:root {
  color: #17332e;
  background: #f3f6f5;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --primary-900: #123e38;
  --primary-800: #174d45;
  --primary-700: #1f665a;
  --primary-600: #277d6e;
  --primary-500: #369886;
  --primary-100: #dff1ed;
  --primary-50: #eff8f6;
  --ink: #17332e;
  --muted: #72817e;
  --line: #dfe7e5;
  --surface: #ffffff;
  --canvas: #f3f6f5;
  --warning: #b7791f;
  --danger: #b64b45;
  --shadow: 0 10px 32px rgba(23, 51, 46, 0.07);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 86%, rgba(62, 151, 132, 0.18), transparent 26%),
    linear-gradient(165deg, #123e38 0%, #174b43 55%, #103731 100%);
  color: #fff;
  box-shadow: 8px 0 28px rgba(13, 43, 38, 0.08);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; color: inherit; text-decoration: none; }
.brand__mark { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; background: rgba(255,255,255,.11); box-shadow: inset 0 1px rgba(255,255,255,.18); }
.brand__mark svg { width: 25px; height: 25px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .06em; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.57); font-size: 10px; letter-spacing: .16em; }
.nav-list { display: grid; gap: 7px; }
.nav-item { width: 100%; height: 47px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; color: rgba(255,255,255,.67); text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.is-active { background: linear-gradient(100deg, rgba(255,255,255,.17), rgba(255,255,255,.08)); color: #fff; box-shadow: inset 3px 0 #82d3c2; }
.scope-note { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; background: rgba(255,255,255,.065); }
.scope-note__title { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.scope-note__title svg { width: 18px; color: #8bd4c4; }
.scope-note p { min-height: 38px; margin: 10px 0 12px; color: rgba(255,255,255,.59); font-size: 11px; line-height: 1.75; }
.scope-note button { padding: 0; border: 0; background: transparent; color: #9bdece; font-size: 11px; }
.scope-note button:hover { color: #fff; }
.sidebar__footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 18px 8px 2px; color: rgba(255,255,255,.45); font-size: 10px; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: #8ba09c; box-shadow: 0 0 0 4px rgba(139,160,156,.09); }
.health-dot.is-online { background: #69d2ab; box-shadow: 0 0 0 4px rgba(105,210,171,.1); }
.health-dot.is-error { background: #e47c72; box-shadow: 0 0 0 4px rgba(228,124,114,.1); }

.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { height: 74px; display: flex; align-items: center; gap: 16px; padding: 0 30px; border-bottom: 1px solid #e3eae8; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.topbar .eyebrow { margin: 0 0 2px; color: var(--primary-600); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: .01em; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #60716e; transition: .18s; }
.icon-button:hover { border-color: #aacbc4; color: var(--primary-700); background: var(--primary-50); }
.icon-button svg { width: 19px; }
.profile-chip { min-width: 320px; max-width: 520px; height: 49px; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; }
.profile-chip__avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-100); color: var(--primary-700); font-size: 15px; font-weight: 800; }
.profile-chip > span:nth-child(2) { min-width: 0; flex: 1; }
.profile-chip strong, .profile-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip strong { max-width: 430px; font-size: 12px; }
.profile-chip small { max-width: 430px; margin-top: 2px; color: #82908e; font-size: 10px; }
.profile-chip > svg { width: 17px; color: #8e9b99; }
.mobile-menu { display: none; width: 39px; height: 39px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

.content-wrap { max-width: 1500px; margin: 0 auto; padding: 14px 26px 32px; }
.scope-banner { min-height: 76px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid #d9e7e4; border-radius: 14px; background: linear-gradient(100deg, #f4faf8, #fff); box-shadow: 0 4px 18px rgba(30, 78, 70, .035); }
.scope-banner__icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-100); color: var(--primary-700); }
.scope-banner__icon svg { width: 22px; }
.scope-banner strong { font-size: 13px; }
.scope-banner p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.scope-banner > span { margin-left: auto; color: #94a09e; font-size: 10px; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 10px 0 12px; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #e2e9e7; border-radius: 13px; background: var(--surface); box-shadow: 0 5px 18px rgba(22, 53, 47, .04); }
.stat-card__icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; }
.stat-card__icon svg { width: 20px; }
.stat-card--total .stat-card__icon { color: #386b91; background: #edf5fa; }
.stat-card--waiting .stat-card__icon { color: #a66f1d; background: #fff5e3; }
.stat-card--processing .stat-card__icon { color: #227d70; background: #e8f7f3; }
.stat-card--done .stat-card__icon { color: #667b77; background: #f0f3f2; }
.stat-card div:last-child { min-width: 0; }
.stat-card span, .stat-card small { display: block; }
.stat-card span { color: #6d7d7a; font-size: 11px; }
.stat-card strong { display: inline-block; margin: 1px 0; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.stat-card small { overflow: hidden; color: #a0aaa8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.filter-card, .table-card { border: 1px solid #e1e8e6; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.filter-card { margin-bottom: 12px; padding: 14px 17px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 15px; }
.section-heading p { margin: 5px 0 0; color: #8a9794; font-size: 10px; }
.text-button { display: flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: var(--primary-700); font-size: 11px; }
.text-button svg { width: 15px; transition: transform .2s; }
.text-button.is-open svg { transform: rotate(180deg); }
.region-filters { margin-bottom: 12px; padding: 11px 13px; border: 1px solid #dce9e6; border-radius: 11px; background: #f7fbfa; }
.region-filters[hidden], .region-filter-field[hidden] { display: none; }
.region-filters__heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.region-filters__heading strong { color: #31564f; font-size: 11px; }
.region-filters__heading span { color: #8a9794; font-size: 9px; }
.region-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 13px; align-items: end; }
.advanced-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 14px; padding-top: 15px; border-top: 1px dashed var(--line); }
.advanced-filters[hidden] { display: none; }
.field { min-width: 0; display: block; }
.field > span { display: block; margin: 0 0 7px; color: #657572; font-size: 10px; font-weight: 600; }
.field > span b { color: #c5524a; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d8e1df; border-radius: 9px; outline: none; background: #fbfcfc; transition: .18s; }
.field input, .field select { height: 39px; padding: 0 11px; }
.field textarea { min-height: 112px; padding: 10px 11px; line-height: 1.7; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #aeb8b6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #69ad9f; background: #fff; box-shadow: 0 0 0 3px rgba(39,125,110,.08); }
.field input:disabled { background: #f0f3f2; color: #9aa6a3; }
.field input[readonly] { cursor: not-allowed; background: #eef3f2; color: #566b66; font-weight: 650; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 11px; top: 50%; width: 17px; color: #8d9a98; transform: translateY(-50%); }
.input-with-icon input { padding-left: 35px; }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 150px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 650; transition: .18s; }
.button svg { width: 16px; }
.button--primary { border-color: var(--primary-700); background: var(--primary-700); color: #fff; box-shadow: 0 6px 14px rgba(31,102,90,.14); }
.button--primary:hover { border-color: var(--primary-800); background: var(--primary-800); }
.button--ghost { border-color: #d8e1df; background: #fff; color: #667572; }
.button--ghost:hover { border-color: #a9c2bd; color: var(--primary-700); background: #f8fbfa; }
.button--soft { border-color: #cbe4de; background: #edf8f5; color: var(--primary-700); }
.button--warning { border-color: #ead5ad; background: #fff8eb; color: #9a681d; }
.button--danger-text { border-color: #ecd1ce; background: #fff; color: var(--danger); }

.table-card { overflow: hidden; font-weight: 550; }
.table-card__heading { align-items: center; margin: 0; padding: 19px 21px 16px; border-bottom: 1px solid #e7eceb; }
.table-card__heading h2 { font-size: 17px; font-weight: 750; }
.table-card__heading p { font-size: 11px; font-weight: 550; }
.legend { display: flex; align-items: center; gap: 16px; color: #879491; font-size: 10px; font-weight: 600; }
.legend > span { display: flex; align-items: center; gap: 6px; }
.legend__dot { width: 7px; height: 7px; border-radius: 50%; background: #adb9b6; }
.legend__dot--active { background: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1140px; border-collapse: collapse; table-layout: fixed; }
th { padding: 12px 14px; background: #f7f9f8; color: #71817d; font-size: 11px; font-weight: 700; text-align: left; }
th:nth-child(1) { width: 15%; } th:nth-child(2) { width: 9%; } th:nth-child(3) { width: 26%; } th:nth-child(4) { width: 20%; } th:nth-child(5) { width: 12%; } th:nth-child(6) { width: 10%; } th:nth-child(7) { width: 8%; text-align: center; }
td { padding: 15px 14px; border-top: 1px solid #edf1f0; color: #3f544f; font-size: 12px; font-weight: 550; line-height: 1.6; vertical-align: middle; }
tbody tr { transition: background .16s; }
tbody tr:hover { background: #fafcfb; }
.record-number { display: block; margin-bottom: 4px; color: #1d5148; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.record-time { display: block; color: #7f8f8b; font-size: 11px; font-weight: 600; }
.submission-number { display: block; overflow-wrap: anywhere; color: #365f57; font-size: 12px; font-weight: 700; line-height: 1.6; }
.mobile-submission-number { display: block; margin-top: 4px; color: #657a75; font-size: 11px; font-weight: 600; }
.issue-type { display: block; overflow: hidden; color: #2f4944; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.region-main { display: block; overflow: hidden; color: #3f5752; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.region-sub { display: block; margin-top: 3px; overflow: hidden; color: #7e8e8a; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.level-pill, .status-tag { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; white-space: nowrap; }
.level-pill { padding: 5px 9px; background: #f0f4f3; color: #596f6a; font-size: 11px; font-weight: 650; }
.handling-department { color: #405b55; font-size: 12px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.status-tag { padding: 5px 10px; font-size: 11px; font-weight: 700; }
.status-tag--waiting { background: #fff5e4; color: #a36b16; }
.status-tag--processing { background: #e9f7f3; color: #227a6c; }
.status-tag--done { background: #edf2f1; color: #667975; }
.status-tag--rejected { background: #fceeed; color: #ad4b44; }
.row-actions { display: flex; align-items: center; justify-content: center; gap: 7px; }
.table-action { padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--primary-700); font-size: 11px; font-weight: 700; }
.table-action:hover { background: var(--primary-50); }
.responsibility-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: #aeb9b7; }
.responsibility-dot.is-active { background: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100); }
.pagination { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 20px; border-top: 1px solid #e8edec; color: #71817d; font-size: 11px; font-weight: 600; }
.pagination > div, .pagination > div > span { display: flex; align-items: center; gap: 5px; }
.pagination button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid #dfe6e4; border-radius: 7px; background: #fff; color: #788784; font-size: 10px; }
.pagination button:hover:not(:disabled), .pagination button.is-current { border-color: var(--primary-700); background: var(--primary-700); color: #fff; }
.pagination button svg { width: 14px; }
.state-panel { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; color: #778683; text-align: center; }
.state-panel strong { margin-top: 12px; color: #475b57; font-size: 13px; }
.state-panel p { margin: 7px 0 0; color: #97a29f; font-size: 10px; }
.state-panel .button { margin-top: 16px; }
.state-panel__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #f0f5f3; color: #79928c; font-size: 20px; font-weight: 700; }
.state-panel--error .state-panel__icon { background: #fff0ee; color: #bd554c; }
.spinner { width: 24px; height: 24px; display: inline-block; border: 2px solid #d8e7e3; border-top-color: var(--primary-600); border-radius: 50%; animation: spin .7s linear infinite; }
.mobile-records { display: none; }

.sidebar-backdrop, .detail-modal-overlay { position: fixed; z-index: 45; inset: 0; background: rgba(13, 33, 29, .42); backdrop-filter: blur(3px); }
.detail-modal-overlay { display: grid; place-items: center; padding: 24px; }
.detail-modal { width: min(900px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #f5f7f6; box-shadow: 0 24px 80px rgba(15, 43, 38, .25); font-weight: 550; animation: detail-modal-in .2s ease-out; }
.detail-modal__header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid #e0e8e6; background: #fff; }
.detail-modal__header p, .modal__header p { margin: 0 0 4px; color: var(--primary-600); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.detail-modal__header h2, .modal__header h2 { margin: 0; font-size: 19px; font-weight: 750; }
.detail-modal__content { flex: 1; overflow-y: auto; padding: 17px; }
.detail-modal__loading { min-height: 320px; display: grid; place-content: center; justify-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.detail-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; padding: 17px 18px; border: 1px solid #dce7e4; border-radius: 13px; background: linear-gradient(110deg, #eff8f6, #fff); }
.detail-status > div { display: flex; align-items: center; gap: 10px; }
.detail-status strong { font-size: 14px; font-weight: 750; }
.detail-status small { color: #5f746f; font-size: 11px; font-weight: 600; }
.detail-section { margin-bottom: 13px; padding: 18px; border: 1px solid #e0e7e5; border-radius: 13px; background: #fff; }
.detail-section > h3, .detail-section__heading h3 { margin: 0 0 16px; font-size: 15px; font-weight: 750; }
.detail-section__heading { display: flex; align-items: center; justify-content: space-between; }
.detail-section__heading span { color: #768681; font-size: 11px; font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.detail-grid div { min-width: 0; }
.detail-grid__wide { grid-column: 1 / -1; padding-top: 12px; border-top: 1px dashed #e3e9e7; }
.detail-grid dt { margin-bottom: 4px; color: #778682; font-size: 11px; font-weight: 650; }
.detail-grid dd { margin: 0; color: #344c46; font-size: 12px; font-weight: 550; line-height: 1.75; overflow-wrap: anywhere; }
.detail-media { display: grid; gap: 10px; }
.detail-media--images { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.detail-media__image { min-width: 0; height: 132px; display: block; overflow: hidden; border: 1px solid #dce5e2; border-radius: 10px; background: #f1f5f4; }
.detail-media__image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .18s ease; }
.detail-media__image:hover img { transform: scale(1.03); }
.detail-media__video { width: 100%; max-height: 360px; border-radius: 10px; background: #10201d; }
.detail-media__audio { width: min(100%, 460px); height: 42px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 11px; padding-bottom: 19px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline__rail { position: relative; display: flex; justify-content: center; }
.timeline__rail::before, .timeline__rail::after, .timeline__dot::before, .timeline__dot::after { content: none !important; display: none !important; border: 0 !important; }
.timeline__dot { position: relative; z-index: 1; width: 12px; height: 12px; flex: 0 0 12px; margin-top: 3px; border: 3px solid #bdd6d0; border-radius: 50%; background: #fff; }
.timeline li:last-child .timeline__dot { width: 16px; height: 16px; flex-basis: 16px; margin-top: 1px; border-color: #e77f28; background: #f39a42; box-shadow: 0 0 0 5px rgba(243, 154, 66, .2); animation: timeline-current-pulse 1.6s ease-in-out infinite; }
.timeline__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.timeline__heading strong { color: #294d45; font-size: 13px; font-weight: 750; }
.timeline__heading time { color: #7f8f8b; font-size: 11px; font-weight: 550; white-space: nowrap; }
.timeline__content p { margin: 0; color: #536a65; font-size: 12px; font-weight: 550; line-height: 1.75; }
.timeline__meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: #7f8f8b; font-size: 11px; font-weight: 550; }
.timeline-edit { padding: 0; border: 0; background: none; color: var(--primary-600); font-size: 11px; font-weight: 650; }
.detail-modal__actions { display: flex; gap: 8px; padding: 13px 17px max(13px, env(safe-area-inset-bottom)); border-top: 1px solid #dfe7e5; background: #fff; }
.detail-modal__actions .button { flex: 1; padding-inline: 10px; }
.detail-modal__actions .button { font-size: 12px; font-weight: 700; }

.modal { width: calc(100% - 28px); max-width: 560px; max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 25px 80px rgba(14, 44, 39, .25); }
.modal::backdrop { background: rgba(13,33,29,.43); backdrop-filter: blur(2px); }
.modal > form { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 21px 15px; border-bottom: 1px solid #e6ecea; }
.modal__body { overflow-y: auto; padding: 18px 21px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 21px; border-top: 1px solid #e4ebe9; background: #fafbfb; }
.security-tip { display: flex; gap: 11px; margin-bottom: 17px; padding: 12px 13px; border: 1px solid #d5e9e4; border-radius: 10px; background: #f1f9f7; color: var(--primary-700); }
.security-tip svg { width: 19px; flex: 0 0 19px; }
.security-tip p { margin: 0; }
.security-tip strong, .security-tip span { display: block; }
.security-tip strong { font-size: 10px; }
.security-tip span { margin-top: 4px; color: #6d837e; font-size: 9px; line-height: 1.6; }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field--wide { grid-column: 1 / -1; }
.profile-region-field.is-disabled { opacity: .46; }
.form-error { margin: 13px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff0ef; color: #ae4841; font-size: 10px; line-height: 1.6; }
.action-record { margin-bottom: 16px; padding: 13px 14px; border-radius: 10px; background: #f3f7f6; }
.action-record span, .action-record strong, .action-record small { display: block; }
.action-record span { color: #8b9895; font-size: 9px; }
.action-record strong { margin: 3px 0; color: var(--primary-800); font-size: 13px; }
.action-record small { color: #82908d; font-size: 9px; }
.action-superior { margin: -6px 0 16px; padding: 13px 14px; border: 1px solid #d7e8e4; border-radius: 10px; background: #f1f9f7; }
.action-superior span, .action-superior strong { display: block; }
.action-superior span { color: #78908a; font-size: 9px; }
.action-superior strong { margin-top: 4px; color: var(--primary-800); font-size: 13px; }
.action-form .field + .field, .action-modal .field + .field { margin-top: 14px; }
.action-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 14px; }
.action-form-grid .field { margin-top: 0 !important; }
.character-count { display: block; margin-top: 4px; color: #9ca7a5; font-size: 9px; text-align: right; }
.character-count b { font-weight: 500; }
.action-warning { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #ecd9b5; border-radius: 8px; background: #fff8eb; color: #8a641f; font-size: 10px; line-height: 1.6; }
.action-modal.is-danger #action-submit { border-color: #af4842; background: #af4842; }
.action-modal.is-warning #action-submit { border-color: #a06d1d; background: #a06d1d; }

.toast-region { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 270px; max-width: 390px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #d8e6e2; border-radius: 11px; background: #fff; color: #40534f; box-shadow: 0 14px 42px rgba(17,48,42,.16); font-size: 10px; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast__icon { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-100); color: var(--primary-700); font-size: 11px; font-weight: 800; }
.toast--error .toast__icon { background: #fcebea; color: #b84c45; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes detail-modal-in { from { transform: translateY(16px) scale(.985); opacity: .55; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes timeline-current-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 5px rgba(243, 154, 66, .2); }
  50% { transform: scale(1.16); box-shadow: 0 0 0 11px rgba(243, 154, 66, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline li:last-child .timeline__dot { animation: none; }
}

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid, .advanced-filters, .region-filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-actions { align-self: end; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 74px; padding: 0 20px; }
  .content-wrap { padding: 19px 18px 30px; }
  .sidebar-backdrop:not([hidden]) { display: block; }
}

@media (max-width: 680px) {
  .modal { left: 14px; right: 14px; width: auto; max-width: none; margin-right: 0; margin-left: 0; }
  .topbar { gap: 11px; padding: 0 13px; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 15px; }
  .topbar__actions > .icon-button { display: none; }
  .profile-chip { min-width: 0; width: 42px; height: 42px; padding: 3px; border: 0; background: transparent; }
  .profile-chip > span:nth-child(2), .profile-chip > svg { display: none; }
  .profile-chip__avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .content-wrap { padding: 14px 11px 26px; }
  .scope-banner { align-items: flex-start; padding: 13px; }
  .scope-banner > span { display: none; }
  .scope-banner p { line-height: 1.55; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0; }
  .stat-card { gap: 9px; padding: 13px 11px; }
  .stat-card__icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
  .stat-card__icon svg { width: 19px; }
  .stat-card strong { font-size: 20px; }
  .stat-card small { display: none; }
  .filter-card { margin-bottom: 12px; padding: 16px 14px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading p { line-height: 1.5; }
  .filter-grid, .advanced-filters, .region-filter-grid { grid-template-columns: 1fr; }
  .region-filters__heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .filter-actions .button { flex: 1; }
  .filter-actions { min-width: 0; }
  .legend { display: none; }
  .table-card__heading { padding: 16px 14px 13px; }
  .table-scroll { display: none; }
  .mobile-records { display: grid; gap: 10px; padding: 11px; }
  .mobile-record { padding: 14px; border: 1px solid #e2e9e7; border-radius: 12px; background: #fff; }
  .mobile-record__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-record__type { margin: 12px 0 5px; color: #294a43; font-size: 12px; font-weight: 700; }
  .mobile-record__meta { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed #e2e8e7; color: #6f817c; font-size: 11px; font-weight: 600; }
  .mobile-record__actions { display: flex; gap: 8px; margin-top: 12px; }
  .mobile-record__actions .button { flex: 1; min-height: 35px; }
  .pagination { padding-inline: 12px; }
  .pagination > div > span button:not(.is-current) { display: none; }
  .detail-modal-overlay { padding: 8px; }
  .detail-modal { max-height: calc(100vh - 16px); border-radius: 13px; }
  .detail-modal__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .profile-form-grid, .action-form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field--wide, .detail-grid__wide { grid-column: auto; }
  .detail-grid div:nth-child(n+2) { padding-top: 10px; border-top: 1px dashed #e3e9e7; }
  .detail-media--images { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .modal__body { padding: 16px; }
  .modal__header, .modal__footer { padding-inline: 16px; }
  .toast-region { right: 10px; bottom: 10px; left: 10px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
