:root {
      --bg: #f5f6f8;
      --surface: #ffffff;
      --surface-soft: #eef7f4;
      --surface-warm: #fff7e6;
      --surface-cool: #eef3ff;
      --surface-alert: #fff1f2;
      --border: #dfe3e8;
      --border-strong: #c8d0da;
      --text: #20242b;
      --muted: #6b7280;
      --faint: #8a94a6;
      --primary: #0f766e;
      --primary-dark: #115e59;
      --blue: #2563eb;
      --amber: #b7791f;
      --rose: #be123c;
      --green: #15803d;
      --ink: #111827;
      --shadow: 0 16px 40px rgba(31, 41, 55, 0.08);
      --radius: 8px;
      --sidebar: 248px;
      --sidebar-collapsed: 76px;
      --header: 68px;
      --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    [data-theme="dark"] {
      --bg: #181b20;
      --surface: #22262d;
      --surface-soft: #19322f;
      --surface-warm: #342817;
      --surface-cool: #1d2b44;
      --surface-alert: #351f28;
      --border: #343b46;
      --border-strong: #4b5563;
      --text: #eef2f7;
      --muted: #b6beca;
      --faint: #8994a5;
      --primary: #2dd4bf;
      --primary-dark: #5eead4;
      --blue: #7aa2ff;
      --amber: #f2bd5c;
      --rose: #fb7185;
      --green: #74d98d;
      --ink: #ffffff;
      --shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      letter-spacing: 0;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .shell {
      display: grid;
      grid-template-columns: var(--sidebar) minmax(0, 1fr);
      min-height: 100vh;
      transition: grid-template-columns 0.2s ease;
    }

    body.sidebar-collapsed .shell {
      grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
    }

    body.sidebar-collapsed .shell:has(.sidebar:hover),
    body.sidebar-collapsed .shell:has(.sidebar:focus-within) {
      grid-template-columns: var(--sidebar) minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      border-right: 1px solid var(--border);
      background: var(--surface);
      display: flex;
      flex-direction: column;
      min-width: 0;
      z-index: 20;
      transition: width 0.2s ease;
    }

    .brand {
      height: var(--header);
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 20px;
      border-bottom: 1px solid var(--border);
      min-width: 0;
    }

    .sidebar-collapse-button {
      position: absolute;
      top: 50%;
      right: -15px;
      z-index: 25;
      width: 30px;
      height: 42px;
      display: grid;
      place-items: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--muted);
      box-shadow: var(--shadow);
      transform: translateY(-50%);
    }

    .sidebar-collapse-button:hover {
      border-color: var(--border-strong);
      color: var(--primary-dark);
    }

    .sidebar-collapse-button svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      transform: rotate(90deg);
      transition: transform 0.2s ease;
    }

    body.sidebar-collapsed .sidebar-collapse-button svg {
      transform: rotate(-90deg);
    }

    .brand-mark {
      width: 34px;
      height: 34px;
      border: 0;
      border-radius: 8px;
      background: var(--primary);
      color: #ffffff;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      font-weight: 800;
      cursor: pointer;
      font: inherit;
    }

    .brand-mark:focus-visible {
      outline: 3px solid rgba(15, 118, 110, 0.25);
      outline-offset: 2px;
    }

    .brand-text {
      min-width: 0;
    }

    .brand-text strong,
    .profile strong,
    .item-title,
    .queue-main strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .brand-text span,
    .profile span {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }

    .sidebar-close-button {
      display: none;
      margin-left: auto;
      width: 36px;
      height: 36px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      place-items: center;
      cursor: pointer;
    }

    .sidebar-close-button svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .sidebar-close-button:hover,
    .sidebar-close-button:focus-visible {
      border-color: var(--border-strong);
      color: var(--primary-dark);
    }

    .nav {
      padding: 14px 12px;
      display: grid;
      gap: 4px;
    }

    body.user-mode-guest .nav a[data-admin-only="true"] {
      display: none;
    }

    .nav a {
      min-height: 42px;
      display: flex;
      align-items: center;
      gap: 11px;
      color: var(--muted);
      text-decoration: none;
      padding: 0 10px;
      border-radius: 8px;
      font-weight: 650;
      font-size: 14px;
      overflow-wrap: anywhere;
    }

    .nav a:hover,
    .nav a.active {
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .nav svg,
    .icon-button svg,
    .action svg,
    .search svg,
    .select-wrap svg,
    .trend svg,
    .stat-icon svg {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 14px;
      border-top: 1px solid var(--border);
      display: grid;
      gap: 12px;
    }

    .usage {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface-cool);
    }

    .usage-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      font-size: 13px;
      font-weight: 750;
    }

    .meter {
      height: 8px;
      margin-top: 10px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(37, 99, 235, 0.18);
    }

    .meter span {
      display: block;
      height: 100%;
      width: 68%;
      background: var(--blue);
    }

    .profile {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .avatar {
      width: 36px;
      height: 36px;
      border-radius: 999px;
      background: #d7f0ea;
      color: #075e54;
      display: grid;
      place-items: center;
      font-weight: 800;
      flex: 0 0 auto;
    }

    body.sidebar-collapsed .brand {
      justify-content: center;
      padding: 0 10px;
    }

    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed .usage,
    body.sidebar-collapsed .profile > div {
      display: none;
    }

    body.sidebar-collapsed .nav {
      padding: 14px 10px;
    }

    body.sidebar-collapsed .nav a {
      justify-content: center;
      gap: 0;
      padding: 0;
    }

    body.sidebar-collapsed .nav a span {
      width: 0;
      opacity: 0;
      overflow: hidden;
      white-space: nowrap;
    }

    body.sidebar-collapsed .sidebar-footer {
      padding: 14px 10px;
      justify-items: center;
    }

    body.sidebar-collapsed .sidebar:hover .brand,
    body.sidebar-collapsed .sidebar:focus-within .brand {
      justify-content: flex-start;
      padding: 0 20px;
    }

    body.sidebar-collapsed .sidebar:hover .brand-text,
    body.sidebar-collapsed .sidebar:hover .usage,
    body.sidebar-collapsed .sidebar:hover .profile > div,
    body.sidebar-collapsed .sidebar:focus-within .brand-text,
    body.sidebar-collapsed .sidebar:focus-within .usage,
    body.sidebar-collapsed .sidebar:focus-within .profile > div {
      display: block;
    }

    body.sidebar-collapsed .sidebar:hover .nav,
    body.sidebar-collapsed .sidebar:focus-within .nav {
      padding: 14px 12px;
    }

    body.sidebar-collapsed .sidebar:hover .nav a,
    body.sidebar-collapsed .sidebar:focus-within .nav a {
      justify-content: flex-start;
      gap: 11px;
      padding: 0 10px;
    }

    body.sidebar-collapsed .sidebar:hover .nav a span,
    body.sidebar-collapsed .sidebar:focus-within .nav a span {
      width: auto;
      opacity: 1;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-footer,
    body.sidebar-collapsed .sidebar:focus-within .sidebar-footer {
      padding: 14px;
      justify-items: stretch;
    }

    .main {
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 15;
      min-height: var(--header);
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 18px;
      padding: 12px 22px;
      border-bottom: 1px solid var(--border);
      background: rgba(245, 246, 248, 0.9);
      backdrop-filter: blur(12px);
    }

    [data-theme="dark"] .topbar {
      background: rgba(24, 27, 32, 0.9);
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .page-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .page-title h1 {
      margin: 0;
      font-size: clamp(22px, 3vw, 30px);
      line-height: 1.12;
      overflow-wrap: anywhere;
    }

    .page-home-button {
      width: 36px;
      height: 36px;
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--primary-dark);
    }

    .page-home-button:hover,
    .page-home-button:focus-visible {
      border-color: rgba(15, 118, 110, 0.38);
      background: rgba(15, 118, 110, 0.12);
      outline: none;
    }

    .page-home-button svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .page-title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .search {
      height: 40px;
      width: min(280px, 28vw);
      min-width: 180px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--muted);
    }

    .search input {
      width: 100%;
      min-width: 0;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--text);
    }

    .search input::placeholder {
      color: var(--faint);
    }

    .icon-button {
      position: relative;
      width: 40px;
      height: 40px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .icon-button:hover,
    .action:hover {
      border-color: var(--border-strong);
      color: var(--primary-dark);
    }

    [data-tip]::after {
      content: attr(data-tip);
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      padding: 7px 9px;
      border-radius: 6px;
      background: var(--ink);
      color: var(--surface);
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      transform: translateY(-4px);
      pointer-events: none;
      transition: opacity 0.16s ease, transform 0.16s ease;
      box-shadow: var(--shadow);
      z-index: 50;
    }

    [data-tip]:hover::after,
    [data-tip]:focus-visible::after {
      opacity: 1;
      transform: translateY(0);
    }

    .content {
      width: 100%;
      max-width: 1480px;
      margin: 0 auto;
      padding: 22px;
      display: grid;
      gap: 18px;
    }

    .view-panel[hidden] {
      display: none;
    }

    .today-work-view,
    .personnel-view,
    .risk-view,
    .confined-view,
    .education-view,
    .notice-view {
      gap: 14px;
    }

    .today-work-hero {
      min-width: 0;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .today-work-summary-head {
      min-width: 0;
      padding: 14px 16px;
      display: grid;
      grid-template-columns: auto minmax(220px, 0.45fr) minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      border-bottom: 1px solid var(--border);
    }

    .today-work-hero.is-collapsed .today-work-summary-head {
      border-bottom: 0;
    }

    .today-work-summary-toggle {
      appearance: none;
      border: 0;
      background: transparent;
      color: var(--text);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      text-align: left;
      font: inherit;
      font-size: 18px;
      font-weight: 900;
    }

    .today-work-summary-toggle svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      transition: transform .18s ease;
    }

    .today-work-hero.is-open .today-work-summary-toggle svg {
      transform: rotate(180deg);
    }

    .work-summary-select-field {
      min-width: 0;
      display: grid;
      gap: 5px;
    }

    .work-summary-select-field span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
    }

    .work-summary-select-field select {
      width: 100%;
    }

    .today-summary-gas-row {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .today-summary-gas-form {
      min-width: 0;
      display: grid;
      grid-column: 1 / -1;
      grid-template-columns: minmax(84px, .7fr) repeat(4, minmax(72px, 1fr)) auto auto;
      gap: 8px;
      align-items: center;
    }

    .gas-submit-button {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

    .gas-submit-button svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
    }

    .today-summary-gas {
      min-width: 0;
      min-height: 48px;
      padding: 8px 10px;
      display: grid;
      align-content: center;
      gap: 3px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-summary-gas span,
    .today-summary-gas strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .today-summary-gas span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
    }

    .today-summary-gas strong {
      color: var(--text);
      font-size: 13px;
      line-height: 1.2;
    }

    .today-work-hero [hidden] {
      display: none;
    }

    .today-work-hero-body {
      padding: 18px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 0.3fr);
      gap: 18px;
      align-items: start;
    }

    .today-work-title {
      min-width: 0;
    }

    .today-work-title h2 {
      margin: 8px 0 6px;
      color: var(--text);
      font-size: 26px;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .today-work-title p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.55;
      overflow-wrap: anywhere;
    }

    .today-badge-row {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .today-badge {
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .today-badge::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: currentColor;
    }

    .today-badge.danger {
      border-color: rgba(190, 18, 60, 0.2);
      background: var(--surface-alert);
      color: var(--rose);
    }

    .today-badge.warning {
      border-color: rgba(183, 121, 31, 0.26);
      background: var(--surface-warm);
      color: var(--amber);
    }

    .today-badge.success {
      border-color: rgba(21, 128, 61, 0.22);
      background: rgba(21, 128, 61, 0.09);
      color: var(--green);
    }

    .today-badge.primary {
      border-color: rgba(15, 118, 110, 0.24);
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .today-key-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin-top: 16px;
    }

    .today-key {
      min-width: 0;
      min-height: 70px;
      padding: 11px;
      display: grid;
      align-content: center;
      gap: 5px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-key span,
    .today-key strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .today-key span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .today-key strong {
      color: var(--text);
      font-size: 14px;
      line-height: 1.3;
    }

    .today-work-actions {
      min-width: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .today-work-actions button {
      min-height: 36px;
      padding: 0 12px;
      border: 1px solid var(--border-strong);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font-size: 12px;
      font-weight: 850;
      white-space: normal;
      cursor: pointer;
    }

    .today-key-card {
      min-width: 0;
      min-height: 82px;
      padding: 12px;
      display: grid;
      align-content: center;
      gap: 5px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-key-card.danger {
      border-color: rgba(190, 18, 60, 0.18);
      background: var(--surface-alert);
    }

    .today-key-card.warning {
      border-color: rgba(183, 121, 31, 0.22);
      background: var(--surface-warm);
    }

    .today-key-card span,
    .today-key-card strong,
    .today-key-card small {
      display: block;
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .today-key-card span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .today-key-card strong {
      color: var(--text);
      font-size: 20px;
      line-height: 1.2;
    }

    .today-key-card small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .today-split-grid {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
      gap: 14px;
      align-items: start;
    }

    .today-risk-table {
      min-width: 0;
      max-width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-top: 1px solid var(--border);
    }

    .today-risk-table table {
      min-width: 760px;
    }

    .today-risk-table th,
    .today-risk-table td {
      vertical-align: top;
    }

    .today-risk-table small {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      line-height: 1.45;
    }

    .today-risk-score {
      min-width: 34px;
      min-height: 28px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 900;
    }

    .today-risk-score.high {
      background: var(--surface-alert);
      color: var(--rose);
    }

    .today-risk-score.medium {
      background: var(--surface-warm);
      color: var(--amber);
    }

    .today-risk-score.low {
      background: rgba(21, 128, 61, 0.09);
      color: var(--green);
    }

    .today-guide-list,
    .today-check-list {
      min-width: 0;
      display: grid;
      gap: 8px;
    }

    .today-guide-card {
      min-width: 0;
      padding: 12px;
      display: grid;
      grid-template-columns: 32px minmax(0, 1fr);
      gap: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-guide-card > span {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 900;
    }

    .today-guide-card strong,
    .today-guide-card p,
    .today-guide-card small,
    .today-check-card strong,
    .today-check-card span {
      display: block;
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .today-guide-card strong,
    .today-check-card strong {
      color: var(--text);
      font-size: 13px;
    }

    .today-guide-card p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .today-guide-card small {
      margin-top: 5px;
      color: var(--faint);
      font-size: 11px;
      line-height: 1.4;
    }

    .today-check-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      margin-top: 12px;
    }

    .today-check-card {
      min-width: 0;
      padding: 11px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-check-card.good {
      border-color: rgba(21, 128, 61, 0.2);
      background: rgba(21, 128, 61, 0.07);
    }

    .today-check-card span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .today-risk-meter {
      min-width: 0;
      padding: 14px;
      border: 1px solid rgba(190, 18, 60, 0.18);
      border-radius: 8px;
      background: var(--surface-alert);
      color: var(--rose);
    }

    .today-risk-meter span,
    .today-risk-meter strong,
    .today-risk-meter small {
      display: block;
      overflow-wrap: anywhere;
    }

    .today-risk-meter span {
      font-size: 12px;
      font-weight: 850;
    }

    .today-risk-meter strong {
      margin-top: 6px;
      font-size: 34px;
      line-height: 1;
    }

    .today-risk-meter small {
      margin-top: 6px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .today-work-main {
      display: grid;
      grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.82fr);
      gap: 14px;
      align-items: start;
    }

    .work-management-panel {
      margin: 18px 0;
    }

    .work-management-panel-head {
      align-items: center;
    }

    .work-management-toggle {
      appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      text-align: left;
      font: inherit;
    }

    .work-management-toggle svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      transition: transform .18s ease;
    }

    .work-management-panel.is-open .work-management-toggle svg {
      transform: rotate(180deg);
    }

    .work-management-panel.is-collapsed .work-management-subtitle,
    .work-management-panel.is-collapsed #workManagementStatus {
      display: none;
    }

    .work-management-content[hidden] {
      display: none;
    }

    .work-management-form {
      display: grid;
      gap: 14px;
    }

    .work-management-entry-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .work-management-entry-list {
      display: grid;
      gap: 12px;
      min-width: 0;
    }

    .work-management-entry {
      min-width: 0;
      padding: 12px;
      display: grid;
      gap: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
    }

    .work-management-entry.is-coordinate-active {
      border-color: rgba(15, 118, 110, 0.48);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
    }

    .work-management-entry-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .work-management-entry-head strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
    }

    .work-management-entry-head .personnel-button {
      min-height: 32px;
      padding: 0 10px;
    }

    .work-management-form-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .form-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .form-field.full {
      grid-column: 1 / -1;
    }

    .form-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .permit-field {
      border: 0;
      padding: 0;
      margin: 0;
    }

    .permit-field legend {
      padding: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .permit-checkbox-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 7px;
      min-width: 0;
    }

    .permit-checkbox-grid label {
      min-width: 0;
      min-height: 38px;
      padding: 0 10px;
      display: flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .permit-checkbox-grid span {
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .permit-checkbox-grid input {
      width: 16px;
      height: 16px;
      accent-color: var(--primary);
      flex: 0 0 auto;
    }

    .autocomplete-field {
      position: relative;
      min-width: 0;
    }

    .autocomplete-list {
      position: absolute;
      z-index: 45;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      max-height: 220px;
      overflow: auto;
      display: grid;
      gap: 4px;
      padding: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .autocomplete-list[hidden] {
      display: none;
    }

    .autocomplete-option {
      min-width: 0;
      padding: 9px 10px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      cursor: pointer;
      display: grid;
      gap: 2px;
      text-align: left;
      font: inherit;
    }

    .autocomplete-option:hover,
    .autocomplete-option:focus-visible {
      background: var(--surface-soft);
      outline: none;
    }

    .autocomplete-option strong,
    .autocomplete-option small {
      overflow-wrap: anywhere;
    }

    .autocomplete-option strong {
      font-size: 13px;
      font-weight: 900;
    }

    .autocomplete-option small {
      color: var(--muted);
      font-size: 12px;
    }

    .work-time-field {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .work-time-field .work-time-prefix {
      color: var(--text);
      font-size: 14px;
      font-weight: 800;
      white-space: nowrap;
    }

    .work-time-field .personnel-input {
      min-width: 0;
    }

    .coordinate-field {
      gap: 6px;
    }

    .coordinate-field-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 6px;
      min-width: 0;
    }

    .coordinate-field-row .personnel-button {
      min-height: 40px;
      padding: 0 10px;
      white-space: nowrap;
    }

    .work-coordinate-picker {
      min-width: 0;
      display: grid;
      gap: 8px;
    }

    .work-coordinate-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .work-coordinate-head strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
    }

    .work-coordinate-head span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-align: right;
      overflow-wrap: anywhere;
    }

    .work-coordinate-map-shell {
      position: relative;
      min-height: 310px;
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #e9edf3;
    }

    .work-coordinate-map-shell iframe {
      position: absolute;
      inset: -32px;
      width: calc(100% + 64px);
      height: calc(100% + 64px);
      border: 0;
      transition: transform 0.12s ease;
    }

    .work-coordinate-click-layer {
      position: absolute;
      inset: 0;
      z-index: 2;
      border: 0;
      background: transparent;
      cursor: crosshair;
      touch-action: none;
      user-select: none;
    }

    .work-coordinate-click-layer.is-dragging {
      cursor: grabbing;
    }

    .work-coordinate-click-layer:focus-visible {
      outline: 3px solid rgba(15, 118, 110, 0.32);
      outline-offset: -3px;
    }

    .work-coordinate-zoom-controls {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 5;
      display: grid;
      gap: 4px;
    }

    .work-coordinate-zoom-controls button {
      width: 34px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      font-size: 18px;
      font-weight: 900;
      line-height: 1;
    }

    .work-coordinate-zoom-controls button:hover,
    .work-coordinate-zoom-controls button:focus-visible {
      border-color: rgba(15, 118, 110, 0.38);
      background: rgba(15, 118, 110, 0.12);
      outline: none;
    }

    .work-management-table-scroll {
      margin-top: 14px;
      max-height: 460px;
    }

    .work-management-table {
      min-width: 1980px;
    }

    .work-management-table th,
    .work-management-table td {
      vertical-align: top;
    }

    .work-management-table td:nth-child(8) {
      min-width: 260px;
      white-space: normal;
      line-height: 1.45;
    }

    .today-stack,
    .today-side-stack {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .today-panel-body {
      padding: 16px;
      display: grid;
      gap: 12px;
    }

    .today-table {
      min-width: 980px;
    }

    .today-table th,
    .today-table td {
      vertical-align: top;
    }

    .today-table small {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      line-height: 1.45;
    }

    .today-score {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 38px;
      min-height: 28px;
      border-radius: 999px;
      background: var(--surface-warm);
      color: var(--amber);
      font-size: 12px;
      font-weight: 900;
    }

    .today-score.high {
      background: var(--surface-alert);
      color: var(--rose);
    }

    .today-list {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .today-row {
      min-width: 0;
      padding: 12px;
      display: grid;
      gap: 5px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-row strong,
    .today-row span,
    .today-row small {
      display: block;
      overflow-wrap: anywhere;
    }

    .today-row strong {
      color: var(--text);
      font-size: 13px;
    }

    .today-row span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .today-row small {
      color: var(--faint);
      font-size: 11px;
    }

    .today-check-row {
      grid-template-columns: 22px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
    }

    .today-check-mark {
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      border: 1px solid var(--border-strong);
      border-radius: 6px;
      color: transparent;
      font-size: 12px;
      font-weight: 900;
    }

    .today-check-row.done .today-check-mark {
      border-color: var(--primary);
      background: var(--primary);
      color: #ffffff;
    }

    .today-check-row.done strong {
      color: var(--muted);
    }

    .today-mini-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .today-mini {
      min-width: 0;
      padding: 10px;
      display: grid;
      gap: 4px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .today-mini span,
    .today-mini strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .today-mini span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .today-mini strong {
      color: var(--text);
      font-size: 14px;
    }

    .today-photo-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .today-photo-slot {
      min-height: 72px;
      display: grid;
      align-content: center;
      justify-items: center;
      gap: 5px;
      padding: 10px;
      border: 1px dashed var(--border-strong);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      text-align: center;
      font-size: 12px;
      font-weight: 800;
    }

    .today-photo-slot.done {
      border-style: solid;
      border-color: rgba(15, 118, 110, 0.28);
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .today-history {
      display: grid;
      gap: 0;
    }

    .today-history .today-row {
      border-radius: 0;
      border-left: 0;
      border-right: 0;
      border-bottom: 0;
      background: transparent;
    }

    .today-history .today-row:first-child {
      border-top: 0;
    }

    .personnel-summary-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
      gap: 14px;
      align-items: stretch;
    }

    .personnel-view .panel-head {
      flex-wrap: wrap;
      align-items: flex-start;
    }

    #personnelDbStatus {
      flex: 0 0 auto;
    }

    .personnel-kpi-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .personnel-kpi {
      min-height: 88px;
      padding: 12px;
      display: grid;
      align-content: center;
      gap: 5px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      min-width: 0;
    }

    .personnel-kpi span,
    .personnel-kpi strong,
    .personnel-kpi small {
      display: block;
      overflow-wrap: anywhere;
    }

    .personnel-kpi span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }

    .personnel-kpi strong {
      color: var(--text);
      font-size: 24px;
      line-height: 1;
    }

    .personnel-kpi small {
      color: var(--faint);
      font-size: 10.5px;
      line-height: 1.35;
    }

    .personnel-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }

    .personnel-button {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      padding: 0 11px;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .personnel-button.primary {
      border-color: var(--primary);
      background: var(--primary);
      color: #ffffff;
    }

    .personnel-button.danger {
      border-color: rgba(220, 38, 38, 0.28);
      color: var(--red);
    }

    .personnel-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .personnel-form-grid.cols-3 {
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
      align-items: end;
    }

    .confined-entry-work-grid {
      grid-template-columns: minmax(240px, 1.35fr) minmax(160px, 0.82fr) minmax(160px, 0.82fr);
    }

    .confined-entry-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
      gap: 12px;
      align-items: stretch;
      min-width: 0;
    }

    .confined-entry-column {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .confined-entry-column-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .confined-entry-column-head strong,
    .confined-entry-column-head small {
      display: block;
      overflow-wrap: anywhere;
    }

    .confined-entry-column-head strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
    }

    .confined-entry-column-head small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-align: right;
    }

    .confined-worker-input-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .confined-entry-detail-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .confined-assigned-person-list {
      display: grid;
      gap: 8px;
      max-height: 248px;
      overflow: auto;
      padding-right: 2px;
    }

    .confined-worker-option {
      width: 100%;
      min-width: 0;
      min-height: 48px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 9px;
      align-items: center;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      text-align: left;
    }

    .confined-worker-option:hover,
    .confined-worker-option:focus-visible,
    .confined-worker-option.is-selected {
      border-color: var(--primary);
      background: var(--surface-soft);
      outline: none;
    }

    .confined-worker-icon {
      width: 30px;
      height: 30px;
      display: inline-grid;
      place-items: center;
      border-radius: 8px;
      background: var(--surface-cool);
      color: var(--blue);
    }

    .confined-worker-option.is-selected .confined-worker-icon {
      background: rgba(15, 118, 110, 0.12);
      color: var(--primary-dark);
    }

    .confined-worker-icon svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .confined-worker-option strong,
    .confined-worker-option small {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .confined-worker-option strong {
      font-size: 13px;
      font-weight: 900;
    }

    .confined-worker-option small {
      margin-top: 3px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .personnel-assign-layout {
      display: grid;
      grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1fr);
      gap: 14px;
      align-items: stretch;
    }

    .personnel-assign-column {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 10px;
    }

    .personnel-assign-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .personnel-native-select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      padding: 0 12px;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
    }

    .personnel-work-preview {
      min-width: 0;
      padding: 12px;
      display: grid;
      gap: 5px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .personnel-work-preview strong,
    .personnel-work-preview span,
    .personnel-work-preview small {
      display: block;
      overflow-wrap: anywhere;
    }

    .personnel-work-preview strong {
      color: var(--text);
      font-size: 13px;
    }

    .personnel-work-preview span,
    .personnel-work-preview small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .personnel-assignment-toggle {
      width: 100%;
      min-height: 42px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
    }

    .personnel-assignment-toggle svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      transition: transform .18s ease;
    }

    .personnel-assignment-toggle[aria-expanded="true"] svg {
      transform: rotate(180deg);
    }

    .personnel-assignment-picker {
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      display: grid;
      gap: 10px;
      transition: max-height .22s ease, opacity .16s ease;
    }

    .personnel-assignment-picker.is-open {
      max-height: 520px;
      opacity: 1;
      overflow: auto;
      padding-right: 2px;
    }

    .personnel-assignment-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .personnel-person-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .personnel-assign-search {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .personnel-assign-search .personnel-search-select {
      min-width: 124px;
      flex: 0 0 124px;
    }

    .personnel-assign-search .personnel-search-box {
      min-width: 0;
      flex: 1 1 auto;
    }

    .personnel-person-empty {
      grid-column: 1 / -1;
      min-height: 42px;
      display: grid;
      place-items: center;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      text-align: center;
    }

    .personnel-person-option {
      min-width: 0;
      min-height: 42px;
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 9px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
    }

    .personnel-person-option input {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      accent-color: var(--primary);
    }

    .personnel-person-option span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .personnel-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .personnel-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .personnel-entry-form {
      display: grid;
      gap: 12px;
    }

    .personnel-input {
      width: 100%;
      min-height: 40px;
      display: flex;
      align-items: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
      padding: 0 11px;
      font-size: 13px;
      font-weight: 750;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .personnel-work-list {
      display: grid;
      gap: 9px;
      margin-top: 12px;
    }

    .personnel-work-card {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 9px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .personnel-work-card.is-full {
      border-color: rgba(220, 38, 38, 0.34);
      background: rgba(220, 38, 38, 0.06);
    }

    .personnel-work-card.is-selected {
      border-color: rgba(15, 118, 110, 0.44);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
    }

    .personnel-work-card[role="button"] {
      cursor: pointer;
    }

    .personnel-work-card strong,
    .personnel-work-card small {
      display: block;
      overflow-wrap: anywhere;
    }

    .personnel-work-card strong {
      color: var(--text);
      font-size: 13px;
    }

    .personnel-work-card small {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .personnel-count {
      min-height: 28px;
      min-width: 68px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(15, 118, 110, 0.24);
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .personnel-work-card.is-full .personnel-count {
      border-color: rgba(220, 38, 38, 0.35);
      background: rgba(220, 38, 38, 0.12);
      color: var(--red);
    }

    .personnel-db-table {
      min-width: 760px;
    }

    .personnel-db-table th:nth-child(1),
    .personnel-db-table td:nth-child(1),
    .personnel-db-table th:nth-child(3),
    .personnel-db-table td:nth-child(3),
    .personnel-db-table th:nth-child(4),
    .personnel-db-table td:nth-child(4),
    .personnel-db-table th:nth-child(5),
    .personnel-db-table td:nth-child(5) {
      text-align: center;
    }

    .personnel-db-table .data-row-actions {
      justify-content: center;
    }

    .personnel-db-toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      min-width: 0;
      flex: 0 1 520px;
    }

    .personnel-search-select {
      min-width: 132px;
      flex: 0 0 132px;
    }

    .personnel-search-box {
      min-width: 180px;
      flex: 1 1 260px;
      min-height: 38px;
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--muted);
      padding: 0 11px;
    }

    .personnel-search-box svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .personnel-search-box input {
      width: 100%;
      min-width: 0;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--text);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
    }

    .personnel-db-table .personnel-input {
      min-height: 34px;
      background: var(--surface);
    }

    .personnel-status {
      color: var(--green);
      font-weight: 900;
    }

    .personnel-status.inactive {
      color: var(--faint);
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      min-width: 0;
    }

    .filters {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      min-width: 0;
    }

    .select-wrap {
      position: relative;
      min-width: 150px;
    }

    .select-wrap select {
      width: 100%;
      min-height: 38px;
      appearance: none;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      padding: 0 36px 0 12px;
      outline: none;
      font-size: 13px;
      font-weight: 650;
    }

    .select-wrap svg {
      position: absolute;
      right: 11px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      pointer-events: none;
      width: 16px;
      height: 16px;
    }

    .title-region-filter {
      display: block;
      width: 178px;
      min-width: 0;
      margin-top: 6px;
    }

    .title-region-filter select {
      min-height: 32px;
      padding-left: 10px;
      font-size: 12px;
    }

    .title-region-filter svg {
      right: 10px;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      align-items: stretch;
    }

    .stat-card,
    .panel,
    .queue-card,
    .activity-item {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .stat-card {
      min-height: 136px;
      padding: 16px;
      display: grid;
      grid-template-rows: auto auto auto auto;
      gap: 12px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition: min-height 0.24s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }

    .stat-card:hover,
    .stat-card:focus-visible {
      border-color: var(--border-strong);
      transform: translateY(-2px);
    }

    .stat-card:focus-visible {
      outline: 3px solid rgba(15, 118, 110, 0.22);
      outline-offset: 2px;
    }

    .stats-grid.has-expanded {
      gap: 0 8px;
      align-items: end;
    }

    .stats-grid.has-expanded .stat-card {
      order: 1;
      min-height: 56px;
      padding: 10px 12px;
      grid-template-rows: auto;
      align-content: center;
      border-bottom-color: transparent;
      border-radius: 8px 8px 0 0;
      background: var(--bg);
      box-shadow: none;
      transform: none;
    }

    .stats-grid.has-expanded .stat-card:hover,
    .stats-grid.has-expanded .stat-card:focus-visible {
      background: var(--surface);
      border-color: var(--border-strong);
      border-bottom-color: transparent;
      transform: translateY(-1px);
    }

    .stats-grid.has-expanded .stat-card.expanded {
      border-color: rgba(15, 118, 110, 0.45);
      border-bottom-color: var(--surface);
      background: var(--surface);
      box-shadow: none;
      z-index: 2;
    }

    .stats-grid.has-expanded .stat-card .stat-top {
      gap: 8px;
    }

    .stats-grid.has-expanded .stat-card .stat-label {
      color: var(--text);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .stats-grid.has-expanded .stat-card .stat-icon {
      width: 28px;
      height: 28px;
    }

    .stats-grid.has-expanded .stat-card .stat-summary,
    .stats-grid.has-expanded .stat-card .trend,
    .stats-grid.has-expanded .stat-card .stat-detail {
      display: none;
    }

    .stat-expanded-panel {
      order: 2;
      grid-column: 1 / -1;
      min-height: 276px;
      padding: 16px;
      display: grid;
      gap: 12px;
      background: var(--surface);
      border: 1px solid rgba(15, 118, 110, 0.45);
      border-radius: 0 8px 8px 8px;
      border-color: rgba(15, 118, 110, 0.45);
      box-shadow: 0 20px 44px rgba(31, 41, 55, 0.12);
    }

    .stat-expanded-panel[hidden] {
      display: none;
    }

    .stat-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .stat-panel-title {
      display: grid;
      gap: 10px;
      min-width: 0;
    }

    .stat-expanded-panel .stat-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .stat-expanded-panel .stat-detail {
      max-height: none;
      opacity: 1;
      overflow: visible;
      pointer-events: auto;
      transform: none;
    }

    .stat-expanded-panel > .stat-summary {
      justify-content: flex-start;
    }

    .stat-expanded-panel > .trend {
      margin-top: -4px;
    }

    .kosha-safety-detail {
      min-width: 0;
    }

    .kosha-education-panel .kosha-safety-panel {
      margin-top: 4px;
    }

    .kosha-safety-panel {
      display: grid;
      gap: 12px;
      min-width: 0;
    }

    .kosha-safety-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 4px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .kosha-safety-tab {
      min-height: 36px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
      padding: 0 12px;
      font-size: 13px;
      font-weight: 850;
    }

    .kosha-safety-tab:hover,
    .kosha-safety-tab:focus-visible {
      border-color: var(--border-strong);
      color: var(--primary-dark);
      outline: none;
    }

    .kosha-safety-tab.active {
      border-color: rgba(15, 118, 110, 0.35);
      background: var(--surface);
      color: var(--primary-dark);
      box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
    }

    .kosha-safety-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
      gap: 12px;
      align-items: start;
    }

    .kosha-safety-main,
    .kosha-safety-side {
      min-width: 0;
    }

    .kosha-panel-card,
    .kosha-detail-card,
    .kosha-feed-card {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
    }

    .kosha-panel-card {
      display: grid;
      gap: 12px;
      padding: 14px;
    }

    .kosha-panel-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
    }

    .kosha-panel-head h3,
    .kosha-detail-card h3,
    .kosha-feed-card h3 {
      margin: 0;
      color: var(--text);
      line-height: 1.3;
      overflow-wrap: anywhere;
    }

    .kosha-panel-head h3 {
      margin-top: 6px;
      font-size: 21px;
    }

    .kosha-panel-head p,
    .kosha-source-note,
    .kosha-feed-meta,
    .kosha-detail-card dd {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .kosha-badge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      min-height: 24px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
      color: var(--muted);
      padding: 0 8px;
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .kosha-badge.primary {
      border-color: rgba(15, 118, 110, 0.24);
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .kosha-badge.danger {
      border-color: rgba(190, 18, 60, 0.22);
      background: var(--surface-alert);
      color: var(--rose);
    }

    .kosha-badge.warning {
      border-color: rgba(183, 121, 31, 0.24);
      background: var(--surface-warm);
      color: var(--amber);
    }

    .kosha-link-button,
    .kosha-action-button {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      padding: 0 10px;
      text-decoration: none;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .kosha-link-button:hover,
    .kosha-action-button:hover,
    .kosha-link-button:focus-visible,
    .kosha-action-button:focus-visible {
      border-color: var(--border-strong);
      color: var(--primary-dark);
      outline: none;
    }

    .kosha-action-button.primary {
      border-color: var(--primary);
      background: var(--primary);
      color: #fff;
    }

    .kosha-case-meta {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .kosha-case-meta div {
      min-width: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      padding: 10px;
    }

    .kosha-case-meta span,
    .kosha-case-meta strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .kosha-case-meta span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
    }

    .kosha-case-meta strong {
      margin-top: 4px;
      color: var(--primary-dark);
      font-size: 15px;
    }

    .kosha-case-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .kosha-case-card {
      min-height: 116px;
      display: grid;
      align-content: start;
      gap: 7px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      padding: 12px;
      text-align: left;
      transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    }

    .kosha-case-card:hover,
    .kosha-case-card.active,
    .kosha-feed-list-button:hover,
    .kosha-feed-list-button.active {
      border-color: rgba(15, 118, 110, 0.5);
      background: var(--surface-soft);
      transform: translateY(-1px);
    }

    .kosha-case-card strong {
      color: var(--text);
      font-size: 13px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .kosha-case-card small {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .kosha-side-status,
    .kosha-detail-card {
      display: grid;
      gap: 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      padding: 12px;
    }

    .kosha-side-status strong {
      color: var(--text);
      font-size: 14px;
    }

    .kosha-side-status span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .kosha-detail-card {
      margin-top: 10px;
    }

    .kosha-detail-card h3 {
      font-size: 16px;
    }

    .kosha-detail-card dl {
      display: grid;
      grid-template-columns: 78px minmax(0, 1fr);
      gap: 8px 10px;
      margin: 0;
    }

    .kosha-detail-card dt {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
    }

    .kosha-detail-card dd {
      margin: 0;
      color: var(--text);
    }

    .kosha-tag-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .kosha-tag-row span {
      border: 1px solid rgba(15, 118, 110, 0.24);
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      padding: 4px 8px;
      font-size: 11px;
      font-weight: 850;
    }

    .kosha-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .kosha-feed-card {
      overflow: hidden;
    }

    .kosha-feed-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
      padding: 12px 12px 0;
    }

    .kosha-feed-head h3 {
      margin-top: 6px;
      font-size: 18px;
    }

    .kosha-feed-image-wrap {
      min-height: 300px;
      display: grid;
      place-items: center;
      background: var(--bg);
      margin: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }

    .kosha-feed-image-wrap img {
      width: 100%;
      max-height: 520px;
      object-fit: contain;
      display: block;
      background: #fff;
    }

    .kosha-feed-empty {
      min-height: 300px;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 8px;
      padding: 20px;
      text-align: center;
      color: var(--muted);
    }

    .kosha-feed-empty strong {
      color: var(--primary-dark);
      font-size: 16px;
    }

    .kosha-feed-nav {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: center;
      padding: 0 12px 12px;
    }

    .kosha-feed-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .kosha-feed-list-button {
      display: grid;
      gap: 4px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      padding: 10px;
      text-align: left;
    }

    .kosha-feed-list-button strong {
      color: var(--text);
      font-size: 13px;
      line-height: 1.35;
    }

    .kosha-feed-list-button small {
      color: var(--muted);
      font-size: 11px;
    }

    @media (max-width: 980px) {
      .kosha-safety-layout {
        grid-template-columns: 1fr;
      }

      .kosha-case-grid,
      .kosha-case-meta {
        grid-template-columns: 1fr;
      }
    }

    .stat-top,
    .panel-head,
    .table-head,
    .queue-item,
    .activity-item,
    .insight-row,
    .task-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .stat-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .stat-icon {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .stat-card:nth-child(1) .stat-icon {
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .stat-card:nth-child(2) .stat-icon {
      background: var(--surface-cool);
      color: var(--blue);
    }

    .stat-card:nth-child(3) .stat-icon {
      background: var(--surface-warm);
      color: var(--amber);
    }

    .stat-card:nth-child(4) .stat-icon {
      background: var(--surface-alert);
      color: var(--rose);
    }

    .stat-value {
      margin: 0;
      font-size: 30px;
      line-height: 1;
      color: var(--text);
      overflow-wrap: anywhere;
    }

    .stat-summary {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      flex-wrap: wrap;
    }

    .stat-status {
      padding: 4px 8px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .trend {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .trend.up {
      color: var(--green);
    }

    .trend.down {
      color: var(--rose);
    }

    .trend.warn {
      color: var(--amber);
    }

    .stat-detail {
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      transform: translateY(-4px);
      transition: max-height 0.24s ease, opacity 0.18s ease, transform 0.18s ease;
    }

    .stat-card.expanded .stat-detail {
      max-height: 460px;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }

    .detail-highlight {
      padding: 12px;
      border-radius: 8px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.45;
    }

    .detail-list {
      list-style: none;
      padding: 0;
      margin: 10px 0 0;
      display: grid;
      gap: 0;
    }

    .detail-list li {
      display: grid;
      grid-template-columns: 96px minmax(0, 1fr);
      gap: 10px;
      padding: 9px 0;
      border-top: 1px solid var(--border);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .detail-list strong {
      color: var(--text);
      font-size: 13px;
    }

    .detail-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .detail-metric {
      min-width: 0;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .detail-metric span,
    .detail-metric strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .detail-metric span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .detail-metric strong {
      margin-top: 4px;
      color: var(--text);
      font-size: 14px;
    }

    .kma-weather-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0;
      min-width: 0;
    }

    .kma-summary-site {
      min-width: 0;
      display: grid;
      gap: 5px;
      padding-right: 10px;
    }

    .kma-summary-site + .kma-summary-site {
      padding-left: 12px;
      padding-right: 0;
      border-left: 1px solid var(--border);
    }

    .kma-summary-main {
      min-width: 0;
      display: flex;
      align-items: center;
    }

    .kma-summary-main strong {
      min-width: 0;
      color: var(--text);
      font-size: 18px;
      font-weight: 900;
      line-height: 1.05;
      white-space: nowrap;
    }

    .kma-summary-meta {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .kma-feels-badge {
      min-height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 8px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
    }

    .kma-summary-wind {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--green);
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .kma-weather-detail {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 10px;
    }

    .kma-weather-site-card {
      min-width: 0;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--text);
    }

    .kma-site-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .kma-site-head strong,
    .kma-site-head small {
      display: block;
      overflow-wrap: anywhere;
    }

    .kma-site-head strong {
      font-size: 13px;
      font-weight: 900;
    }

    .kma-site-head small {
      margin-top: 3px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .kma-source-pill {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      border: 1px solid rgba(37, 99, 235, 0.24);
      border-radius: 999px;
      background: var(--surface-cool);
      color: var(--blue);
      font-size: 12px;
      font-weight: 850;
      text-decoration: none;
      white-space: nowrap;
    }

    .kma-temp-line {
      display: flex;
      align-items: baseline;
      gap: 8px;
      margin-top: 12px;
      min-width: 0;
    }

    .kma-temp-line strong {
      color: #174276;
      font-size: 35px;
      font-weight: 900;
      line-height: 1;
      letter-spacing: 0;
      white-space: nowrap;
    }

    .kma-temp-line span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      white-space: nowrap;
    }

    .kma-weather-metrics {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-top: 14px;
    }

    .kma-weather-metric {
      min-height: 72px;
      padding: 10px;
      display: grid;
      align-content: center;
      gap: 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
    }

    .kma-weather-metric span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .kma-weather-metric strong {
      color: var(--text);
      font-size: 15px;
      font-weight: 900;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .kma-site-foot {
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid var(--border);
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .kma-site-foot span,
    .kma-site-foot small {
      overflow-wrap: anywhere;
    }

    .space-work-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .space-work-item {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      overflow: hidden;
    }

    .space-work-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 38px;
      gap: 8px;
      align-items: stretch;
      padding-right: 8px;
    }

    .space-work-button {
      width: 100%;
      min-height: 54px;
      padding: 0 12px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto auto;
      gap: 10px;
      align-items: center;
      border: 0;
      background: transparent;
      color: var(--text);
      text-align: left;
    }

    .space-work-button:hover,
    .space-work-button:focus-visible {
      background: var(--bg);
      outline: none;
    }

    .space-entry-link {
      min-width: 0;
      min-height: 54px;
      display: grid;
      place-items: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface-soft);
      color: var(--primary-dark);
      text-decoration: none;
      align-self: center;
    }

    .space-entry-link:hover,
    .space-entry-link:focus-visible {
      border-color: rgba(15, 118, 110, 0.38);
      background: rgba(15, 118, 110, 0.14);
      outline: none;
    }

    .space-entry-link svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .space-work-empty {
      padding: 14px;
      border: 1px dashed var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      text-align: center;
    }

    .space-work-title,
    .space-work-meta {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .space-work-title {
      font-size: 14px;
      font-weight: 850;
    }

    .space-work-meta {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }

    .space-work-site,
    .space-work-count {
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .space-work-site {
      background: var(--surface-soft);
      color: var(--primary-dark);
    }

    .space-work-site.housing {
      background: var(--surface-warm);
      color: var(--amber);
    }

    .space-work-count {
      background: var(--surface-cool);
      color: var(--blue);
    }

    .space-work-button svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      color: var(--muted);
      transition: transform 0.18s ease;
    }

    .space-work-item.is-open .space-work-button svg {
      transform: rotate(180deg);
    }

    .space-work-panel {
      display: grid;
      gap: 8px;
      padding: 0 12px 12px;
    }

    .space-work-panel[hidden] {
      display: none;
    }

    .space-person {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .space-person strong,
    .space-person span {
      display: block;
      overflow-wrap: anywhere;
    }

    .space-person strong {
      color: var(--text);
      font-size: 13px;
    }

    .space-person span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
    }

    .space-person-status {
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.9fr);
      gap: 14px;
      align-items: start;
    }

    .panel {
      min-width: 0;
      overflow: hidden;
    }

    .panel-head,
    .table-head {
      padding: 16px 16px 12px;
      border-bottom: 1px solid var(--border);
    }

    .panel-title {
      min-width: 0;
    }

    .panel-title h2 {
      margin: 0;
      font-size: 17px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .panel-title span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .panel-actions {
      display: flex;
      gap: 8px;
      flex: 0 0 auto;
    }

    .action {
      position: relative;
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--muted);
    }

    .work-map-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      padding: 16px;
      display: grid;
      gap: 12px;
      overflow: hidden;
    }

    .work-map-main {
      display: grid;
      grid-template-columns: minmax(168px, 0.34fr) minmax(0, 1fr);
      gap: 10px;
      align-items: stretch;
      min-width: 0;
    }

    .work-map-shell {
      position: relative;
      overflow: hidden;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      min-height: 276px;
      height: 100%;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #e9edf3;
    }

    .work-map-shell iframe {
      position: absolute;
      top: -32px;
      left: -32px;
      width: calc(100% + 64px);
      height: calc(100% + 64px);
      border: 0;
      transition: transform 0.12s ease;
    }

    .work-map-gesture-layer {
      position: absolute;
      inset: 0;
      z-index: 2;
      cursor: grab;
      touch-action: none;
      user-select: none;
    }

    .work-map-gesture-layer.is-dragging {
      cursor: grabbing;
    }

    .work-map-zoom-controls {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 5;
      display: grid;
      gap: 4px;
    }

    .work-map-zoom-controls button {
      width: 34px;
      height: 34px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 8px 18px rgba(31, 52, 77, 0.14);
      font-size: 20px;
      font-weight: 900;
      line-height: 1;
    }

    .work-map-zoom-controls button:hover,
    .work-map-zoom-controls button:focus-visible {
      border-color: var(--border-strong);
      color: var(--primary-dark);
    }

    .work-map-open {
      position: absolute;
      z-index: 6;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 36px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--surface);
      color: var(--primary-dark);
      font-size: 13px;
      font-weight: 800;
      text-decoration: none;
      box-shadow: 0 8px 18px rgba(31, 52, 77, 0.14);
      white-space: nowrap;
      max-width: calc(100% - 20px);
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .work-map-open {
      top: 10px;
      left: 10px;
    }

    .work-map-open:hover {
      filter: brightness(0.98);
    }

    .work-map-status {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 38px;
      padding: 9px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      font-size: 13px;
    }

    .work-map-status strong {
      color: var(--text);
      font-weight: 800;
    }

    .work-map-sites {
      display: grid;
      align-content: start;
      gap: 8px;
      min-width: 0;
      max-height: 276px;
      overflow-y: auto;
      padding-right: 2px;
    }

    .work-map-group {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .work-map-group-button {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 42px;
      padding: 8px 9px 8px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      text-align: left;
      overflow: hidden;
    }

    .work-map-group-button::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 4px;
      background: var(--primary);
    }

    .work-map-group:nth-child(1) .work-map-group-button {
      border-color: rgba(15, 118, 110, 0.24);
      background: var(--surface-soft);
    }

    .work-map-group:nth-child(1) .work-map-group-button::before {
      background: var(--primary);
    }

    .work-map-group:nth-child(2) .work-map-group-button {
      border-color: rgba(37, 99, 235, 0.24);
      background: var(--surface-cool);
    }

    .work-map-group:nth-child(2) .work-map-group-button::before {
      background: var(--blue);
    }

    .work-map-group:nth-child(3) .work-map-group-button {
      border-color: rgba(183, 121, 31, 0.28);
      background: var(--surface-warm);
    }

    .work-map-group:nth-child(3) .work-map-group-button::before {
      background: var(--amber);
    }

    .work-map-group:nth-child(4) .work-map-group-button {
      border-color: rgba(190, 18, 60, 0.2);
      background: var(--surface-alert);
    }

    .work-map-group:nth-child(4) .work-map-group-button::before {
      background: var(--rose);
    }

    .work-map-group-button.has-active,
    .work-map-group-button.is-open,
    .work-map-group-button:hover {
      border-color: var(--primary);
      filter: saturate(1.08);
    }

    .work-map-group-title {
      display: block;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .work-map-group-meta {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      overflow-wrap: anywhere;
    }

    .work-map-group-icon {
      display: inline-grid;
      place-items: center;
      width: 22px;
      height: 22px;
      border-radius: 6px;
      background: var(--bg);
      color: var(--muted);
      transition: transform 0.16s ease;
    }

    .work-map-group-icon svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .work-map-group-button.is-open .work-map-group-icon {
      color: var(--primary-dark);
      transform: rotate(180deg);
    }

    .work-map-group-panel {
      display: none;
      grid-template-columns: 1fr;
      gap: 6px;
      padding-left: 10px;
    }

    .work-map-group-panel.is-open {
      display: grid;
    }

    .work-map-group-empty {
      grid-column: 1 / -1;
      min-height: 42px;
      display: flex;
      align-items: center;
      padding: 9px;
      border: 1px dashed var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }

    .work-map-site {
      display: grid;
      gap: 4px;
      min-height: 34px;
      padding: 8px 9px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: inherit;
      text-align: left;
    }

    .work-map-site.is-active {
      border-color: var(--primary);
      background: var(--surface-soft);
      box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
    }

    .work-map-site-name {
      font-size: 11px;
      font-weight: 900;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .work-map-section {
      display: grid;
      gap: 8px;
      padding-top: 2px;
    }

    #workMapLocation {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
      gap: 6px;
    }

    .work-map-section-title {
      margin: 0;
      font-size: 15px;
      font-weight: 900;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .work-map-empty,
    .work-map-card {
      min-height: 42px;
      padding: 12px;
      border: 1px solid transparent;
      border-radius: 8px;
      font-size: 13px;
    }

    .work-map-empty {
      display: flex;
      align-items: center;
      color: var(--muted);
      background: var(--bg);
    }

    .work-map-card {
      display: flex;
      justify-content: flex-start;
      width: 100%;
      min-width: 0;
      min-height: 38px;
      padding: 8px 10px;
      align-items: center;
      gap: 8px;
      border-color: rgba(37, 99, 235, 0.25);
      background: var(--surface-cool);
      color: var(--text);
      text-align: left;
    }

    .work-map-card:hover,
    .work-map-card:focus-visible {
      border-color: var(--blue);
      background: var(--surface);
      outline: none;
    }

    .work-map-card.is-active {
      border-color: var(--primary);
      background: var(--surface-soft);
      box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
    }

    .work-map-card-icon {
      position: relative;
      width: 30px;
      height: 30px;
      flex: 0 0 auto;
      display: inline-grid;
      place-items: center;
      border-radius: 8px;
      background: var(--surface);
      color: var(--blue);
    }

    .work-map-card-icon svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .work-map-card-icon span {
      position: absolute;
      top: -5px;
      right: -5px;
      min-width: 16px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      background: var(--primary);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
      line-height: 1;
    }

    .work-map-meta {
      display: grid;
      gap: 5px;
      min-width: 0;
    }

    .work-map-name {
      min-width: 0;
      font-size: 11px;
      font-weight: 900;
      overflow-wrap: anywhere;
    }

    .work-map-coordinates {
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .work-map-card-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .work-map-mini {
      height: 32px;
      min-width: 58px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      font-size: 12px;
      font-weight: 800;
    }

    .work-map-mini.open {
      color: var(--primary-dark);
    }

    .work-map-mini.danger {
      color: var(--rose);
    }

    .bar-list {
      padding: 16px;
      display: grid;
      gap: 14px;
    }

    .panel-body {
      padding: 16px;
    }

    .space-panel-body {
      display: grid;
      gap: 10px;
    }

    .bar-item {
      display: grid;
      grid-template-columns: 112px minmax(0, 1fr) 44px;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 13px;
      min-width: 0;
    }

    .bar-track {
      height: 9px;
      border-radius: 999px;
      overflow: hidden;
      background: var(--bg);
    }

    .bar-fill {
      height: 100%;
      border-radius: inherit;
      background: var(--primary);
    }

    .bar-item:nth-child(2) .bar-fill {
      background: var(--blue);
    }

    .bar-item:nth-child(3) .bar-fill {
      background: var(--amber);
    }

    .bar-item:nth-child(4) .bar-fill {
      background: var(--rose);
    }

    .lower-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.8fr);
      gap: 14px;
      align-items: start;
    }

    .table-card {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: var(--shadow);
      overflow: hidden;
      min-width: 0;
    }

    .table-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .table-scroll {
      overflow-x: auto;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
    }

    th,
    td {
      padding: 13px 16px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      vertical-align: middle;
    }

    th {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      background: var(--bg);
    }

    tbody tr:hover {
      background: rgba(15, 118, 110, 0.05);
    }

    tbody tr.hidden {
      display: none;
    }

    .customer {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .customer .avatar {
      width: 30px;
      height: 30px;
      font-size: 12px;
    }

    .customer strong,
    .customer span {
      display: block;
      overflow-wrap: anywhere;
    }

    .customer span {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
    }

    .status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 26px;
      padding: 0 9px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .status::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: currentColor;
    }

    .status.paid {
      color: var(--green);
      background: rgba(21, 128, 61, 0.1);
    }

    .status.pending {
      color: var(--amber);
      background: rgba(183, 121, 31, 0.12);
    }

    .status.failed {
      color: var(--rose);
      background: rgba(190, 18, 60, 0.1);
    }

    .status.loading {
      color: var(--blue);
      background: rgba(37, 99, 235, 0.1);
    }

    .location-pill {
      max-width: 100%;
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 0 10px;
      border: 1px solid rgba(15, 118, 110, 0.24);
      border-radius: 8px;
      background: rgba(15, 118, 110, 0.08);
      color: var(--primary-dark);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
      transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .location-pill:hover,
    .location-pill:focus-visible {
      border-color: var(--primary);
      background: rgba(15, 118, 110, 0.13);
      outline: none;
      transform: translateY(-1px);
    }

    .location-pill svg {
      width: 14px;
      height: 14px;
      flex: 0 0 auto;
      stroke-width: 2.2;
    }

    .location-pill span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .compact {
      width: 34px;
      height: 34px;
    }

    .right-column {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .queue-list,
    .activity-list,
    .insight-list,
    .task-list {
      padding: 14px;
      display: grid;
      gap: 10px;
    }

    .queue-item {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
    }

    .queue-main {
      min-width: 0;
    }

    .queue-main span,
    .activity-item span,
    .insight-row span,
    .task-row span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }

    .queue-actions {
      display: flex;
      gap: 7px;
      flex: 0 0 auto;
    }

    .pill-button {
      min-height: 32px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      padding: 0 10px;
      font-size: 12px;
      font-weight: 800;
    }

    .pill-button.primary {
      border-color: var(--primary);
      background: var(--primary);
      color: #ffffff;
    }

    .activity-item {
      align-items: flex-start;
      padding: 12px;
      box-shadow: none;
    }

    .activity-dot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: var(--primary);
      margin-top: 5px;
      flex: 0 0 auto;
    }

    .activity-item:nth-child(2) .activity-dot {
      background: var(--blue);
    }

    .activity-item:nth-child(3) .activity-dot {
      background: var(--amber);
    }

    .activity-item:nth-child(4) .activity-dot {
      background: var(--rose);
    }

    .activity-copy {
      min-width: 0;
      margin-right: auto;
    }

    .activity-copy strong {
      display: block;
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .activity-time {
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }

    .insight-row,
    .task-row {
      padding: 11px 0;
      border-bottom: 1px solid var(--border);
      align-items: center;
    }

    .insight-row:last-child,
    .task-row:last-child {
      border-bottom: 0;
    }

    .insight-row strong,
    .task-row strong {
      display: block;
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .delta {
      font-size: 13px;
      font-weight: 850;
      white-space: nowrap;
    }

    .delta.good {
      color: var(--green);
    }

    .delta.warn {
      color: var(--amber);
    }

    .delta.bad {
      color: var(--rose);
    }

    .task-row label {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .task-row input {
      width: 17px;
      height: 17px;
      accent-color: var(--primary);
      flex: 0 0 auto;
    }

    .task-row:has(input:checked) strong {
      color: var(--muted);
      text-decoration: line-through;
    }

    .range-row {
      padding: 14px;
      border-top: 1px solid var(--border);
    }

    .range-row label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-size: 13px;
      color: var(--muted);
      font-weight: 750;
    }

    .range-row input {
      width: 100%;
      margin-top: 12px;
      accent-color: var(--primary);
    }

    .mobile-menu {
      display: none;
    }

    @media (max-width: 1180px) {
      .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .work-management-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .dashboard-grid,
      .lower-grid,
      .today-work-main,
      .today-work-hero-body,
      .today-split-grid,
      .personnel-summary-grid {
        grid-template-columns: 1fr;
      }

      .today-work-actions {
        justify-content: flex-start;
      }

      .today-key-grid,
      .personnel-person-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .today-work-summary-head {
        grid-template-columns: 1fr;
      }

      .today-summary-gas-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .today-summary-gas-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 860px) {
      .shell {
        grid-template-columns: 1fr;
      }

      body.sidebar-collapsed .shell,
      body.sidebar-collapsed .shell:has(.sidebar:hover),
      body.sidebar-collapsed .shell:has(.sidebar:focus-within) {
        grid-template-columns: 1fr;
      }

      .shell::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(17, 24, 39, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
      }

      body.nav-open {
        overflow: hidden;
      }

      body.nav-open .shell::after {
        opacity: 1;
        pointer-events: auto;
      }

      .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 300px);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow);
        z-index: 40;
        will-change: transform;
      }

      body.nav-open .sidebar {
        transform: translateX(0);
      }

      .sidebar-collapse-button {
        display: none;
      }

      body.sidebar-collapsed .brand {
        justify-content: flex-start;
        padding: 0 20px;
      }

      body.sidebar-collapsed .brand-text,
      body.sidebar-collapsed .usage,
      body.sidebar-collapsed .profile > div {
        display: block;
      }

      body.sidebar-collapsed .nav {
        padding: 14px 12px;
      }

      body.sidebar-collapsed .nav a {
        justify-content: flex-start;
        gap: 11px;
        padding: 0 10px;
      }

      body.sidebar-collapsed .nav a span {
        width: auto;
        opacity: 1;
      }

      body.sidebar-collapsed .sidebar-footer {
        padding: 14px;
        justify-items: stretch;
      }

      .sidebar-close-button {
        display: grid;
      }

      .mobile-menu {
        display: grid;
      }

      .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 12px 16px;
        gap: 10px;
      }

      .topbar-actions {
        justify-content: flex-end;
        gap: 8px;
      }

      .search {
        display: none;
      }

      .content {
        padding: 16px;
      }

      .toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .filters {
        justify-content: stretch;
      }

      .select-wrap {
        flex: 1 1 auto;
        min-width: 0;
      }

      .work-map-main {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 8px;
        align-items: stretch;
        transition: grid-template-columns 0.18s ease;
      }

      .work-map-main.has-open-group {
        grid-template-columns: 176px minmax(0, 1fr);
      }

      .confined-entry-layout {
        grid-template-columns: 1fr;
      }

      .personnel-assign-layout {
        grid-template-columns: 1fr;
      }

      .today-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .personnel-form-grid,
      .personnel-form-grid.cols-3 {
        grid-template-columns: 1fr;
      }

      .work-map-sites {
        max-height: 330px;
        overflow-y: auto;
        padding-right: 0;
      }

      .work-map-group {
        gap: 5px;
      }

      .work-map-group-button {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        min-height: 50px;
        padding: 7px 6px;
        text-align: center;
      }

      .work-map-group-button.is-open {
        grid-template-columns: minmax(0, 1fr) auto;
        justify-items: stretch;
        min-height: 44px;
        padding: 8px 9px 8px 12px;
        text-align: left;
      }

      .work-map-group-button::before {
        width: 3px;
      }

      .work-map-group-title {
        font-size: 10.5px;
        line-height: 1.2;
      }

      .work-map-group-button.is-open .work-map-group-title {
        font-size: 12px;
      }

      .work-map-group-meta,
      .work-map-group-icon {
        display: none;
      }

      .work-map-group-button.is-open .work-map-group-meta {
        display: block;
      }

      .work-map-group-button.is-open .work-map-group-icon {
        display: inline-grid;
      }

      .work-map-group-panel {
        padding-left: 0;
      }

      .work-map-group-panel.is-open {
        max-height: 190px;
        overflow-y: auto;
        padding-right: 2px;
      }

      .work-map-site {
        min-height: 36px;
        padding: 8px;
      }

      .work-map-shell {
        height: auto;
        min-height: 260px;
      }

    }

    @media (max-width: 620px) {
      .today-summary-gas-row,
      .today-summary-gas-form,
      .permit-checkbox-grid {
        grid-template-columns: 1fr;
      }

      .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
      }

      .stats-grid.has-expanded {
        gap: 0 6px;
      }

      .stats-grid > .stat-card {
        min-height: 58px;
        padding: 7px 5px;
        grid-template-rows: 1fr;
        align-content: center;
        gap: 0;
      }

      .stats-grid.has-expanded .stat-card {
        min-height: 58px;
        padding: 7px 5px;
        border-bottom-color: transparent;
        border-radius: 8px 8px 0 0;
      }

      .stats-grid.has-expanded .stat-card:hover,
      .stats-grid.has-expanded .stat-card:focus-visible {
        border-bottom-color: transparent;
      }

      .stats-grid > .stat-card .stat-top {
        justify-content: center;
        flex-direction: column;
        gap: 4px;
      }

      .stats-grid > .stat-card .stat-icon {
        order: -1;
        width: 20px;
        height: 20px;
        border-radius: 6px;
      }

      .stats-grid > .stat-card .stat-icon svg {
        width: 13px;
        height: 13px;
      }

      .stats-grid > .stat-card .stat-label {
        color: var(--text);
        font-size: 0;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
        max-width: 100%;
        text-align: center;
      }

      .stats-grid > .stat-card .stat-label::after {
        content: attr(data-mobile-label);
        font-size: 8.2px;
        font-weight: 850;
        line-height: 1;
      }

      .stats-grid > .stat-card .stat-summary,
      .stats-grid > .stat-card .trend {
        display: none;
      }

      .stat-expanded-panel {
        min-height: auto;
        border-radius: 0 0 8px 8px;
      }

      .detail-list li,
      .detail-metrics,
      .today-key-grid,
      .today-mini-grid,
      .today-check-row,
      .today-check-list,
      .personnel-person-list,
      .personnel-work-card {
        grid-template-columns: 1fr;
      }

      .today-work-actions {
        display: grid;
        grid-template-columns: 1fr;
      }

      .today-work-actions button {
        width: 100%;
      }

      .today-work-title h2 {
        font-size: 22px;
      }

      .kma-weather-summary,
      .kma-weather-detail,
      .kma-weather-metrics {
        grid-template-columns: 1fr;
      }

      .kma-summary-site {
        padding-right: 0;
      }

      .kma-summary-site + .kma-summary-site {
        margin-top: 4px;
        padding-top: 10px;
        padding-left: 0;
        border-top: 1px solid var(--border);
        border-left: 0;
      }

      .kma-summary-main strong {
        font-size: 17px;
      }

      .kma-temp-line strong {
        font-size: 30px;
      }

      .space-work-button,
      .space-person {
        grid-template-columns: minmax(0, 1fr);
      }

      .space-work-site,
      .space-work-count,
      .space-person-status {
        justify-self: start;
      }

      .page-title h1 {
        font-size: 20px;
      }

      .topbar-actions {
        flex-wrap: nowrap;
      }

      .topbar {
        padding: 10px 12px;
        gap: 8px;
      }

      .topbar-left {
        gap: 8px;
      }

      .topbar .icon-button {
        width: 36px;
        height: 36px;
      }

      .search {
        display: none;
      }

      .filters {
        flex-direction: column;
      }

      .select-wrap,
      .pill-button {
        width: 100%;
      }

      .work-map-wrap {
        padding: 12px;
      }

      .work-map-main {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 7px;
      }

      .work-map-main.has-open-group {
        grid-template-columns: 164px minmax(0, 1fr);
      }

      .work-map-sites {
        max-height: 300px;
        gap: 6px;
      }

      .work-map-group-button {
        min-height: 48px;
        padding: 6px 5px;
      }

      .work-map-group-button.is-open {
        min-height: 42px;
        padding: 7px 8px 7px 10px;
      }

      .work-map-group-title {
        font-size: 9.5px;
      }

      .work-map-group-button.is-open .work-map-group-title {
        font-size: 11px;
      }

      .work-map-group-panel.is-open {
        max-height: 170px;
      }

      #workMapLocation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .work-map-shell {
        min-height: 245px;
        aspect-ratio: 4 / 3;
      }

      .work-map-status,
      .work-map-group-panel,
      .work-map-card {
        grid-template-columns: 1fr;
      }

      .work-map-status {
        align-items: flex-start;
        flex-direction: column;
      }

      .work-map-card-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
      }

      .bar-item {
        grid-template-columns: 86px minmax(0, 1fr) 38px;
      }

      .queue-item {
        align-items: stretch;
        flex-direction: column;
      }

      .queue-actions {
        width: 100%;
      }

      .queue-actions .pill-button {
        flex: 1 1 0;
      }
    }


/* Data hub */
.data-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.data-hub-panel .panel-head,
.data-table-panel .panel-head {
  align-items: flex-start;
  gap: 14px;
}

.data-entry-form,
.sheet-config-form {
  display: grid;
  gap: 16px;
}

.data-textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.data-action-row,
.data-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.data-toolbar {
  justify-content: flex-end;
}

.data-table-select {
  min-width: 170px;
}

.data-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.data-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.data-download-link {
  text-decoration: none;
}

.data-table-scroll {
  max-height: 520px;
}

.data-table th,
.data-table td {
  white-space: nowrap;
}

.data-table td.data-memo-cell {
  min-width: 240px;
  max-width: 360px;
  white-space: normal;
}

.data-empty-row td {
  color: var(--muted);
  text-align: center;
  padding: 28px 12px;
}

.data-row-actions {
  display: flex;
  gap: 8px;
}

.data-row-actions .pill-button {
  padding: 7px 10px;
}

@media (max-width: 1100px) {
  .data-hub-grid {
    grid-template-columns: 1fr;
  }

  .data-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .work-management-form-grid {
    grid-template-columns: 1fr;
  }

  .personnel-db-toolbar {
    width: 100%;
    flex-basis: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .personnel-search-select {
    min-width: 112px;
    flex: 0 0 112px;
  }

  .personnel-search-box {
    min-width: 0;
    flex: 1 1 auto;
  }

  .personnel-view .table-scroll {
    overflow-x: hidden;
  }

  .personnel-db-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .personnel-db-table th:nth-child(2),
  .personnel-db-table td:nth-child(2) {
    display: none;
  }

  .personnel-db-table th,
  .personnel-db-table td {
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .personnel-db-table th:nth-child(1),
  .personnel-db-table td:nth-child(1) {
    width: 24%;
  }

  .personnel-db-table th:nth-child(3),
  .personnel-db-table td:nth-child(3) {
    width: 34%;
  }

  .personnel-db-table th:nth-child(4),
  .personnel-db-table td:nth-child(4) {
    width: 18%;
  }

  .personnel-db-table th:nth-child(5),
  .personnel-db-table td:nth-child(5) {
    width: 24%;
  }

  .personnel-db-table .data-row-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
  }

  .personnel-db-table .personnel-button {
    width: 100%;
    min-height: 30px;
    padding: 0 5px;
    font-size: 11px;
  }
}
