:root {
    --primary: #556ee6;
    --primary-dark: #405189;
    --bg: #f4f7f6;
    --card-bg: #fff;
    --text: #495057;
    --text-muted: #74788d;
    --border: #e9ecef;
    --danger: #f46a6a;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #eef2ff 0%, var(--bg) 45%, #f8fafc 100%);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px 28px;
    box-shadow: 0 12px 40px rgba(64, 81, 137, 0.08);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.auth-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.auth-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.auth-hint {
    font-size: 12px;
    color: var(--text-muted);
    background: #f8f9fc;
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.auth-hint strong {
    color: var(--primary-dark);
}

.auth-alert {
    background: rgba(244, 106, 106, 0.1);
    border: 1px solid rgba(244, 106, 106, 0.25);
    color: #c0392b;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

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

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.15);
}

.btn-submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 9999;
    min-width: 240px;
    max-width: 90vw;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    pointer-events: none;
}

.auth-toast--error {
    background: #fff5f5;
    color: #c0392b;
    border: 1px solid rgba(244, 106, 106, 0.35);
}

.auth-toast--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.auth-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }
}
