/* BLI Frontend Auth Styles
   Theme: Forest Green + Amber  (Bethany Land Institute)
*/

:root {
    --bf-auth-bg-0: #f0fdf4;
    --bf-auth-bg-1: #fefce8;
    --bf-auth-bg-2: #ecfdf5;
    --bf-auth-bg-3: #fef9c3;

    --bf-auth-text:    #0f2318;
    --bf-auth-muted:   #3d5a47;
    --bf-auth-muted-2: #5a7a65;
    --bf-auth-border:  #d1e7d8;

    --bf-auth-primary:   #166534;   /* BLI forest green */
    --bf-auth-secondary: #d97706;   /* BLI amber/orange */
    --bf-auth-accent:    #22c55e;   /* bright green */

    --bf-auth-card-bg:     rgba(255, 255, 255, 0.96);
    --bf-auth-card-border: rgba(255, 255, 255, 0.6);

    --bf-auth-radius-lg: 24px;
    --bf-auth-radius-md: 14px;

    --bf-auth-shadow: 0 20px 60px rgba(15, 50, 25, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

html,
body,
.o_login_page {
    height: 100%;
}

body,
body.o_database_list {
    background: linear-gradient(
        135deg,
        #f0fdf4 0%,
        #fef9c3 28%,
        #ecfdf5 60%,
        #fefce8 100%
    ) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.o_login_page {
    background: transparent !important;
}

@keyframes bf-blob-float {
    0%,  100% { transform: translate(0, 0) scale(1); }
    25%        { transform: translate(30px, -30px) scale(1.06); }
    50%        { transform: translate(-20px, 20px) scale(0.95); }
    75%        { transform: translate(20px, 30px) scale(1.03); }
}

/* ── FULL-PAGE WRAPPER ───────────────────────────────── */
.bf-auth-page {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    padding-top: 4rem;
    position: relative;
    overflow: hidden;
}

/* ── ANIMATED BLOBS ──────────────────────────────────── */
.bf-auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.50;
    animation: bf-blob-float 22s ease-in-out infinite;
}
.bf-auth-blob--1 {
    width: 520px; height: 520px;
    background: linear-gradient(135deg, var(--bf-auth-primary) 0%, var(--bf-auth-secondary) 100%);
    top: -220px; right: -220px;
}
.bf-auth-blob--2 {
    width: 420px; height: 420px;
    background: linear-gradient(135deg, var(--bf-auth-secondary) 0%, var(--bf-auth-accent) 100%);
    bottom: -170px; left: -170px;
    animation-delay: 6s;
}
.bf-auth-blob--3 {
    width: 340px; height: 340px;
    background: linear-gradient(135deg, var(--bf-auth-accent) 0%, #fde68a 100%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 12s;
}

/* ── LAYOUT ──────────────────────────────────────────── */
.bf-auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 0 auto;
}

.bf-auth-container--single {
    grid-template-columns: 1fr;
    max-width: 500px;
}

/* ── CARD ────────────────────────────────────────────── */
.bf-auth-card {
    background: var(--bf-auth-card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--bf-auth-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--bf-auth-shadow);
    border: 1px solid var(--bf-auth-card-border);
}

/* ── HEADER ──────────────────────────────────────────── */
.bf-auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.bf-auth-logo {
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bf-auth-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.10));
}

.bf-auth-logo-fallback {
    width: 64px; height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bf-auth-primary) 0%, var(--bf-auth-secondary) 100%);
    border-radius: 18px;
    color: white;
    box-shadow: 0 10px 30px rgba(22, 101, 52, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.bf-auth-title {
    font-size: 30px;
    font-weight: 900;
    margin: 0 0 0.5rem;
    color: var(--bf-auth-text);
    letter-spacing: -0.5px;
}

.bf-auth-subtitle {
    color: var(--bf-auth-muted);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* ── FORM ────────────────────────────────────────────── */
.bf-auth-form {
    margin-bottom: 1.25rem;
}

.bf-auth-card .oe_login_form,
.bf-auth-card .oe_signup_form,
.bf-auth-card .oe_reset_password_form {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.bf-auth-field {
    margin-bottom: 1.1rem;
}

.bf-auth-field--float {
    position: relative;
}

.bf-auth-float-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bf-auth-muted-2);
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
    transition: transform 160ms ease, top 160ms ease, font-size 160ms ease, color 160ms ease;
    background: transparent;
}

.bf-auth-field--float .bf-auth-input {
    padding-top: 22px;
    padding-bottom: 10px;
}

.bf-auth-field--float .bf-auth-input:focus + .bf-auth-float-label,
.bf-auth-field--float .bf-auth-input:not(:placeholder-shown) + .bf-auth-float-label {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    color: var(--bf-auth-primary);
}

.bf-auth-field--float .bf-auth-input[readonly] + .bf-auth-float-label {
    color: var(--bf-auth-muted-2);
}

/* ── INPUT ───────────────────────────────────────────── */
.bf-auth-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.bf-auth-input {
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--bf-auth-radius-md);
    border: 2px solid var(--bf-auth-border);
    background: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    color: var(--bf-auth-text);
    transition: border-color 150ms ease, box-shadow 150ms ease;
    box-sizing: border-box;
}

.bf-auth-input:focus {
    outline: none;
    border-color: rgba(22, 101, 52, 0.5);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.12);
}

.bf-auth-input-wrap {
    position: relative;
}

.bf-auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(71, 85, 105, 0.80);
    pointer-events: none;
}

.bf-auth-input--with-icon {
    padding-left: 46px;
}

/* ── ALERTS ──────────────────────────────────────────── */
.bf-auth-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid;
}

.bf-auth-alert--error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.bf-auth-alert--success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.bf-auth-alert--info {
    color: #14532d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* ── LINKS ───────────────────────────────────────────── */
.bf-auth-link-row {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 16px;
}

.bf-auth-link {
    color: var(--bf-auth-primary);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.bf-auth-link:hover { text-decoration: underline; }

/* ── BUTTON ──────────────────────────────────────────── */
.bf-auth-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 900;
    font-size: 15px;
    color: white;
    background: linear-gradient(135deg, var(--bf-auth-primary) 0%, var(--bf-auth-secondary) 100%);
    box-shadow: 0 12px 32px rgba(22, 101, 52, 0.22), 0 8px 22px rgba(217, 119, 6, 0.16);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.bf-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(22, 101, 52, 0.28), 0 10px 28px rgba(217, 119, 6, 0.22);
}

/* ── FOOTER ──────────────────────────────────────────── */
.bf-auth-footer {
    text-align: center;
    color: var(--bf-auth-muted);
    font-size: 13px;
    margin-top: 4px;
}

.bf-auth-footer a {
    color: var(--bf-auth-primary);
    font-weight: 900;
    text-decoration: none;
}

.bf-auth-footer a:hover { text-decoration: underline; }

/* ── INFO PANEL (right side on login) ───────────────── */
.bf-auth-info { display: block; }

.bf-auth-info-inner {
    padding: 28px 26px;
    border-radius: var(--bf-auth-radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.bf-auth-info-title {
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.4px;
    margin: 0 0 10px;
    color: var(--bf-auth-text);
}

.bf-auth-info-text {
    margin: 0 0 18px;
    color: var(--bf-auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.bf-auth-feature-list {
    display: grid;
    gap: 12px;
}

.bf-auth-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bf-auth-feature-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bf-auth-primary) 0%, var(--bf-auth-secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(22, 101, 52, 0.20);
    flex-shrink: 0;
}

.bf-auth-feature-text {
    color: var(--bf-auth-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    padding-top: 7px;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
    .bf-auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .bf-auth-info { display: none; }
    .bf-auth-page { padding-top: 2rem; }
}
