/*
 * 缠论复盘：全站色板与顶栏（海军蓝顶栏 + 白底内容）
 */
:root {
    --navy: #0E1A2B;
    --navy-2: #1A2940;
    --paper: #F4F5F7;
    --surface: #FFFFFF;
    --ink: #15171C;
    --ink-2: #3A404B;
    --muted: #6E7581;
    --faint: #A2A8B3;
    --rule: #E3E6EB;
    --rule-soft: #EEF0F3;
    --up: #D23B3B;
    --down: #138A6A;
    --pivot: #3A3DB5;
    --pivot-soft: rgba(58, 61, 181, 0.08);
    --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
    --radius: 6px;
}

/* ---------- 顶栏 ---------- */
.topbar {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 0 28px;
    background: var(--navy);
    color: #C9D1DD;
}
.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.brand small {
    color: #7F8BA0;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
}
.topnav { display: flex; gap: 4px; height: 100%; }
.topnav a {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #9AA6B8;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    transition: color .15s;
}
.topnav a:hover { color: #FFFFFF; }
.topnav a.active { color: #FFFFFF; border-bottom-color: #8C8FF0; }
.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #7F8BA0;
    white-space: nowrap;
}
.topbar-right a { color: #C9D1DD; }
.topbar-right a:hover { color: #FFFFFF; }
.menu-btn { display: none; background: none; border: 0; color: #FFFFFF; padding: 6px 0; cursor: pointer; }

/* 旧版 Bootstrap 页面：顶栏放在 container-fluid 里，抵消它的左右留白 */
.topbar.legacy { margin: 0 -15px 16px; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.topbar.legacy a:hover, .topbar.legacy a:focus { text-decoration: none; }
@media (max-width: 760px) {
    .topbar { gap: 16px; padding: 0 16px; }
    .topnav, .topbar-right .who, #asof, .brand small { display: none; }
    .menu-btn { display: block; }
    .topbar.open { flex-wrap: wrap; height: auto; padding-bottom: 8px; }
    .topbar.open .topnav { display: flex; flex-wrap: wrap; order: 3; width: 100%; height: auto; }
    .topbar.open .topnav a { padding: 8px 10px; }
}

/* 旧版页面的工具条（放在顶栏下方靠右） */
.page-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: -4px 0 12px; }
.page-tools .input-group { width: 320px; }

/* 登录、创建账号 */
.auth-page { margin: 0; min-height: 100vh; background: var(--paper); font: 13px/1.5 var(--sans); color: var(--ink);
             display: flex; align-items: center; justify-content: center; -webkit-font-smoothing: antialiased; }
.auth-card { width: 360px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--rule);
             border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 32px rgba(14, 26, 43, 0.06); }
.auth-card .auth-head { padding: 22px 28px; background: var(--navy); color: #FFFFFF; }
.auth-card .auth-head .brand { font-size: 17px; }
.auth-card .auth-head p { margin: 6px 0 0; color: #7F8BA0; font-size: 12px; }
.auth-card form { padding: 24px 28px 28px; }
.auth-card label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.auth-card input[type=text], .auth-card input[type=password] {
    width: 100%; height: 38px; padding: 0 12px; margin-bottom: 16px; border: 1px solid var(--rule); border-radius: var(--radius);
    background: var(--paper); font: 14px var(--sans); color: var(--ink); outline: none; box-sizing: border-box; }
.auth-card input:focus { border-color: var(--pivot); background: var(--surface); }
.auth-card button { width: 100%; height: 40px; margin-top: 4px; border: 0; border-radius: var(--radius); background: var(--navy);
                    color: #FFFFFF; font: 600 14px var(--sans); letter-spacing: 0.1em; cursor: pointer; }
.auth-card button:hover { background: var(--navy-2); }
.auth-error { margin-bottom: 16px; padding: 10px 12px; border-left: 2px solid var(--up); background: rgba(210, 59, 59, 0.06);
              color: #9E2A2A; font-size: 12px; }
.auth-foot { margin: 16px 0 0; text-align: center; font-size: 12px; }
.auth-foot a { color: var(--pivot); }
