/* Desktop presentation only; document exports retain their original styles. */
.duty-entry-columns { display: none; }

@media screen and (min-width: 861px) {
  :root {
    --bg: #fff;
    --panel-soft: #f8f9fa;
    --line: #e2e5ea;
    --line-strong: #bfc6d0;
    --border: var(--line);
    --text: #262b33;
    --ink: var(--text);
    --muted: #66707e;
    --muted-2: #78818e;
    --primary: #0064c8;
    --primary-dark: #0051a3;
    --primary-soft: #eef3f8;
    --ok: #227548;
    --ok-soft: #edf7f0;
    --shadow: 0 4px 16px rgba(25, 32, 43, .08);
  }

  body {
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
  }

  .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .app-shell.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding: 14px 0; gap: 10px; border-right: 1px solid var(--line); background: #fff; color: var(--text); }
  .sidebar-head { grid-template-columns: minmax(0, 1fr) 28px; padding-bottom: 12px; margin-inline: 12px; border-color: var(--line); }
  .side-brand { gap: 8px; padding: 2px 0; }
  .side-brand .brand-mark { width: 34px; height: 34px; border-radius: 4px; background: #f0f2f5; color: #444d59; font-size: 22px; }
  .side-brand strong { font-size: 19px; }
  .side-brand span { color: #707782; font-size: 11px; }
  .side-brand-button:hover, .side-brand-button:focus-visible { background: #f5f6f8; }
  .side-brand-button:focus-visible { outline-color: #7895b5; }
  .sidebar-toggle { width: 28px; min-width: 28px; min-height: 30px; border-color: transparent; color: #737b86; background: transparent; }
  .sidebar-toggle:hover { color: #343b45; background: #f1f3f6; }
  .user-box { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px 6px; margin-inline: 12px; border: 0; border-radius: 0; background: transparent; }
  .user-avatar { width: 30px; height: 30px; color: #5a6472 !important; background: #eef0f3; font-size: 13px !important; }
  .user-box strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
  .user-box span { margin-top: 2px; color: #707782; font-size: 12px; overflow-wrap: anywhere; }
  .nav-list { gap: 3px; padding-right: 0; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #bdc2ca transparent; }
  .nav-list::-webkit-scrollbar { width: 5px; }
  .nav-list::-webkit-scrollbar-thumb { border-radius: 4px; background: #bdc2ca; }
  .nav-list::-webkit-scrollbar-track { background: transparent; }
  .nav-section-title { margin: 14px 20px 3px; color: #7a818c; font-weight: 400; }
  .nav-section-title:first-child { margin-top: 4px; }
  .nav-btn { min-height: 40px; padding: 8px 20px; gap: 10px; border-radius: 0; color: #303740; font-size: 14px; text-align: left; }
  .nav-btn .ui-icon { width: 17px; height: 17px; color: #737c89; }
  .nav-btn:hover { color: #232a34; background: #f6f7f9; transform: none; }
  .nav-btn:hover .ui-icon { color: #515e70; }
  .nav-btn.active { color: var(--primary); background: #eef3f8; box-shadow: inset -2px 0 var(--primary); font-weight: 500; }
  .nav-btn.active .ui-icon { color: var(--primary); }
  .side-bottom { padding-top: 10px; margin-inline: 12px; border-color: var(--line); }
  .sidebar .side-bottom .btn { min-height: 36px; color: #505965; border-color: var(--line); background: #fff; }
  .sidebar .side-bottom .btn:hover { color: #303740; border-color: #bfc7d0; background: #f7f8fa; }
  .sidebar-collapsed .sidebar { padding: 14px 10px; gap: 8px; }
  .sidebar-collapsed .sidebar-head { grid-template-columns: 1fr; margin-inline: 0; }
  .sidebar-collapsed .side-bottom { margin-inline: 0; }
  .sidebar-collapsed .nav-list { gap: 6px; }
  .sidebar-collapsed .nav-btn { flex-shrink: 0; }
  .sidebar-collapsed .nav-btn.active { box-shadow: inset -2px 0 var(--primary); }
  .sidebar-collapsed .nav-btn:hover { transform: none; }
  .sidebar-collapsed .nav-section-title { flex-shrink: 0; margin: 6px auto; background: var(--line); }

  .topbar { display: flex; flex-wrap: wrap; min-height: 72px; gap: 8px 20px; padding: 12px 20px; background: #fff; backdrop-filter: none; }
  .topbar > div:first-child { flex: 1 1 240px; min-width: 0; }
  .topbar h1 { font-size: 20px; line-height: 1.4; font-weight: 600; }
  .topbar p { margin-top: 2px; font-size: 12px; line-height: 1.6; }
  .top-actions { min-width: 0; margin-left: auto; justify-content: flex-end; align-items: center; gap: 8px; }
  .save-status { min-width: 0; border: 0; background: #f4f5f7; color: #626b78; font-variant-numeric: tabular-nums; }
  .content { padding: 20px; }
  .panel { border-radius: 0; box-shadow: none; padding: 16px; }
  .content > .panel { border: 0; }
  .section-title { gap: 14px; margin-bottom: 14px; align-items: center; }
  .section-title h2, .review-toolbar h2, .case-entry-hero h2 { font-size: 18px; font-weight: 600; }
  .section-title h3 { font-size: 16px; font-weight: 600; }
  .section-title p { margin-top: 4px; font-size: 13px; line-height: 1.6; }
  .btn { min-height: 36px; padding: 6px 14px; border-radius: 4px; color: #3a4350; background: #fff; border-color: #cdd2da; font-size: 14px; font-weight: 400; }
  .btn:hover:not(:disabled) { transform: none; box-shadow: none; border-color: var(--primary); color: var(--primary); background: #f5f8fd; }
  .btn.primary:hover:not(:disabled) { color: #fff; background: var(--primary-dark); }
  .btn.danger:hover:not(:disabled) { color: var(--danger); border-color: #de9b95; background: #fff2f0; }
  .btn.warning:hover:not(:disabled) { color: #7a4b0c; border-color: #ccaa65; background: #fff8e8; }
  .compact-btn { min-height: 30px; padding: 4px 10px; font-size: 13px; }
  .entry-actions .btn, .record-actions .btn { min-height: 30px; padding: 4px 10px; border-color: transparent; background: transparent; font-size: 13px; }
  .btn:disabled { color: #9099a5; background: #f4f5f7; border-color: #e2e5ea; }
  button:focus-visible, a:focus-visible { outline: 2px solid #6694db; outline-offset: 3px; }
  input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #8eaee0; outline-offset: 1px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-radius: 4px; font-size: 14px; }
  input::placeholder, textarea::placeholder { color: #7b8593; opacity: 1; }
  input[readonly] { color: #5d6673; background: #f4f5f7; }
  .field label { font-size: 14px; font-weight: 600; }
  .icon-tile { border-radius: 4px; color: #687381; background: #f2f4f7; }
  .icon-tile.soft { color: #75808f; background: #f5f6f8; }
  .icon-tile.large { width: 38px; height: 38px; }
  .status-pill { font-size: 12px; font-weight: 500; }
  .mode-switch { gap: 0; }
  .mode-switch [data-mode-value] { border-radius: 0; min-height: 34px; padding: 5px 12px; background: #fff; color: var(--muted); }
  .mode-switch [data-mode-value="view"] { border-radius: 4px 0 0 4px; }
  .mode-switch [data-mode-value="edit"] { border-radius: 0 4px 4px 0; margin-left: -1px; }
  .mode-switch [data-mode-value].primary { position: relative; color: var(--primary); border-color: #9db9e2; background: var(--primary-soft); }
  .mode-switch [data-action] { margin-left: 10px; }
  .app-toast { border-radius: 6px; box-shadow: 0 6px 24px rgba(26, 35, 49, .14); }

  .dashboard-page { gap: 16px; }
  .dashboard-hero { grid-template-columns: minmax(0, 1fr) auto; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; gap: 14px; }
  .dashboard-hero h2 { font-size: 20px; font-weight: 600; }
  .dashboard-hero p:last-child { font-size: 13px; max-width: 640px; }
  .dashboard-eyebrow { color: var(--muted); font-weight: 400; font-size: 12px; }
  .dashboard-actions { justify-content: flex-end; gap: 8px; }
  .dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .dashboard-stat { min-height: 116px; padding: 16px; gap: 4px; border-radius: 6px; }
  .dashboard-stat strong { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .dashboard-stat span { color: var(--text); font-weight: 500; font-size: 14px; }
  .dashboard-stat small { font-size: 12px; }
  .dashboard-stat .icon-tile { color: #687381; background: #f2f4f7; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .dashboard-card { display: block; border: 0; }
  .dashboard-list { gap: 0; }
  .dashboard-row { border: 0; border-bottom: 1px solid #eceef2; border-radius: 0; background: transparent; }
  .dashboard-row:last-child { border-bottom: 0; }
  .dashboard-row button { min-height: 66px; padding: 10px 4px; }
  .dashboard-row:hover { background: #f5f8fd; }
  .dashboard-row strong { font-weight: 500; font-size: 14px; }
  .dashboard-row span, .dashboard-row small { font-size: 13px; }
  .dashboard-analytics { margin-top: 0; }
  .knowledge-base-analytics { margin-top: 0; padding-top: 16px; }

  .duty-page { gap: 16px; }
  .duty-hero { align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); }
  .duty-hero h2 { font-size: 18px; font-weight: 600; }
  .duty-hero p { font-size: 13px; margin-top: 4px; }
  .duty-hero-actions { gap: 8px; }
  .duty-page:has(.duty-form) > .duty-hero,
  .gy-handover-page > .duty-hero,
  .control-log-page > .duty-hero { position: sticky; top: var(--sticky-topbar-height); z-index: 12; background: #fff; }
  .duty-entry-panel { --entry-columns: minmax(155px, 1.3fr) minmax(160px, 1.5fr) minmax(70px, .6fr) 72px 144px; padding: 0; border: 1px solid var(--line); overflow: clip; }
  .list-bulkbar { min-height: 58px; padding: 10px 14px; background: #fff; }
  .list-bulkbar .bulk-check { margin-right: auto; }
  .phone-period-filter + .bulk-check { margin-right: 0; }
  .duty-entry-columns, .duty-entry-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 54px; gap: 10px; padding-inline: 14px; }
  .duty-entry-columns { position: sticky; top: var(--sticky-topbar-height); z-index: 3; align-items: center; min-height: 40px; color: #4a5361; border-bottom: 1px solid var(--line); background: #f4f6f9; font-size: 12px; font-weight: 600; }
  .duty-entry-columns > span { text-align: center; }
  .duty-entry-column-labels, .duty-entry-open { display: grid; grid-template-columns: var(--entry-columns); gap: 14px; min-width: 0; padding: 0; }
  .duty-entry-item { min-height: 70px; padding-block: 12px; }
  .duty-entry-item:hover, .duty-entry-item:focus-within { background: #f6f9fe; }
  .duty-entry-item:has(.row-check input:checked) { background: #edf3fc; }
  .duty-entry-title { gap: 8px; }
  .duty-entry-title .icon-tile { width: 28px; height: 28px; }
  .duty-entry-item strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; font-weight: 500; }
  .entry-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
  .entry-owner { color: #4f5a6c; }
  .entry-time { font-size: 12px; font-variant-numeric: tabular-nums; }
  .entry-tags { min-width: 0; }
  .event-tag-list { gap: 4px; }
  .event-tag { border-color: #dfe3e8; border-radius: 3px; background: #f7f8fa; color: #596577; font-size: 12px; font-weight: 400; }
  .duty-entry-title strong { color: var(--primary); }
  .tag-stats-panel { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 16px 0 0; gap: 10px; }
  .tag-stats-head h3 { color: #4f5a6c; font-size: 15px; font-weight: 600; }
  .tag-stats-head p { color: var(--muted); font-size: 12px; }
  .tag-stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; background: #fff; }
  .tag-stat-card { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 16px; gap: 6px; }
  .tag-stat-card strong { color: #4b5668; font-size: 13px; font-weight: 500; }
  .tag-stat-card b { font-size: 18px; font-weight: 500; }
  .empty { padding: 40px 20px; border: 0; color: var(--muted); background: transparent; font-size: 14px; }

  .duty-form { padding: 0; }
  .duty-meta-grid-compact, .duty-read-meta-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .duty-meta-grid .field { padding: 12px 16px; }
  .duty-section-title { padding: 10px 16px; background: #f4f6f9; }
  .duty-section-title h3 { font-size: 16px; color: var(--text); font-weight: 600; }
  .duty-form .field label, .duty-field-heading > label { color: #353e4c; font-weight: 600; }
  .duty-field textarea { color: var(--text); background: #fff; border-color: #cbd1da; }
  .duty-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px #e6eefb; }
  .duty-fill-note { background: #fafbfc; }
  .read-field, .readonly-field { border-color: var(--line); background: #fff; }
  .read-field > span:first-child, .readonly-field > span:first-child { color: var(--muted); }
  .phone-panel { gap: 14px; }
  .phone-toolbar { position: sticky; top: var(--sticky-topbar-height); z-index: 12; gap: 12px; padding-block: 10px; background: #fff; }
  .phone-table th { color: #3e4857; background: #f3f5f8; font-size: 13px; font-weight: 600; }
  .phone-table td { color: var(--text); font-size: 14px; }
  .phone-table th, .phone-table td { border-color: #d4d9e1; }
  .phone-table td:focus-within { background: #f6f9fe; }
  .phone-table-wrap { scrollbar-width: thin; scrollbar-color: #9aa7b9 #eef1f5; }
  .phone-table input:not([type="checkbox"]):not([type="radio"]), .phone-table textarea { border-radius: 0; }
  .template-fill-editor .template-gap { border-radius: 0; }

  .history-filterbar { display: flex; flex-wrap: wrap; background: #f8f9fb; border-color: var(--line); border-radius: 0; gap: 12px; padding: 12px; }
  .history-filterbar .field { flex: 1 1 145px; }
  .history-filterbar .field:first-child { flex: 2 1 210px; }
  .history-filterbar .field:has(.date-combo) { flex-basis: 192px; }
  .history-filterbar > .btn { align-self: flex-end; }
  .history-filterbar > .filter-count { align-self: center; }
  .history-list { gap: 0; }
  .history-list .record-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px; }
  .history-list .record-item:hover, .history-list .record-item:focus-within { background: #f6f9fe; }
  .history-list .record-item:has(.row-check input:checked) { background: #edf3fc; }
  .record-open h3 { color: var(--text); font-size: 15px; font-weight: 500; }
  .record-open p, .record-meta { font-size: 13px; }
  .history-bulkbar { margin-bottom: 0; border-radius: 0; }
  .config-tabs { gap: 6px; }
  .review-toolbar h2 { margin-bottom: 4px; }
  .review-editor .report-editor-sheet { padding: 20px; }
  .dialog-panel, .fullscreen-panel { border-radius: 6px; }
  .dialog-panel h2, .fullscreen-head h2 { font-size: 18px; }
  .procedure-card.selected { background: #fafbfc; box-shadow: none; }
  .procedure-card:hover { background: #fafbfc; box-shadow: 0 0 0 1px #c9d7e6; transform: none; }
  .suggestion-popover { border-color: #d6dce4; background: #fff; box-shadow: 0 4px 16px rgba(35, 45, 58, .1); }
  .suggestion-popover button { border-color: #dde2e8; color: #4c596b; background: #f8f9fb; border-radius: 3px; }
  .suggestion-popover button:hover { background: #eef3f8; color: var(--primary); }

  /* Airport-specific sheets share the same visual hierarchy, not their fields. */
  .gy-duty-sheet, .control-log-sheet { padding: 0; overflow: hidden; }
  .gy-sheet-heading, .control-log-title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
  .gy-sheet-heading h3, .control-log-title-row h3 { margin: 0; font-size: 17px; font-weight: 600; }
  .gy-sheet-heading p, .control-log-title-row span { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
  .gy-date-field { width: 250px; flex: 0 0 250px; }
  .gy-readiness-wrap { overflow-x: auto; padding: 16px; scrollbar-width: thin; }
  .gy-readiness-table { width: max(100%, calc(var(--gy-column-count, 9) * 130px)); border-collapse: collapse; table-layout: fixed; }
  .gy-readiness-table th, .gy-readiness-table td { padding: 8px; border: 1px solid var(--line-strong); text-align: center; }
  .gy-readiness-table th { background: #f3f5f8; font-size: 13px; font-weight: 600; }
  .gy-readiness-table th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 var(--line-strong); }
  .gy-readiness-table input { padding: 6px; min-width: 104px; text-align: center; }
  .gy-shift-number { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0 8px 4px 0; border-radius: 4px; color: var(--primary); background: var(--primary-soft); font-weight: 600; }
  .gy-shift-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .gy-shift-meta > * { min-width: 0; padding: 12px 16px; border-right: 1px solid var(--line); }
  .gy-shift-meta label span { display: block; margin-bottom: 6px; color: #444d5c; font-size: 13px; }
  .gy-handover-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gy-detail-field, .gy-handover-detail-grid > .readonly-field { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .gy-detail-field > span { display: flex; gap: 8px; align-items: center; min-height: 32px; margin-bottom: 6px; font-weight: 500; }
  .gy-detail-field > span b { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 4px; color: var(--muted); background: #f0f2f6; font-size: 12px; }
  .gy-detail-field textarea { min-height: 94px; }
  .gy-transfer-list, .gy-transfer-read { display: grid; gap: 10px; padding: 16px; }
  .gy-transfer-item, .gy-transfer-read-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; }
  .gy-transfer-item > input:not([type="checkbox"]), .gy-transfer-item > textarea { flex: 1 1 280px; width: auto; }
  .gy-transfer-item.done, .gy-transfer-read-item.done { background: var(--ok-soft); border-color: #bad8c7; }
  .gy-transfer-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .gy-transfer-check input { width: 16px; height: 16px; }
  .gy-transfer-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .gy-transfer-note { font-size: 13px; color: var(--muted); }
  .carried-badge { padding: 3px 6px; border-radius: 4px; color: #805d11; background: #fff5da; font-size: 12px; }
  .control-log-section { border-bottom: 1px solid var(--line); }
  .control-log-section-head { display: flex; gap: 12px; padding: 12px 16px; align-items: center; background: #f3f5f8; }
  .control-log-section-head > span { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); font-weight: 600; }
  .control-log-section-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
  .control-log-section-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
  .control-log-grid, .control-log-read-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .control-log-grid > .field, .control-log-read-grid > .read-field { min-width: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
  .control-log-grid > .wide-field { grid-column: 1 / -1; }
  .control-log-grid textarea { min-height: 80px; }
  .control-log-equipment-field { display: flex; flex-direction: column; gap: 6px; }
  .equipment-abnormal-detail textarea { min-height: 80px; border-color: #dfbf7c; background: #fffbf2; }
  .equipment-read-value { display: grid; justify-items: start; gap: 6px; margin-top: 6px; }
  .equipment-read-value p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .equipment-status { padding: 3px 8px; border-radius: 4px; font-size: 13px; }
  .equipment-status.normal { color: var(--ok); background: var(--ok-soft); }
  .equipment-status.abnormal { color: #945709; background: #fff4df; }
  .equipment-status.empty { color: var(--muted); background: #f4f5f7; }

  .duty-config-page { display: grid; gap: 16px; }
  .duty-config-summary, .duty-module-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
  .duty-config-summary > div { display: grid; gap: 4px; padding: 12px; border-left: 2px solid var(--line); }
  .duty-config-summary span, .duty-module-option small, .duty-department-preview p { color: var(--muted); font-size: 13px; }
  .duty-config-summary strong { font-size: 18px; }
  .duty-module-option { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
  .duty-module-option:has(input:checked) { border-color: #b3c9e8; background: var(--primary-soft); }
  .duty-module-option input { flex: 0 0 16px; width: 16px; height: 16px; }
  .duty-module-option span { display: grid; gap: 4px; }
  .duty-department-editor { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 16px; }
  .duty-department-editor textarea { min-height: 240px; }
  .duty-department-preview { min-width: 0; overflow-x: auto; padding: 12px; border: 1px solid var(--line); }
  .department-preview-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(100px, 1fr); width: max-content; min-width: 100%; }
  .department-preview-row span { padding: 10px; border: 1px solid var(--line); text-align: center; }
  .duty-config-note { color: var(--muted); }
  .duty-config-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
}

@media screen and (min-width: 861px) and (max-width: 1199px) {
  .content { padding: 16px; }
  .topbar { padding-inline: 16px; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-actions { justify-content: flex-start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .duty-entry-panel { --entry-columns: minmax(150px, 1.1fr) minmax(110px, 1fr) 65px 64px 100px; }
  .duty-entry-column-labels, .duty-entry-open { gap: 8px; }
  .entry-time { white-space: normal; }
  .duty-entry-title .icon-tile { display: none; }
  .duty-entry-columns, .duty-entry-item { padding-inline: 10px; gap: 6px; }
  .duty-hero { flex-wrap: wrap; }
  .duty-hero-actions { width: 100%; }
  .gy-handover-detail-grid, .control-log-grid, .control-log-read-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duty-department-editor { grid-template-columns: 1fr; }
  .duty-module-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (min-width: 861px) and (max-width: 1000px) {
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duty-entry-panel { --entry-columns: minmax(120px, 1fr) minmax(100px, 1fr) 60px 56px 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell, .sidebar, .nav-btn, .btn { transition: none; }
}

/* Guangyuan-only controller duty statistics */
.controller-duty-page { display: grid; gap: 14px; }
.controller-duty-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.controller-duty-tabs button { min-height: 40px; padding: 8px 18px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-weight: 500; }
.controller-duty-tabs button:hover { color: var(--text); background: #f7f9fc; }
.controller-duty-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); background: #f4f7fc; }
.controller-duty-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.controller-duty-month-control, .controller-duty-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.controller-duty-month-control label { display: flex; align-items: center; gap: 8px; }
.controller-duty-month-control label > span { color: var(--muted); font-size: 13px; }
.controller-duty-month-control select { width: 205px; min-height: 34px; }
.controller-duty-toolbar-actions .btn { white-space: nowrap; }
.controller-duty-sheet { padding: 0; overflow: hidden; }
.controller-duty-sheet-title { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 62px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: center; }
.controller-duty-sheet-title h2 { margin: 0; font-size: 20px; font-weight: 600; }
.controller-duty-sheet-title span { color: var(--muted); font-size: 13px; }
.controller-duty-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.controller-duty-meta-grid > div, .controller-duty-meta-grid > label { display: grid; align-content: center; gap: 5px; min-height: 72px; padding: 10px 14px; border-right: 1px solid var(--line); }
.controller-duty-meta-grid > label { grid-column: span 2; }
.controller-duty-meta-grid > :nth-child(4), .controller-duty-meta-grid > :last-child { border-right: 0; }
.controller-duty-meta-grid span { color: var(--muted); font-size: 12px; }
.controller-duty-meta-grid strong { font-size: 14px; font-weight: 600; }
.controller-duty-meta-grid input { min-height: 34px; padding: 6px 9px; }
.controller-duty-table-wrap { max-height: calc(100vh - 330px); min-height: 470px; overflow: auto; scrollbar-width: thin; scrollbar-color: #97a5b8 #edf0f4; }
.controller-duty-table { width: max(100%, 1510px); border-collapse: separate; border-spacing: 0; table-layout: fixed; font-variant-numeric: tabular-nums; }
.controller-duty-table th, .controller-duty-table td { height: 38px; padding: 0; border-right: 1px solid #d5dae2; border-bottom: 1px solid #d5dae2; text-align: center; }
.controller-duty-table thead th { position: sticky; top: 0; z-index: 4; width: 82px; height: 52px; padding: 5px; color: #394454; background: #edf2f8; font-size: 13px; font-weight: 600; }
.controller-duty-table thead th:first-child, .controller-duty-table tbody th, .controller-duty-table tfoot th { position: sticky; left: 0; z-index: 5; width: 62px; min-width: 62px; background: #f3f5f8; box-shadow: 1px 0 #cfd5de; }
.controller-duty-table thead th:first-child { z-index: 7; }
.controller-duty-table .controller-duty-total-column { width: 92px; }
.controller-duty-table thead input { width: 100%; min-height: 34px; padding: 5px 4px; border-color: transparent; background: transparent; text-align: center; font-weight: 600; }
.controller-duty-table thead input:hover, .controller-duty-table thead input:focus { border-color: #9fb7d8; background: #fff; }
.controller-duty-table tbody th { color: #4f5a69; font-size: 13px; font-weight: 500; }
.controller-duty-table tbody td { background: #fff; }
.controller-duty-table tbody tr:hover td, .controller-duty-table tbody tr:hover th { background: #f7f9fc; }
.controller-duty-table tbody input { width: 100%; height: 37px; padding: 4px; border: 0; border-radius: 0 !important; background: transparent; text-align: center; font-variant-numeric: tabular-nums; }
.controller-duty-table tbody input:focus { background: #eef5ff; box-shadow: inset 0 0 0 2px #7fa3d4; outline: 0; }
.controller-duty-table input[type="number"]::-webkit-inner-spin-button, .controller-duty-table input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.controller-duty-empty-total { color: #a1a9b5; background: #fafbfc !important; }
.controller-duty-table tfoot th, .controller-duty-table tfoot td { height: 38px; color: #303a48; background: #f1f4f8; font-size: 13px; font-weight: 600; }
.controller-duty-table tfoot tr:last-child th, .controller-duty-table tfoot tr:last-child td { position: sticky; bottom: 0; z-index: 3; }
.controller-duty-table tfoot tr:first-child th, .controller-duty-table tfoot tr:first-child td { position: sticky; bottom: 38px; z-index: 3; }
.controller-duty-table tfoot tr th { z-index: 6 !important; }
.controller-duty-note { display: grid; grid-template-columns: 86px minmax(0, 1fr); border-top: 1px solid var(--line); }
.controller-duty-note strong, .controller-duty-note span { padding: 11px 14px; }
.controller-duty-note strong { border-right: 1px solid var(--line); background: #f3f5f8; text-align: center; }
.controller-duty-note span { color: #4f5a69; line-height: 1.65; }
.controller-duty-query-panel { padding: 0; overflow: hidden; }
.controller-duty-query-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) minmax(160px, .8fr) auto; gap: 12px; align-items: end; padding: 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.controller-duty-query-form label { display: grid; gap: 6px; }
.controller-duty-query-form label span { color: #454f5e; font-size: 13px; font-weight: 600; }
.controller-duty-query-form select { min-height: 38px; }
.controller-duty-query-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.controller-duty-query-summary > div { display: grid; gap: 4px; padding: 16px 18px; border-right: 1px solid var(--line); }
.controller-duty-query-summary > div:last-child { border-right: 0; }
.controller-duty-query-summary span, .controller-duty-query-summary small { color: var(--muted); font-size: 12px; }
.controller-duty-query-summary strong { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.controller-duty-query-table-wrap { overflow-x: auto; }
.controller-duty-query-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.controller-duty-query-table th, .controller-duty-query-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.controller-duty-query-table th { color: #465162; background: #f3f5f8; font-size: 13px; font-weight: 600; }
.controller-duty-query-table td { font-size: 14px; }

@media screen and (min-width: 861px) and (max-width: 1199px) {
  .controller-duty-toolbar { align-items: flex-start; flex-direction: column; }
  .controller-duty-toolbar-actions { width: 100%; justify-content: flex-end; }
  .controller-duty-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controller-duty-meta-grid > label { grid-column: span 1; }
  .controller-duty-meta-grid > :nth-child(even) { border-right: 0; }
  .controller-duty-query-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controller-duty-query-form .btn { grid-column: 1 / -1; justify-self: end; }
}
