:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --text: #111827;
    --muted: #6b7280;
    --border: #d9e0ea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    --radius-lg: 28px;
    --radius-md: 16px;
}

body[data-theme="dark"] {
    --bg: #09090b;
    --surface: #111827;
    --surface-2: #1f2937;
    --text: #f9fafb;
    --muted: #9ca3af;
    --border: #374151;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --danger: #f87171;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.16), transparent 35%),
        var(--bg);
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

body[data-theme="light"] .login-shell {
    background: rgba(255, 255, 255, 0.76);
}

.brand-panel {
    padding: 56px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.72)),
        linear-gradient(45deg, rgba(249, 115, 22, 0.35), transparent);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

body[data-theme="dark"] .brand-panel {
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(124, 45, 18, 0.9)),
        linear-gradient(45deg, rgba(37, 99, 235, 0.32), transparent);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    right: -80px;
    bottom: -80px;
}

.logo-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 34px;
}

.brand-panel h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    margin: 0 0 18px;
    letter-spacing: -0.05em;
}

.brand-panel p {
    max-width: 480px;
    font-size: 18px;
    line-height: 1.65;
    opacity: 0.92;
}

.login-panel {
    padding: 56px;
    background: var(--surface);
}

.top-options {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 42px;
}

.pill-link {
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.pill-link.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.login-panel h2 {
    font-size: 34px;
    margin: 0 0 8px;
    letter-spacing: -0.04em;
}

.login-panel .subtitle {
    margin: 0 0 32px;
    color: var(--muted);
    line-height: 1.5;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.25);
    margin-bottom: 18px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

input {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    outline: none;
    font-size: 16px;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

button {
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
    padding: 15px 18px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.dashboard {
    min-height: 100vh;
    padding: 32px;
}

.dashboard-card {
    max-width: 960px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.dashboard-header h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

.logout-link {
    color: #ffffff;
    background: var(--primary);
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 850px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel,
    .login-panel {
        padding: 34px;
    }

    .brand-panel {
        min-height: 280px;
    }
}
