:root {
    color-scheme: dark light;
    --bg: #0b0d10;
    --ink: #eef1f4;
    --muted: #9aa3ad;
    --accent: #c5ccd4;
    --font: "Segoe UI", "Helvetica Neue", sans-serif;
    --display: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
    --line: rgba(197, 204, 212, 0.22);
    --metal: linear-gradient(105deg, #8a939c 0%, #e8edf2 28%, #ffffff 42%, #b4bcc6 55%, #9aa3ad 72%, #dce2e8 100%);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #e7ebf0;
        --ink: #1c2128;
        --muted: #5c6570;
        --accent: #6d7680;
        --line: rgba(28, 33, 40, 0.12);
        --metal: linear-gradient(105deg, #4a525c 0%, #8b949e 28%, #c5ccd3 42%, #6a7380 58%, #2f353c 100%);
    }
}

html, body.james-body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
}

.james-glow {
    position: fixed;
    width: 42rem;
    height: 42rem;
    left: 50%;
    top: 38%;
    background: radial-gradient(circle, rgba(197, 204, 212, 0.2) 0%, transparent 68%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: james-breathe 8s ease-in-out infinite;
}

.james-login-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 2.4rem;
    box-sizing: border-box;
}

.james-login-brand {
    text-align: center;
    margin: 0 0 1.5rem;
}

.james-wordmark {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
    letter-spacing: 0.04em;
    line-height: 0.95;
    margin: 0 0 0.5rem;
    background-image: var(--metal);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: james-sheen 7s ease-in-out infinite;
}

.james-role {
    font-family: var(--display);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--accent);
    margin: 0;
}

@keyframes james-sheen {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes james-breathe {
    0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

.modalLoading {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .james-glow,
    .james-wordmark {
        animation: none !important;
    }
    .james-wordmark { background-position: 40% 50%; }
}
