        :root {
            --brand-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --brand-primary: #667eea;
            --brand-secondary: #764ba2;
            --surface: #f7f8fc;
            --border-soft: #e5e7eb;
            --text-muted-2: #6b7280;
        }
        * { box-sizing: border-box; }
        html, body { height: 100%; }
        body {
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: var(--surface);
            color: #111827;
        }

        .auth-wrap {
            min-height: 100vh;
            display: grid;
            grid-template-columns: 1fr 1fr;
        }
        @media (max-width: 900px) {
            .auth-wrap { grid-template-columns: 1fr; }
            .brand-pane { display: none !important; }
        }

        /* Left: brand panel */
        .brand-pane {
            background: var(--brand-grad);
            color: #fff;
            padding: 3rem;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .brand-pane::before {
            content: '';
            position: absolute;
            top: -120px; right: -120px;
            width: 360px; height: 360px;
            background: rgba(255,255,255,0.08);
            border-radius: 50%;
        }
        .brand-pane::after {
            content: '';
            position: absolute;
            bottom: -140px; left: -100px;
            width: 320px; height: 320px;
            background: rgba(255,255,255,0.06);
            border-radius: 50%;
        }
        .brand-mark {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.1rem;
            font-weight: 600;
            position: relative; z-index: 1;
        }
        .brand-mark .logo {
            width: 38px; height: 38px;
            border-radius: 10px;
            background: rgba(255,255,255,0.18);
            display: inline-flex;
            align-items: center; justify-content: center;
            font-size: 1.2rem;
        }
        .brand-body {
            position: relative;
            z-index: 1;
            max-width: 420px;
        }
        .brand-body h1 {
            font-size: 2.1rem;
            font-weight: 700;
            line-height: 1.2;
            margin: 0 0 1rem 0;
        }
        .brand-body p.lead {
            font-size: 1rem;
            opacity: 0.85;
            margin-bottom: 2rem;
            line-height: 1.55;
        }
        .feature-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .feature-list li {
            display: flex;
            align-items: flex-start;
            gap: 0.85rem;
            margin-bottom: 1rem;
            font-size: 0.92rem;
        }
        .feature-list .check {
            flex-shrink: 0;
            width: 28px; height: 28px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            display: inline-flex;
            align-items: center; justify-content: center;
            font-size: 0.9rem;
        }
        .feature-list .text strong { display: block; margin-bottom: 0.1rem; }
        .feature-list .text small { opacity: 0.8; }

        .brand-footer {
            font-size: 0.78rem;
            opacity: 0.75;
            position: relative;
            z-index: 1;
        }

        /* Right: form panel */
        .form-pane {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 3rem 2rem;
        }
        .form-card {
            width: 100%;
            max-width: 420px;
        }
        .form-head { margin-bottom: 2rem; }
        .form-head h2 { font-weight: 700; font-size: 1.6rem; margin: 0 0 0.4rem 0; color: #111827; }
        .form-head p { color: var(--text-muted-2); margin: 0; font-size: 0.92rem; }

        .form-label {
            font-weight: 500;
            color: #374151;
            font-size: 0.85rem;
            margin-bottom: 0.4rem;
        }
        .form-control {
            border: 1px solid var(--border-soft);
            border-radius: 10px;
            padding: 0.7rem 0.9rem;
            font-size: 0.95rem;
            transition: all 0.15s ease;
        }
        .form-control:focus {
            border-color: var(--brand-primary);
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
            outline: none;
        }

        .input-icon { position: relative; }
        .input-icon .lead-icon {
            position: absolute;
            left: 0.95rem;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 1rem;
            pointer-events: none;
        }
        .input-icon .form-control { padding-left: 2.6rem; }
        .input-icon .toggle-pw {
            position: absolute;
            right: 0.7rem;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--text-muted-2);
            cursor: pointer;
            padding: 0.25rem 0.4rem;
        }
        .input-icon .toggle-pw:hover { color: var(--brand-primary); }
        .input-icon .form-control.with-toggle { padding-right: 2.8rem; }

        .row-extras {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: -0.25rem 0 1.25rem 0;
            font-size: 0.85rem;
        }
        .remember {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            color: #374151;
            cursor: pointer;
            user-select: none;
        }
        .remember input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand-primary); }
        .forgot {
            color: var(--brand-primary);
            text-decoration: none;
            font-weight: 600;
        }
        .forgot:hover { color: var(--brand-secondary); }

        .btn-signin {
            width: 100%;
            background: var(--brand-grad);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 0.8rem 1rem;
            font-weight: 600;
            font-size: 0.95rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.18s ease;
            box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
        }
        .btn-signin:hover {
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
        }
        .btn-signin:active { transform: translateY(0); }

        /* Alerts */
        .alert {
            border-radius: 10px;
            border: none;
            padding: 0.85rem 1rem;
            font-size: 0.88rem;
            display: flex;
            align-items: flex-start;
            gap: 0.6rem;
        }
        .alert-danger {
            background: #fef2f2;
            color: #991b1b;
        }
        .alert-success {
            background: #ecfdf5;
            color: #065f46;
        }
        .alert-info, .alert-warning {
            background: #fef3c7;
            color: #92400e;
        }

        /* Caps lock hint */
        .caps-hint {
            display: none;
            margin-top: 0.4rem;
            font-size: 0.78rem;
            color: #d97706;
            align-items: center;
            gap: 0.3rem;
        }
        .caps-hint.show { display: flex; }

        .secure-tag {
            margin-top: 1.5rem;
            text-align: center;
            color: var(--text-muted-2);
            font-size: 0.78rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }
        .secure-tag i { color: #10b981; }

        .legal {
            margin-top: 2rem;
            text-align: center;
            color: var(--text-muted-2);
            font-size: 0.72rem;
        }
    
