.portal-body {
  --console-gutter: clamp(14px, 2vw, 24px);
  --console-card: #fff;
  --console-subtle: #f7f6f3;
  --console-border: #dedcd6;
}

.console-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 17px;
}
.console-heading h1 {
  margin: 0;
  font-size: clamp(24px, 2.45vw, 34px);
  line-height: 1.22;
  color: var(--ehs-ink);
}
.console-heading time, .console-heading .console-period {
  color: var(--ehs-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.console-card {
  min-width: 0;
  padding: var(--console-gutter, 18px);
  border: 1px solid var(--console-border, #dedcd6);
  border-radius: 14px;
  background: var(--console-card, #fff);
}
.console-card + .console-card {margin-top: 15px;}
.console-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 12px;
}
.console-card-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}
.console-card-head a, .console-action {
  font-size: 13px;
  font-weight: 650;
  color: var(--ehs-link);
}
.console-empty {color: var(--ehs-muted); margin: 0; padding: 13px 0 8px; font-size: 14px;}
.console-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #fff1d9;
  color: #794805;
  padding: 3px 8px;
  line-height: 1.4;
  font-size: 12px;
  white-space: nowrap;
}
.console-tag.is-done {background: #eeefeb; color: #3d423e;}
.console-tag.is-late {background: #fcece6; color: #9e3827;}

/* Reports use business filters in a single compact toolbar. */
body :is(.console-filter, .gd-filters, .records-filters, .management-hazard-filters, .check-filters) {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 7px 10px;
  position: static;
}
body .console-filter {
  padding: 10px 14px;
  margin: 0 0 15px;
  border: 1px solid var(--console-border, #dedcd6);
  border-radius: 10px;
  background: #fff;
}
body .ws-card > .console-filter, body .console-card .console-filter {
  border: 0;
  padding: 10px 0;
  margin-bottom: 9px;
}
body .ws-card > .console-filter {
  padding-inline: 18px;
  border-block: 1px solid var(--console-border, #dedcd6);
  border-radius: 0;
  background: #f9f8f5;
}
body :is(.console-filter, .gd-filters, .records-filters, .management-hazard-filters, .check-filters) > label {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  line-height: 1.4;
  color: #55544f;
  font-size: 12px;
  font-weight: 610;
}
body:is(.portal-body, .fire-body) :is(.console-filter, .gd-filters, .records-filters, .management-hazard-filters, .check-filters) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, .button) {
  min-height: 34px;
  height: 34px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.35;
  max-width: 100%;
}
body .console-filter :is(select[name=grid3],select[name=grid4]) {width: clamp(136px, 15vw, 202px); min-width: 0;}
body .console-filter :is(input[type=date], input[type=month]) {width: 143px;}
body .console-filter .console-search {flex: 0 1 290px;}
body .console-filter > .button {margin: 0; padding-inline: 14px;}
body .console-filter a:not(.button) {display: inline-flex; align-items: center; min-height: 34px; font-size: 13px;}
body .console-filter.compact-edit {margin: 5px 0 0;}
body .management-hazard-filters :is(.hazard-status-filters, .admin-ledger-search) {margin: 0;}
body .management-hazard-filters .hazard-status-filters {flex-basis: 100%;}

/* The legacy panel style serves both inset form sections and edge-to-edge tables. */
:is(body.portal-body, .fire-main) .panel > :is(h2, h3):first-child {margin-inline: 16px;}
body :is(.panel, .ws-card) > :is(h2,h3):first-child {margin-block-start: 14px;}
body :is(.dashboard-chart,.form-panel,.records-chart-panel,.detail-info,.action-panel) > :is(h2,h3):first-child {margin: 0 0 12px;}
:is(body.portal-body, .fire-main) .panel > .gd-result {padding-inline: 16px;}

.admin-dashboard-nav {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ffffff22;
}
body .admin-dashboard-nav a {font-size: 14px; gap: 10px; min-height: 43px; margin: 0; border-radius: 8px;}
body .admin-dashboard-nav a[aria-current=page], body .admin-side-nav > a[aria-current=page],
body .admin-nav-group > summary > a[aria-current=page] {
  color: #ffcf8c;
  background: #ffffff11;
  box-shadow: inset 3px 0 var(--ehs-orange);
}
body .admin-department-home {min-height: 43px; font-size: 14px; gap: 10px; margin: 0;}
.admin-department-home svg, .admin-dashboard-nav svg {width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;}
body .admin-department .admin-subnav a::before {content: none;}
body .admin-department .admin-subnav {padding-left: 30px;}
body .admin-department .admin-subnav a {
  min-height: 34px;
  padding: 5px 10px;
  border-left: 1px solid #b5a79a59;
}
.portal-user > span:nth-child(2) {min-width: 0; overflow-wrap: anywhere;}

.notice.warning {background:#fff3dc;color:#62430e;}
.detail-operation-link {margin-bottom:14px;}
#detail-operations,#plan-date,#submit-note,#review-note {scroll-margin-top:16px;}
.project-message {padding:16px;margin-bottom:14px;overflow-wrap:anywhere;}
.project-message .record-fields {padding:0;margin:0;grid-template-columns:repeat(2,minmax(0,1fr));}
.project-message .record-fields div {min-width:0;}
.project-message .record-wide {grid-column:1/-1;}
.project-message dt {color:#514c44;font-size:.9rem;}
.project-message dd {margin:4px 0 0;font-weight:650;}
.project-message p:last-child {margin-bottom:0;}
.project-message article + article {border-top:1px solid #e6ddd0;margin-top:12px;padding-top:12px;}
@media (max-width:650px) {
  .back-link[aria-label] {font-size:14px;min-height:44px;display:inline-flex;align-items:center;}
}

.employee-home {max-width: 980px; margin: 0 auto;}
.employee-heading {margin-bottom: 12px;}
.employee-hero {
  min-height: clamp(188px, 30vw, 244px);
  overflow: hidden;
  border-radius: 17px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(90deg,#191a1d 0%,#191a1df8 19%,#191a1da8 49%,#17181c20 78%),
    #202023 url(brand/ehs-technology.webp) right 54% / cover no-repeat;
  border: 1px solid #2e2f31;
}
.employee-hero-copy {padding: clamp(17px, 4vw, 34px); max-width: 66%; min-width: 0;}
.employee-hero h2 {
  margin: 0 0 5px;
  font-size: clamp(24px, 4.2vw, 38px);
  letter-spacing: -.03em;
  line-height: 1.2;
}
.employee-hero p {color: #eeedeb; font-size: 13px; margin: 0 0 14px;}
body .employee-hero .button {min-height: 44px; padding: 7px 14px; white-space: nowrap; gap: 7px; font-size: 14px;}
.employee-hero svg, .employee-icon svg, .employee-arrow {width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8;}
.employee-columns {display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 14px; margin-top: 14px; align-items: start;}
.employee-side {min-width: 0; display: grid; gap: 14px;}
.employee-tools {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px;}
.employee-tools a {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  min-height: 64px;
  background: white;
  color: var(--ehs-ink);
  border: 1px solid var(--console-border);
  border-radius: 12px;
  font-size: 14px;
}
.employee-tools a:hover, .daily-tools a:hover, .daily-queue a:hover {border-color: #c88a38;}
.employee-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  flex: none;
  color: var(--ehs-link);
  background: var(--ehs-tint);
}
.employee-arrow {width: 13px; height: 13px; margin-left: auto; color: #6f6a64; flex: none;}
.employee-card {padding: clamp(13px, 2vw, 19px);}
.employee-card .console-card-head {margin-bottom: 9px;}
.employee-card .console-card-head a {min-height: 34px; display: inline-flex; align-items: center; gap: 4px;}
.employee-counters {display: flex; align-items: stretch; border-block-start: 1px solid var(--console-border); padding-top: 10px;}
.employee-counters > div {flex: 1; min-width: 0; text-align: center; padding: 2px 5px;}
.employee-counters > div + div {border-inline-start: 1px solid var(--console-border);}
.employee-counters strong, .employee-counters span {display: block;}
.employee-counters strong {font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums;}
.employee-counters span {font-size: 12px; color: var(--ehs-muted);}
.employee-record {
  min-height: 51px;
  border-top: 1px solid var(--console-border);
  padding: 8px 0;
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ehs-ink);
}
.employee-record-main {min-width: 0; flex: 1;}
.employee-record strong, .employee-record small {display: block;}
.employee-record strong {line-height: 1.4; overflow-wrap: anywhere;}
.employee-record small {color: var(--ehs-muted); font-size: 12px;}
.employee-record .employee-icon {width: 31px; height: 31px; background: #f4f3f0;}
.employee-record:hover {color: var(--ehs-link);}
.employee-home .company-activity {margin-top: 14px;}

.two-wheel-home-entry {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  min-height: 88px;
  padding: 9px max(96px, 30%) 9px 15px;
  border: 1px solid #24669c;
  border-radius: 13px;
  background: linear-gradient(90deg, #0b3b70 8%, #0b3b7000 35%) right center / 124px 100% no-repeat,
    #0b3b70 url(brand/two-wheel-training.webp?v=blue-20261125) right center / auto 100% no-repeat;
  color: #fff;
  line-height: 1.25;
}
.two-wheel-home-entry:hover {border-color: #d89d52; color: #fff;}
.two-wheel-home-entry strong {color: #fff; font-size: 17px; font-weight: 750;}
.two-wheel-home-label {font-size: 11px; color: #e3f3ff;}
.two-wheel-home-action {font-size: 13px; font-weight: 650; color: #ffce8a;}
.ehs-daily .two-wheel-home-entry {margin-bottom: 10px;}

.ehs-daily {max-width: 650px; margin: 0 auto;}
.ehs-daily .console-card {padding-right: clamp(16px, 3vw, 22px);}
.daily-queue, .daily-tools {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px;}
.daily-queue a, .daily-tools a {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--console-border);
  border-radius: 10px;
  background: #faf9f7;
  color: var(--ehs-ink);
  font-size: 14px;
}
.daily-queue a {justify-content: flex-start; min-height: 65px;}
.daily-queue b, .daily-queue strong {display: block;}
.daily-queue strong {font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums;}
.daily-tools a {min-height: 56px; font-weight: 650;}

.console-board {--board-gap: 14px; display: grid; gap: var(--board-gap);}
.console-board > .console-heading, .console-board > .console-filter {margin: 0;}
.board-kpis {display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,137px),1fr)); gap: 10px;}
.board-kpi {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--console-border);
  border-radius: 12px;
  background: white;
  color: var(--ehs-ink);
}
a.board-kpi:hover {border-color: #b27d33; color: var(--ehs-ink);}
.board-kpi.is-key {background: #fffbf2; border-color: #edc388;}
.board-kpi > span {font-size: 13px; font-weight: 620; color: #4d4b46;}
.board-kpi strong {color: var(--ehs-ink); font-size: 27px; line-height: 1.12; letter-spacing: -.025em; font-variant-numeric: tabular-nums;}
.board-kpi small {color: var(--ehs-muted); font-size: 12px;}
.board-split {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--board-gap);}
.board-split .console-card {margin: 0;}
.board-list {list-style: none; margin: 0; padding: 0;}
.board-bar-row, .board-project {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(4rem, 1fr) minmax(72px, 2.25fr) minmax(2.2ch, auto);
  gap: 10px;
  padding-block: 6px;
  font-size: 13px;
  color: var(--ehs-ink);
}
.board-bar-row {min-height: 29px;}
a.board-bar-row:hover {color: var(--ehs-link);}
.board-bar-row strong, .board-project strong {text-align: end; font-variant-numeric: tabular-nums;}
.board-meter {
  display: block;
  background: #eeede9;
  border-radius: 20px;
  height: 7px;
  min-width: 0;
  overflow: hidden;
}
.board-meter > span {width: var(--meter, 0%); height: 100%; display: block; border-radius: inherit; background: #c57617;}
.board-meter.dark > span {background: #625b54;}
.board-project {grid-template-columns: minmax(115px,1.6fr) minmax(56px,1fr) minmax(36px,auto);}
.board-project + .board-project {border-top: 1px solid #eeeae3;}
.board-project small {display: block; color: var(--ehs-muted); font-size: 11px;}
.board-project a {overflow-wrap: anywhere; font-weight: 650;}
.board-table-wrap {overflow-x: auto;}
body table.board-table {font-size: 13px; width: 100%; min-width: 350px; border-collapse: collapse; table-layout: auto;}
body .board-table :is(th,td) {padding: 8px 10px; border-bottom: 1px solid #e8e5de; text-align: start; vertical-align: middle;}
body .board-table th {background: #f7f5f1; font-weight: 650; color: #4d4b46; white-space: nowrap;}
body .board-table td {background: white; line-height: 1.45; overflow-wrap: anywhere;}
body .board-table tr:hover td {background: #fbf9f4;}
.board-table td:first-child a {font-weight: 650; color: var(--ehs-link);}
.board-table .board-number {font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center;}
.board-table td:last-child {color: var(--ehs-muted);}
.board-table th:first-child {border-top-left-radius: 7px;}
.board-table th:last-child {border-top-right-radius: 7px;}
.board-table details {margin-top: 5px;}
.board-table details summary {cursor: pointer;}
.board-actions {display: flex; gap: 16px;}
.board-details summary {font-weight: 650; cursor: pointer; padding: 3px 0;}
.board-details[open] summary {margin-bottom: 10px;}
.board-note {color: var(--ehs-muted); font-size: 12px; margin: 8px 0 0;}
.board-tabs {display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px;}
.dashboard-tabs {margin-bottom: 14px;}
.screen-other-boards {margin-top: 14px;}
body .board-tabs a, body .board-pagination a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  font-size: 13px;
  padding: 4px 11px;
  border: 1px solid var(--console-border);
  margin: 0;
  border-radius: 7px;
  color: var(--ehs-ink);
  background: white;
}
body .board-tabs a[aria-current=page] {background: var(--ehs-tint); border-color: #e8bc79; color: var(--ehs-link);}
.board-pagination {display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 10px 0 0; font-size: 13px; color: var(--ehs-muted);}
.board-errors {color: #9f3525; padding: 8px 12px; border: 1px solid #e7bfb5; border-radius: 8px; background: #fff6f3; margin: 0;}

@media (min-width: 901px) {
  body.admin-shell:has(.gd-open) .workspace main, body.admin-fire:has(.gd-open) .fire-main {
    padding-inline-end: 69px;
  }
  body .console-board > .console-filter {padding-block: 8px;}
  body .console-board > .console-filter > label {font-size: 12px; line-height: 1.25;}
  body:is(.portal-body, .fire-body) .console-board > .console-filter :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, .button) {
    font-size: 13px;
    min-height: 32px;
    height: 32px;
    padding-block: 4px;
  }
}
@media (max-width: 980px) {
  .console-board {--board-gap: 12px;}
}
@media (max-width: 745px) {
  .employee-columns, .board-split {grid-template-columns: minmax(0,1fr);}
  .employee-home, .ehs-daily {max-width: 550px;}
  .employee-hero {background-position: right 24%;}
  .employee-tools a {padding-inline: 10px;}
  body:is(.portal-body, .fire-body) :is(.console-filter, .gd-filters, .records-filters, .management-hazard-filters, .check-filters) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, .button) {min-height: 40px; height: 40px; font-size: 16px;}
  .console-filter {padding: 9px 11px;}
}
@media (max-width: 360px) {
  .employee-hero-copy {max-width: 69%;}
  .employee-hero h2 {font-size: 23px;}
  .employee-tools a, .daily-tools a, .daily-queue a {gap: 6px; padding-inline: 7px; font-size: 13px;}
}
@media print {
  .console-filter, .board-tabs, .board-pagination, .admin-dashboard-nav {display: none !important;}
  .console-card {break-inside: avoid;}
}

.daily-hero {display: block; min-height: 0; margin-bottom: 14px; padding: 17px;}
.daily-hero h2 {font-size: 20px; margin: 0 0 13px;}
.daily-hero .daily-queue a {background: #282629e8; border-color: #746b60; color: #fff; min-height: 66px;}
.daily-hero .daily-queue a:hover {border-color: var(--ehs-orange);}
.daily-hero .daily-queue a:focus-visible {outline-color: var(--ehs-orange);}
.daily-hero .employee-icon {color: #ffcb86; background: #4a3723;}
.daily-hero .daily-queue strong {color: #ffbf65;}
