/* auth */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --gold:       #c9a84c;
            --gold-light: #e8d5a3;
            --gold-pale:  #fdf8ee;
            --ink:        #1a1610;
            --ink-soft:   #3d3528;
            --muted:      #7a7060;
            --cream:      #faf8f4;
        }
        [data-theme="dark"] { --cream: #0a0a0a; --ink: #f5f0e8; --ink-soft: rgba(245,240,232,0.72); --muted: rgba(245,240,232,0.5); }

        body {
            font-family: 'DM Sans', sans-serif;
            min-height: 100vh;
            display: grid;
            grid-template-columns: 1fr 1fr;
            -webkit-font-smoothing: antialiased;
            background: var(--cream);
        }

        /* ── Left decorative panel ── */
        .auth-panel-left {
            background: linear-gradient(200deg, #1e1912 0%, #2d2618 45%, #1a1610 100%);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 48px 52px;
            position: relative;
            overflow: hidden;
        }

        .auth-panel-left::before {
            content: '';
            position: absolute;
            top: -100px; right: -100px;
            width: 500px; height: 500px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(201,168,76,0.12), transparent 65%);
            pointer-events: none;
            animation: auth-orb-float 8s ease-in-out infinite;
        }

        @keyframes auth-orb-float {
            0%, 100% { transform: translate(0, 0); }
            50% { transform: translate(-30px, 20px); }
        }

        .auth-panel-left::after {
            content: '"';
            position: absolute;
            bottom: -40px; left: 30px;
            font-family: 'Cormorant Garamond', serif;
            font-size: 22rem;
            font-weight: 300;
            color: rgba(201,168,76,0.04);
            line-height: 1;
            pointer-events: none;
        }

        .auth-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            position: relative;
            z-index: 1;
        }

        .auth-brand-icon { display:flex; align-items:center; justify-content:center; margin-bottom:16px; }

        .auth-brand-name {
            font-family: 'Cormorant Garamond', serif;
            font-size: 24px;
            font-weight: 600;
            color: #f5ede0;
            letter-spacing: 0.06em;
            display: block;
        }

        .auth-brand-logo {
            height: 76px;
            max-width: 220px;
            object-fit: contain;
        }

        .auth-brand-sub {
            font-size: 10px;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: rgba(245,237,224,0.35);
            display: block;
            margin-top: 1px;
        }

        .auth-panel-quote {
            position: relative;
            z-index: 1;
        }

        .auth-panel-quote p {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.85rem;
            font-weight: 300;
            font-style: italic;
            color: rgba(245,237,224,0.75);
            line-height: 1.4;
            margin-bottom: 20px;
        }

        .auth-panel-quote p em {
            color: var(--gold);
            font-style: italic;
        }

        .quote-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .quote-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 7px 13px;
            border-radius: 999px;
            border: 1px solid rgba(201,168,76,0.2);
            background: rgba(201,168,76,0.06);
            font-size: 0.74rem;
            color: rgba(245,237,224,0.5);
            letter-spacing: 0.04em;
        }

        .quote-chip i { color: var(--gold); font-size: 0.7rem; opacity: 0.8; }

        /* ── Animated invitation preview (center) ── */
        .auth-invite-preview {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 0;
            position: relative;
            z-index: 1;
        }

        .auth-invite-card {
            width: min(280px, 85%);
            aspect-ratio: 0.72;
            background: linear-gradient(165deg, #fdf9f0 0%, #f5ede0 40%, #ebe0d0 100%);
            border-radius: 12px 12px 16px 16px;
            box-shadow:
                0 4px 0 rgba(0,0,0,0.15),
                0 16px 48px rgba(0,0,0,0.45),
                0 0 0 1px rgba(201,168,76,0.2),
                inset 0 1px 0 rgba(255,255,255,0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 28px 24px;
            position: relative;
            overflow: hidden;
            opacity: 0;
            transform: translateY(16px) scale(0.97);
            animation: auth-invite-enter 1s cubic-bezier(0.22,1,0.36,1) 0.3s forwards;
        }
        .auth-invite-card:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow:
                0 6px 0 rgba(0,0,0,0.12),
                0 24px 64px rgba(0,0,0,0.5),
                0 0 0 1px rgba(201,168,76,0.3),
                0 0 48px rgba(201,168,76,0.08),
                inset 0 1px 0 rgba(255,255,255,0.9);
            transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease;
        }

        .auth-invite-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
            opacity: 0.9;
        }

        .auth-invite-logo {
            width: 100%;
            max-width: 180px;
            height: auto;
            object-fit: contain;
        }

        @keyframes auth-invite-enter {
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* ── Right form panel ── */
        .auth-panel-right {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 48px 40px;
        }

        .auth-form-wrap {
            width: 100%;
            max-width: 380px;
            animation: auth-form-enter 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
        }

        @keyframes auth-form-enter {
            from { opacity: 0; transform: translateY(24px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .auth-form-wrap .form-field:nth-child(1) { animation: fade-up 0.5s 0.1s both; }
        .auth-form-wrap .form-field:nth-child(2) { animation: fade-up 0.5s 0.2s both; }
        .auth-form-wrap .form-field:nth-child(3) { animation: fade-up 0.5s 0.3s both; }
        @keyframes fade-up {
            from { opacity: 0; transform: translateY(16px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .auth-form-eyebrow {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.68rem;
            letter-spacing: 0.24em;
            text-transform: uppercase;
            color: var(--gold);
            font-weight: 600;
            margin-bottom: 12px;
        }

        .eyebrow-line {
            width: 24px; height: 1px;
            background: var(--gold);
            opacity: 0.6;
        }

        .auth-form-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 2.6rem;
            font-weight: 300;
            color: var(--ink);
            line-height: 1.1;
            margin-bottom: 8px;
        }

        .auth-form-title em { font-style: italic; color: var(--gold); }

        .auth-form-sub {
            font-size: 0.88rem;
            color: var(--muted);
            margin-bottom: 36px;
            font-weight: 300;
            line-height: 1.55;
        }

        /* Error */
        .auth-error {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 13px 16px;
            background: #fff0f2;
            border: 1px solid rgba(220, 53, 69, 0.25);
            border-radius: 12px;
            color: #b91c1c;
            font-size: 0.83rem;
            margin-bottom: 20px;
        }

        .auth-error i { font-size: 0.9rem; flex-shrink: 0; }

        /* Fields */
        .form-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 16px;
        }

        .form-field label {
            font-size: 0.72rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--muted);
            font-weight: 500;
        }

        .input-wrap {
            position: relative;
        }

        .input-wrap i {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--muted);
            font-size: 0.85rem;
            pointer-events: none;
            transition: color 0.2s;
        }

        .form-input {
            width: 100%;
            padding: 13px 16px 13px 42px;
            border: 1px solid rgba(201,168,76,0.25);
            border-radius: 12px;
            background: var(--gold-pale);
            color: var(--ink);
            font-size: 0.92rem;
            font-family: 'DM Sans', sans-serif;
            outline: none;
            transition: all 0.22s;
        }

        .form-input::placeholder { color: #b5a898; }

        .form-input:focus {
            border-color: var(--gold);
            background: #fff;
            box-shadow: 0 0 0 4px rgba(201,168,76,0.1), 0 4px 16px rgba(201,168,76,0.08);
            transform: translateY(-1px);
        }

        .form-input:focus + i,
        .input-wrap:focus-within i {
            color: var(--gold);
        }

        .input-wrap i { left: auto; }
        .input-wrap .input-icon-left {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--muted);
            font-size: 0.82rem;
            pointer-events: none;
            transition: color 0.2s;
            z-index: 1;
        }

        .input-wrap:focus-within .input-icon-left { color: var(--gold); }

        /* Password toggle */
        .input-eye {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--muted);
            cursor: pointer;
            font-size: 0.85rem;
            padding: 4px;
            transition: color 0.2s;
        }
        .input-eye:hover { color: var(--gold); }

        /* Submit */
        .btn-auth {
            width: 100%;
            padding: 15px;
            border-radius: 999px;
            border: none;
            background: linear-gradient(135deg, #d4a843, var(--gold));
            background-size: 200% 100%;
            color: #fff;
            font-size: 0.92rem;
            font-weight: 600;
            font-family: 'DM Sans', sans-serif;
            letter-spacing: 0.08em;
            cursor: pointer;
            box-shadow: 0 6px 24px rgba(201,168,76,0.38);
            transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
            margin-top: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            position: relative;
            overflow: hidden;
        }

        .btn-auth::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 45%, rgba(255,255,255,0.05) 50%, transparent 55%);
            background-size: 300% 100%;
            animation: auth-btn-shimmer 4s ease-in-out infinite;
        }

        @keyframes auth-btn-shimmer {
            0% { background-position: 150% 0; }
            50% { background-position: -50% 0; }
            100% { background-position: 150% 0; }
        }

        .btn-auth:hover {
            transform: translateY(-2px) scale(1.01);
            box-shadow: 0 14px 40px rgba(201,168,76,0.5);
        }

        .btn-auth:active {
            transform: translateY(0) scale(0.99);
            box-shadow: 0 4px 16px rgba(201,168,76,0.3);
        }

        .btn-auth-google {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            text-decoration: none;
            background: #fff !important;
            color: #3c4043 !important;
            border: 1.5px solid #dadce0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .btn-auth-google:hover {
            background: #f8f9fa !important;
            border-color: #c6c9cc;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .btn-auth-google svg { flex-shrink: 0; }

        .auth-divider {
            display: flex;
            align-items: center;
            gap: 14px;
            margin: 24px 0;
            color: rgba(122,112,96,0.5);
            font-size: 0.75rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .auth-divider::before,
        .auth-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: rgba(201,168,76,0.18);
        }

        .auth-footer-links {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            margin-top: 4px;
        }

        .auth-link {
            font-size: 0.84rem;
            color: var(--muted);
            text-decoration: none;
            transition: color 0.2s;
            font-weight: 300;
        }

        .auth-link span { color: var(--gold); font-weight: 500; }
        .auth-link:hover { color: var(--gold); }

        /* Mobile */
        @media (max-width: 820px) {
            body {
                grid-template-columns: 1fr;
                width: 100%;
                max-width: 100vw;
                overflow-x: clip;
                min-height: 100dvh;
            }
            .auth-panel-left { display: none; }
            .auth-panel-right {
                padding: max(52px, calc(env(safe-area-inset-top) + 24px)) 20px max(28px, env(safe-area-inset-bottom));
                min-height: 100dvh;
                width: 100%;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            .auth-form-wrap {
                max-width: 100%;
                width: 100%;
                padding-top: 8px;
            }
            .auth-form-title {
                font-size: clamp(1.65rem, 7vw, 2rem);
                line-height: 1.15;
            }
            .auth-form-sub {
                margin-bottom: 1.25rem;
            }
            .form-field {
                margin-bottom: 1rem;
            }
            .form-row-remember {
                margin-top: 0.75rem;
                margin-bottom: 1rem;
                gap: 0.75rem;
            }
            .auth-form-wrap input,
            .auth-form-wrap select,
            .auth-form-wrap textarea {
                font-size: 16px !important;
                min-height: 48px;
                width: 100%;
                padding: 12px 14px !important;
            }
            .auth-submit,
            .btn-auth {
                min-height: 50px;
                width: 100%;
                margin-top: 0.5rem;
            }
        }