/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE — Luxury Gold / Black Theme
   Art-Deco · Responsive · Mobile-First
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
    --gold:        #d4af37;
    --gold-light:  #f0d060;
    --gold-dark:   #a87c1e;
    --gold-muted:  #c9a84c33;
    --black:       #0a0a0a;
    --black-soft:  #111111;
    --black-card:  #181612;
    --white:       #fdfaf3;
    --white-dim:   #e8e0cc;
    --grey:        #888580;
    --error:       #e53935;
    --success:     #4caf50;
    --radius-lg:   16px;
    --radius-pill: 50px;
    --shadow-gold: 0 0 28px rgba(212,175,55,0.25);
    --shadow-card: 0 32px 80px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.5);
    --transition:  0.45s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'DM Sans', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }

/* ── Body / Page Shell ──────────────────────────────────── */
body {
    font-family: var(--font-body);
    background-color: var(--black);
    background-image:
        url('../images/login-bgG-new.jpg'),
        radial-gradient(ellipse 120% 80% at 50% 0%, #1a1207 0%, #0a0a0a 100%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--white);
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Animated grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ── Page Layout ────────────────────────────────────────── */
.login-register {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    padding: 24px max(16px, env(safe-area-inset-left)) 24px max(16px, env(safe-area-inset-right));
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

/* ── Card (form-container) ──────────────────────────────── */
.form-container {
    position: relative;
    width: 960px;
    max-width: 100%;
    min-height: 580px;
    background: var(--black-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(212,175,55,0.18);

    /* Entrance animation */
    animation: cardReveal 0.8s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(32px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);     }
}

/* Gold top accent line */
.form-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    z-index: 200;
}

/* ── Panels ─────────────────────────────────────────────── */
.form-panel {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 50%;
    transition: opacity var(--transition), transform var(--transition);
    opacity: 0;
    z-index: -1;
    will-change: transform, opacity;
}

.form-panel.active {
    opacity: 1;
    z-index: 2;
}

/* Get-started / Login panels slide from left */
.font-panel  { transform: translateX(-40px); }
.log-in      { transform: translateX(-40px); }
.font-panel.active,
.log-in.active { transform: translateX(0); }

/* Sign-up / Forget panels slide from right */
.sign-up          { transform: translateX(40px); }
.forget-panel     { transform: translateX(40px); }
.forget-otp-panel { transform: translateX(40px); }
.sign-up.active,
.forget-panel.active,
.forget-otp-panel.active { transform: translateX(0); }

/* Right-panel-active: panels shift 0→50% */
.form-container.right-panel-active .font-panel,
.form-container.right-panel-active .log-in {
    transform: translateX(0);
}
.form-container.right-panel-active .sign-up {
    opacity: 1;
    z-index: 5;
    transform: translateX(100%);
    width: 50%;
}

/* ── Overlay Container ──────────────────────────────────── */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform var(--transition);
    z-index: 100;
}

.form-container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

/* ── Overlay Panel ──────────────────────────────────────── */
.form-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            150deg,
            #000000 0%,
            #0f0c02 15%,
            #1a1207 28%,
            #8b6914 42%,
            #d4af37 52%,
            #c9962a 62%,
            #1a1207 76%,
            #080604 90%,
            #000000 100%
        );
    display: flex;
    align-items: stretch;
}

/* Decorative geometric lines on overlay */
.form-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(212,175,55,0.04) 40px,
            rgba(212,175,55,0.04) 41px
        );
    pointer-events: none;
}

.overlay-left,
.overlay-right {
    flex: 1;
	width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0px 0px;
    text-align: center;
    transition: transform var(--transition), opacity var(--transition);
}

.overlay-left  { opacity: 0; transform: translateX(-20px); }
.overlay-right { opacity: 1; transform: translateX(0);     }

.form-container.right-panel-active .overlay-left  { opacity: 1; transform: translateX(0);  }
.form-container.right-panel-active .overlay-right { opacity: 0; transform: translateX(20px); }

.overlay-left  img { width: 100%; max-width: 300px; }
.overlay-right img { width: 100%; max-width: 300px; }

/* ── Sign Form (inner content) ──────────────────────────── */
.sign-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 36px 44px;
    background: var(--black-card);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) transparent;
}

.sign-form::-webkit-scrollbar { width: 4px; }
.sign-form::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }

/* Logo */
.sign-form > a > img {
    width: 130px;
    max-width: 100%;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 12px rgba(212,175,55,0.3));
    transition: transform 0.3s ease;
}
.sign-form > a > img:hover { transform: scale(1.04); }

/* Heading */
.sign-form h1 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--gold);
    margin-bottom: 20px;
    text-align: center;

    /* shimmer effect */
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3.5s linear infinite;
}

@keyframes shimmer {
    from { background-position: 0% center; }
    to   { background-position: 200% center; }
}

/* Labels */
.sign-form label,
.text-start.w-100 label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 5px;
}

/* ── Inputs ─────────────────────────────────────────────── */
.frm-inpt {
    width: 100%;
    padding: 13px 18px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-pill);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.frm-inpt::placeholder { color: var(--grey); }

.frm-inpt:focus {
    border-color: var(--gold);
    background: rgba(212,175,55,0.06);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.12), 0 0 20px rgba(212,175,55,0.08);
}

.frm-inpt[readonly] {
    border-color: rgba(212,175,55,0.35);
    background: rgba(212,175,55,0.04);
    color: var(--white-dim);
    cursor: default;
}

/* Validation states */
.textbox-background-error {
    background-color: rgba(229,57,53,0.08) !important;
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(229,57,53,0.12) !important;
}

.textbox-background-ok {
    background-color: rgba(76,175,80,0.06) !important;
    border-color: var(--success) !important;
}

/* ── Password Container ──────────────────────────────────── */
.password-container {
    position: relative;
    width: 100%;
}

.password-container .frm-inpt {
    padding-right: 46px;
    margin-bottom: 12px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-60%);
    background: none;
    border: none;
    color: var(--grey);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.password-toggle:hover { color: var(--gold); }
.password-toggle:focus { outline: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.sign-btn {
    width: 100%;
    padding: 13px 20px;
    margin: 14px 0 6px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark));
    background-size: 200% 100%;
    border: none;
    border-radius: var(--radius-pill);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-position 0.4s ease, transform 0.12s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(212,175,55,0.35);
    position: relative;
    overflow: hidden;
}

.sign-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.12), transparent);
    pointer-events: none;
}

.sign-btn:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(212,175,55,0.5);
}

.sign-btn:active { transform: scale(0.97); }

.sign-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Overlay sign-in / sign-up ghost buttons */
#signin, #signup {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    box-shadow: none;
    font-size: 11px;
    letter-spacing: 0.15em;
    padding: 11px 32px;
    width: auto;
    min-width: 140px;
    margin: 8px 0;
}

#signin:hover, #signup:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 10px 0;
    color: var(--grey);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.25), transparent);
}

/* ── Google Button ──────────────────────────────────────── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-pill);
    color: var(--white-dim);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.15s, box-shadow 0.25s;
    letter-spacing: 0.02em;
}

.btn-google svg { flex-shrink: 0; width: 18px; height: 18px; }

.btn-google:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(212,175,55,0.45);
    box-shadow: 0 4px 18px rgba(212,175,55,0.15);
    transform: translateY(-1px);
    color: var(--white);
    text-decoration: none;
}

.btn-google:active { transform: scale(0.97); }

/* ── Inline Alert ────────────────────────────────────────── */
.form-alert {
    display: none;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 12px;
    border-left: 3px solid transparent;
    animation: alertSlide 0.3s ease both;
}

.form-alert i {
    font-size: 14px;
    flex-shrink: 0;
    vertical-align: -1px;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-alert.alert-error {
    color: #ff8a8a;
    background: rgba(229,57,53,0.12);
    border-left-color: var(--error);
    box-shadow: inset 0 0 20px rgba(229,57,53,0.06), 0 2px 8px rgba(229,57,53,0.1);
}

.form-alert.alert-success {
    color: #a5d6a7;
    background: rgba(76,175,80,0.12);
    border-left-color: var(--success);
    box-shadow: inset 0 0 20px rgba(76,175,80,0.06), 0 2px 8px rgba(76,175,80,0.1);
}

/* ── Utility links / back buttons ────────────────────────── */
.back-to-login {
    background: none;
    border: none;
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
    padding: 4px;
    letter-spacing: 0.03em;
}

.back-to-login:hover { color: var(--gold-light); }

.back-to-font {
    background: none;
    border: none;
    color: var(--grey);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.back-to-font:hover { color: var(--gold); }

/* ── Log-back row ────────────────────────────────────────── */
.log-back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-top: 4px;
}

.log-back .sign-btn { margin: 0; width: auto; flex: 1; min-width: 120px; }

/* ── Forgot password link ────────────────────────────────── */
#show-forget {
    background: none;
    border: none;
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    align-self: flex-end;
    margin: -4px 0 6px;
    padding: 0;
    transition: color 0.2s;
}

#show-forget:hover { color: var(--gold-light); }

/* ── Back to home link ───────────────────────────────────── */
.back-home { margin-top: 12px; }

.back-home a {
    color: var(--grey) !important;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.back-home a:hover { color: var(--gold) !important; }

/* ── Social Icons ────────────────────────────────────────── */
.social-fixed-icons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-fixed-icons .wa img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.social-fixed-icons .wa img:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(37,211,102,0.4);
}

/* ── General utility ─────────────────────────────────────── */
.btn { cursor: pointer; }
.w-100 { width: 100%; }
.text-start { text-align: left; }

/* ── Overlay Text ────────────────────────────────────────── */
.form-overlay h2 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── Signup btn shorthand ─────────────────────────────────── */
.signup-btn { margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 640px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* Fix iOS background-attachment: fixed bug */
    body {
        background-attachment: scroll;
    }

    .login-register {
        padding: 16px 12px;
        padding: 16px max(12px, env(safe-area-inset-left)) 16px max(12px, env(safe-area-inset-right));
        align-items: center;
    }

    /* Card becomes a tall single-column card */
    .form-container {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        max-height: none;
        border-radius: 14px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,0.75), 0 0 0 1px rgba(212,175,55,0.15);
    }

    /* Hide the overlay branding strip on mobile */
    .overlay-container { display: none !important; }

    /* All panels go full-width */
    .form-panel {
        width: 100% !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        height: auto !important;
        min-height: auto;
        pointer-events: none;
        transform: none !important;
    }

    .form-panel.active {
        pointer-events: auto;
    }

    /* Stack panels; only active one shows */
    .form-panel:not(.active) {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        visibility: hidden;
        opacity: 0;
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden;
        pointer-events: none;
    }

    .form-panel.active {
        position: relative !important;
        visibility: visible;
        opacity: 1;
        transform: none !important;
        z-index: 2;
    }

    /* Reset right-panel-active transforms that don't apply on mobile */
    .form-container.right-panel-active .sign-up {
        transform: none !important;
        width: 100% !important;
    }

    .form-container.right-panel-active .log-in {
        transform: none !important;
    }

    /* Inner form */
    .sign-form {
        padding: 28px 22px 32px;
        min-height: auto;
        justify-content: flex-start;
        padding-top: 32px;
    }

    .sign-form > a > img {
        width: 100px;
        margin-bottom: 14px;
    }

    .sign-form h1 {
        font-size: 24px;
        margin-bottom: 14px;
    }

    .frm-inpt {
        padding: 12px 16px;
        font-size: 16px;     /* prevent iOS zoom — must be ≥16px */
        margin-bottom: 10px;
    }

    .sign-btn {
        padding: 14px 20px;
        font-size: 12px;
        margin: 12px 0 4px;
    }

    .log-back {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .log-back .sign-btn { width: 100%; min-width: unset; }

    #show-forget { align-self: flex-start; }

    .divider { margin: 8px 0; }

    .btn-google { padding: 13px 16px; font-size: 14px; }

    .form-alert {
        font-size: 12px;
        padding: 10px 14px;
    }

    .social-fixed-icons {
        bottom: 16px;
        right: 14px;
    }

    .social-fixed-icons .wa img {
        width: 40px;
        height: 40px;
    }
}

/* ── Extra-small screens (≤ 380px, e.g. iPhone SE) ───────── */
@media (max-width: 380px) {
    .login-register {
        padding: 10px 8px;
    }

    .sign-form {
        padding: 22px 16px 28px;
    }

    .sign-form > a > img {
        width: 80px;
        margin-bottom: 10px;
    }

    .sign-form h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .sign-form label,
    .text-start.w-100 label {
        font-size: 10px;
    }

    .frm-inpt {
        padding: 11px 14px;
    }

    .sign-btn {
        padding: 13px 16px;
        font-size: 11px;
    }

    .btn-google {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* ── Tablet (641px – 900px) ─────────────────────────────── */
@media (min-width: 641px) and (max-width: 900px) {
    .form-container { min-height: 560px; }
    .sign-form { padding: 28px 32px; }
    .sign-form > a > img { width: 110px; }

    .overlay-left img,
    .overlay-right img { max-width: 220px; }
}

/* ── Large screens (≥ 1100px) ───────────────────────────── */
@media (min-width: 1100px) {
    .sign-form { padding: 40px 52px; }
}

/* ── Landscape mobile ───────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .login-register {
        align-items: flex-start;
        padding-top: 12px;
    }

    .sign-form {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .sign-form > a > img {
        width: 60px;
        margin-bottom: 8px;
    }

    .sign-form h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }
}