:root {
  --sidebar-width: 340px;
  --content-max-width: 1520px;
  --control-height: 42px;
  --bg: #f0f1f3;
  --surface: #ffffff;
  --surface-strong: #f2f2f2;
  --ink: #222222;
  --muted: #666666;
  --line: #d2d2d2;
  --accent: #e60012;
  --accent-strong: #c90010;
  --red: #b42318;
  --red-bg: #fff1ee;
  --yellow: #946200;
  --yellow-bg: #fff7d6;
  --green: #137a4b;
  --green-bg: #eaf8ef;
  --shadow: none;
  --radius: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.bot-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.app-shell {
  display: block;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.auth-screen .app-shell {
  display: grid;
  min-height: 100vh;
  background: #eeeeee;
}

body.auth-screen .sidebar,
body.auth-screen .topbar {
  display: none;
}

body.auth-screen .main-panel {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  margin-left: 0;
  overflow-y: auto;
  background: #eeeeee;
}

body.auth-screen .view {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 32px 18px;
  background: #eeeeee;
}

.app-startup-notice {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(420px, calc(100vw - 36px));
  border: 1px solid #c8c8c8;
  background: #ffffff;
  padding: 32px;
  text-align: center;
}

.app-startup-notice h2,
.app-startup-notice p {
  margin: 0;
}

.app-startup-notice h2 {
  font-size: 19px;
}

.app-startup-notice p {
  color: #555555;
  font-size: 14px;
}

.startup-retry-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  text-decoration: none;
}

.login-page {
  display: grid;
  place-items: center;
  width: 100%;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(420px, calc(100vw - 36px));
  min-height: 0;
  border: 1px solid #c8c8c8;
  background: #ffffff;
  padding: 42px 38px 32px;
}

.login-logo {
  display: block;
  width: min(270px, 82%);
  height: auto;
  margin: 0 auto 24px;
}

.login-divider {
  height: 1px;
  margin-bottom: 17px;
  background: #d6d6d6;
}

.login-heading {
  margin-bottom: 24px;
  text-align: center;
}

.login-heading h2 {
  margin-bottom: 5px;
  font-size: 22px;
  font-weight: 900;
}

.login-heading p {
  margin-bottom: 0;
  color: #555555;
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form label {
  display: grid;
  gap: 9px;
  color: #333333;
  font-size: 14px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  height: 42px;
  border: 1px solid #bfbfbf;
  border-radius: 0;
  padding: 0 12px;
  color: #222222;
  background: #ffffff;
}

.password-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
}

.password-input-row input {
  min-width: 0;
}

.password-toggle-button {
  width: 58px;
  height: 42px;
  padding: 0;
  white-space: nowrap;
}

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 9px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
}

.login-button:hover {
  background: var(--accent-strong);
}

.login-help {
  margin-top: 10px;
  border-left: 4px solid #d6d6d6;
  padding: 10px 12px;
  color: #555555;
  background: #f7f7f7;
  font-size: 13px;
  line-height: 1.55;
}

.login-help strong {
  display: block;
  margin-bottom: 4px;
  color: #333333;
  font-size: 14px;
}

.login-help p {
  margin: 2px 0;
}

.login-status-panel {
  margin: 10px 0;
  border: 1px solid #d9d9d9;
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  color: #444444;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.55;
}

.login-status-panel strong {
  display: block;
  margin-bottom: 4px;
  color: #222222;
  font-size: 14px;
}

.login-status-panel p {
  margin: 2px 0;
}

.login-signup-link {
  margin: 21px 0 0;
  color: #666666;
  text-align: center;
  font-size: 14px;
}

.login-signup-link button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  padding: 0;
}

.login-support-details {
  margin-top: 12px;
  border-top: 1px solid #e1e1e1;
  padding-top: 10px;
}

.login-support-details summary {
  width: max-content;
  margin: 0 auto;
  color: #666666;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.login-support-details .login-signup-link {
  margin-top: 12px;
}

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

.login-bootstrap {
  margin-top: 20px;
  border-top: 1px solid #e2e2e2;
  padding-top: 18px;
  text-align: center;
}

.login-bootstrap p {
  margin-bottom: 10px;
  color: #555555;
  font-size: 13px;
}

.login-bootstrap button {
  min-height: 40px;
  border: 1px solid #bdbdbd;
  border-radius: 0;
  padding: 0 16px;
  background: #ffffff;
  color: #333333;
  font-weight: 800;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--sidebar-width);
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 0 0 22px;
  border-right: 1px solid #bfbfbf;
  box-shadow: none;
  background: #ffffff;
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 7px;
  align-items: center;
  justify-items: center;
  min-width: 0;
  border-radius: 0;
  background: #ffffff;
  min-height: 88px;
  padding: 10px 24px 9px;
  border-bottom: 1px solid #cfcfcf;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 185px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: center;
}

.brand span {
  display: block;
  width: 100%;
  border-top: 1px solid #e4e4e4;
  padding-top: 7px;
  color: #333333;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.mobile-nav-toggle {
  display: none;
}

.sidebar-note {
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border-top: 1px solid #eeeeee;
  background: #eeeeee;
}

.nav-group {
  display: grid;
  gap: 0;
}

.nav-group-label {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid #dddddd;
  background: #ffffff;
  color: #666666;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid #dddddd;
  border-left: 5px solid transparent;
  border-radius: 0;
  padding: 0 20px;
  background: #f2f2f2;
  color: #333333;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
}

.nav-button:hover {
  background: #e9e9e9;
}

.nav-button[aria-current="page"] {
  border-left-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.sidebar-note {
  margin-top: auto;
  margin-right: 20px;
  margin-left: 20px;
  padding-top: 18px;
  border-top: 1px solid #e1e1e1;
}

.main-panel {
  min-width: 0;
  margin-left: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  padding: 22px 32px;
  border-bottom: 1px solid #cfcfcf;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.section-label {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  font-size: 15px;
  line-height: 1.2;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.network-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #b7d8c4;
  padding: 0 9px;
  background: #f2fbf5;
  color: #17683f;
  font-size: 12px;
  font-weight: 800;
}

.network-status[data-status="offline"] {
  border-color: #e8c87a;
  background: #fff8e3;
  color: #795100;
}

.incident-evidence-dossier-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.incident-evidence-stage {
  min-width: 0;
  padding: 12px 14px;
}

.incident-evidence-stage + .incident-evidence-stage {
  border-left: 1px solid var(--line);
}

.incident-evidence-stage strong {
  display: block;
  margin-bottom: 6px;
  color: #333333;
  font-size: 14px;
}

.incident-evidence-stage p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.view {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: 30px 32px 56px;
  background: #ffffff;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.record-mapping-summary-panel {
  padding: 14px;
  overflow-x: auto;
}

.record-mapping-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  min-width: 720px;
}

.record-mapping-summary-grid .metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 10px 12px;
  box-shadow: none;
}

.record-mapping-summary-grid .metric strong {
  margin-top: 4px;
  font-size: 24px;
}

.record-mapping-summary-grid .metric span {
  white-space: normal;
}

.two-column {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

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

.activity-option-groups {
  display: grid;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.activity-option-summary {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.activity-option-count-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.activity-option-count-strip span,
.activity-option-count-strip em {
  border: 1px solid var(--border);
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.activity-option-count-strip strong {
  color: var(--text);
}

.activity-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.activity-source-links span,
.activity-source-links a {
  border: 1px solid var(--border);
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.activity-source-links span {
  color: var(--text);
}

.activity-source-links a:focus,
.activity-source-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.activity-option-count-strip em {
  border-color: #f3b9c4;
  background: #fff7f9;
  color: var(--danger);
  font-weight: 800;
}

.activity-official-reassurance {
  margin: 0 0 14px;
  border: 1px solid #d8dde5;
  border-left: 4px solid var(--accent);
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.activity-program-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.activity-program-card {
  min-height: 72px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.activity-program-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: #fff7f9;
  box-shadow: inset 4px 0 0 var(--accent);
}

.activity-program-card:focus,
.activity-program-card:hover {
  border-color: var(--accent);
}

.activity-program-card strong,
.activity-program-card span {
  display: block;
}

.activity-program-card strong {
  color: var(--text);
  font-size: 14px;
}

.activity-program-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.activity-option-tools {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
}

.activity-option-tools label {
  min-width: 0;
}

.activity-option-tools select,
.activity-option-tools input {
  width: 100%;
}

.activity-option-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-option-controls .secondary-button {
  min-height: 38px;
  padding: 8px 12px;
}

.activity-search-empty {
  margin: 2px 0 0;
  border: 1px solid #f3b9c4;
  padding: 10px 12px;
  background: #fff7f9;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.activity-selected-summary {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
}

.activity-selected-summary > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-selected-summary strong {
  color: var(--text);
  font-size: 13px;
}

.activity-selected-summary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.activity-selected-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.activity-group-index {
  margin: 0 0 14px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #f8f8f8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.activity-option-group {
  min-width: 0;
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.activity-option-group-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style-position: outside;
}

.activity-option-group-title span {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.activity-option-group summary {
  user-select: none;
}

.activity-option-group[open] .activity-option-group-title {
  margin-bottom: 10px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-14 {
  margin-top: 14px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-18 {
  margin-top: 18px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-16 {
  margin-bottom: 16px;
}

.panel,
.metric,
.output-box,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel,
.output-box,
.empty-state {
  min-width: 0;
  padding: 18px;
}

.metric {
  min-width: 0;
  min-height: 150px;
  padding: 18px;
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.dashboard-overview {
  margin-bottom: 16px;
}

.today-safety-intro {
  margin-bottom: 18px;
}

.today-safety-intro h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.today-safety-intro .item-meta {
  margin-bottom: 0;
}

.daily-safety-scope-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.daily-safety-scope-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.daily-safety-scope-form .record-linkage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.daily-safety-scope-list {
  display: grid;
  gap: 8px;
}

.daily-safety-scope-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.daily-safety-scope-item .item-title,
.daily-safety-scope-item .item-meta {
  margin: 0;
}

.daily-safety-flow-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.daily-safety-recheck {
  margin: 8px 0 0;
  border-left: 3px solid var(--yellow);
  padding: 6px 8px;
  background: #fffdf3;
}

.daily-safety-recheck.is-due,
.daily-safety-closeout-status.is-followup {
  border-left-color: var(--accent);
  background: #fff7f9;
}

.daily-safety-stop-record-status {
  margin-top: 10px;
  border-left: 3px solid var(--yellow);
  padding: 8px 10px;
  background: #fffdf3;
}

.daily-safety-stop-record-status.is-followup {
  border-left-color: var(--accent);
  background: #fff7f9;
}

.daily-safety-stop-record-status .item-meta,
.daily-safety-stop-record-status .field-help {
  margin: 0;
}

.daily-safety-stop-record-status .field-help,
.daily-safety-stop-record-hint {
  margin-top: 5px;
}

.daily-safety-closeout-status {
  margin-top: 10px;
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  background: #f5fbf8;
}

.daily-safety-closeout-status .item-meta,
.daily-safety-closeout-status .field-help {
  margin: 0;
}

.daily-safety-closeout-status .field-help {
  margin-top: 5px;
}

.daily-safety-scope-cancel {
  position: relative;
}

.daily-safety-scope-cancel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.daily-safety-scope-cancel form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  width: min(360px, 70vw);
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.daily-safety-scope-cancel .field-help {
  grid-column: 1 / -1;
  margin: 0;
}

.today-safety-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.today-safety-form {
  gap: 16px;
}

.today-safety-form .record-linkage-fieldset {
  background: #fbfbfb;
}

.today-safety-record-reminder {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--accent);
  background: var(--red-bg);
}

.today-safety-record-reminder.is-recorded {
  border-left-color: var(--green);
  background: var(--green-bg);
}

.today-safety-record-reminder.is-followup {
  border-left-color: var(--accent);
  background: var(--red-bg);
}

.today-safety-record-reminder h4,
.today-safety-record-reminder p {
  margin: 0;
}

.today-safety-record-reminder h4 {
  font-size: 15px;
}

.today-safety-record-reminder > p:not(.section-label):not(.item-meta) {
  font-size: 13px;
  line-height: 1.5;
}

.today-safety-form .record-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.weather-safety-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.weather-safety-check input {
  flex: 0 0 auto;
}

.weather-safety-checkbox-grid-alert {
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.weather-safety-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.weather-safety-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.today-safety-result-column {
  position: sticky;
  top: 112px;
}

.weather-safety-result {
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  background: #ffffff;
  padding: 20px;
}

.weather-safety-result-empty {
  border-left-color: #999999;
  background: #f7f7f7;
  color: var(--muted);
}

.weather-safety-result-normal {
  border-left-color: var(--green);
  background: var(--green-bg);
}

.weather-safety-result-caution,
.weather-safety-result-reduce-or-relocate {
  border-left-color: #d99a00;
  background: var(--yellow-bg);
}

.weather-safety-result-stop-and-evacuate {
  border-left-color: var(--red);
  background: var(--red-bg);
}

.weather-safety-result-hold-for-data {
  border-left-color: #777777;
  background: #f3f3f3;
}

.weather-safety-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.weather-safety-result-heading h3 {
  margin-bottom: 6px;
  font-size: 26px;
}

.weather-safety-result-heading .status-pill {
  white-space: nowrap;
}

.weather-safety-result-heading p {
  margin-bottom: 0;
  font-weight: 700;
}

.weather-safety-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.weather-safety-summary div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(34, 34, 34, 0.14);
  padding-top: 8px;
}

.weather-safety-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weather-safety-summary dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.weather-safety-result-section {
  margin-top: 16px;
}

.weather-safety-result-section h4 {
  margin: 0 0 7px;
  font-size: 14px;
}

.weather-safety-result-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  font-weight: 700;
}

.weather-safety-disclaimer {
  margin-top: 18px;
}

.today-safety-save-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(34, 34, 34, 0.2);
  background: rgba(255, 255, 255, 0.78);
}

.today-safety-save-panel h4,
.today-safety-save-panel p {
  margin: 0;
}

.today-safety-save-panel > label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.today-safety-save-panel textarea {
  min-height: 88px;
}

.today-safety-confirmation {
  align-items: flex-start;
  padding: 9px 10px;
  border-left: 4px solid var(--accent);
  background: var(--red-bg);
  font-size: 12px;
  line-height: 1.5;
}

.today-safety-save-complete {
  border-left: 5px solid var(--green);
  background: var(--green-bg);
}

.dashboard-priority-panel {
  margin-bottom: 16px;
}

.dashboard-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-priority-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #f3d577;
  background: #fffdf7;
}

.dashboard-priority-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-priority-card strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
}

.dashboard-priority-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-today-safety-panel {
  margin-bottom: 16px;
}

.safety-execution-overview-panel,
.safety-execution-timeline-panel {
  margin-bottom: 16px;
}

.safety-execution-overview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fbfbfb;
}

.safety-execution-overview-summary > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.safety-execution-overview-summary > div:last-child {
  border-right: 0;
}

.safety-execution-overview-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.safety-execution-overview-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.safety-execution-overview-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.safety-execution-overview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid #d8d8d8;
  padding: 12px;
  background: #ffffff;
}

.safety-execution-overview-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.safety-execution-overview-item.tone-warning {
  border-left-color: #f3d577;
  background: #fffdf7;
}

.safety-execution-overview-item.tone-danger {
  border-left-color: #ef98a5;
  background: #fff7f8;
}

.safety-execution-overview-item.tone-success {
  border-left-color: #9ed8b2;
  background: #f7fcf8;
}

.safety-execution-timeline-panel {
  border-left: 4px solid #d8d8d8;
}

.safety-execution-timeline-panel.tone-warning {
  border-left-color: #f3d577;
}

.safety-execution-timeline-panel.tone-danger {
  border-left-color: #ef98a5;
}

.safety-execution-timeline-panel.tone-success {
  border-left-color: #9ed8b2;
}

.safety-execution-status-warning {
  background: #fff8df;
  color: #755300;
}

.safety-execution-status-danger {
  background: var(--red-bg);
  color: var(--red);
}

.safety-execution-status-success {
  background: var(--green-bg);
  color: var(--green);
}

.safety-execution-stage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.safety-execution-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid #d8d8d8;
  padding: 10px;
  background: #ffffff;
}

.safety-execution-stage strong,
.safety-execution-stage p,
.safety-execution-stage span {
  margin: 0;
}

.safety-execution-stage strong {
  display: block;
  font-size: 13px;
}

.safety-execution-stage p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.safety-execution-stage span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.safety-execution-stage.stage-complete {
  border-left-color: #9ed8b2;
  background: #f7fcf8;
}

.safety-execution-stage.stage-pending,
.safety-execution-stage.stage-followup {
  border-left-color: #f3d577;
  background: #fffdf7;
}

.safety-execution-stage.stage-followup {
  border-left-color: #ef98a5;
  background: #fff7f8;
}

.safety-execution-timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-today-safety-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fbfbfb;
}

.dashboard-today-safety-summary > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.dashboard-today-safety-summary > div:last-child {
  border-right: 0;
}

.dashboard-today-safety-summary span,
.dashboard-today-safety-summary p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-today-safety-summary strong {
  display: block;
  margin: 7px 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.dashboard-metric {
  display: grid;
  align-content: start;
  gap: 8px;
  border-left: 5px solid var(--line);
}

.dashboard-metric p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-status-green {
  border-color: #c5e8d3;
  background: var(--green-bg);
  color: var(--green);
}

.dashboard-status-yellow {
  border-color: #f3d577;
  background: var(--yellow-bg);
  color: var(--yellow);
}

.dashboard-status-red {
  border-color: #ffc2b8;
  background: var(--red-bg);
  color: var(--red);
}

.axis-board {
  margin-top: 16px;
}

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

.axis-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-left-width: 5px;
  padding: 14px;
  background: #ffffff;
}

.axis-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.readiness-checklist {
  display: grid;
  gap: 10px;
}

.readiness-checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #f3d577;
  background: #ffffff;
}

.readiness-checklist-item.is-ready {
  border-left-color: #9ed8b2;
}

.compact-toolbar {
  margin-bottom: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state-action {
  margin-top: 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  border-radius: 0;
  padding: 0 13px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

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

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border-color: var(--line);
  background: #f5f5f5;
  color: var(--ink);
}

.ghost-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.danger-button {
  background: var(--red-bg);
  color: var(--red);
  border-color: #ffd2ca;
}

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

.password-change-panel {
  max-width: none;
}

.password-policy-details {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: #fff7f9;
  padding: 10px 12px;
}

.password-policy-details summary {
  color: #6f2535;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.password-policy-details .item-meta {
  margin: 8px 0 0;
  color: #6f2535;
}

.password-policy-details .password-policy-checklist {
  margin-top: 10px;
  border: 1px solid #f3c6cf;
  border-left: 4px solid var(--accent);
  background: #ffffff;
}

.password-change-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) 170px;
  gap: 10px;
  align-items: end;
}

.password-change-form button {
  min-height: var(--control-height);
}

.hermes-mcp-panel {
  max-width: none;
}

.hermes-mcp-boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hermes-mcp-boundary-grid article {
  min-width: 0;
  padding: 12px 14px;
}

.hermes-mcp-boundary-grid article + article {
  border-left: 1px solid var(--line);
}

.hermes-mcp-boundary-grid strong {
  display: block;
  margin-bottom: 5px;
  color: #333333;
  font-size: 14px;
}

.hermes-mcp-boundary-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hermes-mcp-notice,
.hermes-mcp-status,
.hermes-mcp-stepup-ready {
  margin-bottom: 14px;
}

.hermes-mcp-issued-token {
  margin: 16px 0;
  border-top: 1px solid #f1bdc8;
  border-bottom: 1px solid #f1bdc8;
  padding: 14px;
  background: #fff7f9;
}

.hermes-mcp-snapshot-publication {
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.hermes-mcp-snapshot-publication > .item-meta {
  margin: 8px 0 0;
}

.hermes-mcp-snapshot-publish-form {
  margin-top: 12px;
}

.hermes-mcp-snapshot-publish-form .primary-button {
  min-height: var(--control-height);
}

.hermes-mcp-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.hermes-mcp-token-row input {
  min-width: 0;
  letter-spacing: 0;
}

.hermes-mcp-connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hermes-mcp-step {
  min-width: 0;
  padding: 16px 14px;
}

.hermes-mcp-step + .hermes-mcp-step {
  border-left: 1px solid var(--line);
}

.hermes-mcp-step h3 {
  margin-bottom: 8px;
}

.hermes-mcp-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.hermes-mcp-inline-form label {
  min-width: 0;
}

.hermes-mcp-inline-form input {
  width: 100%;
}

.hermes-mcp-inline-form button {
  min-height: var(--control-height);
  white-space: nowrap;
}

.hermes-mcp-active-list {
  margin-top: 18px;
}

.hermes-mcp-delegation-list {
  border-top: 1px solid var(--line);
}

.hermes-mcp-delegation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.hermes-mcp-delegation-item > div {
  min-width: 0;
}

.hermes-mcp-delegation-item p {
  margin: 3px 0 0;
}

.hermes-mcp-delegation-item form {
  flex: 0 0 auto;
}

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

.safety-verification-pre-operation-guide {
  border-left: 4px solid var(--accent);
  background: #fff7f9;
}

.safety-verification-checklist-fields {
  grid-column: 1 / -1;
}

.safety-verification-checklist-fieldset {
  margin: 0;
  border: 1px solid var(--line);
  padding: 14px;
  background: #ffffff;
}

.safety-verification-checklist-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

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

.safety-verification-checklist-input {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fbfbfb;
}

.safety-verification-checklist-input p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.record-linkage-fieldset {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  padding: 14px;
  background: #ffffff;
}

.record-linkage-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.record-linkage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.record-context-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 12px;
}

.record-context-grid-staff {
  grid-template-columns: minmax(0, 1fr);
}

.record-linkage-fieldset .notice {
  margin-top: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 90, 115, 0.16);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.incident-initial-response-form,
.incident-initial-response-panel {
  border-left: 4px solid #f25b78;
  padding: 14px;
  background: #fff8fa;
}

.incident-response-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.incident-response-checks .full {
  grid-column: 1 / -1;
}

.elevated-confirm-row {
  align-items: flex-start;
  border: 1px solid #ffdca8;
  border-radius: 0;
  background: #fff8ec;
  padding: 10px;
  line-height: 1.4;
}

.approval-submit-modal[hidden] {
  display: none;
}

.approval-submit-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.44);
}

.approval-submit-dialog {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.24);
  padding: 22px;
}

.approval-submit-dialog h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.approval-submit-dialog .button-row {
  justify-content: flex-end;
  margin-top: 18px;
}

.compact-check {
  display: inline-flex;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 0 10px;
}

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

.role-checkbox-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  padding: 10px;
  color: var(--ink);
}

.role-checkbox-card input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.role-checkbox-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.role-checkbox-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  min-width: 0;
}

.list-item.is-invalidated {
  background: #f1f1f1;
  color: #777777;
}

.list-item.is-muted {
  background: #f7f7f7;
  color: #777777;
}

.list-item.is-highlighted {
  border-left: 5px solid var(--accent);
}

.recently-saved-workflow-item {
  background: #fff9fb;
}

.recently-saved-workflow-notice {
  border-color: #f3b9c4;
  background: #fff7f9;
  color: var(--danger);
  font-weight: 800;
}

.list-item button {
  text-align: left;
}

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

.item-actions {
  justify-content: end;
}

.inline-action-details {
  flex: 1 1 320px;
  max-width: 560px;
}

.backup-mcp-snapshot {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 14px;
  background: #fffafb;
}

.backup-mcp-snapshot h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.backup-mcp-snapshot p {
  margin: 6px 0;
}

.inline-action-details summary {
  cursor: pointer;
  font-weight: 800;
  padding: 10px 0;
}

.inline-action-form {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
}

.inline-action-form textarea {
  min-height: 72px;
}

.business-unit-edit-form {
  margin-top: 12px;
}

.demand-site-safety-profile-details {
  margin-top: 12px;
}

.demand-site-safety-profile-intro,
.today-safety-profile-hint {
  margin: 10px 0;
  border-left: 4px solid var(--accent);
  background: #fff8f9;
  padding: 10px 12px;
}

.demand-site-safety-profile-intro p,
.today-safety-profile-hint p {
  margin: 4px 0;
}

.profile-fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  margin: 0;
  padding: 10px;
}

.profile-fieldset legend {
  font-weight: 800;
  padding: 0 4px;
}

.demand-site-safety-profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.demand-site-safety-profile-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.demand-site-safety-profile-card p {
  margin: 5px 0;
}

.business-unit-lifecycle-form {
  flex: 1 1 260px;
  max-width: 420px;
}

.site-edit-form {
  margin-top: 12px;
}

.site-lifecycle-form {
  flex: 1 1 260px;
  max-width: 420px;
}

.year-rollover-create-form {
  max-width: 420px;
}

.year-rollover-decision-form {
  min-width: 260px;
}

.year-rollover-finalize-form {
  flex: 1 1 320px;
  max-width: 520px;
}

.migration-commit-form {
  max-width: 560px;
}

.user-edit-form {
  max-width: 520px;
}

.user-lifecycle-form,
.role-revocation-form,
.organization-setting-form {
  flex: 1 1 300px;
  max-width: 520px;
}

.education-completion-form,
.education-cancellation-form,
.education-invalidation-form,
.education-attendance-form,
.education-attendance-status-form {
  flex: 1 1 320px;
  max-width: 520px;
}

.education-attendance-status-form {
  min-width: 180px;
}

.safety-task-completion-form,
.safety-task-start-form,
.safety-task-cancellation-form {
  max-width: 520px;
}

.action-completion-form {
  max-width: 520px;
}

.evidence-edit-form,
.evidence-invalidation-form,
.linked-evidence-form {
  max-width: 560px;
}

.evidence-camera-capture {
  min-height: var(--control-height);
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #fbfbfb;
}

.linked-evidence-details {
  max-width: 640px;
  margin-bottom: 12px;
}

.review-completion-form,
.review-invalidation-form {
  max-width: 360px;
}

.safety-verification-edit-form,
.safety-verification-completion-form,
.safety-verification-invalidation-form {
  max-width: 420px;
}

.item-title {
  margin: 0;
  font-weight: 800;
}

.item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.demand-site-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.demand-site-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #cfcfcf;
  padding: 0 9px;
  background: #ffffff;
  color: #333333;
  font-size: 12px;
  font-weight: 800;
}

.lifecycle-meta {
  color: #8a4b58;
}

.grade-pill,
.status-pill,
.team-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 0;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.grade-red {
  background: var(--red-bg);
  color: var(--red);
}

.grade-yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.grade-green {
  background: var(--green-bg);
  color: var(--green);
}

.status-pill {
  background: var(--surface-strong);
  color: var(--muted);
}

.expiry-candidate-pill {
  background: #fff8df;
  color: #755300;
}

.team-pill {
  margin: 0 4px 4px 0;
  background: #eef3f7;
  color: #31546a;
}

.detail-section {
  display: grid;
  gap: 14px;
}

.notice {
  margin: 0;
  border-left: 4px solid var(--accent);
  padding: 12px;
  background: #fff4f6;
  color: #5f2632;
  border-radius: 0;
  font-size: 13px;
}

.output-box pre {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.next-step-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  padding: 12px;
  background: #fffdf5;
}

.next-step-guide .item-title,
.next-step-guide .item-meta {
  margin: 0;
}

.next-step-guide .eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.next-step-guide.next-step-success {
  border-left-color: var(--green);
  background: var(--green-bg);
}

.toolkit-next-flow {
  align-items: flex-start;
}

.education-next-flow {
  margin: 12px 0;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .next-step-guide {
    align-items: stretch;
    flex-direction: column;
  }
}

.audit-log-list {
  display: grid;
  gap: 10px;
}

.audit-log-item {
  align-items: start;
}

.audit-log-item details {
  margin-top: 8px;
}

.audit-log-item summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.audit-log-item pre {
  max-height: 220px;
  margin: 8px 0 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: #f7f7f7;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.audit-warning-warning {
  border-left-color: #d99a00;
  background: #fff8df;
  color: #755300;
}

.audit-warning-danger {
  border-left-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}

.chat-box {
  display: grid;
  gap: 12px;
}

.chat-example {
  border-radius: 0;
  background: var(--surface-strong);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.business-type-help {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  background: #f7f7f7;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.business-type-help p {
  margin: 0;
}

.record-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f7f7f7;
}

.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.record-summary-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.record-summary-grid strong {
  color: var(--text);
  font-size: 18px;
}

.linked-record-highlights {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.linked-record-group {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.linked-record-group ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.file-access-request-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fafafa;
}

.compact-form {
  gap: 10px;
  margin-top: 4px;
}

.file-access-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.table th {
  width: 34%;
  color: var(--muted);
  font-size: 12px;
}

.table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 0;
  background: #333333;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.report-preview-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 14px;
    box-shadow: none;
  }

  body {
    overflow: auto;
  }

  .main-panel {
    margin-left: 0;
    height: auto;
    overflow: visible;
  }

  .brand {
    border-radius: 0;
    justify-items: start;
  }

  .brand-logo {
    width: min(100%, 185px);
    max-height: 52px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    padding: 0;
    padding-bottom: 4px;
    gap: 10px;
  }

  .nav-group {
    display: flex;
    align-items: stretch;
    gap: 0;
  }

  .nav-group-label {
    display: flex;
    align-items: center;
    min-width: max-content;
    margin: 0;
    padding: 0 10px;
    border-bottom: 1px solid #dddddd;
    background: #ffffff;
  }

  .nav-button {
    min-width: max-content;
  }

  .sidebar-note {
    display: none;
  }

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

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .today-safety-layout {
    grid-template-columns: 1fr;
  }

  .today-safety-result-column {
    position: static;
  }

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

  .daily-safety-scope-form {
    grid-template-columns: 1fr;
  }

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

  .password-change-form button {
    grid-column: 1 / -1;
  }

}

@media (max-width: 680px) {
  .sidebar {
    padding: 0;
  }

  .brand {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo menu"
      "label label";
    justify-items: stretch;
    min-height: 0;
    padding: 12px 18px;
  }

  .brand-logo {
    grid-area: logo;
    width: min(100%, 180px);
    max-height: 46px;
    justify-self: start;
  }

  .brand span {
    grid-area: label;
    margin-top: 2px;
    text-align: left;
  }

  .mobile-nav-toggle {
    grid-area: menu;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid #bdbdbd;
    border-radius: 0;
    padding: 0 12px;
    background: #ffffff;
    color: #333333;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
  }

  .nav-list {
    display: none;
    overflow: visible;
    padding: 0;
    border-top: 1px solid #dddddd;
  }

  .sidebar.mobile-nav-open .nav-list {
    display: grid;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-group {
    display: grid;
  }

  .nav-group-label {
    min-height: 38px;
    padding: 0 18px;
  }

  .nav-button {
    min-height: 48px;
    padding: 0 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 18px;
  }

  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 8px;
    white-space: normal;
  }

  .topbar-meta #save-status {
    flex-basis: 100%;
  }

  .topbar-meta .network-status {
    flex-basis: 100%;
    width: max-content;
  }

  .topbar-meta .session-actions {
    flex-wrap: wrap;
  }

  .view {
    padding: 18px;
  }

  .dashboard-grid,
  .dashboard-priority-grid,
  .dashboard-today-safety-summary,
  .safety-execution-overview-summary,
  .safety-execution-stage-list,
  .password-change-form,
  .two-field-grid,
  .form-grid,
  .record-context-grid,
  .record-linkage-grid,
    .record-filter-bar,
  .record-summary-grid {
    grid-template-columns: 1fr;
  }

  .incident-evidence-dossier-flow {
    grid-template-columns: 1fr;
  }

  .incident-evidence-stage + .incident-evidence-stage {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .today-safety-form .record-context-grid,
  .daily-safety-scope-form .record-linkage-grid,
  .weather-safety-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .daily-safety-scope-item {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-safety-scope-cancel form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .incident-response-checks {
    grid-template-columns: 1fr;
  }

  .safety-verification-checklist-grid {
    grid-template-columns: 1fr;
  }

  .weather-safety-result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .list-item,
  .readiness-checklist-item,
  .safety-execution-overview-item,
  .safety-execution-timeline-footer {
    grid-template-columns: 1fr;
  }

  .safety-execution-timeline-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .safety-execution-timeline-footer button {
    width: 100%;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button-row button,
  .button-row a {
    width: 100%;
  }

  .hermes-mcp-boundary-grid,
  .hermes-mcp-connection-grid {
    grid-template-columns: 1fr;
  }

  .hermes-mcp-boundary-grid article + article,
  .hermes-mcp-step + .hermes-mcp-step {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hermes-mcp-token-row,
  .hermes-mcp-inline-form {
    grid-template-columns: 1fr;
  }

  .hermes-mcp-token-row button,
  .hermes-mcp-inline-form button {
    width: 100%;
  }

  .hermes-mcp-delegation-item {
    align-items: stretch;
    flex-direction: column;
  }

  .hermes-mcp-delegation-item form,
  .hermes-mcp-delegation-item form button {
    width: 100%;
  }
}
