:root {
    --accent: #475569;
    --bg: #eceef1;
    --card: #ffffff;
    --text: #1d2733;
    --muted: #68727f;
    --border: #d3d8df;
    --radius-input: 8px;
    --radius-card: 14px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem 2rem;
}

.card {
    background: var(--card);
    border: 1px solid #e1e4e9;
    border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 28px rgba(16, 24, 40, 0.07);
    padding: 2.5rem 2.25rem 2.25rem;
    width: 100%;
    max-width: 408px;
}

.brand { text-align: center; margin-bottom: 1.9rem; }
.brand svg { display: inline-block; }
.brand h1 {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0.85rem;
}
.tagline { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; }

.field { margin-bottom: 1.05rem; }
.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #39424e;
}
.field input {
    width: 100%;
    padding: 0.68rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
}
.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.25rem 0 1.25rem;
}
.check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
}
.check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.muted-link { color: var(--accent); font-size: 0.85rem; text-decoration: none; }
.muted-link:hover { text-decoration: underline; }
.muted-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.btn {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter 120ms ease;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn:disabled { opacity: 0.7; cursor: default; }
.btn:disabled:active { transform: none; }
.btn.busy::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error {
    display: none;
    background: #fef2f2;
    border: 1px solid #f5caca;
    color: #b3261e;
    border-radius: var(--radius-input);
    font-size: 0.85rem;
    line-height: 1.45;
    padding: 0.6rem 0.8rem;
    margin-top: 1.05rem;
}

.site-footer {
    margin-top: 1.9rem;
    color: #98a1ad;
    font-size: 0.78rem;
    text-align: center;
}

.notfound { text-align: center; }
.notfound .code {
    font-size: 2.9rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}
.notfound p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.4rem; }

@media (max-width: 480px) {
    .page { padding: 1.5rem 1rem; justify-content: flex-start; }
    .card { padding: 2rem 1.4rem; }
}
