/**
 * 登入／註冊等會員認證頁（default、minimal、dcinside 共用）
 * 依各模版 head 定義的 CSS 變數（--bg、--fg、--accent…）著色
 */

.fate-auth-page {
    max-width: 26rem;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 2.5rem;
}

.fate-auth-page__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.45rem;
    letter-spacing: 0.02em;
}

.fate-auth-page__sub {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0 0 1rem;
    line-height: 1.55;
}

.fate-auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
    padding: 1rem 1.05rem;
    background: var(--card, rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow-sm, none);
}

.fate-auth-card label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.fate-auth-card input[type="text"],
.fate-auth-card input[type="password"],
.fate-auth-card input[type="email"] {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg2, var(--bg));
    color: var(--fg);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.fate-auth-card input.input--ok {
    border-color: rgba(63, 185, 80, 0.45);
}

.fate-auth-card input.input--bad {
    border-color: rgba(248, 81, 73, 0.5);
}

.fate-auth-card input.input--wait {
    border-color: rgba(121, 192, 255, 0.35);
}

.fate-auth-card .field-check {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: -0.45rem 0 0.65rem;
    min-height: 1.15em;
}

.fate-auth-card .field-check[hidden] {
    display: none;
}

.fate-auth-card .field-check--ok {
    color: var(--ok, #3fb950);
}

.fate-auth-card .field-check--bad {
    color: #f85149;
}

.fate-auth-card .field-check--wait {
    color: var(--muted);
}

.fate-auth-card button[type="submit"] {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.fate-auth-card button[type="submit"]:hover {
    background: color-mix(in srgb, var(--accent) 25%, transparent);
}

.fate-auth-card button[type="submit"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fate-auth-remember {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.15rem 0 0.75rem;
    cursor: pointer;
}

.fate-auth-remember input {
    margin: 0;
}

.fate-auth-msg {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    line-height: 1.5;
}

.fate-auth-msg--bad {
    color: #f85149;
    background: rgba(248, 81, 73, 0.08);
}

.fate-auth-msg--warn {
    color: #d4a72c;
    background: rgba(212, 167, 44, 0.1);
}

.fate-auth-msg--ok {
    color: var(--ok, #3fb950);
    background: rgba(63, 185, 80, 0.09);
}

.fate-auth-back {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.fate-auth-back a {
    color: var(--accent);
    text-decoration: none;
}

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

/* minimal 淺色模版 */
.fate-theme-minimal .minimal-page.fate-auth-page {
    --fg: var(--min-fg);
    --muted: var(--min-muted);
    --accent: var(--min-accent);
    --line: var(--min-line);
    --card: var(--min-card);
    --bg2: var(--min-bg-subtle);
    --radius: var(--min-radius);
    --shadow-sm: var(--min-shadow);
    --ok: #22863a;
    max-width: var(--min-content);
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.fate-theme-minimal .fate-auth-card button[type="submit"] {
    background: var(--min-accent);
    border-color: var(--min-accent);
    color: #fff;
}

.fate-theme-minimal .fate-auth-card button[type="submit"]:hover {
    background: var(--min-accent-hover);
    border-color: var(--min-accent-hover);
}

/* DC Inside 淺色模版 */
html.fate-theme-dci .fate-auth-card button[type="submit"],
body.fate-theme-dci .fate-auth-card button[type="submit"] {
    background: var(--dci-link, #0066cc);
    border-color: var(--dci-link, #0066cc);
    color: #fff;
}

html.fate-theme-dci .fate-auth-card button[type="submit"]:hover,
body.fate-theme-dci .fate-auth-card button[type="submit"]:hover {
    background: var(--dci-link-hover, #004499);
    border-color: var(--dci-link-hover, #004499);
}

html.fate-theme-dci .fate-auth-msg--bad,
body.fate-theme-dci .fate-auth-msg--bad {
    color: #b91c1c;
    background: #fef2f2;
    border-color: rgba(185, 28, 28, 0.35);
}

html.fate-theme-dci .fate-auth-msg--warn,
body.fate-theme-dci .fate-auth-msg--warn {
    color: #7a5200;
    background: #fff8e6;
    border-color: #d4a72c;
}

html.fate-theme-dci .fate-auth-msg--ok,
body.fate-theme-dci .fate-auth-msg--ok {
    color: #1a5c28;
    background: #eafbea;
    border-color: rgba(34, 134, 58, 0.35);
}
