/* ==========================================================================
   assets/style.css —— 全站共用样式（用户端 + 后台共用同一份）
   --------------------------------------------------------------------------
   v2.0.4 界面对齐：本文件按测试版（React 验证版）的设计语言重写，
   使正式版前台与后台的观感与测试版一致：
   - 配色：浅灰底 #f2f2f7 / 白卡面 / 主文字 #1c1c1e / 次文字 #6b7280 /
     边框 #e5e7eb / 用户端主色深青 #0f766e；后台主色改用琥珀 #d97706
     （由 body.admin-page 覆盖 --accent 实现，见下方变量段）；
   - 圆角：卡片 16px、输入框与按钮 12px、小按钮 8px、徽章全圆角；
   - 阴影：卡片极轻的 shadow-sm，弹窗 shadow-xl 级别；
   - 版心：用户端 640px、公告/保障等窄页 480px（main.page-narrow）、
     后台 860px（main.page-wide），左右内边距 20px；
   - 间距：卡片下边距 14px、卡片内边距 16~20px、表单组下边距 14px，
     与测试版的紧凑间距尺度（space-y-3 / mt-4 为主）对齐。
   约束：本文件只定义外观。全部既有类名与 JS 钩子（.modal.open、
   .record-item.expanded、.admin-record-row-wrap.expanded、.dock:hover/.open、
   .id-unknown-on 的显隐、body.loaded 隐藏兜底等）保持原名原语义，
   assets/app.js 与各页内联脚本不依赖任何新类名。
   v2.1.8 前台美观提升（纯外观，零文案/零结构/零 JS 改动）：页面底色由
   中性灰改冰青色调、主按钮改双色渐变 + 柔和投影（色值走 --btn-* 变量，
   后台琥珀同机制变色）、输入框改白底 + 聚焦光环、卡片改双层柔和阴影、
   标题层级与公告正文行距收紧、弹窗遮罩加轻微模糊。后台仅共享组件层
   的质感提升，琥珀身份与全部布局不变。
   v2.1.8 后台精修（同为纯外观）：右侧悬浮坞重点重做（暖白渐变面板、
   琥珀描边、双层投影、贝塞尔滑动、条目药丸式悬停、分组发丝线），视图
   标签选中态改琥珀渐变，分组框改细边渐变 + 组头染色条，版本号药丸与
   ADMIN 徽章改渐变面；悬浮坞的几何与全部 JS 钩子保持原样。
   ========================================================================== */

/* ---------- 设计变量（对应测试版 theme.css 的 :root） ---------- */
:root {
    color-scheme: light dark;
    --bg: #f8f3ec;          /* 页面底色（v2.1.8 暖冬：暖米色，取代中性灰/冰青） */
    --surface: #ffffff;     /* 卡片/浮层底色 */
    --text: #2a2019;        /* 主文字（暖调近黑） */
    --dim: #7a6a58;         /* 次要文字（暖灰褐，在暖米底上 ≥4.5:1） */
    --border: #e8ddcd;      /* 边框（暖米灰） */
    --accent: #146856;      /* 主色（用户端深松绿；后台页覆盖为琥珀） */
    --accent-ink: #0d5240;  /* 主色深一档（徽章文字等） */
    --btn-from: #1c8266;    /* 主按钮渐变上端 */
    --btn-to: #0e5a44;      /* 主按钮渐变下端兼边框色 */
    --btn-shadow: rgba(14, 90, 68, .45); /* 主按钮投影色 */
    --ring: rgba(20, 104, 86, .18);     /* 输入框聚焦光环 */
    --input-border: #ded1bd;             /* 输入框边框（深色模式另行覆盖） */
    --red: #dc2626;         /* 危险/报案红 */
    --red-ink: #b91c1c;
    --page-w: 640px;        /* 版心宽（窄页/宽页由 body 类覆盖） */
    --shadow-sm: 0 1px 2px rgba(74, 54, 32, .05), 0 10px 26px -14px rgba(74, 54, 32, .15);
    --shadow-xl: 0 24px 48px rgba(46, 32, 16, .30);
}
/* 版心变体挂在 <main> 上（不挂 body）：单页壳无刷新切换时只替换
   .page-main，宽度类随内容一起换入，不会残留上一页的宽度。
   （v2.0.6 起页眉行已并入 .page-main 顶部，不再有独立页眉条。） */
.page-main.page-narrow { max-width: 480px; }
.page-main.page-wide { max-width: 860px; }
/* 后台：主色切换为琥珀系（对应测试版后台的 amber 口径），
   所有用 var(--accent) 的组件（主按钮、聚焦边框、开关、链接）随之变色。 */
body.admin-page {
    --accent: #d97706;
    --accent-ink: #92400e;
    --btn-from: #e8890c;
    --btn-to: #b45309;
    --btn-shadow: rgba(180, 83, 9, .4);
    --ring: rgba(217, 119, 6, .2);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16120e;
        --surface: #221b15;
        --text: #f4ede3;
        --dim: #bfae97;
        --border: #3a2f24;
        --accent: #43cf9e;
        --accent-ink: #7ce3bb;
        --btn-from: #35bd8d;
        --btn-to: #178a63;
        --btn-shadow: rgba(0, 0, 0, .5);
        --ring: rgba(67, 207, 158, .22);
        --input-border: #4a3b2b;
    }
    body.admin-page { --accent: #f59e0b; --accent-ink: #fcd34d; --btn-from: #d97706; --btn-to: #b45309; }
    /* 深色下记录分组框改深青底（v2.1.8 浅色版用冰青渐变，深色须单独覆盖）。 */
    .record-group { border-color: #1e4d3a; background: linear-gradient(180deg, rgba(16, 66, 48, .45), rgba(12, 40, 30, .3)); }
    .record-group-head { color: #8fe0bd; }
    /* 深色下后台分组框与悬浮坞改深琥珀（v2.1.8）。 */
    .admin-group { border-color: rgba(245, 158, 11, .32); background: linear-gradient(180deg, rgba(122, 84, 20, .30), rgba(122, 84, 20, .14)); }
    .admin-group .record-group-head { color: #fcd34d; background: rgba(245, 158, 11, .08); }
    .admin-record-row-wrap { border-top-color: rgba(245, 158, 11, .18); }
    .admin-record-row:hover { background: rgba(245, 158, 11, .08); }
    .dock {
        border-color: rgba(245, 158, 11, .35);
        box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .65), 0 4px 14px rgba(0, 0, 0, .4);
    }
    body.admin-page .dock .dock-item:hover { background: rgba(245, 158, 11, .13); color: #fcd34d; }
    body.admin-page .dock .dock-head { color: #fbbf24; border-bottom-color: rgba(245, 158, 11, .22); }
    body.admin-page .dock .dock-item[data-panel-target="super"] { border-top-color: rgba(245, 158, 11, .22); }
    /* 深色氛围层：暖光压暗、雪花纹转月光色。 */
    body {
        background-image:
            radial-gradient(ellipse at center, rgba(255, 170, 80, .07) 0%, rgba(255, 170, 80, 0) 65%),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23D8C9A8' stroke-opacity='.06' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E");
        background-size: 100% 420px, 84px 84px;
        background-position: 50% 0, 0 0;
        background-repeat: no-repeat, repeat;
    }
    body.admin-page {
        background-image:
            radial-gradient(ellipse at center, rgba(255, 170, 80, .08) 0%, rgba(255, 170, 80, 0) 65%),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23D8C9A8' stroke-opacity='.06' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E");
        background-size: 100% 420px, 84px 84px;
        background-position: 50% 0, 0 0;
        background-repeat: no-repeat, repeat;
    }
    .dock {
        background:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23F5C97B' stroke-opacity='.07' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E"),
            linear-gradient(180deg, #1e272c, #181f22);
    }
}

/* ---------- 基础与版心 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
    /* 暖冬氛围层（v2.1.8）：顶部一层暖光（像冬日午后透进窗的光）+ 全页
       极淡的雪花暗纹（内联 SVG 平铺，零额外请求）；卡片自有底色会盖住
       纹理，只有页边与卡间留白处透出，不影响正文阅读。 */
    background-image:
        radial-gradient(ellipse at center, rgba(255, 190, 100, .14) 0%, rgba(255, 190, 100, 0) 65%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23A5875F' stroke-opacity='.12' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 420px, 84px 84px;
    background-position: 50% 0, 0 0;
    background-repeat: no-repeat, repeat;
}
/* 后台氛围层同构，暖光略强、纹色转琥珀。 */
body.admin-page {
    background-image:
        radial-gradient(ellipse at center, rgba(255, 180, 84, .16) 0%, rgba(255, 180, 84, 0) 65%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23B45309' stroke-opacity='.11' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 420px, 84px 84px;
    background-position: 50% 0, 0 0;
    background-repeat: no-repeat, repeat;
}
/* 滚动条也纳入暖冬色板（浏览器默认灰条与主题脱节）。 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(160, 130, 90, .35); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(20, 104, 86, .22); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* 版心：与测试版 main 一致（max-w + px-5）；单页壳替换的正是 .page-main。 */
.page-main { max-width: var(--page-w); margin: 0 auto; padding: 10px 20px 40px; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
h1.page-title { font-size: 23px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; margin: 6px 0 14px; }
body.admin-page h1.page-title { font-size: 20px; }
.muted { color: var(--dim); font-size: 13px; }
.error-text { color: var(--red-ink); }
.success-text { color: #047857; }
/* 广告条在场时，聚焦滚动定位预留底部空间（对应测试版 .ad-bar-on 规则，
   本站广告条由页脚按开关输出，全局启用无副作用）。 */
input, textarea, select, button, [tabindex] { scroll-margin-bottom: 106px; }

/* ---------- 静态兜底与无 JS 提示 ---------- */
#boot-fallback {
    padding: 10px 14px; background: #fffbeb; color: #92400e;
    font-size: 13px; text-align: center;
}
body.loaded #boot-fallback { display: none; }
.noscript-tip {
    padding: 10px 14px; background: #fef2f2; color: var(--red-ink);
    font-size: 14px; text-align: center;
}

/* ---------- 页眉 / 页脚（对应测试版页眉：纯图形 Logo 在最左，无站名字样） ---------- */
/* 页眉行（v2.0.6）：位于 .page-main 顶部——左：Logo + 标题；右：本页快捷入口。
   取代 v2.0.4 的独立页眉条（.site-header 已废弃）。 */
.page-head-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin: 6px 0 14px;
}
.page-head-row .head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-head-row .head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.page-head-row .page-title { margin: 0; }
/* Logo 只显示图形本身：高度与测试版页眉一致（默认图 40px 级），
   自定义宽图按高度等比缩放、限宽 200px，不带任何文字。 */
.site-logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; flex: none; }
.site-footer { text-align: center; padding: 18px 14px 28px; }
.site-footer-text { color: var(--dim); font-size: 13px; margin: 0; }

/* ---------- 通用组件：卡片 / 徽章 / 按钮 / 表单 ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
/* 徽章（对应测试版的 rounded-full 小标签）：本人=主色实心、同行=青色浅底。 */
.badge {
    display: inline-block; border-radius: 999px; padding: 2px 10px;
    font-size: 12px; font-weight: 600; line-height: 1.6; vertical-align: middle; white-space: nowrap;
}
.badge-accent { background: var(--accent); color: #fff; }
.badge-teal { background: #d8efe3; color: #0d5240; }
.badge-amber { background: #fef3c7; color: #92400e; }
.card-title .badge { margin-left: 8px; }

.btn {
    display: inline-block; border: 1px solid var(--btn-to); color: #fff;
    background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
    box-shadow: 0 8px 18px -8px var(--btn-shadow), inset 0 1px 0 rgba(255, 255, 255, .18);
    font-size: 16px; font-weight: 600; line-height: 1.4; padding: 13px 20px; border-radius: 12px;
    cursor: pointer; text-align: center; -webkit-appearance: none; appearance: none;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); box-shadow: 0 3px 8px -4px var(--btn-shadow); filter: brightness(.97); }
.btn-block { display: block; width: 100%; }
/* 次按钮：白底描边深字（对应测试版「返回」「返回继续阅读」等）。 */
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: none; }
body.admin-page .btn-secondary { border-color: rgba(217, 119, 6, .5); color: #92400e; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--dim); border-color: var(--border); font-weight: 500; box-shadow: none; }
.btn-small { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px; min-height: 32px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
/* 报案「已报案 · 查看」描边红按钮（对应测试版 ClaimEntryButton）。 */
.btn-claim-view { background: var(--surface); border: 1px solid #fca5a5; color: var(--red-ink); font-weight: 600; box-shadow: none; }
/* 后台报案流程按钮（对应测试版：转交专员=sky、已结案=深灰）。 */
.btn-sky { background: #0284c7; border-color: #0284c7; color: #fff; font-weight: 600; box-shadow: none; }
.btn-gray { background: #374151; border-color: #374151; color: #fff; font-weight: 600; box-shadow: none; }
/* 后台版本号药丸按钮（对应测试版页眉的版本 pill）。 */
.btn-version {
    border-radius: 999px; border: 1px solid rgba(217, 119, 6, .45);
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
    box-shadow: 0 2px 6px rgba(101, 60, 5, .10);
    color: #92400e; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px; font-weight: 500; padding: 6px 12px; cursor: pointer;
}
/* 后台用户信息处的小头像（v2.1.6）：用户自愿同步的微信头像，仅后台展示。 */
.avatar-mini {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
    vertical-align: -5px; margin-right: 5px; background: #eadfcd;
}
/* 后台顶栏外链药丸（v2.1.5：「精彩瞬间后台」入口，新标签页打开图库后台）。
   与版本号药丸同形不同色：链接用中性描边白底，避免与版本号的琥珀色混淆。 */
.btn-topbar-link {
    border-radius: 999px; border: 1px solid #ddd2c0; background: #fff;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .06);
    color: #2a2019; font-size: 13px; font-weight: 600; padding: 6px 12px;
    text-decoration: none; display: inline-block; cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.btn-topbar-link:hover { background: #f7efe3; }
/* 后台标题旁的 ADMIN 徽章。 */
.admin-badge {
    background: linear-gradient(180deg, #fef3c7, #fdeac2); border: 1px solid rgba(217, 119, 6, .35);
    color: #92400e; border-radius: 999px; padding: 2px 8px;
    font-size: 12px; font-weight: 600; margin-left: 6px; vertical-align: middle;
}
body.admin-page ::selection { background: rgba(217, 119, 6, .25); }
/* 设置抽屉与悬浮坞同温：暖色投影 + 琥珀发丝左边（页内样式的冷灰投影被此覆盖）。 */
body.admin-page .admin-panel.open {
    box-shadow: -18px 0 44px rgba(74, 48, 14, .22);
    border-left: 1px solid rgba(217, 119, 6, .25);
}

.form-group { margin-bottom: 14px; }
.form-group label.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-group .required-mark { color: var(--red); }
/* 输入框（v2.1.8：白底 + 青灰边，聚焦主色边框 + 柔光环；旧版用页面底色作
   输入底色，在白卡上显脏且聚焦反馈弱）。 */
input[type="text"], input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="password"], input[type="file"], select, textarea {
    width: 100%; font-size: 16px; padding: 12px 16px; color: var(--text);
    border: 1px solid var(--input-border); border-radius: 12px; background: var(--surface);
    -webkit-appearance: none; appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="file"] { font-size: 14px; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #7d6c58; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.field-hint { font-size: 13px; color: var(--dim); margin-top: 4px; line-height: 1.5; }
/* 身份证号/生日等宽字体（对应测试版 font-mono 口径）。 */
input[name$="_id_number"], input[name$="_birthday"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em;
}
/* 分段选择（如性别 男/女）：并排药丸选项，选中态主色描边。 */
.segmented { display: flex; gap: 8px; }
.segmented label {
    flex: 1; text-align: center; padding: 11px 0; border: 1px solid var(--input-border);
    border-radius: 12px; cursor: pointer; font-size: 15px; background: var(--surface); color: var(--text);
    transition: border-color .15s ease, background .15s ease;
}
.segmented input { display: none; }
.segmented label:has(input:checked) {
    border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
    background: rgba(20, 104, 86, .07); box-shadow: 0 0 0 1px var(--accent) inset;
}
/* 勾选行（隐私同意等）。 */
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }

/* ---------- 开关（.switch）：「不记得证件号」等开关的统一样式 ---------- */
/* 开关行做成测试版的浅底圆角条：未开=页面底色、开=琥珀浅底 + 琥珀字。 */
.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 6px 10px; margin: 2px 0 12px; border-radius: 8px;
    background: var(--bg); font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer;
}
.switch-row:has(.switch input:checked) { background: #fef3c7; color: #92400e; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { display: none; }
.switch-slider {
    position: absolute; inset: 0; border-radius: 999px; background: #ddd3c4;
    transition: background .2s;
}
.switch-slider::before {
    content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .25); transition: left .2s;
}
.switch input:checked + .switch-slider { background: var(--accent); }
#fill-form .switch input:checked + .switch-slider { background: #f59e0b; } /* 填写页开关用琥珀（测试版口径） */
.switch input:checked + .switch-slider::before { left: 22px; }

/* ---------- 弹窗（.modal）：遮罩 + 底部贴起（PC 居中），.open 时显示 ---------- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(32, 22, 12, .55); padding: 16px; overflow-y: auto;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.modal.open { display: flex; align-items: flex-end; justify-content: center; }
.modal-box {
    background: var(--surface); border-radius: 20px; padding: 22px 20px;
    width: 100%; max-width: 480px; box-shadow: var(--shadow-xl);
    /* 内容过高时在盒子内部滚动：盒子高度不得超过视口（扣掉遮罩上下各 16px 内边距）。
       否则 PC 居中对齐（align-items:center）会把盒子顶部顶出视口上方、且滚动滚不回去——
       改版记录这类长弹窗曾因此看不到顶部条目（v2.0.4 验收修正）。 */
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    overflow-y: auto;
}
.modal-title { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.modal-body { font-size: 15px; white-space: normal; word-break: break-word; }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 640px) {
    .modal.open { align-items: center; }
}

/* ---------- 提示条（对应测试版的浅底圆角提示框） ---------- */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; line-height: 1.6; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error { background: #fef2f2; color: var(--red-ink); }
.alert-info { background: #eff6ff; color: #1d4ed8; }
.error-list { margin: 0; padding-left: 18px; font-size: 14px; }

/* ---------- 公告页 ---------- */
.announcement-body { font-size: 15.5px; line-height: 1.9; word-break: break-word; }
.announcement-body p { margin: 0 0 10px; }
/* 公告页竖排动作表单（确认 / 提醒页两钮）：与卡片拉开间距、两钮之间小间距。
   v2.1.8：整页级主操作按钮加高，拇指更好按、视觉更稳。 */
.stack-form { margin-top: 16px; }
.stack-form .btn { padding-top: 15px; padding-bottom: 15px; }
.stack-form + .stack-form { margin-top: 8px; }
/* 保障内容入口行：居中、次要文字，「点此查看」为主色下划线（测试版口径）。 */
.announce-next-line { margin: 10px 2px 0; font-size: 13px; text-align: center; color: var(--dim); }
.announce-next-line a { color: inherit; text-decoration: none; }
.link-em { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 填写页 ---------- */
.person-card { position: relative; }
/* 同行卡片：青色描边区分本人卡（测试版口径）。 */
.companion-card { border-color: rgba(20, 104, 86, .32); }
/* 同行删除按钮：右上角红色描边小钮（测试版口径）。 */
.person-card .remove-companion-btn {
    position: absolute; top: 12px; right: 12px;
    border: 1px solid #fecaca; color: var(--red); background: var(--surface);
    border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 500;
}
.id-unknown-zone { display: none; }        /* 不记得证件号模式下的生日/性别区，开关打开时显示 */
.id-normal-zone { display: block; }         /* 正常模式下的证件号区，开关打开时隐藏 */
.person-card.id-unknown-on .id-normal-zone,
.person-block.id-unknown-on .id-normal-zone { display: none; }
.person-card.id-unknown-on .id-unknown-zone,
.person-block.id-unknown-on .id-unknown-zone { display: block; }
/* 添加同行人员：虚线主色大按钮（测试版口径）。 */
.btn-add-companion {
    display: block; width: 100%; padding: 12px; cursor: pointer; text-align: center;
    border: 2px dashed rgba(20, 104, 86, .5); border-radius: 16px;
    background: var(--surface); color: var(--accent);
    font-size: 16px; font-weight: 600; -webkit-appearance: none; appearance: none;
}
.btn-add-companion[disabled] { opacity: .5; cursor: not-allowed; }
/* 填写页紧凑布局（v1.3.5 口径沿用）：人员块内边距与组间距收紧。 */
#fill-form .form-group { margin-bottom: 12px; }
#fill-form .person-block { padding: 16px 16px 6px; margin-bottom: 12px; }

/* ---------- 记录页：批次分组（对应测试版「同批提交」青色框 + 内嵌白卡） ---------- */
.record-group {
    border: 1px solid #cfe3d6; background: linear-gradient(180deg, rgba(240, 249, 241, .85), rgba(250, 252, 246, .5));
    border-radius: 18px; padding: 12px; margin-bottom: 12px;
}
.record-group-head { font-size: 13px; font-weight: 700; letter-spacing: .01em; color: #0d5240; margin: 0 4px 8px; }
/* 分组框内的旧 .card 容器透明化，真正的卡片是每条 .record-item。 */
.record-group > .card {
    background: transparent; border: none; border-radius: 0;
    box-shadow: none; padding: 0; margin: 0;
}
.record-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm);
}
.record-item:last-child { margin-bottom: 0; }
.record-name { font-weight: 600; font-size: 16px; }
.ann-duration-note { color: var(--dim); font-size: 13px; font-weight: 400; }
.record-detail { display: none; font-size: 14px; padding: 10px 0 2px; margin-top: 10px; border-top: 1px dashed var(--border); }
.record-detail p { margin: 3px 0; }
.record-item.expanded .record-detail { display: block; }
.record-claim-row { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 团长页：按日期折叠（对应测试版日期分组卡） ---------- */
.leader-date-block { margin-bottom: 12px; }
.leader-date-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    cursor: pointer; font-weight: 600;
}
.leader-date-body { display: none; padding-top: 10px; }
.leader-date-block.open .leader-date-body { display: block; }
/* 团长批量文本框：等宽字体（测试版口径）。 */
.batch-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px; line-height: 1.7;
}

/* ---------- 报案组件 ---------- */
/* 状态徽章（对应测试版 ClaimStatusBadge 配色）。 */
.claim-badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.claim-badge-pending { background: #fef3c7; color: #92400e; }
.claim-badge-transferred { background: #e0f2fe; color: #075985; }
.claim-badge-closed { background: #e5e7eb; color: #374151; }
.claim-badge-hot { background: var(--red); color: #fff; font-weight: 700; }
/* 60 分钟标红：整条报案红色加亮（测试版口径：红粗边 + 浅红底）。 */
.claim-hot { border: 2px solid #ef4444 !important; background: #fef2f2 !important; }
.claim-hot .record-name, .claim-hot .claim-summary { color: var(--red-ink); font-weight: 700; }
/* 报案展示块。 */
.claim-summary { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; cursor: pointer; font-size: 14px; }
.claim-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 10px; background: var(--surface); }
.claim-photo-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.claim-photo-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.claim-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* 报案照片上传区：虚线框圈起（对应测试版照片墙的虚线添加区观感），
   内部文件输入去掉自身边框避免双重框线。 */
.claim-photo-field { border: 2px dashed var(--border); border-radius: 12px; padding: 12px; }
.claim-photo-field input[type="file"] { border: none; background: transparent; padding: 4px 0; }
.claim-photo-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
/* 管理员「代为报案」：details 摘要做成红色实心按钮观感（测试版口径）。 */
.claim-proxy { margin-top: 10px; }
.claim-proxy > summary {
    display: inline-block; cursor: pointer; list-style: none;
    background: var(--red); color: #fff; font-size: 13px; font-weight: 600;
    padding: 8px 14px; border-radius: 8px;
}
.claim-proxy > summary::-webkit-details-marker { display: none; }
.claim-flow-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* 报案进度置顶区（对应测试版：浅红底 + 红描边，内嵌白卡条目）。 */
/* 报案进度置顶区（v2.0.7 一行化）：每条报案压成一行——姓名 / 受伤时间（月-日 时:分）/
   状态徽章横排不换行，整行可点开查看弹窗；区块内边距与行高都收到最紧。 */
.claim-pinned {
    border: 1px solid #fca5a5; background: rgba(254, 242, 242, .6);
    border-radius: 16px; padding: 10px 12px; margin-bottom: 14px; box-shadow: none;
}
.claim-pinned .card-title { font-size: 14px; color: #7f1d1d; margin: 0 0 2px; }
.claim-pinned-main {
    display: flex; width: 100%; align-items: center; gap: 8px; flex-wrap: nowrap;
    background: var(--surface); border: 1px solid #fecaca; border-radius: 10px;
    padding: 6px 10px; margin-top: 6px; cursor: pointer; text-align: left;
    font-size: 13.5px; color: var(--text); box-shadow: none; min-height: 36px;
}
.claim-pinned-main .record-name { font-weight: 600; flex: none; white-space: nowrap; }
.claim-pin-time {
    color: var(--dim); font-size: 12.5px; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.claim-pinned-main .claim-badge { flex: none; }
.claim-pinned-item { margin-top: 0; }
/* 详情定义列表（报案查看弹窗/后台详情共用；对应测试版 dt 次色、92px 宽）。 */
.detail-list { margin: 0; font-size: 14px; }
.detail-list > div { display: flex; gap: 10px; padding: 4px 0; }
.detail-list dt { flex: 0 0 92px; color: var(--dim); margin: 0; }
.detail-list dd { margin: 0; flex: 1; word-break: break-all; }

/* ---------- 我的记录：3天前折叠区（对应测试版折叠卡） ---------- */
.old-batches {
    margin-top: 14px; border: 1px solid var(--border); background: var(--surface);
    border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.old-batches > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 12px 16px; list-style: none; }
.old-batches > summary::-webkit-details-marker { display: none; }
.old-batches .record-group { margin: 0 12px 12px; }

/* ---------- 后台通用 ---------- */
/* 后台记录分组框（对应测试版：琥珀描边框 + 浅琥珀底 + 组头条）。 */
.admin-group {
    padding: 0; overflow: hidden; border: 1px solid rgba(217, 119, 6, .38);
    background: linear-gradient(180deg, rgba(255, 251, 235, .85), rgba(255, 251, 235, .35));
    border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.admin-group .record-group-head {
    margin: 0; padding: 10px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: #78350f;
    background: linear-gradient(180deg, rgba(254, 243, 199, .5), rgba(254, 243, 199, .15));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 后台一行记录：单行紧凑展示，点击整行展开详情。 */
.admin-record-row-wrap { background: var(--surface); border-top: 1px solid rgba(217, 119, 6, .18); }
.admin-record-row {
    display: flex; gap: 8px; align-items: center; cursor: pointer;
    padding: 7px 12px; font-size: 13px; line-height: 1.45;
    white-space: nowrap; overflow: hidden; background: transparent;
    transition: background .12s ease;
}
.admin-record-row:hover { background: rgba(254, 243, 199, .6); }
.admin-record-row .record-name { font-size: 13px; font-weight: 600; }
/* 行内证件号列等宽紧缩、电话列数字等宽（与测试版单行行口径一致）。 */
.admin-record-row > span:nth-child(2) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: -.02em; }
.admin-record-row > span:nth-child(3) { font-variant-numeric: tabular-nums; }
.admin-record-detail { display: none; background: var(--bg); border-top: 1px dashed var(--border); padding: 10px 12px; }
.admin-record-row-wrap.expanded .admin-record-detail { display: block; }
.admin-groupinfo { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
/* 复制状态徽章（对应测试版行内状态色：已复制=sky、已归档=emerald）。 */
.copy-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: var(--dim); flex: none; }
.copy-badge-copied { background: #e0f2fe; color: #075985; }
.copy-badge-archived { background: #d1fae5; color: #065f46; }
/* 代填人完整信息块。 */
.proxy-info { font-size: 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0 12px 8px; word-break: break-all; }
/* 后台右侧悬浮坞（对应测试版右侧悬浮设置框）：默认收起为 42px 窄边，
   悬停（PC）或带 open 类（触屏点按）时展开为 236px 列表。
   v2.1.8 精修（几何与钩子不变：宽度 236px、露边 42px、transform 公式、
   .dock:hover/.open 展开条件、条目 data-panel-target 全部原样）：面板改
   暖白渐变 + 琥珀描边 + 双层柔和投影，滑动改贝塞尔缓动；条目改内嵌
   圆角药丸式悬停（琥珀浅染）；「⚙ 设置」头条改琥珀字并加发丝分隔线，
   收起时露出的齿轮页签更醒目；超级管理员条目上方加发丝分隔线分组。
   条目字号/字重用 body.admin-page 前缀压过 admin.php 页内样式的 font 继承。 */
.dock {
    position: fixed; right: 0; top: 50%; z-index: 900; width: 236px;
    transform: translateY(-50%) translateX(calc(100% - 42px));
    transition: transform .3s cubic-bezier(.22, .9, .26, 1);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23B45309' stroke-opacity='.09' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #ffffff, #fff8ea);
    border: 1px solid rgba(217, 119, 6, .38); border-right: none;
    border-radius: 20px 0 0 20px;
    box-shadow: 0 24px 48px -16px rgba(101, 60, 5, .30), 0 4px 14px rgba(101, 60, 5, .08);
    padding: 10px 8px;
}
.dock:hover, .dock.open { transform: translateY(-50%) translateX(0); }
.dock-item {
    display: block; padding: 10px 14px; margin: 1px 0; border-radius: 10px;
    font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
body.admin-page .dock .dock-item { font-size: 14px; font-weight: 500; }
body.admin-page .dock .dock-item:hover { background: rgba(217, 119, 6, .09); color: #92400e; }
body.admin-page .dock .dock-head {
    font-weight: 700; color: #b45309; letter-spacing: .03em;
    border-bottom: 1px solid rgba(217, 119, 6, .18); border-radius: 10px 10px 0 0;
    margin-bottom: 6px; padding-bottom: 12px;
}
body.admin-page .dock .dock-item[data-panel-target="super"] {
    border-top: 1px solid rgba(217, 119, 6, .18); margin-top: 6px; padding-top: 12px;
    border-radius: 0 0 10px 10px;
}
/* 后台设置区默认折叠：标题可点，.open 时展开 body。 */
.collapsible { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.collapsible-head { padding: 12px 14px; font-weight: 600; cursor: pointer; }
.collapsible-body { display: none; padding: 0 14px 14px; }
.collapsible.open .collapsible-body { display: block; }

/* ---------- 全局常驻底部广告条（结构与 sandbox 口径不变，仅外观对齐测试版：
   条内留白 + 圆角描边的广告框、虚线占位框） ---------- */
.adbar-spacer { height: 90px; }
.adbar {
    position: fixed; left: 0; right: 0; bottom: 0; height: 90px; z-index: 800;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 8px 20px;
}
.adbar-frame {
    width: 100%; max-width: 640px; height: 74px; margin: 0 auto; display: block;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.adbar-placeholder {
    height: 74px; max-width: 640px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: var(--dim); font-size: 13px;
    border: 2px dashed var(--border); border-radius: 8px;
}

/* ---------- PC 适配 ---------- */
@media (min-width: 768px) {
    .modal-box { max-width: 480px; }
}

/* ---------- 公告/提醒卡片：内边距 20px（对应测试版公告卡 p-5） ---------- */
.announce-card {
    padding: 20px; position: relative; overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23146856' stroke-opacity='.06' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 8v18M13 13l7 6 7-6M13 24l7-6 7 6'/%3E%3Cpath d='M62 50v18M55 55l7 6 7-6M55 66l7-6 7 6'/%3E%3C/g%3E%3C/svg%3E");
}
/* 公告卡右上角的大雪花水印（纯装饰，指针穿透、正文在其下层正常排版）。 */
.announce-card::before {
    content: ""; position: absolute; right: -28px; top: -28px; width: 132px; height: 132px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23146856' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M60 6v108M15 33l90 54M105 33L15 87'/%3E%3Cpath d='M46 22l14-12 14 12M46 98l14 12 14-12'/%3E%3Ccircle cx='60' cy='60' r='7'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
    opacity: .10; transform: rotate(18deg); pointer-events: none;
}

/* ---------- 后台：视图标签组与快捷日期（v2.0.4 交互对齐，样式对应测试版后台 tab） ---------- */
/* 视图标签：整排描边容器 + 等分标签，点击即切换视图（链接带 GET 参数，后端不变）；
   选中态：记录类标签琥珀实心、受伤情况标签红色实心（与测试版选中色口径一致）。 */
.view-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 4px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.view-tab {
    text-align: center; padding: 8px 4px; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: var(--dim); white-space: nowrap;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.view-tab.active {
    background: linear-gradient(180deg, var(--btn-from), var(--btn-to)); color: #fff;
    box-shadow: 0 5px 12px -5px var(--btn-shadow);
}
.view-tab-claims.active { background: var(--red); box-shadow: 0 5px 12px -5px rgba(220, 38, 38, .45); }
/* 页面标题行：标题在左、胶囊小按钮在右（对应测试版各页页眉行）。 */
/* （.page-head-row 的定义已移到文件前部「页眉行」处，v2.0.6 统一。） */
.btn-pill { border-radius: 999px; }

/* 页眉行右侧快捷按钮（v2.0.7）：主色实心胶囊，比原幽灵按钮醒目得多——
   用于查看我的记录 / 填写信息 / 团长工作台三个入口。 */
.btn-head-action {
    background: var(--accent); border: 1px solid var(--accent); color: #fff;
    font-weight: 600; padding: 7px 14px; min-height: 34px;
    display: inline-flex; align-items: center;
}
.btn-head-action:hover { filter: brightness(1.06); }

/* 「添加管理员微信」入口（v2.0.7 改版）：无卡片，次级按钮 + 居中说明文字。 */
.admin-wechat-entry { margin: 14px 0 4px; }
.admin-wechat-desc { margin: 8px 0 0; text-align: center; font-size: 13px; }

/* 快捷日期胶囊：点击即按该范围筛选（链接形式，GET 参数与筛选表单一致）。 */
.date-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.date-chip {
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    border-radius: 999px; padding: 4px 12px; font-size: 13px; line-height: 1.6;
}
