:root {
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --border: #e2e5ea;
    --text: #1c2430;
    --text-muted: #6b7280;
    --accent: #1f3a5f;
    --accent-hover: #16294a;
    --error: #c23b3b;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

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

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.topbar-note {
    font-size: 13px;
    color: var(--text-muted);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
    width: 100%;
    max-width: 360px;
    padding: 32px 28px 28px;
}

.auth-card h1 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 6px;
}

.subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 24px;
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14.5px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbfc;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.12);
    background: #ffffff;
}

.field input.error {
    border-color: var(--error);
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

.remember input {
    margin: 0;
}

.link-muted {
    color: var(--accent);
    text-decoration: none;
}

.link-muted:hover {
    text-decoration: underline;
}

button[type="submit"] {
    width: 100%;
    padding: 11px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease;
}

button[type="submit"]:hover {
    background: var(--accent-hover);
}

button[type="submit"]:disabled {
    cursor: default;
    opacity: 0.85;
}

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

button.loading .btn-spinner {
    display: inline-block;
}

button.loading .btn-label {
    opacity: 0.85;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status {
    margin-top: 14px;
    font-size: 13px;
    color: var(--error);
    min-height: 16px;
    display: none;
}

.status.visible {
    display: block;
}

.footnote {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 22px;
}

.footer {
    text-align: center;
    padding: 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer .dot {
    margin: 0 6px;
}

.footer a {
    color: var(--text-muted);
}
