        :root {
            --bg-page: #0f172a;
            --bg-card: #1e293b;
            --bg-input: #0f172a;
            --border: #334155;
            --border-focus: #3b82f6;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --accent: #3b82f6;
            --accent-hover: #2563eb;
            --danger: #ef4444;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            min-height: 100vh;
            background-color: var(--bg-page);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', system-ui, sans-serif;
            color: var(--text-main);
        }

        /* ── Subtle grid pattern on background ── */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(var(--border) 1px, transparent 1px),
                linear-gradient(90deg, var(--border) 1px, transparent 1px);
            background-size: 40px 40px;
            opacity: 0.15;
            pointer-events: none;
            z-index: 0;
        }

        .login-wrapper {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 420px;
            padding: 1rem;
        }

        /* ── Brand header ── */
        .brand {
            text-align: center;
            margin-bottom: 2rem;
        }

        .brand-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 52px;
            height: 52px;
            border-radius: 12px;
            background: var(--accent);
            margin-bottom: 0.75rem;
        }

        .brand-icon i {
            font-size: 1.5rem;
            color: #fff;
        }

        .brand h1 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-main);
            letter-spacing: -0.01em;
        }

        .brand p {
            font-size: 0.8125rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }

        /* ── Card ── */
        .login-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 2rem 1.75rem;
        }

        .login-card h2 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
            color: var(--text-main);
        }

        .login-card .sub {
            font-size: 0.8125rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }

        /* ── Form fields ── */
        .field-group {
            margin-bottom: 1rem;
        }

        .field-group label {
            display: block;
            font-size: 0.8125rem;
            font-weight: 500;
            color: var(--text-muted);
            margin-bottom: 0.375rem;
        }

        .input-wrap {
            position: relative;
        }

        .input-wrap .field-icon {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.9375rem;
            color: var(--text-muted);
            pointer-events: none;
        }

        .input-wrap input {
            width: 100%;
            background: var(--bg-input);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-main);
            font-size: 0.9375rem;
            padding: 0.625rem 0.875rem 0.625rem 2.5rem;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .input-wrap input::placeholder {
            color: #475569;
        }

        .input-wrap input:focus {
            border-color: var(--border-focus);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }

        /* password toggle */
        .toggle-pass {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            padding: 0;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.9375rem;
            line-height: 1;
        }

        .toggle-pass:hover {
            color: var(--text-main);
        }

        /* ── Error alert ── */
        .alert-login {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 8px;
            padding: 0.625rem 0.875rem;
            font-size: 0.8125rem;
            color: #fca5a5;
            margin-bottom: 1.25rem;
        }

        .alert-login i {
            font-size: 0.9375rem;
            flex-shrink: 0;
        }

        /* ── Submit button ── */
        .btn-login {
            width: 100%;
            background: var(--accent);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 0.9375rem;
            font-weight: 500;
            padding: 0.6875rem 1rem;
            margin-top: 0.25rem;
            cursor: pointer;
            transition: background 0.15s, transform 0.1s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .btn-login:hover {
            background: var(--accent-hover);
        }

        .btn-login:active {
            transform: scale(0.98);
        }

        /* ── Footer ── */
        .login-footer {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* ── Status dots (decorative) ── */
        .status-bar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #22c55e;
            flex-shrink: 0;
        }

        .dot.animate {
            animation: pulse-dot 2s infinite;
        }

        @keyframes pulse-dot {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.3;
            }
        }
    
