:root {
    --bg: #0f172a;         /* slate-900 */
    --card: #0b1022cc;     /* translucent */
    --card-border: #1e293b;/* slate-800 */
    --text: #e2e8f0;       /* slate-200 */
    --muted: #94a3b8;      /* slate-400 */
    --primary: #6366f1;    /* indigo-500 */
    --primary-600: #4f46e5;/* indigo-600 */
    --ring: #a5b4fc;       /* indigo-300 */
    --error: #ef4444;      /* red-500 */
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background:
    radial-gradient(1200px 600px at 10% 10%, #1e293b 0%, transparent 60%),
    radial-gradient(1000px 500px at 90% 20%, #1f2937 0%, transparent 55%),
    linear-gradient(180deg, #0b1022 0%, #0f172a 100%);
    display: grid;
    place-items: center;
    min-height: 100svh;
}

.card {
    width: min(92vw, 420px);
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 28px;
}

.logo {
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    gap: 12px;
    text-align: center;
}

.logo img {
    width: 64px; height: 64px; border-radius: 14px; display: block;
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
}

.logo .brand { font-weight: 700; letter-spacing: .3px; }
.logo .sub { color: var(--muted); font-size: .95rem; }

form { display: grid; gap: 14px; margin-top: 8px; }

label { font-size: .9rem; color: var(--muted); }

.field { display: grid; gap: 6px; }

.control {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: #0b1029;
    border: 1px solid #243047;
    border-radius: 12px;
    overflow: hidden;
}

input[type="text"], input[type="password"] {
    appearance: none;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    width: 100%;
}

.toggle {
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 0 12px;
    height: 100%;
    font-size: .9rem;
}

.actions { margin-top: 6px; display: grid; gap: 10px; }

button[type="submit"] {
    appearance: none;
    background: var(--primary);
    border: 1px solid var(--primary-600);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 6px 16px rgba(99,102,241,.35);
}

button[type="submit"]:hover { background: var(--primary-600); }
button[type="submit"]:active { transform: translateY(1px); }

.foot {
    margin-top: 8px;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

/* Accessibility focus */
.control:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Light theme (auto) */
@media (prefers-color-scheme: light) {
    :root {
    --bg: #f1f5f9;
    --card: #ffffffcc;
    --card-border: #e2e8f0;
    --text: #0f172a;
    --muted: #475569;
    --ring: #818cf8;
    }
    body {
    background:
        radial-gradient(1200px 600px at 10% 10%, #dbeafe 0%, transparent 60%),
        radial-gradient(1000px 500px at 90% 20%, #e2e8f0 0%, transparent 55%),
        linear-gradient(180deg, #eef2ff 0%, #f1f5f9 100%);
    }
    .control { background: #f8fafc; border-color: #e2e8f0; }
    input[type="text"], input[type="password"] { color: #0f172a; }
    .logo img { box-shadow: 0 6px 20px rgba(99,102,241,.25); }
}