/* ================================================================
   Manggala Furniture — Auth Pages CSS
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Nunito:wght@400;500;600;700&display=swap');

:root {
    --gold:       #C9A84C;
    --gold-light: #E8C96A;
    --gold-dark:  #A07830;
    --gold-pale:  #F7F0E0;
    --gold-muted: #EDE0C4;
    --dark:       #1A1510;
    --dark-2:     #2A2118;
    --cream:      #FAF7F2;
    --text:       #1A1510;
    --text-sub:   #6B5E4A;
    --text-muted: #9A8C7A;
    --border:     #E8DFD0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background: var(--dark);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* ── Left Panel ───────────────────────────────────────────────── */
.login-left {
    flex: 1;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 220px; height: 220px;
    border: 1px solid rgba(201,168,76,0.12);
    border-radius: 50%;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    top: -40px; left: -40px;
    width: 160px; height: 160px;
    border: 1px solid rgba(201,168,76,0.08);
    border-radius: 50%;
}

.deco-line {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.left-logo {
    height: 110px;
    width: auto;
    object-fit: contain;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(201,168,76,0.2));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.left-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.04em;
    text-align: center;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

.left-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    margin-top: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.left-divider {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

.left-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    color: rgba(201,168,76,0.5);
    text-align: center;
    max-width: 260px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ── Right Panel ──────────────────────────────────────────────── */
.login-right {
    width: 420px;
    flex-shrink: 0;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}

/* ── Form ─────────────────────────────────────────────────────── */
.form-header {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.form-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}

.form-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-group {
    width: 100%;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-input::placeholder { color: #C4B9AA; }

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--dark);
    color: var(--gold-light);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: var(--dark-2);
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 4px 16px rgba(201,168,76,0.2);
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--gold-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover { color: var(--gold); }

.form-footer {
    position: absolute;
    bottom: 24px;
    font-size: 11px;
    color: #C4B9AA;
    letter-spacing: 0.05em;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 680px) {
    body {
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        min-height: 100vh;
    }
    .login-left  { display: none; }
    .login-right {
        width: 100%;
        min-height: 100vh;
        background: var(--dark);
        border-radius: 0;
        padding: 48px 24px 36px;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .login-right::before {
        display: block;
        top: 0; left: 0; right: 0;
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
    }

    /* Form input jadi terang di atas background gelap */
    .form-label { color: rgba(255,255,255,0.6); }
    .form-input {
        background: rgba(255,255,255,0.06);
        border-color: rgba(201,168,76,0.25);
        color: #fff;
    }
    .form-input:focus {
        border-color: var(--gold);
        background: rgba(255,255,255,0.09);
        box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    }
    .form-input::placeholder { color: rgba(255,255,255,0.25); }
    .form-title { color: var(--gold-light); }
    .form-sub   { color: rgba(255,255,255,0.4); }
    .form-footer { position: static; margin-top: 32px; text-align: center; color: rgba(255,255,255,0.2); }
    .forgot-link { color: var(--gold); }
    .forgot-link:hover { color: var(--gold-light); }
    .back-link { color: rgba(255,255,255,0.4); }
    .back-link:hover { color: var(--gold); }

    /* Mobile logo teks jadi terang */
    .mobile-logo-title { color: var(--gold-light); }
}

/* Mobile Logo — see responsive section */

/* ── Auth Loader ──────────────────────────────────────────────── */
#auth-loader {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease;
}

#auth-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.auth-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.auth-loader-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    animation: auth-pulse 1.6s ease-in-out infinite;
}

.auth-loader-bar {
    width: 140px;
    height: 2px;
    background: rgba(201,168,76,0.2);
    border-radius: 99px;
    overflow: hidden;
}

.auth-loader-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #A07830, #C9A84C, #E8C96A);
    border-radius: 99px;
    animation: auth-slide 1.2s ease-in-out infinite;
}

@keyframes auth-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(0.96); }
}

@keyframes auth-slide {
    0%   { width: 0%; margin-left: 0%; }
    50%  { width: 80%; margin-left: 10%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ── Back Link ────────────────────────────────────────────────── */
.back-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover { color: var(--gold-dark); }

/* ── Form hint ────────────────────────────────────────────────── */
.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── Btn green ────────────────────────────────────────────────── */
.btn-success {
    width: 100%;
    padding: 12px;
    background: #14532D;
    color: #BBF7D0;
    border: 1px solid #166534;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-success:hover {
    background: #166534;
    box-shadow: 0 4px 16px rgba(21,128,61,0.2);
}

/* ── Alert Override (Tailwind compat) ─────────────────────────── */
.alert-box {
    width: 100%;
    margin-bottom: 16px;
}

/* Tailwind alert classes — override warna supaya sesuai tema */
.bg-green-50  { background: #F0FDF4 !important; }
.bg-red-50    { background: #FEF2F2 !important; }
.bg-blue-50   { background: var(--gold-pale) !important; }
.border-green-200 { border-color: #BBF7D0 !important; }
.border-red-200   { border-color: #FECACA !important; }
.text-green-800   { color: #166534 !important; }
.text-red-800     { color: #991B1B !important; }

/* ── Mobile Logo center fix ───────────────────────────────────── */
.mobile-logo {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.mobile-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.mobile-logo-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-top: 8px;
    letter-spacing: 0.03em;
}