/* ============================================================
   课程签到助手 · 设计系统
   ============================================================ */
:root {
    --bg: #131c2e;
    --bg-soft: #182238;
    --panel: #1b2540;
    --panel-2: #212c4b;
    --panel-3: #2a3757;
    --border: #36435f;
    --border-soft: #2b3852;
    --text: #f3f7ff;
    --text-2: #ccd6ea;
    --muted: #98a5c4;
    --primary: #5b8cff;
    --primary-2: #3f6df0;
    --ok: #2fd37a;
    --err: #ff5c72;
    --warn: #ffb020;
    --pink: #ff5fa2;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
    --shadow-soft: 0 6px 22px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: radial-gradient(1200px 620px at 8% -12%, #24365f 0, transparent 62%),
                radial-gradient(900px 520px at 100% 0, #2a2350 0, transparent 58%),
                var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none; }

a { color: var(--primary); text-decoration: none; }

/* ---------------- 通用控件 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .12s;
    white-space: nowrap;
}

.btn:hover { border-color: var(--primary); background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(91, 140, 255, .28);
}

.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff8b9b; border-color: #4a2331; }
.btn.danger:hover { background: #3a1c27; color: #fff; }
.btn.small { padding: 6px 11px; font-size: 12px; }
.btn.tiny { padding: 4px 9px; font-size: 11px; border-radius: 8px; }
.btn.block { width: 100%; }

.input {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}

.input::placeholder { color: #5f6b87; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 140, 255, .14); }
.input.narrow { max-width: 140px; }
.input.wide { flex: 2; }
.input.search { max-width: 210px; }
.input.select { max-width: 150px; }

.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.pink { color: var(--pink); }
.right { text-align: right; }
.break { word-break: break-all; }
.ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 登录 ---------------- */
.login-wrap {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.login-glow {
    position: absolute;
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(91, 140, 255, .22), transparent 62%);
    filter: blur(20px);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 400px;
    background: linear-gradient(180deg, rgba(28, 38, 62, .92), rgba(18, 26, 43, .96));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 34px 32px 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.login-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #8a5bff);
    box-shadow: 0 10px 26px rgba(91, 140, 255, .35);
    margin-bottom: 16px;
}

.login-card h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: 1px; }

.login-card .author {
    color: var(--pink);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 95, 162, .35);
    margin-bottom: 12px;
}

.login-sub { color: var(--muted); font-size: 12px; margin: 0 0 22px; line-height: 1.7; }
.field-label { display: block; color: var(--text-2); font-size: 12px; margin: 0 0 6px; }
.login-card .input { margin-bottom: 14px; padding: 11px 13px; }
.login-card .btn.block { margin-top: 6px; padding: 11px; font-size: 14px; }
.login-tip { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 224px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(18, 26, 43, .96), rgba(12, 18, 31, .96));
    border-right: 1px solid var(--border-soft);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #8a5bff);
    box-shadow: 0 8px 20px rgba(91, 140, 255, .32);
}

.brand-text strong { display: block; font-size: 15px; letter-spacing: .4px; }
.brand-text .author { display: block; color: var(--pink); font-size: 11px; font-weight: 700; letter-spacing: 1px; }

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, color .15s;
    position: relative;
}

.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: rgba(91, 140, 255, .13); color: #d6e3ff; }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.nav-icon { width: 16px; display: inline-flex; justify-content: center; font-size: 13px; }
.nav-badge {
    margin-left: auto;
    background: var(--pink);
    color: #fff;
    font-size: 10px;
    border-radius: 20px;
    padding: 1px 7px;
}

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; }
.avatar {
    width: 32px; height: 32px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel-3);
    color: var(--text); font-weight: 700; font-size: 13px;
}
.user-name { font-size: 13px; }
.user-role { font-size: 11px; color: var(--muted); }

.main { flex: 1; padding: 24px 28px 40px; max-width: 1500px; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.topbar h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: .3px; }
.topbar-sub { margin: 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.clock { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------------- 统计卡 ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }

.stat-card {
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute; right: -20px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 140, 255, .16), transparent 70%);
}

.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-value.ok { color: var(--ok); }
.stat-value.err { color: var(--err); }
.stat-unit { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat-hint { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* ---------------- 面板 ---------------- */
.panel {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-tip { margin: -4px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.badge {
    display: inline-block;
    background: rgba(255, 255, 255, .16);
    border-radius: 20px;
    padding: 0 7px;
    font-size: 11px;
    margin-left: 4px;
}

/* ---------------- 课程卡 ---------------- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 13px;
}

.course-card {
    background: linear-gradient(180deg, var(--panel-2), var(--bg-soft));
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px 15px 12px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}

.course-card:hover {
    border-color: rgba(91, 140, 255, .45);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.course-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.course-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta { color: var(--muted); font-size: 11px; margin-top: 6px; display: flex; gap: 5px; }
.course-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.course-info { display: flex; flex-direction: column; gap: 2px; }
.course-count { font-size: 11px; color: var(--text-2); }
.course-time { font-size: 10px; color: var(--muted); }

/* ---------------- 状态药丸 ---------------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.pill.ok { color: var(--ok); border-color: rgba(47, 211, 122, .35); background: rgba(47, 211, 122, .1); }
.pill.err { color: var(--err); border-color: rgba(255, 92, 114, .35); background: rgba(255, 92, 114, .1); }
.pill.warn { color: var(--warn); border-color: rgba(255, 176, 32, .35); background: rgba(255, 176, 32, .1); }
.pill.run { color: var(--primary); border-color: rgba(91, 140, 255, .4); background: rgba(91, 140, 255, .12); }
.pill.muted { color: var(--muted); }

.type-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(91, 140, 255, .12);
    color: #a9c1ff;
    font-size: 10px;
    margin-left: 4px;
}

/* ---------------- 开关 ---------------- */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute; inset: 0;
    background: #2a3450;
    border-radius: 20px;
    transition: background .18s;
    cursor: pointer;
}
.switch span::after {
    content: "";
    position: absolute;
    width: 15px; height: 15px;
    left: 3px; top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s;
}
.switch input:checked + span { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.switch input:checked + span::after { transform: translateX(17px); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; background: rgba(255, 255, 255, .015); }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------------- 表单行 ---------------- */
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.form-row .input { flex: 1; min-width: 150px; }
.form-row .input.narrow { flex: 0 0 140px; }
.form-row .input.wide { flex: 2; min-width: 240px; }
.form-row .btn { flex: 0 0 auto; }

/* ---------------- 弹窗 / 日志 ---------------- */
.mask {
    position: fixed; inset: 0;
    background: rgba(4, 8, 16, .66);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 22px;
    z-index: 60;
}

.modal {
    width: 560px;
    max-width: 100%;
    max-height: 84vh;
    overflow: auto;
    background: linear-gradient(180deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    animation: pop .18s ease;
}

.modal.wide { width: 780px; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.log-list { display: flex; flex-direction: column; }
.log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border-soft);
}
.log-item:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.log-dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(47, 211, 122, .6); }
.log-dot.err { background: var(--err); box-shadow: 0 0 10px rgba(255, 92, 114, .55); }
.log-dot.warn { background: var(--warn); }
.log-dot.run { background: var(--primary); }
.log-main { flex: 1; min-width: 0; }
.log-title { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.log-msg { color: var(--muted); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ---------------- 图片 ---------------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.img-card { border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.img-card img { width: 100%; height: 112px; object-fit: cover; display: block; }
.img-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 11px; color: var(--muted); }

.qr-detail { display: grid; grid-template-columns: 1fr 200px; gap: 18px; align-items: start; }
.qr-img { width: 200px; border-radius: 10px; border: 1px solid var(--border); }
.kv { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-soft); font-size: 12px; }
.kv span { color: var(--muted); width: 70px; flex-shrink: 0; }
.kv b { font-weight: 500; }

/* ---------------- 空态 / toast ---------------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-title { font-size: 15px; color: var(--text-2); margin-bottom: 6px; }
.empty-sub { font-size: 12px; line-height: 1.7; }

.toasts { position: fixed; right: 22px; top: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast {
    min-width: 220px;
    max-width: 380px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 12px;
    box-shadow: var(--shadow-soft);
    animation: slide .2s ease;
}
.toast.error { border-left-color: var(--err); }
.toast.success { border-left-color: var(--ok); }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .main { padding: 62px 16px 24px; }
    .main { padding: 16px; }
    .qr-detail { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   像素字 · 顶部运行天数 · 摄像头扫码 · 邮箱 / 通知
   ============================================================ */
.pixel-gold {
    font-family: "Courier New", ui-monospace, Consolas, monospace;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffd24a;
    text-shadow: 2px 0 0 #9a6a12, -2px 0 0 #9a6a12, 0 2px 0 #9a6a12, 0 -2px 0 #9a6a12,
                 2px 2px 0 #6b4a10, 4px 4px 0 rgba(0, 0, 0, .35);
    image-rendering: pixelated;
}

.pixel-pink {
    font-family: "Courier New", ui-monospace, Consolas, monospace;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ff5fa2;
    text-shadow: 1.5px 0 0 #b32261, -1.5px 0 0 #b32261, 0 1.5px 0 #b32261, 0 -1.5px 0 #b32261,
                 2px 2px 0 #7d123f, 3px 3px 0 rgba(0, 0, 0, .3);
    image-rendering: pixelated;
}

.brand-text .pixel-pink { font-size: 11px; }
.login-card .pixel-pink { font-size: 16px; margin-bottom: 12px; }

.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.topbar-center { text-align: center; }
.topbar-center .pixel-gold { font-size: 13px; white-space: nowrap; }
.topbar-actions { justify-self: end; }

.site-days {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
}
.site-days .pixel-gold { font-size: 15px; }

/* ---------------- 摄像头扫码 ---------------- */
.camera-modal { width: 620px; }
.camera-stage {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #05070d;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
}
.camera-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame {
    position: absolute;
    inset: 16%;
    border: 2px solid rgba(91, 140, 255, .85);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45), 0 0 22px rgba(91, 140, 255, .55) inset;
    animation: scanPulse 1.8s ease-in-out infinite;
}
@keyframes scanPulse {
    0%, 100% { border-color: rgba(91, 140, 255, .85); }
    50% { border-color: rgba(255, 95, 162, .85); }
}
.camera-tip { color: var(--muted); font-size: 12px; text-align: center; margin: 10px 0 0; }
.camera-error { color: var(--err); font-size: 12px; text-align: center; margin: 10px 0 0; }

/* ---------------- 邮箱绑定 ---------------- */
.email-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.email-quick .muted { font-size: 12px; }
.modal-actions { margin-top: 18px; }

/* ---------------- 通知预览 / 文本域 ---------------- */
.textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
    font-family: inherit;
}
.notice-preview { margin-top: 16px; }
.preview-label { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.preview-box {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--bg-soft);
    font-size: 13px;
    line-height: 1.8;
}
.preview-title { font-weight: 700; color: #cfe0ff; }
.preview-body { color: var(--text-2); white-space: pre-wrap; margin-top: 6px; }
.preview-sign { color: var(--muted); font-size: 11px; margin-top: 10px; }

/* ---------------- 照片默认标记 ---------------- */
.img-card.is-default { border-color: rgba(47, 211, 122, .55); box-shadow: 0 0 0 1px rgba(47, 211, 122, .25); }

@media (max-width: 900px) {
    .topbar { grid-template-columns: 1fr; }
    .topbar-center { order: 3; text-align: left; }
    .topbar-actions { justify-self: start; }
}

/* ============================================================
   本轮：金色跳动天数 / 普通作者名 / 居中确认 / 自动扫码提示
   ============================================================ */
.author-name {
    color: #ff5fa2;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}
.brand-text .author-name { display: block; font-size: 11px; margin-top: 2px; }
.login-card .author-name { font-size: 16px; margin-bottom: 12px; letter-spacing: 1px; }

/* 金色大字：跳三下 → 淡出 → 停 2 秒 → 再来一次 */
.days-jump {
    display: inline-block;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffd24a;
    text-shadow: 0 0 18px rgba(255, 200, 60, .55), 0 2px 0 #a8741a, 0 4px 10px rgba(0, 0, 0, .45);
    animation: daysJump 6s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes daysJump {
    0%   { transform: translateY(0) scale(.94); opacity: 0; }
    6%   { transform: translateY(-16px) scale(1.06); opacity: 1; }
    12%  { transform: translateY(0) scale(1); }
    18%  { transform: translateY(-12px); }
    24%  { transform: translateY(0); }
    30%  { transform: translateY(-8px); }
    36%  { transform: translateY(0); }
    50%  { transform: translateY(0); opacity: 1; }
    58%  { transform: translateY(-4px); opacity: 0; }
    100% { transform: translateY(-4px); opacity: 0; }
}

.topbar-center .days-jump { font-size: 21px; }
.site-days .days-jump { font-size: 19px; }

/* 居中确认弹窗 */
.confirm-modal {
    width: 420px;
    text-align: center;
    padding: 26px 24px 20px;
}
.confirm-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #ffb020;
    background: rgba(255, 176, 32, .12);
    border: 1px solid rgba(255, 176, 32, .35);
}
.confirm-icon.danger {
    color: var(--err);
    background: rgba(255, 92, 114, .12);
    border-color: rgba(255, 92, 114, .35);
}
.confirm-modal h3 { margin: 0 0 8px; font-size: 17px; }
.confirm-message { color: var(--text-2); font-size: 13px; line-height: 1.7; margin: 0 0 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 110px; padding: 9px 16px; }

.btn.danger-solid {
    background: linear-gradient(135deg, #ff5c72, #d93a52);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 92, 114, .28);
}
.btn.danger-solid:hover { filter: brightness(1.06); }

/* 自动扫码提示块 */
.auto-hint {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px dashed rgba(91, 140, 255, .35);
    border-radius: 12px;
    background: rgba(91, 140, 255, .06);
}
.auto-hint-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #a9c1ff;
    background: rgba(91, 140, 255, .14);
}
.auto-hint-title { font-size: 13px; font-weight: 600; }
.auto-hint-sub { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.6; }

/* ============================================================
   上传控件（自定义文件选择）
   ============================================================ */
.hidden-file { display: none; }

.upload-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.upload-picker {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .12s;
    min-height: 62px;
}

.upload-picker:hover { border-color: var(--primary); background: rgba(91, 140, 255, .06); }
.upload-picker:active { transform: scale(.995); }
.upload-picker.filled { border-style: solid; border-color: rgba(91, 140, 255, .45); }

.upload-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--panel-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-thumb.placeholder { color: #7f8bab; font-size: 20px; }
.upload-meta { min-width: 0; }
.upload-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.upload-name { flex: 1 1 180px; }
.upload-submit { flex: 0 0 auto; min-width: 92px; }

/* ============================================================
   全局顺滑：过渡 / 滚动 / 触控反馈
   ============================================================ */
html { scroll-behavior: smooth; }
body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    text-rendering: optimizeLegibility;
}
.table-wrap { -webkit-overflow-scrolling: touch; }
.nav { -webkit-overflow-scrolling: touch; }

.main > * { animation: pageIn .22s ease both; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.btn { -webkit-user-select: none; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.nav-item:active { transform: scale(.99); }
.course-card:active { transform: scale(.995); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   手机端专项（≤ 640px）
   ============================================================ */
@media (max-width: 640px) {
    body { font-size: 14px; }

    .layout { flex-direction: column; }
    .brand-logo { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
    .nav-item { min-height: 46px; }
    .sidebar-foot .btn { min-height: 42px; }

    .main { padding: 14px 12px calc(28px + env(safe-area-inset-bottom)); }
    .topbar { grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
    .topbar h2 { font-size: 18px; }
    .topbar-sub { font-size: 11px; }
    .topbar-center { order: 3; text-align: left; }
    .topbar-center .days-jump { font-size: 16px; letter-spacing: .5px; }
    .topbar-actions { justify-self: start; gap: 8px; }
    .clock { display: none; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 12px 13px; }
    .stat-value { font-size: 22px; }
    .stat-hint { font-size: 10px; }

    .panel { padding: 14px 13px; border-radius: 12px; }
    .panel-head { gap: 8px; }
    .panel-actions { width: 100%; }
    .panel-actions .input.search { max-width: none; flex: 1 1 100%; }
    .panel-actions .btn { flex: 1 1 auto; min-height: 38px; }

    .course-grid { grid-template-columns: 1fr; gap: 10px; }
    .course-card { padding: 13px 13px 11px; }

    .form-row { flex-direction: column; align-items: stretch; }
    .form-row .input, .form-row .input.narrow, .form-row .input.wide,
    .form-row .btn, .form-row select { width: 100%; max-width: none; flex: 1 1 auto; min-height: 42px; }
    .upload-row { flex-direction: column; }
    .upload-picker { flex: 0 0 auto; width: 100%; }
    .upload-name { flex: 0 0 auto; width: 100%; min-height: 44px; }
    .upload-submit { flex: 0 0 auto; width: 100%; min-height: 44px; }

    .input, select, textarea { font-size: 16px; } /* 防止 iOS 聚焦放大 */
    .btn { min-height: 40px; }
    .btn.small, .btn.tiny { min-height: 34px; }

    .table-wrap { margin: 0 -4px; }
    .table th, .table td { padding: 9px 10px; white-space: nowrap; }
    .table td.ellipsis { max-width: 140px; }

    .modal, .modal.wide { width: 100%; max-height: 88vh; padding: 16px; border-radius: 14px; }
    .confirm-modal { width: 100%; }
    .mask { padding: 12px; }
    .camera-modal { width: 100%; }
    .camera-stage { aspect-ratio: 3 / 4; }

    .img-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .img-card img { height: 96px; }
    .img-meta { flex-wrap: wrap; }

    .log-item { flex-wrap: wrap; gap: 8px; }
    .log-main { flex: 1 1 100%; order: 2; }
    .log-item .pill { order: 3; }
    .log-item .rel { order: 4; margin-left: auto; }
    .log-dot { order: 1; }

    .login-wrap { padding: 16px; align-items: flex-start; padding-top: 12vh; }
    .login-card { width: 100%; padding: 26px 20px 22px; border-radius: 16px; }
    .login-card h1 { font-size: 23px; }
    .site-days { top: 18px; }
    .site-days .days-jump { font-size: 14px; }

    .qr-detail { grid-template-columns: 1fr; }
    .qr-img { width: 100%; max-width: 260px; }
    .toasts { left: 12px; right: 12px; top: 12px; }
    .toast { min-width: 0; max-width: none; }
}

/* Cookie 登录备用通道 */
.login-alt { margin-top: 12px; text-align: center; font-size: 12px; }
.login-alt a { color: var(--muted); }
.login-alt a:hover { color: var(--primary); }
.cookie-box { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cookie-box .textarea { min-height: 86px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.cookie-box .login-tip code { color: #a9c1ff; }

/* 摄像头安全上下文提示与手动兜底 */
.camera-tip { margin-top: 12px; padding: 10px 12px; border-radius: 10px;
    background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .35);
    color: #ffce7a; font-size: 12px; line-height: 1.6; }
.camera-tip a { color: #ffd89a; text-decoration: underline; }
.manual-box { margin-top: 12px; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.manual-head { display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; cursor: pointer; font-size: 13px; color: var(--muted); }
.manual-head:hover { color: #fff; }
.manual-arrow { font-size: 11px; color: var(--primary); }
.manual-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 9px; }
.manual-body .textarea { min-height: 84px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* 管理端用户卡片（移动端） */
.user-cards { display: none; }
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
    .user-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
    .user-card { border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px; background: var(--panel-2); }
    .user-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .user-card-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12px; color: var(--muted); }
    .user-card-row b { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }
    .user-card .btn { margin-top: 10px; }
    /* 移动端表格统一允许横向滑动并给出阴影提示 */
    .table-wrap { position: relative; }
}

@media (max-width: 640px) {
    .admin-user-table { display: none; }
}

/* 邮箱验证码输入 */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .input { flex: 1 1 auto; min-width: 0; }
.code-btn { flex: 0 0 auto; min-width: 108px; white-space: nowrap; }
@media (max-width: 640px) {
    .code-btn { min-width: 96px; font-size: 12px; padding-left: 10px; padding-right: 10px; }
}

.help-list { margin: 8px 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.help-list code { color: #a9c1ff; }

.map-modal { width: min(720px, 94vw); max-height: 90vh; overflow: auto; }
.addr-map { height: 380px; margin-top: 10px; border-radius: 8px; overflow: hidden; }
.map-results { max-height: 180px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }
.map-result { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.map-result:last-child { border-bottom: 0; }
.map-result:hover { background: rgba(90,140,255,.12); }
.map-result .muted { margin-left: 8px; font-size: 12px; }

.manual-code { display: inline-flex; gap: 4px; align-items: center; margin-right: 6px; }
.manual-code .input.tiny { width: 92px; height: 28px; padding: 0 6px; font-size: 12px; }

/* 限频/告警提示条 */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.7;
}
.alert.warn {
    border-color: rgba(255, 176, 32, .45);
    background: rgba(255, 176, 32, .08);
    color: #ffd27a;
}
.alert.warn b { color: #ffb020; }

/* 表格内联口令输入框 */
.input.tiny { padding: 4px 8px; font-size: 11px; border-radius: 8px; }


/* ===== 手势签到九宫格 / 签到码键盘 ===== */
.modal-x {
    position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; line-height: 1;
    border: 0; border-radius: 8px; background: transparent; color: var(--muted);
    font-size: 20px; cursor: pointer;
}
.modal-x:hover { background: rgba(255,255,255,.08); color: #fff; }
.pad-wrap {
    position: relative; width: min(78vw, 300px); height: min(78vw, 300px);
    margin: 12px auto 0; touch-action: none; user-select: none;
}
.pad-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;overflow:visible}
.pad-grid{position:relative;z-index:1;
    position: absolute; inset: 0; display: grid;
    grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.pad-dot {
    display: flex; align-items: center; justify-content: center; margin: 10px;
    border-radius: 50%; background: #1f2937; color: #9ca3af; font-size: 17px;
    transition: background .12s, color .12s, transform .12s;
}
.pad-dot.on { background: #3b82f6; color: #fff; transform: scale(1.06); }
.pad-seq { text-align: center; margin-top: 10px; min-height: 22px; letter-spacing: 2px; font-size: 14px; }
.code-display {
    margin: 6px auto 0; text-align: center; font-size: 24px; letter-spacing: 10px;
    min-height: 34px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 12px auto 0; }
.key {
    padding: 14px 0; text-align: center; border-radius: 10px; background: #1f2937;
    color: #e5e7eb; font-size: 18px; cursor: pointer; user-select: none;
}
.key:active { background: #374151; }
.key.ghost { color: var(--muted); font-size: 15px; }
@media (max-width: 480px) {
    .pad-wrap { width: 84vw; height: 84vw; }
    .keypad { max-width: 88vw; }
}

.code-input{width:100%;box-sizing:border-box;padding:12px 14px;border-radius:10px;border:1px solid #2a3550;background:#0f1729;color:#e6ecff;font-size:14px;letter-spacing:.5px;margin-bottom:8px}
.code-input::placeholder{color:#5b6b8c}


/* 签到记录分页条（2026-11-05） */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 2px;
    font-size: 12.5px;
    flex-wrap: wrap;
}
.pager .muted { color: var(--muted, #8b9ab8); }
.pager-actions { display: flex; align-items: center; gap: 8px; }
.pager-actions .select { width: auto; min-width: 96px; }
.pager .btn:disabled { opacity: .4; cursor: not-allowed; }

.table td.nowrap, .table th.nowrap { white-space: nowrap; }

/* 登录页管理员入口（2026-11-05） */
.admin-entry {
    display: inline-block;
    margin: -6px 0 14px;
    font-size: 12.5px;
    color: var(--muted, #8b9ab8);
    text-decoration: none;
    border-bottom: 1px dashed rgba(139, 154, 184, .45);
    transition: color .15s, border-color .15s;
}
.admin-entry:hover { color: var(--brand, #6c8cff); border-color: rgba(108, 140, 255, .7); }

/* 首屏加载占位 */
.app-loading {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #8b9ab8;
    font-size: 13px;
}
.app-loading .spinner {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid rgba(108, 140, 255, .25);
    border-top-color: #6c8cff;
    animation: ocs-spin .8s linear infinite;
}
@keyframes ocs-spin { to { transform: rotate(360deg); } }
/* ============================================================
   移动端抽屉式侧栏（≤ 900px）：功能块固定在左侧滑出，
   不再把导航堆在页面顶部挤占首屏。
   ============================================================ */
.nav-toggle { display: none; }
.nav-mask { display: none; }

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        position: fixed;
        top: calc(10px + env(safe-area-inset-top));
        left: 12px;
        width: 44px;
        height: 44px;
        padding: 0 11px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: rgba(26, 36, 64, .92);
        backdrop-filter: blur(8px);
        z-index: 70;
        cursor: pointer;
        box-shadow: var(--shadow-soft);
    }
    /* 图标由 .nav-toggle-icon 内部的 i 画，别让 span 规则命中文字标签 */
    .nav-toggle-icon i {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .nav-mask {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 74;
        background: rgba(6, 10, 20, .52);
        backdrop-filter: blur(2px);
        animation: maskIn .18s ease-out;
    }
    @keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(262px, 78vw);
        height: 100vh;
        height: 100dvh;
        z-index: 75;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
        border-right: 1px solid var(--border);
        background: linear-gradient(180deg, var(--panel-2), var(--panel));
        transform: translateX(-104%);
        transition: transform .22s cubic-bezier(.22, .61, .36, 1);
        overflow-y: auto;
        box-shadow: none;
    }
    .sidebar.open {
        transform: none;
        box-shadow: 18px 0 48px rgba(0, 0, 0, .45);
    }
    .sidebar .brand { padding: 4px 6px 14px; }
    .sidebar .nav {
        flex-direction: column;
        gap: 6px;
        overflow: visible;
        flex: 0 0 auto;
    }
    .sidebar .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 14px;
        font-size: 14.5px;
        border-radius: 12px;
        min-width: 0;
        text-align: left;
    }
    .sidebar .nav-item.active::before { display: block; }
    .sidebar .nav-icon { font-size: 17px; }
    .sidebar .sidebar-foot {
        margin: auto 0 0;
        padding: 14px 0 0;
        border-top: 1px solid var(--border-soft);
    }
    .sidebar .user-chip { display: flex; }
    .main { padding: calc(66px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
    .main { padding-left: 12px; padding-right: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   帮助页（签到说明 + 意见反馈）
   ============================================================ */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.help-card {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px 16px 14px;
    background: var(--panel-2);
}
.help-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: nowrap; }
.help-card-head h4 { flex: 1 1 auto; }
.help-card-head h4 { margin: 0; font-size: 15px; letter-spacing: .2px; }
.help-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 24px;
    padding: 0 9px;
    border-radius: 7px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #cfe0ff;
    background: rgba(91, 140, 255, .18);
    border: 1px solid rgba(91, 140, 255, .35);
}
.help-desc { margin: 0 0 8px; color: var(--text-2); font-size: 13px; line-height: 1.65; }
.help-points { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.help-points-wide { padding-left: 20px; font-size: 13px; line-height: 2; }
.help-points-wide b { color: var(--text); font-weight: 600; }
.help-textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.help-meta { display: flex; justify-content: flex-end; margin: 6px 2px 10px; font-size: 12px; }

/* ============================================================
   移动端汉堡按钮：图标 + 「菜单」字样
   ============================================================ */
@media (max-width: 900px) {
    .nav-toggle {
        flex-direction: row;
        align-items: center;
        gap: 7px;
        width: auto;
        min-width: 78px;
        padding: 0 12px 0 10px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
    }
    .nav-toggle-icon { display: flex; flex-direction: column; gap: 3px; width: 16px; }
    .nav-toggle-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
    .nav-toggle-label { letter-spacing: .5px; white-space: nowrap; }
    .nav-toggle:active .nav-toggle-icon i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    .nav-toggle:active .nav-toggle-icon i:nth-child(2) { opacity: 0; }
    .nav-toggle:active .nav-toggle-icon i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
    .nav-toggle-icon i { transition: transform .2s ease, opacity .2s ease; }
}

/* ============================================================
   明亮主题（一键切换，localStorage 记住）
   ============================================================ */
body.theme-bright {
    --bg: #eef3fb;
    --bg-soft: #f6f9ff;
    --panel: #ffffff;
    --panel-2: #f5f8ff;
    --panel-3: #eaf0fb;
    --border: #d3ddeb;
    --border-soft: #e2e9f4;
    --text: #16202f;
    --text-2: #43536b;
    --muted: #6a7a93;
    --primary: #2f6bff;
    --primary-2: #1f56e0;
    --ok: #0f9d58;
    --err: #d93a4d;
    --warn: #b7791f;
    --pink: #d6417f;
    --shadow: 0 16px 40px rgba(26, 45, 80, .12);
    --shadow-soft: 0 4px 16px rgba(26, 45, 80, .08);
    background: radial-gradient(1200px 620px at 8% -12%, #dce8ff 0, transparent 62%),
                radial-gradient(900px 520px at 100% 0, #ece4ff 0, transparent 58%),
                var(--bg);
    color: var(--text);
}
body.theme-bright .sidebar {
    background: linear-gradient(180deg, #ffffff, #f4f8ff);
    border-right-color: var(--border);
}
body.theme-bright .nav-item:hover { background: #eaf1ff; color: var(--text); }
body.theme-bright .nav-item.active { background: rgba(47, 107, 255, .12); color: #14418f; }
body.theme-bright .topbar h2, body.theme-bright .brand-text strong { color: var(--text); }
body.theme-bright .panel { box-shadow: var(--shadow-soft); }
body.theme-bright .table th { color: var(--muted); }
body.theme-bright .table tr:hover td { background: #f3f7ff; }
body.theme-bright .input, body.theme-bright .select, body.theme-bright textarea {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text);
}
body.theme-bright .input::placeholder, body.theme-bright textarea::placeholder { color: #93a2b8; }
body.theme-bright .btn { background: #ffffff; border-color: var(--border); color: var(--text); }
body.theme-bright .btn:hover { background: #f2f6ff; }
body.theme-bright .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
body.theme-bright .btn.primary:hover { background: var(--primary-2); }
body.theme-bright .help-badge { color: #1c4bb0; background: rgba(47, 107, 255, .12); border-color: rgba(47, 107, 255, .3); }
body.theme-bright .help-card { background: #f8fbff; border-color: var(--border-soft); }
body.theme-bright .login-card { background: #ffffff; box-shadow: var(--shadow); }
body.theme-bright .toast { background: #ffffff; color: var(--text); box-shadow: var(--shadow); }
body.theme-bright .days-jump {
    color: #b8860b;
    text-shadow: 0 1px 0 #fff, 0 6px 18px rgba(184, 134, 11, .25);
}
body.theme-bright .nav-toggle { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-soft); }
body.theme-bright .nav-mask { background: rgba(20, 34, 58, .35); }
body.theme-bright .code-input { background: #ffffff; border-color: var(--border); color: var(--text); }
body.theme-bright .preview-title { color: #14418f; }body.theme-bright .avatar { background: #dbe7ff; color: #1c4bb0; }
body.theme-bright .map-result code, body.theme-bright .help-points code { color: #1c4bb0; }
body.theme-bright .nav-item { color: var(--text-2); }
body.theme-bright .nav-item.active { color: #14418f; }
body.theme-bright .stat-card, body.theme-bright .course-card { background: #ffffff; border-color: var(--border-soft); }
body.theme-bright .pill.ok { background: rgba(15,157,88,.12); color: #0b7a45; }
body.theme-bright .pill.err { background: rgba(217,58,77,.12); color: #b52d3e; }
body.theme-bright .pill.muted { background: #eef2f9; color: #5b6a83; }body.theme-bright .nav-item.active { color: #14418f; }
body.theme-bright .help-list code, body.theme-bright .cookie-box .login-tip code { color: #1c4bb0; }
body.theme-bright .login-tip, body.theme-bright .panel-tip { color: var(--muted); }body.theme-bright .type-tag { background: rgba(47,107,255,.12); color: #1c4bb0; }
body.theme-bright .stat-hint, body.theme-bright .panel-tip, body.theme-bright .muted { color: var(--muted); }
body.theme-bright .topbar .clock { color: var(--muted); }
/* ============================================================
   地址库：实时联想下拉
   ============================================================ */
.addr-field { position: relative; flex: 1 1 auto; min-width: 0; }
.addr-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 268px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    box-shadow: var(--shadow);
}
.addr-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.addr-item:hover, .addr-item:focus-visible { background: rgba(91, 140, 255, .16); outline: none; }
.addr-name { font-size: 13.5px; font-weight: 600; }
.addr-sub { font-size: 12px; color: var(--muted); }
.addr-hint { padding: 10px; font-size: 12px; color: var(--muted); text-align: center; }

/* 帮助页重点标注 */
.help-strong { color: #ff5c72; font-weight: 700; }
.help-points .help-strong { color: #ff5c72; }
body.theme-bright .help-strong { color: #cf2233; }
/* 地址库：已选坐标提示 + 表单底部 */
.addr-picked {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(47, 211, 122, .1);
    border: 1px solid rgba(47, 211, 122, .3);
    font-size: 12.5px;
    color: var(--text-2);
}
.addr-picked b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.addr-picked-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 211, 122, .18);
}
.addr-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }
body.theme-bright .addr-picked { background: #eefaf3; border-color: #b7e6cc; }