:root {
  --ink: #1f2933;
  --ink-soft: #68767d;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --line: #dde7e1;
  --teal: #1f6b45;
  --teal-soft: #e8f3ee;
  --navy: #296140;
  --navy-2: #1f4d31;
  --gold: #d5a85f;
  --coral: #c94c4c;
  --purple: #6c5aa8;
  --blue: #3d7190;
  --green: #3f8a68;
  --shadow: 0 14px 34px rgba(28, 67, 49, .09);
  --radius: 16px;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.side { background: var(--navy); color: white; padding: 22px 16px 17px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex: 0 0 272px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.24); border-radius: 4px; }
.side::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.38); }
.brand { padding: 2px 9px 18px; display: grid; gap: 15px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo { width: 190px; height: auto; display: block; border-radius: 4px; }
.brand-subline { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 38px; width: 38px; border-radius: 12px; background: linear-gradient(135deg, #e5b55d, #f8d28b); color: #193a49; display: grid; place-items: center; font-size: 21px; font-weight: 800; box-shadow: 0 6px 14px rgba(0,0,0,.18); flex: none; }
.brand h1 { font-size: 15px; margin: 0; line-height: 1.45; letter-spacing: .02em; }
.brand p { font-size: 11px; color: #b9cec2; margin: 4px 0 0; }
.nav-section { display: grid; gap: 4px; }
.nav-label { color: #9fbbb0; font-size: 10px; letter-spacing: .15em; font-weight: 700; padding: 6px 11px 7px; }
.nav-btn { border: 0; color: #d6e5dc; background: transparent; border-radius: 10px; text-align: left; padding: 8px 11px; display: flex; gap: 11px; align-items: center; font-size: 13px; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-btn:hover { background: rgba(255,255,255,.08); color: white; transform: translateX(2px); }
.nav-btn.active { background: #e8f3ee; color: var(--navy); font-weight: 700; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.nav-svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-spacer { flex: 1; }

/* 侧栏收起按钮：仅保留小箭头，悬在左右分界线的垂直中点 */
.side-toggle { position: fixed; top: 50%; left: calc(272px - 14px); z-index: 6; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 9px; background: rgba(255,255,255,.95); color: #14736e; box-shadow: 0 2px 8px rgba(20,50,70,.18); cursor: pointer; display: grid; place-items: center; transform: translateY(-50%); transition: left .2s ease; }
.side-toggle:hover { background: #fff; color: var(--navy); }
.side-toggle .nav-svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-toggle.collapsed { left: calc(74px - 14px); }
.side.collapsed { flex-basis: 74px; flex: 0 0 74px; padding: 22px 10px 17px; }
.side.collapsed .brand { padding: 2px 2px 14px; justify-items: center; }
.side.collapsed .brand-logo { width: 52px; }
.side.collapsed .brand-subline, .side.collapsed .platform-wordmark, .side.collapsed .nav-label, .side.collapsed .nav-btn > span:last-child, .side.collapsed .account-card { display: none; }
.side.collapsed .nav-btn { justify-content: center; padding: 9px 0; }
.side.collapsed .nav-svg { width: 19px; height: 19px; }
.side.collapsed .nav-mascot { width: 19px; height: 19px; }
.side.collapsed .nav-section { align-items: center; }
.side.collapsed .side-spacer { flex: 1; min-height: 18px; }
@media (max-width: 780px) { .side-toggle { display: none; } }
.account-card { border: 1px solid rgba(255,255,255,.17); background: rgba(0,0,0,.13); padding: 13px; border-radius: 14px; }
.account-heading { display: flex; gap: 9px; align-items: center; }
.account-avatar { height: 30px; width: 30px; border-radius: 50%; display: grid; place-items: center; background: #d7eadf; color: var(--navy); font-size: 12px; font-weight: 800; }
.account-card .who { font-size: 13px; font-weight: 700; }
.account-card .role { color: #b7cec3; font-size: 11px; margin: 3px 0 0; display: block; }
.account-card > small { color: #a8c2b5; display: block; margin: 10px 0 11px 39px; font-size: 11px; }
.account-actions { display: flex; gap: 7px; }
.ghost { background: transparent; border: 1px solid rgba(255,255,255,.24); color: #e0ece4; border-radius: 8px; padding: 6px 9px; font-size: 11px; }
.ghost:hover { background: rgba(255,255,255,.08); }

.main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.topbar { min-height: 78px; padding: 15px 30px; background: rgba(247,248,245,.96); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); flex: 0 0 auto; }
.top-context { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-title .eyebrow { color: var(--teal); display: block; font-size: 10px; letter-spacing: .08em; margin-bottom: 3px; }
.top-title h2 { font-size: 20px; letter-spacing: -.03em; margin: 0; }
.top-title p { color: var(--ink-soft); font-size: 12px; margin: 3px 0 0; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.system-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 11px; }
.system-status i { width: 7px; height: 7px; border-radius: 50%; background: #2e8b57; box-shadow: 0 0 0 4px #e4f1e9; }
.mobile-menu { display: none; border: 1px solid var(--line); background: white; color: var(--teal); height: 36px; width: 36px; border-radius: 9px; font-size: 17px; }
.clock-select { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: var(--ink); font-size: 12px; max-width: 160px; }
.icon-button { border: 1px solid var(--line); background: white; height: 35px; min-width: 35px; padding: 0 10px; border-radius: 10px; color: var(--ink); position: relative; }
.notif-dot { background: var(--coral); width: 7px; height: 7px; border-radius: 99px; position: absolute; right: 7px; top: 6px; }
.content { padding: 28px 30px 36px; max-width: 1550px; margin: 0 auto; flex: 1 1 auto; min-width: 0; }
.site-footer { border-top: 1px solid var(--line); margin: 0 30px; padding: 18px 0 24px; display: flex; justify-content: space-between; gap: 14px; color: #84918e; font-size: 11px; flex: 0 0 auto; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: 0 0 20px; }
.page-heading h3 { font-size: 25px; letter-spacing: -.04em; margin: 0; }
.page-heading p { color: var(--ink-soft); margin: 7px 0 0; font-size: 14px; line-height: 1.5; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; font-size: 12px; padding: 5px 9px; background: #edf0ef; color: #536973; white-space: nowrap; }
.pill.live { color: #056a59; background: #e2f4ed; }
.pill.warn { color: #8b5810; background: #fff0d2; }
.pill.bad { color: #aa3f38; background: #fde8e5; }
.pill.purple { color: #4d418e; background: #ebe9fa; }
.pill.blue { color: #2460ab; background: #e8f1ff; }

.hero { background: linear-gradient(135deg, #173f32, #2d7656); color: white; border-radius: 18px; padding: 25px 27px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero:before { content:""; position:absolute; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.15); border-radius:50%; right:-120px; top:-160px; }
.hero:after { content:""; position:absolute; width: 180px; height: 180px; border: 1px solid rgba(213,168,95,.25); border-radius:50%; right:70px; bottom:-145px; }
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.hero-copy { flex: 1 1 400px; min-width: 0; }
.hero-kicker { color: #d7e9df; font-size: 11px; letter-spacing: .13em; }
.hero h4 { font-size: 21px; margin: 8px 0 0; letter-spacing: -.03em; }
.hero p { margin: 9px 0 0; color: #d8ebe1; font-size: 13px; max-width: 700px; line-height: 1.65; }
.hero-visual { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; margin-left: auto; }
.hero-visual img { width: 63px; height: 63px; object-fit: contain; filter: drop-shadow(0 7px 10px rgba(0,0,0,.2)); }
.hero .right { position: relative; z-index: 1; text-align: right; min-width: 180px; }
.hero .big-time { font-size: 30px; font-weight: 800; letter-spacing: .03em; }
.hero .small-time { color: #bfdbdc; font-size: 12px; margin-top: 4px; white-space: nowrap; }

.metric-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 15px; box-shadow: 0 4px 13px rgba(20,56,67,.03); flex: 1 1 150px; min-width: 0; }
.metric-action { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; appearance: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.metric-action:hover { border-color: #b9cfc4; box-shadow: 0 8px 18px rgba(20,56,67,.09); transform: translateY(-1px); }
.metric-action:focus-visible { outline: 3px solid rgba(63,138,104,.28); outline-offset: 2px; }
.metric .label { color: var(--ink-soft); font-size: 12px; }
.metric .number { margin-top: 7px; font-weight: 800; font-size: 26px; letter-spacing: -.04em; }
.metric .note { color: var(--ink-soft); margin-top: 4px; font-size: 11px; }
.metric.teal .number { color: var(--teal); }
.metric.gold .number { color: #be7e12; }
.metric.coral .number { color: var(--coral); }
.metric.purple .number { color: var(--purple); }

.grid-2 { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.grid-2 > * { flex: 1 1 360px; min-width: 0; }
@media (min-width: 1181px) {
  .grid-2 > :first-child { flex: 1.55 1 480px; }
  .grid-2 > :last-child { flex: .8 1 300px; max-width: 460px; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 16px rgba(20, 56, 67, .035); }
.card-head { padding: 17px 18px 12px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.card-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-head-actions a.button { text-decoration: none; }
.card-head h4 { margin: 0; font-size: 16px; }
.card-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.card-body { padding: 0 18px 18px; }
/* card 直接子元素（非 card-head/card-body）统一左右内边距，避免贴边与标题不对齐 */
.card > *:not(.card-head):not(.card-body) {
  padding-left: 18px;
  padding-right: 18px;
}
.card > *:not(.card-head):not(.card-body):last-child {
  padding-bottom: 18px;
}
.card > form, .card > .form-grid {
  padding-bottom: 18px;
}
/* 按钮组统一弹性布局 + 间距，防止挤在一起 */
.export-actions, .button-row, .action-bar, .btn-group, .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.section-head h4 { margin: 0; font-size: 17px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.filter { background: #fff; border: 1px solid var(--line); color: #5b7179; padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.filter.active { border-color: #8fc7bd; background: var(--teal-soft); color: #087269; }
.shift-list { display: grid; gap: 10px; }
.shift-card { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 13px; padding: 13px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 13px; }
.shift-card.state-warn { border-left-color: var(--gold); }
.shift-card.state-bad { border-left-color: var(--coral); }
.shift-card.state-purple { border-left-color: var(--purple); }
.shift-place { font-size: 13px; color: var(--ink-soft); min-width: 140px; flex: 1 1 160px; max-width: 230px; }
.shift-place b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }
.shift-place span { display: block; margin-top: 2px; line-height: 1.45; word-break: break-word; }
.person { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 2 1 220px; }
.avatar { height: 33px; width: 33px; min-width: 33px; border-radius: 50%; display: grid; place-items: center; align-content: center; justify-content: center; font-size: 13px; font-weight: 800; line-height: 1; text-align: center; padding: 0; color: #15505e; background: #dcedec; flex: none; }
.avatar.purple { color: #59448d; background: #edeafa; }
.avatar.gold { color: #925f0f; background: #faecd0; }
.person strong { font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .sub-badge { display: inline-block; margin: 2px 0 0 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.6; color: #fff; background: #7c5cbf; vertical-align: 1px; }
.table-wrap .sub-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.6; color: #fff; background: #7c5cbf; vertical-align: 1px; }
.person span { font-size: 12px; color: var(--ink-soft); display: block; margin-top: 3px; }
.shift-meta { font-size: 12px; color: var(--ink-soft); line-height: 1.65; flex: 1 1 180px; min-width: 0; }
.shift-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; flex: 1 0 auto; margin-left: auto; }
.button { border: 0; background: var(--teal); color: #fff; padding: 9px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; }
.button:hover { filter: brightness(.95); }
.button.secondary { background: #e7f1ef; color: #14736e; }
.button.danger { background: #fae6e3; color: #ae443c; }
.button.slate { background: #edf1f2; color: #38545e; }
.button.gold { background: #fff0d5; color: #96600e; }
.button.small { padding: 7px 9px; font-size: 11px; }
.button.tiny { padding: 4px 8px; font-size: 11px; }
.button:disabled { opacity: .5; cursor: not-allowed; }

/* 原生文件选择按钮统一样式（避免裸按钮风格突兀） */
input[type='file'] { font-size: 12px; color: var(--ink-soft); min-width: 0; }
input[type='file']::file-selector-button { border: 1px solid #cfddd8; background: #e7f1ef; color: #14736e; border-radius: 9px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer; margin-right: 10px; transition: filter .15s ease; }
input[type='file']::file-selector-button:hover { filter: brightness(.95); }

/* 全局原生控件统一样式（不依赖 form-grid 容器，防止裸样式） */
input[type='date'], input[type='time'], input[type='datetime-local'], input[type='month'], input[type='week'], input[type='number'], input[type='text'], input[type='password'], input[type='email'], input[type='tel'], input[type='search'], select, textarea {
  border: 1px solid #d4e0d9;
  border-radius: 10px;
  padding: 10px 14px;
  background: #ffffff;
  color: #243b2e;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-sizing: border-box;
}
input[type='date']:hover, input[type='time']:hover, input[type='datetime-local']:hover, input[type='month']:hover, input[type='week']:hover, input[type='number']:hover, input[type='text']:hover, input[type='password']:hover, input[type='email']:hover, input[type='tel']:hover, input[type='search']:hover, select:hover, textarea:hover {
  border-color: #b8cfc2;
  background: #fdfefe;
}
input[type='date']:focus, input[type='time']:focus, input[type='datetime-local']:focus, input[type='month']:focus, input[type='week']:focus, input[type='number']:focus, input[type='text']:focus, input[type='password']:focus, input[type='email']:focus, input[type='tel']:focus, input[type='search']:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #548f6b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(41,97,64,.12);
}
input::placeholder, textarea::placeholder { color: #a8b8b0; font-size: 13px; }
input[type='date']::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; filter: invert(.35) sepia(.4) saturate(3) hue-rotate(80deg); }
input[type='date']::-webkit-calendar-picker-indicator:hover { opacity: 1; }
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23548f6b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select option { padding: 6px 10px; }

.table-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 18px 4px; }
.search-input { border: 1px solid #d4e0d9; border-radius: 10px; padding: 9px 14px; font-size: 13px; background: #fff; width: min(320px, 100%); transition: border-color .18s ease, box-shadow .18s ease; }
.search-input:hover { border-color: #b8cfc2; }
.search-input:focus { outline: none; border-color: #548f6b; box-shadow: 0 0 0 3px rgba(41,97,64,.12); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr; gap: 8px 14px; align-items: center; }
.detail-grid span { color: var(--ink-soft); font-size: 12px; }
.detail-grid b { font-weight: 700; font-size: 13px; }
.modal-field { display: block; margin-top: 10px; }
.modal-field input { width: 100%; border: 1px solid #d4e0d9; border-radius: 10px; padding: 10px 14px; font-size: 14px; background: #fff; box-sizing: border-box; margin-top: 6px; transition: border-color .18s ease, box-shadow .18s ease; }
.modal-field input:hover { border-color: #b8cfc2; }
.modal-field input:focus { outline: none; border-color: #548f6b; box-shadow: 0 0 0 3px rgba(41,97,64,.12); }

.timeline { display: grid; gap: 2px; }
.timeline-item { display: grid; grid-template-columns: 27px 1fr; gap: 9px; padding: 9px 0; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--teal); margin: 4px 0 0 6px; box-shadow: 0 0 0 4px #e9f5f1; }
.timeline-item.warn .timeline-dot { background: var(--gold); box-shadow: 0 0 0 4px #fff4dd; }
.timeline-item.bad .timeline-dot { background: var(--coral); box-shadow: 0 0 0 4px #ffebe8; }
.timeline-main { font-size: 13px; line-height: 1.5; }
.timeline-main small { color: var(--ink-soft); display: block; margin-top: 2px; }
.notice-list { display: grid; gap: 9px; }
.notice { padding: 11px 12px; border-radius: 11px; background: #f6f7f6; border: 1px solid #ebefed; }
.notice b { display: block; font-size: 13px; }
.notice span { color: var(--ink-soft); font-size: 12px; line-height: 1.55; display: block; margin-top: 4px; }
.notice .tagline { margin-top: 6px; font-size: 11px; color: #62808a; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 15px; flex-wrap: wrap; }
.search { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; min-width: 230px; background: white; }
.tab-row { display:flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 11px; border: 0; border-bottom: 2px solid transparent; color: var(--ink-soft); background: transparent; white-space: nowrap; font-size: 13px; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; background: white; }
.data-table th { color: #61747c; text-align: left; font-size: 11px; letter-spacing: .03em; font-weight: 700; padding: 11px 13px; background: #f4f7f6; border-bottom: 1px solid var(--line); }
.data-table td { font-size: 13px; padding: 12px 13px; border-bottom: 1px solid #edf0ef; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdfc; }
.muted { color: var(--ink-soft); }
.label-stack { display: grid; gap: 2px; }
.label-stack small { color: var(--ink-soft); font-size: 11px; }

.form-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.form-grid > * { flex: 1 1 240px; min-width: 0; }
.form-grid > .button, .form-grid > button { flex: 0 0 auto; margin-left: auto; padding: 11px 32px; font-size: 14px; border-radius: 10px; }
.form-grid.one { flex-direction: column; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: #4a656e; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); background: #fff; border-radius: 9px; outline: none; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #75bcb1; box-shadow: 0 0 0 3px rgba(83, 172, 160, .14); }
.field textarea { min-height: 96px; resize: vertical; }
.field-help { color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.upload-box { border: 1px dashed #a9c5c0; background: #f7fbfa; padding: 14px; border-radius: 11px; min-height: 115px; display: grid; align-content: center; gap: 7px; }
.upload-box input { border: 0; padding: 0; background: transparent; }
.upload-name { font-size: 12px; color: #216d68; word-break: break-all; }
.attendance-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.attendance-workspace { align-items: start; }
.attendance-selector { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 15px; }
.attendance-selector label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; flex: 1 1 280px; min-width: 0; }
.attendance-selector select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); background: #fff; border-radius: 9px; outline: none; color: var(--ink); }
.attendance-selector select:focus { border-color: #75bcb1; box-shadow: 0 0 0 3px rgba(83,172,160,.14); }
.attendance-upload-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.attendance-upload-grid .upload-box { flex: 1 1 250px; min-width: 0; }
.attendance-upload-grid .upload-box { min-height: 218px; align-content: start; }
.upload-box.has-record { border-style: solid; background: #f2faf6; }
.upload-heading { display: flex; align-items: flex-start; gap: 9px; }
.upload-heading strong { display: block; font-size: 13px; }
.upload-index { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; }
.upload-index.teal { color: #0d725f; background: #dff2e9; }
.upload-index.gold { color: #8a5b11; background: #ffefd0; }
.upload-heading .field-help { display: block; margin-top: 4px; }
.file-field { display: grid; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.file-field input { width: 100%; font-weight: 400; }
.attendance-status-hero { padding: 15px; border: 1px solid #d6e8dd; border-radius: 13px; background: #f2faf5; display: grid; gap: 5px; }
.attendance-status-hero .status-caption { color: var(--ink-soft); font-size: 11px; }
.attendance-status-hero strong { color: var(--teal); font-size: 20px; letter-spacing: -.03em; }
.attendance-status-hero > span:last-child { color: #52716a; font-size: 12px; line-height: 1.55; }
.attendance-checklist { display: grid; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e4ece7; border-radius: 10px; background: #fbfdfc; }
.check-row b, .check-row small { display: block; }
.check-row b { font-size: 12px; }
.check-row small { color: var(--ink-soft); font-size: 11px; margin-top: 3px; }
.check-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #71827d; background: #edf1ef; font-size: 11px; font-weight: 800; }
.check-icon.done { color: #0b735e; background: #dff2e9; }
.attendance-review-link { margin-top: 16px; }
.attendance-workspace .profile-band { background: linear-gradient(135deg, #eff8f3, #f8fbf7); border-color: #d8e9df; }
.info-box { border-left: 3px solid var(--teal); background: #f1faf7; padding: 11px 13px; border-radius: 0 10px 10px 0; color: #326466; font-size: 12px; line-height: 1.6; }
.alert-box { border-left-color: var(--gold); background: #fff8e9; color: #805f1d; }

.case-list { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid #eef3f0; margin-top: 4px; }
.case-row { padding: 14px; border: 1px solid var(--line); border-radius: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.case-row > div:first-child { flex: 1 1 300px; min-width: 0; }
.case-row h5 { margin: 0; font-size: 14px; }
.case-row p { color: var(--ink-soft); font-size: 12px; margin: 5px 0 0; }
.case-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; margin-left: auto; }
.status-steps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.status-step { font-size: 11px; color: #6c7e84; background: #eef2f1; padding: 4px 7px; border-radius: 99px; }
.status-step.current { color: #08766d; background: #dff2ec; font-weight: 700; }

.profile-band { background: linear-gradient(135deg, #f0f8f6, #e7eff7); border: 1px solid #dbe9e5; border-radius: 16px; padding: 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 15px; }
.profile-band h4 { margin: 0; font-size: 17px; }
.profile-band p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.profile-avatar { height: 48px; width: 48px; font-size: 16px; }
.schedule-week { display: grid; grid-template-columns: repeat(7, minmax(122px, 1fr)); gap: 8px; overflow-x: auto; }
.day-col { min-width: 122px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.day-col b { font-size: 12px; }
.mini-shift { border-left: 3px solid var(--teal); margin-top: 9px; padding: 6px 7px; border-radius: 4px 8px 8px 4px; background: #f1faf7; font-size: 11px; line-height: 1.45; }
.mini-shift.clear { border-left-color: var(--purple); background: #f4f2fe; }

.knowledge-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.knowledge-card { border: 1px solid var(--line); padding: 15px; border-radius: 14px; background: white; flex: 1 1 280px; min-width: 0; }
.knowledge-card .k-icon { font-size: 20px; }
.knowledge-card h5 { margin: 9px 0 4px; font-size: 15px; }
.knowledge-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }

.role-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.role-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; flex: 1 1 260px; min-width: 0; }
.role-card h5 { margin: 0; font-size: 15px; }
.role-card p { color: var(--ink-soft); font-size: 12px; line-height: 1.55; margin: 6px 0 11px; }
.role-card ul { margin: 0; padding-left: 17px; color: #48636b; font-size: 12px; line-height: 1.7; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8,28,37,.47); z-index: 20; display: grid; place-items: center; padding: 18px; }
body.no-scroll { overflow: hidden; }
.modal { background: #fff; border-radius: 19px; width: min(680px, 100%); max-height: min(770px, 92vh); overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.26); }
.modal.large { width: min(920px, 100%); }
.modal-head { padding: 17px 19px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h4 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px 19px 20px; }
.modal-foot { padding: 13px 19px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-body label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 13px; }
.modal-body label + label { margin-top: 12px; }
.modal-body input, .modal-body textarea, .modal-body select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fbfdfc; color: var(--ink); font: inherit; transition: border-color .18s ease, box-shadow .18s ease; }
.modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus { outline: none; border-color: #548f6b; box-shadow: 0 0 0 3px rgba(41,97,64,.16); }
.modal-body textarea { min-height: 96px; resize: vertical; }
.modal-body .ai-check { display: flex !important; align-items: center; gap: 8px; margin-top: 14px; }
.modal-body .ai-check input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #27684e; }
.modal-form .modal-foot { position: sticky; bottom: 0; background: #fff; border-radius: 0 0 19px 19px; }
.close { border: 0; background: transparent; font-size: 21px; color: var(--ink-soft); }
.chat { display: grid; gap: 9px; margin: 12px 0; }
.bubble { max-width: 86%; padding: 10px 12px; background: #f0f4f3; border-radius: 12px 12px 12px 3px; font-size: 13px; line-height: 1.5; }
.bubble.me { background: #dff2ed; border-radius: 12px 12px 3px 12px; justify-self: end; }
.bubble small { display: block; color: #6c8186; font-size: 10px; margin-top: 4px; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.quick { border: 1px solid #cfe1dd; color: #18726b; background: #f5fbf9; border-radius: 99px; padding: 6px 8px; font-size: 11px; }
.login-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.login-role { text-align: left; border: 1px solid var(--line); background: white; padding: 13px; border-radius: 12px; }
.login-role:hover { border-color: #73b9ae; background: #f5fcfa; }
.login-role b { font-size: 13px; display: block; }
.login-role span { color: var(--ink-soft); font-size: 11px; display: block; margin-top: 4px; }

.toast { position: fixed; bottom: 21px; right: 21px; max-width: min(380px, calc(100vw - 42px)); background: #173d4e; color: white; padding: 12px 14px; border-radius: 11px; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 13px; z-index: 50; animation: slide-in .2s ease-out; }
@keyframes slide-in { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity:1; } }
.empty { padding: 30px 12px; color: var(--ink-soft); text-align: center; font-size: 13px; }
.hide { display: none !important; }

@media (max-width: 780px) {
  .app-shell { display: block; }
  .side { position: fixed; z-index: 10; left: 0; top: 0; bottom: 0; height: 100vh; width: 272px; transform: translateX(-101%); transition: transform .2s ease; box-shadow: 14px 0 35px rgba(0,0,0,.19); flex: none; }
  .side.open { transform: translateX(0); }
  .topbar { height: auto; padding: 12px 15px; }
  .mobile-menu { display: block; }
  .top-title h2 { font-size: 15px; }
  .top-title p { display: none; }
  .top-title .eyebrow { font-size: 9px; }
  .top-actions .system-status { display: none; }
  .content { padding: 18px 15px 36px; }
  .site-footer { margin: 0 15px; padding-bottom: 18px; display: grid; gap: 4px; }
  .page-heading { display:block; }
  .page-heading > .button { margin-top: 12px; }
  .hero { padding: 18px; display:block; }
  .hero-visual { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; margin-top: 15px; }
  .hero-visual img { width: 48px; height: 48px; }
  .hero .right { display: contents; }
  .hero .big-time { text-align: right; }
  .hero .small-time { grid-column: 1 / -1; text-align: left; font-size: clamp(9px, 2.7vw, 12px); }
  .metric-grid { gap: 9px; }
  .metric { padding: 12px; }
  .metric .number { font-size: 23px; }
  .shift-card { align-items: flex-start; }
  .shift-actions { justify-content: flex-start; margin-left: 0; }
  .top-actions .clock-select { max-width: 135px; }
  .top-actions .desktop-only { display:none; }
  .toolbar { align-items: stretch; }
  .search { width:100%; min-width: 0; }
}

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 34px 20px; background: radial-gradient(circle at 10% 0%, #e8f3ee 0, transparent 35%), linear-gradient(135deg, #f7f8f5, #eef5f0); position: relative; overflow: hidden; }
.auth-page:after { content:""; position:absolute; width:460px; height:460px; border:1px solid rgba(41,97,64,.1); border-radius:50%; right:-180px; bottom:-230px; }
.auth-layout { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); background: rgba(255,255,255,.72); border: 1px solid rgba(221,231,225,.95); border-radius: 24px; overflow: hidden; box-shadow: 0 22px 60px rgba(41, 97, 64, .14); position: relative; z-index: 1; }
.auth-layout.compact { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); }
.auth-intro { min-height: 560px; background: #296140; color: white; padding: 30px 34px; position: relative; overflow: hidden; }
.auth-intro:before { content:""; position:absolute; width:410px; height:410px; border:1px solid rgba(255,255,255,.14); border-radius:50%; right:-190px; top:-150px; }
.auth-intro:after { content:""; position:absolute; width:240px; height:240px; border:1px solid rgba(213,168,95,.3); border-radius:50%; left:-150px; bottom:-150px; }
.auth-logo { position: relative; z-index: 1; display: inline-block; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.auth-logo .brand-logo { width: 250px; }
.auth-identity { display:flex; align-items:center; gap:10px; margin-top: 32px; position:relative; z-index:1; }
.auth-identity .brand-crest { width: 42px; height: 42px; }
.auth-identity strong, .auth-identity span { display:block; }
.auth-identity strong { font-size: 16px; letter-spacing:.04em; }
.auth-identity span { color:#c9e0d3; font-size:16px; margin-top:2px; }
.auth-message { position:relative; z-index:1; margin-top: 70px; max-width: 430px; }
.auth-message .eyebrow, .section-kicker { font-size: 10px; letter-spacing: .15em; font-weight: 700; color: #8bbba1; }
.auth-message h1 { font-size: 31px; line-height:1.35; letter-spacing:-.05em; margin: 14px 0 13px; }
.auth-message h1 em { color: #f0d18e; font-style: normal; }
.auth-message p { color: #d4e7dc; line-height:1.7; font-size:13px; margin:0; }
.auth-mascot { position:absolute; right:28px; bottom:-13px; width: 165px; height: 165px; object-fit:contain; z-index:1; filter: drop-shadow(0 10px 10px rgba(0,0,0,.22)); }
.auth-mascot.small { width: 125px; height: 125px; right: 34px; bottom: 14px; }
.auth-card { width: 100%; background: var(--surface); padding: 50px 46px 42px; display:flex; flex-direction:column; justify-content:center; }
.auth-card-heading h2 { font-size: 27px; letter-spacing:-.04em; margin: 11px 0 6px; }
.auth-card-heading .muted { font-size:13px; margin:0; }
.auth-card .brand-mark { margin-bottom: 16px; }
.auth-card h1 { font-size: 23px; line-height: 1.45; margin: 0 0 8px; }
.auth-card form { display: grid; gap: 14px; margin-top: 28px; }
.auth-card label, .form-grid label, .notice label { display: grid; gap: 8px; color: #3a5a48; font-size: 13px; font-weight: 600; }
.auth-card input, .form-grid input, .form-grid select, .form-grid textarea, .notice input { width: 100%; border: 1px solid #d4e0d9; border-radius: 10px; padding: 10px 14px; background: #ffffff; color: #243b2e; font-size: 14px; line-height: 1.5; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-card input:hover, .form-grid input:hover, .form-grid select:hover, .form-grid textarea:hover, .notice input:hover { border-color: #b8cfc2; background: #fdfefe; }
.auth-card input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .notice input:focus { outline:none; border-color:#548f6b; background:#ffffff; box-shadow:0 0 0 3px rgba(41,97,64,.12); }
.form-grid textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.button.primary { background: var(--teal); color: white; }
.auth-card .button.primary { background: #296140; }
.auth-card .button.primary:hover { background: #2f8054; filter: none; }
.button.danger { color: white; background: var(--coral); }
.notice.error { border-color: #e9b4ae; background: #fff1ef; color: #9d3e35; }
.auth-note { color: var(--ink-soft); font-size: 12px; line-height: 1.6; margin-bottom: 0; }
.auth-submit { width:100%; display:flex; align-items:center; justify-content:center; gap:9px; padding:12px 14px; margin-top:2px; font-size:13px; }
.auth-submit span { font-size:18px; line-height:0; transition:transform .18s ease; }
.auth-submit:hover span { transform:translateX(3px); }
.auth-rule { margin-top:22px; padding:12px 13px; border-left:3px solid var(--gold); background:#fffaf0; border-radius:0 10px 10px 0; }
.auth-rule b { font-size:12px; color:#78591f; }
.auth-rule p { margin:5px 0 0; color:#847354; font-size:11px; line-height:1.6; }
.auth-meta { color:#a1aaa5; font-size:10px; line-height:1.5; margin-top:26px; }
.metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.metric { padding: 16px; display: grid; gap: 8px; flex: 1 1 220px; min-width: 0; justify-items: center; text-align: center; }
.metric span { color: var(--ink-soft); font-size: 13px; }
.metric .number { font-size: 25px; font-weight: 800; line-height: 1.1; }
.metric b { font-size: 25px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; font-size: 13px; vertical-align: top; }
th { color: var(--ink-soft); font-weight: 600; background: #f7faf9; }
td small { display: block; color: var(--ink-soft); margin-top: 4px; }
.attendance-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.attendance-grid .notice { display: grid; gap: 9px; flex: 1 1 260px; min-width: 0; }
.case-list, .notice-list { display: grid; gap: 11px; }
.case-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.case-row p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.notice { border: 1px solid var(--line); border-radius: 13px; padding: 14px; display: grid; gap: 6px; background: #fff; }
.notice span, .notice small { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
/* 签到审核 · AI OCR 结果展示 */
.review-item { align-items: flex-start; }
.review-item > div:first-child { display: grid; gap: 8px; min-width: 0; flex: 1 1 360px; }
.review-item .pill + .pill { margin-left: 4px; }
.review-sub { color: var(--ink-soft); font-size: 12px; margin: 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.review-item .review-date-fields { flex: 1 1 220px; min-width: 0; }
.ocr-box { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 10px; background: #fbfcfb; display: grid; gap: 7px; }
.ocr-muted { color: var(--ink-soft); font-size: 12px; }
.ocr-error { color: #aa3f38; font-size: 12px; line-height: 1.5; }
.ocr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 5px 10px; }
.ocr-cell { display: grid; gap: 1px; min-width: 0; }
.ocr-cell span { font-size: 11px; color: var(--ink-soft); }
.ocr-cell b { font-size: 13px; font-weight: 600; word-break: break-all; }
.ocr-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ocr-note { border-radius: 8px; background: var(--teal-soft); padding: 7px 9px; display: grid; gap: 2px; }
.ocr-note b { font-size: 12px; color: #1e5d54; }
.ocr-note span { font-size: 12px; color: #355e59; line-height: 1.5; }
.ocr-raw summary { font-size: 12px; color: #2460ab; cursor: pointer; }
.ocr-raw p { font-size: 12px; color: #55696f; background: #f4f6f5; padding: 8px; border-radius: 8px; line-height: 1.6; word-break: break-all; margin-top: 6px; }
.ocr-engine { color: #90a0a4; font-size: 11px; }
.ocr-rec { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.ocr-rec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ocr-rec-target { background: rgba(41,97,64,.05); border: 1px solid rgba(41,97,64,.18); border-radius: 10px; padding: 8px 9px; margin: 2px 0 0; }
.ocr-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ocr-rec-title { font-size: 12px; color: var(--ink-soft); }
.ocr-target-mark { color: #296140; font-size: 12px; background: rgba(41,97,64,.12); padding: 2px 8px; border-radius: 999px; }
.ocr-notfound { background: rgba(204,132,0,.10); }
.ocr-notfound b, .ocr-notfound span { color: #8a5a00; }
@media (max-width: 780px) { .auth-page { padding: 16px; } .auth-layout, .auth-layout.compact { display:block; width:min(470px,100%); } .auth-intro { min-height: 280px; padding: 24px; } .auth-intro .auth-logo .brand-logo { width: 210px; } .auth-identity { margin-top: 20px; } .auth-message { margin-top: 28px; max-width: 290px; } .auth-message h1 { font-size: 24px; margin: 9px 0; } .auth-message p { font-size: 12px; } .auth-mascot { width: 112px; height:112px; right: 12px; bottom: -7px; } .auth-mascot.small { width: 96px; height:96px; right:14px; bottom:5px; } .auth-card { padding: 28px 24px 26px; } .auth-card-heading h2 { font-size: 23px; } }
.info-box { margin-top: 14px; border-radius: 12px; padding: 12px 14px; color: #476b70; background: var(--teal-soft); font-size: 13px; line-height: 1.55; }
.empty { padding: 24px; color: var(--ink-soft); text-align: center; }
@media (max-width: 780px) { .auth-page { padding: 16px; } .auth-layout, .auth-layout.compact { display:block; width:min(470px,100%); } .auth-intro { min-height: 280px; padding: 24px; } .auth-intro .auth-logo .brand-logo { width: 210px; } .auth-identity { margin-top: 20px; } .auth-message { margin-top: 28px; max-width: 290px; } .auth-message h1 { font-size: 24px; margin: 9px 0; } .auth-message p { font-size: 12px; } .auth-mascot { width: 112px; height:112px; right: 12px; bottom: -7px; } .auth-mascot.small { width: 96px; height:96px; right:14px; bottom:5px; } .auth-card { padding: 28px 24px 26px; } .auth-card-heading h2 { font-size: 23px; } }

@media (max-width: 780px) {
  .attendance-heading-actions { justify-content: flex-start; margin-top: 12px; }
  .attendance-upload-grid .upload-box { min-height: auto; }
}

/* 小图钉群聊：保留现有绿色主题，使用左右两栏的 QQ 式群组布局 */
.chat-layout { display: flex; gap: 14px; align-items: stretch; min-height: 600px; }
.chat-rooms, .chat-panel { min-width: 0; overflow: hidden; }
.chat-rooms { padding: 0; flex: 0 0 300px; }
.chat-panel { padding: 0; flex: 1 1 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.chat-rooms-head, .chat-panel-head { padding: 16px 17px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-rooms-head h4, .chat-panel-head h4 { margin: 0; font-size: 16px; }
.chat-rooms-head p, .chat-panel-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.chat-room-list { padding: 8px; display: grid; gap: 4px; max-height: 650px; overflow: auto; }
.chat-room-item { width: 100%; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 11px; padding: 11px 10px; text-align: left; display: grid; gap: 6px; transition: background .16s ease, border-color .16s ease; }
.chat-room-item:hover { background: #f1faf6; border-color: #d8e9df; }
.chat-room-item.active { background: var(--teal-soft); border-color: #b8d9c6; }
.room-top, .room-labels { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.room-labels { color: #84918e; font-size: 10px; }
.room-kind { color: #18726b; background: #e2f4ed; border-radius: 99px; padding: 2px 6px; }
.room-kind.incident { color: #8b5812; background: #fff0d2; }
.room-preview { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.room-unread { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 99px; color: white; background: var(--coral); font-size: 10px; }
.chat-panel { padding: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.chat-members { min-height: 48px; padding: 9px 15px; border-bottom: 1px solid #edf1ef; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.members-title { color: var(--ink-soft); font-size: 11px; font-weight: 700; margin-right: 3px; }
.member-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e1ebe6; background: #fbfdfc; color: #4f6867; border-radius: 99px; padding: 3px 7px 3px 3px; font-size: 10px; }
.member-chip i { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: #dceee8; color: var(--teal); font-style: normal; font-weight: 800; }
.member-chip small { color: #84918e; font-size: 9px; }
.member-more { color: var(--teal); font-size: 10px; }
.chat-message-list { min-height: 340px; max-height: 470px; overflow: auto; padding: 17px; background: #fbfdfc; display: flex; flex-direction: column; gap: 10px; }
.chat-message { width: fit-content; max-width: min(78%, 600px); align-self: flex-start; position: relative; }
.chat-message-actions { position: absolute; top: 6px; right: -58px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.chat-message:hover .chat-message-actions, .chat-message-actions:focus-within { opacity: 1; }
.chat-message-del { padding: 3px 8px; border: 1px solid #e2e8e5; border-radius: 8px; background: #fff; color: #b0422f; font-size: 11px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.chat-message-del:hover { background: #fdf1ee; border-color: #ecc8c0; }
.chat-message.me .chat-message-actions { right: auto; left: -58px; }
.chat-message-body.recalled { color: #9aa5a0; font-style: italic; }
.chat-message.me { align-self: flex-end; }
.chat-message-body { padding: 10px 12px; border: 1px solid #e4ece7; border-radius: 13px 13px 13px 4px; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.me .chat-message-body { border-color: #c3e1d2; border-radius: 13px 13px 4px 13px; background: #e2f4ed; }
.chat-message.system { align-self: center; max-width: 92%; }
.chat-message.system .chat-message-body { border: 0; border-left: 3px solid var(--gold); border-radius: 0 9px 9px 0; color: #806020; background: #fff8e9; font-size: 12px; }
.chat-message.notice-message .chat-message-body { border-color: #b8d9c6; background: #eef8f2; }
.chat-message-tag { display: inline-block; margin-right: 6px; color: #89601c; background: #ffefcf; border-radius: 99px; padding: 2px 6px; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.chat-message-meta { color: #8b9996; font-size: 10px; margin: 4px 5px 0; }
.chat-message.me .chat-message-meta { text-align: right; }
.chat-composer { padding: 12px 15px 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer-top { min-height: 25px; display: flex; align-items: center; }
.chat-composer-top label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 11px; }
.chat-composer-top select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: #fbfdfc; color: var(--ink); font-size: 11px; }
.chat-composer textarea { width: 100%; min-height: 70px; margin-top: 7px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; color: var(--ink); background: #fbfdfc; }
.chat-composer textarea:focus { outline: none; border-color: #6baa85; box-shadow: 0 0 0 3px rgba(63,138,104,.13); }
.chat-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.chat-composer-foot .muted { font-size: 10px; }
.incident-row { background: #fff; }
.incident-row .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.case-note { display: block; margin-top: 6px; color: #806020; font-size: 11px; }
.case-chat-preview { min-height: 115px; max-height: 240px; overflow: auto; border: 1px solid #e4ece7; border-radius: 12px; padding: 11px; background: #fbfdfc; display: flex; flex-direction: column; gap: 8px; }
.resolution-summary { display: grid; gap: 5px; border: 1px solid #e4ece7; border-radius: 11px; padding: 11px 13px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.resolution-summary b { color: #8b5812; }
.resolution-summary.normal { border-color: #c3e1d2; background: #f1faf6; }
.resolution-summary.normal b { color: var(--teal); }

@media (max-width: 940px) {
  .chat-layout { flex-direction: column; min-height: auto; }
  .chat-rooms { flex: none; max-height: 280px; }
  .chat-room-list { max-height: 205px; }
  .chat-message-list { min-height: 300px; max-height: 410px; }
  .chat-message { max-width: 88%; }
  .chat-panel-head { padding: 14px; }
  .chat-members { padding: 8px 12px; }
  .incident-row .actions { justify-content: flex-start; }
}
/* Shared model selection across chat, duty hints, announcements and reports. */
.ai-selection-bar{display:flex;align-items:center;gap:20px;margin:20px 32px 0;padding:16px 20px;background:#f2f7f4;border:1px solid #d4e2d9;border-radius:14px}
.ai-selection-bar label{display:flex;flex-direction:column;gap:6px;font-weight:650;min-width:260px;margin:0}
.ai-selection-bar select{width:100%;max-width:390px;padding:9px 12px;border:1px solid #bacfc2;border-radius:8px;background:white;color:#254936;font:inherit}
.ai-selection-bar p{margin:0 0 5px;color:#315c43;font-size:14px}
.ai-selection-bar small{display:block;color:#65786c;line-height:1.6;font-size:12px}
@media(max-width:800px){.ai-selection-bar{margin:12px 16px 0;align-items:stretch;flex-direction:column;gap:12px}.ai-selection-bar label{min-width:0}.ai-selection-bar select{max-width:100%}}

/* ============ 弹性盒子模型 · 全局自适应保险 ============ */
/* 任何图片/媒体不超过容器，防止换设备后被撑破 */
img, svg, canvas, video { max-width: 100%; }
/* 页面禁止横向漂移（clip 不产生滚动容器，不破坏 sticky） */
body { overflow-x: clip; }
/* flex/grid 子项默认不强制扩张超出容器 */
.flex-col, .grid-2 > *, .metric-grid > *, .form-grid > *, .shift-card > *, .chat-layout > *, .case-row > * { min-width: 0; }

/* 窄屏表格仍允许容器内横向滚动（不撑破页面） */
@media (max-width: 940px) {
  .data-table-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---- 高度方向自适应：矮窗口（笔记本/外接屏常见 1280x720 等）时紧凑化，避免内容被挤出视口 ---- */
@media (max-height: 780px) and (min-width: 781px) {
  .topbar { min-height: 62px; padding: 10px 26px; }
  .top-title h2 { font-size: 17px; margin: 0; }
  .content { padding: 20px 26px 28px; }
  .page-heading { margin-bottom: 14px; }
  .page-heading h3 { font-size: 21px; margin-top: 2px; }
  .hero { padding: 16px 20px; }
  .hero h4 { font-size: 18px; margin-top: 4px; }
  .hero p { margin-top: 5px; line-height: 1.55; }
  .hero-visual img { width: 46px; height: 46px; }
  .hero .big-time { font-size: 24px; }
  .hero .big-time b { font-size: 20px; }
  .metric-grid { margin: 12px 0 14px; }
  .metric { padding: 11px 13px; }
  .metric .number { font-size: 22px; }
  .metric span { font-size: 12px; }
  .side { padding-top: 16px; gap: 13px; }
  .side .account-card { padding: 12px; }
  .side .nav-section-title { margin: 13px 0 5px; }
  .side .nav-item { padding: 8px 10px; }
  .chat-layout { min-height: 480px; }
  .collaboration-workspace .ai-conversation { max-height: 56vh; min-height: 220px; }
  .chat-message-list { min-height: 280px; max-height: 400px; }
  .data-table-wrap, .table-wrap { max-height: 60vh; overflow: auto; }
}
/* 极矮窗口进一步压缩 */
@media (max-height: 640px) and (min-width: 781px) {
  .hero { display: block; }
  .hero-visual { margin-top: 10px; }
  .hero .right { display: contents; }
  .hero .small-time { grid-column: 1 / -1; text-align: left; }
  .side { padding: 12px 12px 14px; gap: 10px; }
  .side .brand-title { font-size: 15px; }
  .side .account-card .sub { display: none; }
}

/* ================= 前端体验优化：弹窗 / 消息 / 提示 特效 ================= */

/* —— 弹窗进出场过渡 —— */
.modal-backdrop-enter-active { transition: opacity .24s ease; }
.modal-backdrop-leave-active { transition: opacity .2s ease; }
.modal-backdrop-enter-from, .modal-backdrop-leave-to { opacity: 0; }
.modal-backdrop-enter-active .modal { animation: modalPop .32s cubic-bezier(.34, 1.56, .64, 1); }
.modal-backdrop-leave-active .modal { animation: modalShrink .2s ease-in forwards; }
@keyframes modalPop { from { transform: translateY(18px) scale(.93); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes modalShrink { to { transform: scale(.96); opacity: 0; } }
.modal-backdrop.leaving .modal { pointer-events: none; }

/* —— 群聊消息入场 —— */
.chat-message { animation: msgIn .3s cubic-bezier(.22, .9, .36, 1); }
@keyframes msgIn { from { transform: translateY(9px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.chat-message.me { animation-name: msgInMe; }
@keyframes msgInMe { from { transform: translateY(9px) scale(.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* —— 群聊列表选中态 —— */
.chat-room-item { transition: background .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease; }
.chat-room-item:hover { transform: translateX(2px); }
.chat-room-item.active { box-shadow: inset 3px 0 0 #2f7d5f; }

/* —— toast 类型色 —— */
.toast.error { background: #8a2f2f; }
.toast.success { background: #1e5c41; }

/* —— 滚动条美化 —— */
.chat-message-list::-webkit-scrollbar, .ai-conversation::-webkit-scrollbar, .chat-room-list::-webkit-scrollbar { width: 8px; }
.chat-message-list::-webkit-scrollbar-thumb, .ai-conversation::-webkit-scrollbar-thumb, .chat-room-list::-webkit-scrollbar-thumb { background: #c9d9cf; border-radius: 99px; }

/* —— 分页条 —— */
.pagination-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; padding: 12px 2px 2px; border-top: 1px dashed var(--line); margin-top: 12px; }
.pagination-total { color: var(--ink-soft); font-size: 12px; margin-right: auto; }
.pagination-nav { display: inline-flex; align-items: center; gap: 8px; }
.pagination-indicator { min-width: 56px; text-align: center; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.pagination-size { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; }
.pagination-size select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fbfdfc; color: var(--ink); font-size: 12px; }
.pagination-bar .button.small:disabled { opacity: .4; cursor: not-allowed; }

/* —— 群聊搜索框 —— */
.chat-room-search { display: block; margin: 10px 12px 4px; }
.chat-room-search input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: #fbfdfc; color: var(--ink); font-size: 12px; }
.chat-room-search input:focus { outline: none; border-color: #548f6b; box-shadow: 0 0 0 3px rgba(41, 97, 64, .14); }

/* —— 表格与卡片文字防溢出加固 —— */
td { word-break: break-word; overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; }
.card-body > * { min-width: 0; }
.shift-list, .case-list, .notice-list, .timeline, .handoff-item { min-width: 0; }
.ai-toolbar { flex-wrap: wrap; }
.ai-toolbar label { max-width: 100%; }
.ai-toolbar label.grow, .ai-toolbar label.full { min-width: 0; }
.handoff-item, .knowledge-item { overflow-wrap: anywhere; }
.notice b, .notice span, .notice small { overflow-wrap: anywhere; }
.chat-message-list::-webkit-scrollbar-thumb:hover, .ai-conversation::-webkit-scrollbar-thumb:hover, .chat-room-list::-webkit-scrollbar-thumb:hover { background: #a9c4b2; }
