/* =====================================================================
   iPhone 风格（iOS）——盖在 app.css 上面
   ===================================================================== */
:root {
  --primary: #007aff; --primary-600: #007aff; --primary-50: rgba(0,122,255,.10);
  --bg: #f2f2f7; --card: #fff; --line: rgba(60,60,67,.16); --line-2: rgba(60,60,67,.10);
  --text: #1c1c1e; --muted: #8e8e93; --faint: #aeaeb2;
  --green: #248a3d; --green-bg: rgba(52,199,89,.16); --yellow: #c93400; --yellow-bg: rgba(255,149,0,.16);
  --red: #ff3b30; --red-bg: rgba(255,59,48,.12); --gray-bg: rgba(118,118,128,.12); --blue-bg: rgba(0,122,255,.12); --blue: #007aff;
  --fill: rgba(118,118,128,.12); --fill-2: rgba(118,118,128,.20);
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04); --shadow-lg: 0 10px 40px rgba(0,0,0,.18);
  --glass: rgba(249,249,251,.78); --blur: saturate(180%) blur(20px);
}
body {
  font: 15px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); }

/* 登入 */
.login-card { border: 0; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.10); padding: 30px 26px; }
.login-card .demo code { background: var(--fill); border-radius: 6px; }
.login-card .btn.primary { padding: 13px 16px; border-radius: 13px; font-size: 16px; font-weight: 600; }

/* 侧边栏：毛玻璃 */
.sidebar { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-right: .5px solid var(--line); }
.brand { border-bottom: 0; padding: 18px 16px 8px; }
.nav { padding: 6px 10px; }
.nav a { padding: 9px 12px; border-radius: 10px; font-size: 15px; margin-bottom: 2px; }
.nav a:hover { background: var(--fill); }
.nav a.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav a.active .badge { background: #fff; color: var(--primary); }
.nav a svg { width: 20px; height: 20px; stroke-width: 1.9; }
.nav a:not(.active) svg { color: var(--primary); }
.nav .badge { border-radius: 10px; min-width: 20px; text-align: center; }
.user-box { border-top: .5px solid var(--line); }
.avatar { background: linear-gradient(180deg, #a1a1aa, #71717a); color: #fff; }

/* 顶部：毛玻璃 + 大标题 */
.topbar { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: .5px solid var(--line); padding: 14px 28px; }
.topbar h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.content { padding: 22px 28px 48px; }

/* 按钮 */
.btn { border: 0; background: var(--fill); color: var(--primary); border-radius: 10px; padding: 8px 14px; font-weight: 500; transition: background .15s, transform .1s, opacity .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); opacity: .85; }
.btn.primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #0a6fe6; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--fill); }
.btn.sm { padding: 5px 11px; border-radius: 8px; font-size: 13px; }

/* 分段控制（中/EN） */
.lang-switch { border: 0; background: var(--fill); border-radius: 9px; padding: 2px; }
.lang-switch button { background: transparent; border-radius: 7px; padding: 4px 12px; font-size: 13px; font-weight: 500; color: var(--text); }
.lang-switch button.on { background: #fff; color: var(--text); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }

/* 输入框：灰色填满、没有框线 */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], input[type=tel], select, textarea {
  border: 0; background-color: var(--fill); border-radius: 10px; padding: 10px 12px; transition: background-color .15s, box-shadow .15s;
}
select { -webkit-appearance: none; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
input:focus, select:focus, textarea:focus { background-color: #fff; box-shadow: 0 0 0 2px var(--primary); border-color: transparent; }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); }
label.field > span { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.check input, td.cb input, th.cb input { accent-color: var(--primary); width: 18px; height: 18px; }

/* 卡片：iOS 分组白卡 */
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { padding: 16px 18px; }
.stat .label { font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat.click { transition: transform .12s, box-shadow .12s; }
.stat.click:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.stat.click:active { transform: scale(.98); }
.section-head { border-bottom: .5px solid var(--line-2); padding: 14px 18px; }
.section-head h3 { font-size: 17px; font-weight: 600; }
.section-body { padding: 14px 18px; }
.note-box { background: var(--yellow-bg); color: #8a3a00; border-radius: 12px; padding: 10px 14px; }
.info-box { background: var(--primary-50); color: #0058c4; border-radius: 12px; padding: 10px 14px; }
.bulkbar { background: var(--primary-50); border: 0; border-radius: 12px; }
.dropdown { border: 0; border-radius: 14px; background: rgba(250,250,252,.92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.dropdown button { border-radius: 8px; padding: 9px 12px; }
.dropdown button:hover { background: var(--fill); }

/* 表格 */
.table-wrap { border: 0; border-radius: var(--radius); }
th { background: #fff; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; border-bottom: .5px solid var(--line); }
th, td { padding: 11px 14px; border-bottom: .5px solid var(--line-2); }
tbody tr:hover { background: rgba(0,0,0,.025); }
tbody tr:active { background: rgba(0,0,0,.05); }
tbody tr.sel { background: var(--primary-50); }
tbody tr:last-child td { border-bottom: 0; }
td .main-line { font-weight: 600; }
.empty { border: 0; border-radius: var(--radius); }

/* 标签：胶囊 */
.tag { border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 12px; }
.docs-dots i { background: #34c759; }
.docs-dots i.no { background: #ffb3ae; }

/* 右边面板：iOS sheet */
.panel-backdrop { background: rgba(0,0,0,.25); }
.panel { background: #f2f2f7; border-radius: 16px 0 0 16px; box-shadow: -10px 0 40px rgba(0,0,0,.15); transition: transform .32s cubic-bezier(.32,.72,0,1); }
.panel-head { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: .5px solid var(--line); border-radius: 16px 0 0 0; }
.panel-head h3 { font-size: 17px; font-weight: 600; }
.tabs { margin: 12px 18px 0; padding: 2px; border: 0; background: var(--fill); border-radius: 9px; gap: 0; }
.tabs button { flex: 1; margin: 0; padding: 6px 8px; border: 0; border-radius: 7px; color: var(--text); font-size: 13px; font-weight: 500; }
.tabs button.on { background: #fff; color: var(--text); border: 0; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
.panel-foot { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: .5px solid var(--line); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
.panel-foot .btn { padding: 10px 18px; border-radius: 12px; }
.group-title { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: .02em; margin: 14px 0 8px 2px; }
.panel input[type=text], .panel input[type=tel], .panel input[type=number], .panel input[type=date], .panel select, .panel textarea { background-color: #fff; }
.panel input:disabled, .panel select:disabled, .panel textarea:disabled { background-color: rgba(255,255,255,.55); }
.call-box { border: 0; background: #fff; border-radius: 14px; padding: 14px; }
.call-box input[type=text] { background-color: var(--fill); }
.result-btns button { border: 0; background: var(--fill); border-radius: 10px; padding: 10px; font-weight: 500; }
.result-btns button.on { background: var(--primary); color: #fff; }
.doc-row { background: #fff; border-radius: 12px; padding: 6px 12px; margin-bottom: 8px; }
.doc-row, .doc-row:last-of-type { border-bottom: 0; }
.tpl-text { background: #fff; border: 0; border-radius: 14px; }
.timeline li { border-left-color: var(--line); }
.readonly-val { padding: 9px 2px; }

/* 确认框：iOS alert */
.modal-back { background: rgba(0,0,0,.3); }
.modal { background: rgba(242,242,247,.94); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 16px; max-width: 300px; padding: 20px 16px 14px; text-align: center; animation: pop .22s cubic-bezier(.32,.72,0,1); }
.modal .actions { justify-content: stretch; }
.modal .actions .btn { flex: 1; justify-content: center; padding: 10px; }
@keyframes pop { from { opacity: 0; transform: scale(1.12); } }

/* 提示：顶部胶囊 */
#toasts { left: 50%; right: auto; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); align-items: center; }
.toast { background: rgba(30,30,32,.86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 999px; padding: 10px 18px; font-weight: 500; animation: tin2 .3s cubic-bezier(.32,.72,0,1); }
.toast.err { background: rgba(255,59,48,.92); }
@keyframes tin2 { from { opacity: 0; transform: translateY(-14px) scale(.96); } }

/* 图表 */
.bar-list .bar-row .track { background: var(--fill); height: 8px; }

/* 下方分页列（手机才出现） */
.tabbar { display: none; }

@media (max-width: 768px) {
  .btn.menu-btn { display: none !important; }
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topbar h2 { font-size: 28px; }
  .content { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-top: .5px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #999; text-decoration: none;
    font-size: 10px; font-weight: 500; border: 0; background: none; padding: 2px 0; position: relative; cursor: pointer; }
  .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .active { color: var(--primary); }
  .tabbar .badge { position: absolute; top: -2px; left: calc(50% + 6px); background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; min-width: 18px; line-height: 18px; padding: 0 5px; text-align: center; font-weight: 600; }
  .sidebar { z-index: 45; border-radius: 0 18px 18px 0; box-shadow: none; background: rgba(249,249,251,.96); }
  .layout.nav-open .sidebar { box-shadow: 10px 0 40px rgba(0,0,0,.18); }
  .layout.nav-open::after { z-index: 44; background: rgba(0,0,0,.25); }
  /* 面板：从下面滑上来的 sheet */
  .panel { top: calc(10px + env(safe-area-inset-top)); width: 100%; border-radius: 14px 14px 0 0; transform: translateY(105%); box-shadow: 0 -10px 40px rgba(0,0,0,.18); z-index: 46; }
  .panel.open { transform: none; }
  .panel-backdrop { z-index: 45; }
  .panel-head { border-radius: 14px 14px 0 0; position: relative; padding-top: 20px; }
  .panel-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(60,60,67,.3); }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .value { font-size: 26px; }
  .cards-mobile tr { border: 0; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
  .cards-mobile td.first { border-bottom: .5px solid var(--line-2); }
  .toolbar .btn, .toolbar select { flex: 1 1 auto; justify-content: center; }
  #toasts { width: calc(100% - 32px); }
}

/* ---- AI 助手 ---- */
.ai-fab { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 12px 18px; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #5e5ce6, #007aff); box-shadow: 0 8px 24px rgba(0,122,255,.35); transition: transform .12s; }
.ai-fab:hover { transform: translateY(-1px); }
.ai-fab:active { transform: scale(.96); }
.ai-fab[hidden] { display: none; }
.ai-chat { display: flex; flex-direction: column; height: 100%; min-height: 60vh; }
.ai-msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-bottom: 10px; }
.ai-msg { max-width: 85%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.45; word-wrap: break-word; }
.ai-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.ai-msg.assistant { align-self: flex-start; background: #fff; color: var(--text); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.ai-hello { background: #fff; border-radius: 14px; padding: 12px 14px; color: var(--text); }
.ai-tips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.ai-tips .btn { white-space: normal; text-align: left; }
.ai-input { display: flex; gap: 8px; align-items: flex-end; }
.ai-input textarea { min-height: 42px; max-height: 140px; resize: none; background-color: #fff; border-radius: 20px; padding: 10px 14px; }
.ai-input .btn { border-radius: 20px; padding: 10px 16px; }
.ai-note { margin-top: 6px; text-align: center; }
.ai-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: aidot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 768px) {
  .ai-fab { right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px 15px; }
}

.ai-attach { display: flex; gap: 6px; margin-bottom: 8px; }
.ai-attach .btn { background: #fff; }
.ai-img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; margin-bottom: 6px; }
.ai-file { font-weight: 600; margin-bottom: 4px; }
.ai-status { margin-left: 8px; font-size: 13px; color: var(--muted); }

/* ---- 单据 ---- */
.claim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.claim-card { border: 0; padding: 0; text-align: left; cursor: pointer; overflow: hidden; font: inherit; color: inherit; display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.claim-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.claim-card:active { transform: scale(.98); }
.claim-thumb { aspect-ratio: 4 / 3; background: var(--fill); display: grid; place-items: center; overflow: hidden; }
.claim-thumb img { width: 100%; height: 100%; object-fit: cover; }
.claim-pdf { font-weight: 700; color: var(--red); font-size: 22px; }
.claim-meta { padding: 10px 12px; min-width: 0; }
.claim-meta .main-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.claim-big img { display: block; max-width: 100%; max-height: 50vh; margin: 0 auto; border-radius: 12px; }
.claim-summary { background: #fff; border-radius: 12px; padding: 12px 14px; line-height: 1.5; }
.claim-ocr { margin-top: 10px; } .claim-ocr pre { white-space: pre-wrap; font-size: 12px; background: #fff; border-radius: 10px; padding: 10px; max-height: 240px; overflow: auto; }
.ai-saved { font-size: 12px; opacity: .85; margin-bottom: 4px; }
.gd-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; } .gd-stats > div { display: flex; flex-direction: column; }
.gd-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; } .gd-steps li { margin-bottom: 6px; }
@media (max-width: 768px) { .claim-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

.otp-input { width: 100%; text-align: center; font-size: 30px !important; letter-spacing: 12px; font-weight: 700; padding: 14px 12px !important; font-variant-numeric: tabular-nums; }

/* 分配团队 */
.team-box { background: #fff; border-radius: 12px; padding: 4px 12px; margin-bottom: 8px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: .5px solid var(--line-2); }
.team-row:last-child { border-bottom: 0; }
.team-row select { width: 170px; flex: none; }
.team-row select.changed { box-shadow: 0 0 0 2px var(--primary); }

/* AI 问答记录 */
.ailog-tools { display: flex; gap: 8px; } .ailog-tools select { width: 45%; flex: none; }
.ailog-item { background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.ailog-item summary { cursor: pointer; list-style: none; } .ailog-item summary::-webkit-details-marker { display: none; }
.ailog-meta { font-size: 13px; margin-bottom: 4px; }
.ailog-q { white-space: pre-wrap; word-break: break-word; }
.ailog-a { margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--line-2); font-size: 14px; color: var(--text); line-height: 1.5; }

/* 合约到期 */
.rn-acts { display: inline-flex; gap: 6px; }
.rn-acts .btn { text-decoration: none; }

.rn-date { display: flex; flex-direction: column; gap: 4px; }
.rn-date > span { font-size: 12px; color: var(--muted); margin-left: 2px; }
.rn-date input { width: 170px; }
.rn-kw input { width: 220px; }
.rn-quick { display: inline-flex; gap: 6px; align-self: flex-end; padding-bottom: 4px; }
.toolbar:has(.rn-date) { align-items: flex-end; }
@media (max-width: 768px) { .rn-date, .rn-date input, .rn-kw input { width: 100%; } .rn-date { flex: 1 1 45%; } .rn-kw { flex-basis: 100%; } }

/* 合约中：先不要处理 */
tbody tr.under-contract td:first-child, tbody tr.under-contract td.first { box-shadow: inset 4px 0 0 #ff9500; }
tbody tr.under-contract { background: rgba(255,149,0,.06); }
.uc-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #c93400; background: rgba(255,149,0,.18); }
.uc-text { color: #c93400; font-weight: 600; }
.uc-box { background: rgba(255,149,0,.16); color: #8a3a00; border: 1.5px solid #ff9500; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }

/* 公告弹出视窗 */
.notice-back { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: tin2 .25s ease; }
.notice-card { width: 100%; max-width: 440px; max-height: 86vh; background: #f2f2f7; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; animation: pop .3s cubic-bezier(.32,.72,0,1); }
.notice-scroll { overflow: auto; padding: 18px 18px 6px; display: flex; flex-direction: column; gap: 12px; }
.notice-item { background: #fff; border-radius: 16px; padding: 14px 16px; }
.notice-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.notice-img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin: 4px auto 10px; }
.notice-body { line-height: 1.55; color: var(--text); }
.notice-ok { margin: 12px 18px 18px; padding: 13px; border-radius: 14px; font-size: 16px; justify-content: center; }
.lb-card { background: linear-gradient(160deg, #fff8e6, #fff); border: 1px solid rgba(255,149,0,.35); border-radius: 16px; padding: 14px 16px; }
.lb-title { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: .5px solid var(--line-2); font-size: 15px; }
.lb-row:last-of-type { border-bottom: 0; }
.lb-medal { font-size: 22px; width: 28px; text-align: center; }
.lb-n { margin-left: auto; font-weight: 700; color: #c93400; }
.lb-me { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--primary-50); color: #0058c4; font-weight: 600; }
/* 公告页 */
.notice-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font: inherit; color: inherit; }
.nt-img-wrap { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; } .nt-img-wrap .notice-img { margin: 0; max-height: 160px; }

/* 弹出视窗：满屏 + ✕ */
.notice-back { padding: 0; background: #f2f2f7; -webkit-backdrop-filter: none; backdrop-filter: none; place-items: stretch; }
.notice-card { max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; position: relative; align-items: center;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.notice-scroll { width: 100%; max-width: 640px; flex: 1; padding: 64px 20px 8px; justify-content: flex-start; }
.notice-ok { width: calc(100% - 40px); max-width: 600px; }
.notice-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--fill-2); color: var(--text); font-size: 18px; cursor: pointer; z-index: 2; }
.notice-x:hover { background: rgba(118,118,128,.3); }
.notice-img { max-height: 50vh; }
#ntCard .notice-row { background: var(--fill); border-radius: 12px; }
#ntCard .notice-row:hover { background: var(--fill-2); }

/* ---- 弹出效果 ---- */
.notice-back { animation: ntFade .3s ease both; }
.notice-card { animation: ntPop .6s cubic-bezier(.2, 1.35, .4, 1) both; }
.notice-scroll > * { animation: ntUp .55s cubic-bezier(.2, 1, .3, 1) both; }
.notice-scroll > *:nth-child(1) { animation-delay: .18s; }
.notice-scroll > *:nth-child(2) { animation-delay: .32s; }
.notice-scroll > *:nth-child(3) { animation-delay: .46s; }
.notice-scroll > *:nth-child(4) { animation-delay: .6s; }
.notice-scroll > *:nth-child(n+5) { animation-delay: .7s; }
.notice-ok { animation: ntUp .5s cubic-bezier(.2, 1, .3, 1) .5s both; }
.notice-x { animation: ntFade .4s ease .4s both; }
.lb-row { animation: ntUp .45s cubic-bezier(.2, 1, .3, 1) both; }
.lb-row:nth-of-type(1) { animation-delay: .7s; } .lb-row:nth-of-type(2) { animation-delay: .85s; } .lb-row:nth-of-type(3) { animation-delay: 1s; }
.lb-medal { display: inline-block; animation: ntBounce .7s cubic-bezier(.3, 1.8, .5, 1) both; }
.lb-row:nth-of-type(1) .lb-medal { animation-delay: .8s; } .lb-row:nth-of-type(2) .lb-medal { animation-delay: .95s; } .lb-row:nth-of-type(3) .lb-medal { animation-delay: 1.1s; }
.lb-me { animation: ntUp .45s cubic-bezier(.2, 1, .3, 1) 1.2s both; }
.notice-back.closing { animation: ntFadeOut .26s ease forwards; }
.notice-back.closing .notice-card { animation: ntShrink .26s ease forwards; }
@keyframes ntFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ntFadeOut { to { opacity: 0; } }
@keyframes ntPop { 0% { opacity: 0; transform: scale(.8) translateY(40px); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ntShrink { to { transform: scale(.94); } }
@keyframes ntUp { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ntBounce { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
/* 彩带 */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 71; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation-name: ntConfetti; animation-timing-function: cubic-bezier(.25, .6, .45, 1); animation-fill-mode: forwards; }
@keyframes ntConfetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift), 105vh) rotate(var(--spin)); } }
@media (prefers-reduced-motion: reduce) {
  .notice-back, .notice-card, .notice-scroll > *, .notice-ok, .notice-x, .lb-row, .lb-medal, .lb-me { animation: none !important; }
  .confetti { display: none; }
}

/* 必填没填：红框 */
.nt-old { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--card, #fff); font-size: 14px; white-space: pre-line; }
.nt-old b { display: block; font-size: 12px; color: var(--muted, #8e8e93); margin-bottom: 4px; }
.msgs { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; margin-bottom: 10px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; }
.msg.agent { align-self: flex-start; background: #fff; border: 1px solid rgba(0,0,0,.08); border-bottom-left-radius: 4px; }
.msg.admin { align-self: flex-end; background: rgba(0,122,255,.12); border-bottom-right-radius: 4px; }
.msg-meta { font-size: 12px; color: #8e8e93; margin-bottom: 2px; }
.msg-meta b { color: #1c1c1e; }
.msg-text { font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.msg-send { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.msg-send textarea { flex: 1; min-height: 44px; resize: vertical; }
.na-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #0a58ca; background: rgba(0,122,255,.14); }
.na-box { white-space: pre-line; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0,122,255,.10); color: #0a58ca; font-weight: 600; }
.na-tag.task { color: #fff; background: #007aff; }
.nc-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(52,199,89,.10); font-size: 13px; }
.nc-bar.closed { color: #248a3d; font-weight: 600; }
.nc-rows { display: flex; flex-direction: column; gap: 2px; }
.nc-rows b { display: inline-block; min-width: 52px; }
.nc-settle { background: #34c759 !important; color: #fff !important; white-space: nowrap; }
.na-tag.task.late { background: #ff3b30; }
.ok-solid { background: #34c759 !important; color: #fff !important; border-color: #34c759 !important; }
.prompt-input { width: 100%; margin: 4px 0 12px; box-sizing: border-box; }
.rs-box { margin: -4px 0 12px; padding: 8px 12px; border-radius: 10px; background: rgba(255,59,48,.08); color: #c62828; font-size: 14px; white-space: pre-wrap; }
.na-tag.task.cr { background: #ff9500; }
.cr-open { margin: 0 0 12px; color: #c62828 !important; }
.cr-form { margin: 0 0 12px; padding: 12px; border-radius: 12px; background: rgba(255,59,48,.06); }
.cr-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,149,0,.10); }
.cr-box.approved { background: rgba(142,142,147,.12); }
.cr-box.rejected { background: rgba(0,122,255,.08); }
.cr-head { font-weight: 700; margin-bottom: 4px; }
.cr-line { font-size: 14px; margin: 2px 0; white-space: pre-wrap; }
.cr-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.cr-files a { display: flex; flex-direction: column; align-items: center; width: 84px; font-size: 11px; text-decoration: none; color: inherit; }
.cr-files img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(0,0,0,.1); }
.cr-files span { width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-acts { display: flex; gap: 8px; margin-top: 8px; }
.na-tag.task.inst { background: #af52de; }
.na-tag.task.docs { background: #ff3b30; }
.it-box { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(175,82,222,.10); color: #7d2fa6; font-weight: 600; }
.cx-sum { font-weight: 600; margin-bottom: 8px; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cx-table th, .cx-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(0,0,0,.06); }
.cx-table th { color: #8e8e93; font-weight: 600; font-size: 12px; }
#cxReport .section-head input[type=month] { max-width: 170px; }
.na-tag.task.proof { background: #34c759; }
.pf-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(52,199,89,.10); }
.pf-acts { flex-wrap: wrap; }
.pf-acts a.btn { text-decoration: none; }
.pf-paste { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; margin: 0 0 12px; padding: 18px 12px; border: 2px dashed rgba(52,199,89,.6); border-radius: 12px; background: rgba(52,199,89,.05); cursor: pointer; outline: none; }
.pf-paste:focus { border-color: #34c759; background: rgba(52,199,89,.12); }
.pf-paste.busy { opacity: .5; pointer-events: none; }
.pf-up { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.pf-up label.btn { cursor: pointer; }
.na-tag.task.late { background: #ff3b30; }
.na-check { font-weight: 600; }
.od-bar { align-items: flex-end; }
.od-title { align-self: center; font-size: 14px; }
.invalid { box-shadow: 0 0 0 2px var(--red) !important; background-color: rgba(255,59,48,.06) !important; }

/* 订单页工具列：两行 */
.ob-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ob-top .ob-search { flex: 1 1 auto; min-width: 0; max-width: none; }
.ob-top .btn { flex: 0 0 auto; white-space: nowrap; }
.ob-date b { font-weight: 600; margin-left: 2px; }
.ob-pop { min-width: 250px; }
.ob-pop button.on { color: var(--blue, #007aff); font-weight: 600; }
.ob-custom { border-top: 1px solid rgba(0,0,0,.08); margin-top: 4px; padding: 8px 6px 4px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #8e8e93; }
.ob-custom label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-custom input { width: 150px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.ob-chips select.chip { field-sizing: content; width: auto; min-width: 0; max-width: 240px; height: 32px; padding: 0 28px 0 12px; border-radius: 999px; font-size: 13px; background-color: #fff; border: 1px solid rgba(0,0,0,.1); background-position: right 10px center; }
.ob-chips select.chip.on, .chip-btn.on { background-color: rgba(0,122,255,.12); color: #007aff; border-color: #007aff; font-weight: 600; }
.chip-btn { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; background: #fff; border: 1px solid rgba(0,0,0,.1); cursor: pointer; color: inherit; }
.link-btn { background: none; border: 0; color: #007aff; font-size: 13px; cursor: pointer; padding: 0 6px; }
.ob-chips .spacer { flex: 1; }
@media (max-width: 640px) {
  .ob-top { flex-wrap: wrap; }
  .ob-top .ob-search { flex-basis: 100%; }
  .ob-top .menu-wrap { flex: 1; }
  .ob-top .ob-date { width: 100%; }
  .ob-pop { left: 0; right: auto; }
}
