/* ===== 登录/注册页样式 ===== */

:root {
    --primary: #2260cc;
    --primary-hover: #1a4ea8;
    --bg: #f5f6f8;
    --surface: #fff;
    --border: #e8eaef;
    --text: #1d2129;
    --text-secondary: #77818c;
    --text-tertiary: #a1a9b3;
    --radius: 8px;
    --radius-sm: 5px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.auth-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: var(--bg);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34,96,204,.08);
    background: var(--surface);
}

.error-msg {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid #fecaca;
}

.error-msg.hidden { display: none; }

.btn-primary {
    width: 100%;
    padding: 11px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
    font-family: inherit;
    height: 44px;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .5; pointer-events: none; }

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

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }
