/* Login-only stylesheet -- keep tiny so /login stays a single small CSS round-trip. */
:root {
    --color-ink: #12213a;
    --color-panel: #ffffff;
    --color-accent: #2f6f5e;
    --color-accent-dark: #234f42;
    --color-line: #dfe3e8;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius-control: 10px;
    --radius-panel: 14px;
    --ease-mac: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-mac: 0 10px 30px -10px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --border-light: 1px solid rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--color-ink);
    color: var(--color-ink);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.5);
    background-clip: content-box;
}

main.login {
    max-width: 380px;
    margin: 8rem auto 0;
    padding: 0 1.25rem 3rem;
}

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: var(--border-light);
    border-radius: var(--radius-panel);
    padding: 1.5rem;
    box-shadow: var(--shadow-mac);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.login-lang {
    display: flex;
    justify-content: flex-end;
    margin: -0.35rem -0.15rem 0.75rem;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-option {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 3.5rem;
    height: 2.5rem;
    padding: 0 0.4rem;
    text-decoration: none;
    color: #5a6575;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.lang-option img {
    display: block;
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.lang-option.is-active {
    color: var(--color-accent-dark);
    border-color: rgba(47, 111, 94, 0.4);
    background: rgba(47, 111, 94, 0.1);
}

.lang-sep {
    display: none;
}

.lang-sep {
    align-self: center;
    color: #98a2b3;
    font-size: 0.75rem;
    padding-bottom: 0.85rem;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}

.muted {
    color: #5b6472;
    font-size: 0.9rem;
}

.error-box {
    background: rgba(253, 236, 236, 0.92);
    border: 1px solid #f2c6c2;
    color: #a3312a;
    padding: 1rem;
    border-radius: var(--radius-panel);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-mac);
}

form.stack label {
    display: block;
    margin: 0.6rem 0 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

form.stack input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: var(--border-light);
    border-radius: var(--radius-control);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s var(--ease-mac), box-shadow 0.2s var(--ease-mac);
}

form.stack input:focus {
    outline: none;
    border-color: rgba(47, 111, 94, 0.45);
    box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.15);
}

button {
    margin-top: 1rem;
    width: 100%;
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-control);
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.2s var(--ease-mac);
    box-shadow: 0 4px 12px -2px rgba(47, 111, 94, 0.28);
}

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

button:active {
    transform: scale(0.98);
}
