:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #687582;
  --muted-soft: #8a97a5;
  --line: #dde4ec;
  --line-strong: #c7d2de;
  --canvas: #f4f6f8;
  --paper: #ffffff;
  --nav: #12202f;
  --nav-soft: #20354a;
  --accent: #f58220;
  --accent-deep: #d96f16;
  --blue: #425e7b;
  --blue-soft: #eef3f8;
  --green-soft: #edf7f2;
  --green-text: #2d7054;
  --red-soft: #fff7f8;
  --red-text: #8e3b46;
  --shadow: 0 24px 56px rgba(18, 32, 47, 0.14);
}

.hr-portal-theme {
  --accent: #0f9d78;
  --accent-deep: #0c7f61;
  --nav: #0b2a24;
  --nav-soft: #123c33;
  --green-soft: #e8f7f1;
  --green-text: #0c7f61;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, rgba(245, 130, 32, 0.08), transparent 24rem),
    linear-gradient(180deg, #f8fafc 0%, var(--canvas) 100%);
  color: var(--ink);
  font-family: "Segoe UI", "Aptos", sans-serif;
}

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

button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  filter: none;
  transform: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
}

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

input::placeholder {
  color: #97a4b2;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #afc3d8;
}

.company-name-ui {
  color: var(--ink);
}

.company-name-ui span {
  color: #d96f16;
}

.eyebrow.company-name-ui,
.eyebrow-light.company-name-ui,
.topbar .company-name-ui,
.brand-ribbon .company-name-ui,
.auth-footer .company-name-ui,
.app-footer .company-name-ui {
  color: var(--ink);
}

.login-brand-panel .company-name-ui,
.sidebar .company-name-ui {
  color: #fff;
}

.brand-row,
.sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.brand-logo {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 32, 42, 0.12);
}

.brand-row-large {
  align-items: flex-start;
}

.brand-mark-large,
.brand-logo-large {
  width: 70px;
  height: 70px;
}

.brand-heading {
  margin: 4px 0 0;
  color: #fff;
  font-size: 27px;
  line-height: 1.15;
}

.brand-divider {
  width: 100%;
  height: 1px;
  background: rgba(175, 195, 216, 0.2);
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(360px, 440px);
  width: min(860px, 100%);
  min-height: auto;
  overflow: hidden;
  border: 1px solid rgba(18, 32, 47, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-brand-panel {
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(18, 32, 47, 0.98), rgba(18, 32, 47, 0.95)),
    linear-gradient(135deg, rgba(245, 130, 32, 0.12), transparent);
  color: #fff;
}

.login-brand-block {
  display: grid;
  gap: 18px;
  align-content: center;
  min-height: 100%;
}

.login-tagline {
  margin: 0;
  color: #afc3d8;
  font-size: 17px;
  font-style: italic;
}

.brand-description {
  margin: 0;
  color: #afc3d8;
  font-size: 14px;
  line-height: 1.7;
}

.login-card-shell {
  display: grid;
  place-items: center;
  padding: 30px 34px;
  background:
    linear-gradient(180deg, rgba(245, 130, 32, 0.035), transparent 8rem),
    #fff;
}

.login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
}

.login-card h2,
.sidebar h2,
.topbar h1,
.panel h2,
.dialog-header h2 {
  margin: 4px 0 0;
}

.login-card h2 {
  font-size: 26px;
  line-height: 1.1;
}

.auth-eyebrow,
.auth-copy,
.auth-footer,
.form-message,
.reset-help,
.reset-message,
.context-copy,
.filter-status {
  margin: 0;
}

.auth-copy,
.auth-footer,
.reset-help,
.filter-status,
.context-copy {
  color: var(--muted);
}

.auth-copy {
  margin-top: -10px;
  font-size: 14px;
}

.auth-footer {
  font-size: 12px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 12px;
}
.login-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-mode-button {
  border: 1px solid var(--line-strong);
  background: var(--blue-soft);
  color: var(--ink);
}

.login-mode-button.is-active {
  background: var(--nav);
  color: #fff;
}

.login-mode-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}


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

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

.inline-input-button input {
  min-width: 0;
}

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

.password-toggle {
  min-width: 70px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--blue-soft);
  color: var(--ink);
}

.form-message,
.reset-message {
  min-height: 20px;
  color: var(--red-text);
  font-size: 13px;
  font-weight: 700;
}

.reset-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.reset-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 700;
}

.reset-panel summary::-webkit-details-marker {
  display: none;
}

.reset-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

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

.reset-help {
  font-size: 12px;
  line-height: 1.55;
}

.navy-button {
  background: var(--nav);
}

.blue-button {
  background: var(--blue);
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line-strong);
  background: var(--blue-soft);
  color: var(--ink);
}

.danger-button {
  background: var(--red-text);
  color: #fff;
}

.row-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.row-action-group .ghost-button {
  padding: 3px 8px;
  font-size: 11px;
}

.danger-text {
  color: var(--red-text);
  border-color: var(--red-text);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px 16px;
  background: var(--nav);
  color: #fff;
}

.sidebar-brand-shell {
  display: grid;
  gap: 14px;
}

.sidebar-tagline {
  margin: 0;
  color: #afc3d8;
  font-size: 12px;
  font-style: italic;
}

.sidebar h2 {
  font-size: 22px;
  color: #fff;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list button {
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: transparent;
  color: #d9e3ee;
  text-align: left;
  font-weight: 650;
}

.nav-list button:hover {
  background: var(--nav-soft);
}

.nav-list button.active {
  background: var(--accent);
  color: #fff;
}

.portal-access-panel {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.portal-access-title {
  margin: 0 0 2px;
  color: #afc3d8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-switch-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.portal-switch-button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.portal-switch-button.portal-switch-secondary {
  color: #c8d3df;
  background: transparent;
}

.workspace-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 460px);
  gap: 18px;
  align-items: start;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar-main {
  display: grid;
  gap: 8px;
}

.brand-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brand-ribbon span {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.page-heading h1 {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.15;
}

#pageEyebrow {
  display: none;
}

.page-heading p:last-child {
  margin-top: 5px;
}

.top-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.top-action-stack {
  display: grid;
  gap: 8px;
  min-width: 190px;
}
.erp-announcements-dropdown {
  position: relative;
  min-width: 190px;
  color: var(--navy);
}
.erp-announcements-dropdown summary {
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}
.erp-announcements-dropdown summary::-webkit-details-marker { display: none; }
.erp-announcements-dropdown summary::after { content: "▾"; float: right; margin-left: 10px; color: var(--accent); }
.erp-announcements-dropdown[open] summary { border-color: var(--accent); }
.erp-announcements-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}
.erp-announcement-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-left: 3px solid #cbd5e1;
  background: #f8fafc;
}
.erp-announcement-item.is-pinned { border-left-color: var(--accent); }
.erp-announcement-item strong { color: var(--navy); font-size: 12px; }
.erp-announcement-item span { color: #475569; font-size: 11px; line-height: 1.45; }
.erp-announcement-item small { color: #64748b; font-size: 10px; }
.announcement-loading,
.announcement-empty { color: #64748b; font-size: 11px; }

.toast-stack {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 5px solid #2563eb;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 12px 14px;
}

.toast strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.toast span {
  display: block;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}

.toast-success {
  border-left-color: #16a34a;
}

.toast-denied {
  border-left-color: #d97706;
}

.toast-failed {
  border-left-color: #dc2626;
}

.date-filter-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 180px 180px auto auto minmax(220px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.filter-label {
  align-self: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.filter-status {
  align-self: center;
  font-size: 12px;
}

.branch-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  align-self: center;
}

.branch-filter-panel.is-hidden {
  display: none;
}

.branch-filter-panel .filter-label {
  margin-right: 2px;
}

.branch-filter-panel .checkbox-field {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.api-banner {
  display: none;
  gap: 10px;
  align-items: center;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  background: #f5f9fc;
  color: var(--blue);
}

.api-banner strong {
  color: inherit;
}

.api-banner span {
  color: var(--muted);
  font-size: 13px;
}

.api-banner.is-ok {
  background: var(--green-soft);
  color: var(--green-text);
}

.api-banner.is-warning {
  background: #fff5eb;
  color: var(--accent-deep);
}

.data-sync-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 9px 16px;
  background: var(--blue, #2f6fed);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.data-sync-banner.is-hidden {
  display: none;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.module-content {
  display: grid;
  gap: 18px;
}

.admin-request-strip {
  align-items: stretch;
}

.admin-delete-panel {
  border-color: rgba(191, 45, 45, 0.28);
  background: #fffafa;
}

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

.kpi,
.panel,
.alert,
.record-dialog::backdrop {
  border-radius: 14px;
}

.kpi,
.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(18, 32, 47, 0.05);
}

.kpi {
  padding: 16px;
}

/* The branch totals need extra width for the two currency columns. */
.kpi.kpi-branch {
  grid-column: span 2;
}

.kpi-branch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 8px;
}

.kpi-branch-cell {
  min-width: 0;
  padding: 0 8px;
  border-left: 1px solid var(--line);
}

.kpi-branch-cell:first-child {
  padding-left: 0;
  border-left: 0;
}

.kpi-branch-cell small {
  display: block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi.kpi-branch .kpi-branch-cell strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: clip;
}

@media (max-width: 600px) {
  .kpi-branch-grid {
    gap: 6px;
  }
  .kpi-branch-cell {
    padding: 0 6px;
  }
  .kpi-branch-cell:first-child {
    padding-left: 0;
  }
  .kpi.kpi-branch   .kpi-branch-cell strong {
    font-size: 12px;
    letter-spacing: -0.3px;
  }
  .kpi.kpi-branch {
    grid-column: span 1;
  }
}

.kpi span,
.kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--blue);
  font-size: 28px;
  line-height: 1.05;
}

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

.wide-left {
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
}

.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  min-width: 0;
  padding: 18px;
}

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

.panel-header h2 {
  font-size: 22px;
  line-height: 1.2;
}

.table-wrap {
  max-height: min(620px, calc(100vh - 260px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap table {
  font-size: 11px;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
  padding: 0;
}

.column-filter-row th {
  position: static;
  background: #fbfbfb;
  border-bottom: 1px solid var(--line);
  padding: 3px 4px;
}

.column-filter-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  background: #fff;
  color: var(--ink);
}

.column-filter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.column-lock-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.icon-toggle-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
}

.icon-toggle-button:hover {
  background: #f1f4f8;
}

.shipment-column-tools { position: relative; display: flex; align-items: center; min-height: 34px; margin: 2px 0 10px; }
.shipment-column-toggle { min-height: 31px; padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.shipment-column-menu { position: absolute; z-index: 30; top: 36px; left: 0; width: min(310px, calc(100vw - 48px)); max-height: min(460px, calc(100vh - 120px)); overflow: auto; padding: 12px; border: 1px solid #d7e0ea; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(30, 47, 69, .16); }
.shipment-column-menu[hidden] { display: none; }
.shipment-column-menu-title { margin-bottom: 3px; color: #1b2a3a; font-size: 13px; font-weight: 700; }
.shipment-column-menu-help { margin-bottom: 9px; color: #637489; font-size: 11px; line-height: 1.35; }
.shipment-column-setting { display: flex; align-items: center; gap: 8px; min-height: 32px; margin: 2px 0; padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; color: #28394a; font-size: 12px; cursor: grab; user-select: none; }
.shipment-column-setting:hover { border-color: #dce6f0; background: #f5f8fb; }
.shipment-column-drag { color: #8b9aab; font-size: 14px; line-height: 1; }
.shipment-column-setting input[type="checkbox"] { position: relative; width: 15px; height: 15px; margin: 0; appearance: none; border: 1px solid #aab8c7; border-radius: 4px; background: #fff; cursor: pointer; }
.shipment-column-setting input[type="checkbox"]:checked { border-color: #f58220; background: #f58220; }
.shipment-column-setting input[type="checkbox"]:checked::after { content: "✓"; position: absolute; top: -3px; left: 2px; color: #fff; font-size: 13px; font-weight: 800; }
.shipment-column-setting input[type="checkbox"]:focus-visible { outline: 2px solid #8ab9e8; outline-offset: 1px; }
.shipment-column-menu-actions { display: flex; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e4ebf2; }
.shipment-column-menu-actions .secondary-button { min-height: 29px; padding: 4px 9px; font-size: 11px; }

.customer-activity-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 10px;
  color: #526477;
  font-size: 12px;
  font-weight: 600;
}

.customer-activity-filter select {
  width: auto;
  min-width: 170px;
  min-height: 32px;
  padding: 4px 28px 4px 9px;
  border: 1px solid #c9d6e3;
  border-radius: 6px;
  background: #fff;
  color: #25374a;
  font: inherit;
}

.col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  user-select: none;
}

.col-resize-handle:hover,
.col-resize-handle:active {
  background: var(--accent, #1a5fb4);
  opacity: 0.4;
}

.sort-header-button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  color: inherit;
}

.sort-header-button:hover {
  background: #f1f4f8;
}

.sort-header-button.is-active {
  color: var(--accent, #1a5fb4);
}

.audit-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.audit-scroll .table-wrap {
  min-width: 760px;
}

.audit-scroll th:first-child,
.audit-scroll td:first-child {
  width: 36px;
  text-align: center;
}

.audit-details {
  cursor: help;
  border-bottom: 1px dotted var(--line);
}

.audit-details-empty {
  color: var(--muted, #8a94a3);
}

.audit-detail-list {
  display: grid;
  gap: 12px;
}

.audit-detail-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbff;
}

.audit-detail-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.audit-detail-entry-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.audit-detail-entry-heading {
  display: grid;
  gap: 2px;
}

.audit-detail-entry-meta {
  color: var(--muted, #8a94a3);
  font-size: 12px;
}

.audit-change-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.audit-change-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted, #8a94a3);
}

.audit-change-note {
  margin: 0;
  font-size: 13px;
}

.audit-change-note-empty {
  color: var(--muted, #8a94a3);
}

.receipt-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.receipt-line,
.receipt-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.receipt-total {
  grid-template-columns: minmax(0, 1fr) auto;
  font-size: 0.95rem;
}

.charge-line-builder {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.tariff-charge-builder {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.tariff-charge-entry {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 110px auto;
  gap: 10px;
  align-items: end;
}

.tariff-charges-table {
  min-width: 720px;
}

.form-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.form-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

.collapsible-section summary {
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.collapsible-section:not([open]) {
  gap: 0;
}

.dashboard-alert-panel {
  display: grid;
  gap: 12px;
}

.dashboard-alert-row {
  margin-top: 18px;
}

.dashboard-alert-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.dashboard-alert-panel > summary::-webkit-details-marker {
  display: none;
}

.dashboard-alert-panel > summary .panel-header {
  flex: 1;
  margin-bottom: 0;
}

.dashboard-alert-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f7fb;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.dashboard-alert-toggle::before {
  content: "Expand";
}

.dashboard-alert-panel[open] .dashboard-alert-toggle::before {
  content: "Collapse";
}

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

.form-section textarea {
  min-height: 68px;
}

.cargo-entry {
  grid-template-columns: 70px 52px repeat(3, 58px) 66px 82px 98px auto;
  align-items: end;
  min-width: 660px;
  gap: 6px;
}

.cargo-category-row {
  max-width: 260px;
}

.cargo-entry label {
  font-size: 11px;
}

.cargo-entry input,
.cargo-entry select {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.cargo-entry button {
  width: max-content;
  min-height: 34px;
  padding: 7px 12px;
  justify-self: start;
}

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

.cargo-live-summary span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pod-cargo-summary {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1px solid #cbdcf1;
  border-radius: 8px;
  background: #f4f8fc;
}

.employee-document-panel {
  margin-top: 20px;
}

.employee-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.employee-document-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.employee-document-list {
  display: grid;
  gap: 8px;
}

.employee-document-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto minmax(180px, auto);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.employee-document-row.is-locked {
  border-color: #e3b9bd;
  background: #fff8f8;
}

.employee-document-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.employee-document-row-main small {
  color: var(--muted);
}

.employee-document-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.document-locked,
.document-unlocked {
  width: max-content;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
}

.document-locked {
  color: var(--red-text);
  background: #ffe6e8;
}

.document-unlocked {
  color: var(--green-text);
  background: var(--green-soft);
}

.employee-document-card small {
  color: var(--muted);
}
.employee-profile-thumbnail {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.employee-document-card a {
  color: var(--blue);
  font-weight: 700;
}

.document-uploaded,
.document-missing {
  width: max-content;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
}

.document-uploaded {
  color: #176b3a;
  background: #e6f7ed;
}

.document-missing {
  color: #7a5b14;
  background: #fff4d8;
}

.post-login-announcement-notice {
  margin-bottom: 18px;
  border-color: #c7d9ef;
  background: linear-gradient(135deg, #f6faff 0%, #ffffff 72%);
}

.post-login-announcement-notice .panel-header {
  align-items: flex-start;
}

.post-login-announcement-notice h2 {
  margin: 2px 0 4px;
}

.announcement-unread-badge {
  padding: 4px 9px;
  border-radius: 999px;
  color: #1c4f86;
  background: #dcecff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pod-cargo-summary span {
  color: var(--muted);
}

.pod-split-history {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #cbdcf1;
  border-radius: 8px;
  background: #f4f8fc;
}

.pod-split-history .table-wrap {
  max-height: 220px;
  overflow-y: auto;
}

.pod-action-row {
  flex-wrap: wrap;
}

.pallet-builder {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  overflow-x: auto;
}

.pallet-builder .tariff-charge-entry {
  grid-template-columns: repeat(4, minmax(90px, 120px)) auto;
  justify-content: center;
}

.pallet-builder .cargo-entry {
  grid-template-columns: 70px 52px repeat(3, 58px) 66px 82px 98px auto;
  justify-content: stretch;
}

.cargo-description-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.pallet-builder .tariff-charges-table {
  min-width: 640px;
  table-layout: fixed;
}

.pallet-dimensions-table .pallet-col-sr {
  width: 54px;
}

.pallet-dimensions-table .pallet-col-count {
  width: 112px;
}

.pallet-dimensions-table .pallet-col-measure {
  width: 92px;
}

.pallet-dimensions-table .pallet-col-total {
  width: 112px;
}

.pallet-dimensions-table .pallet-col-button {
  width: 120px;
}

.pallet-builder .tariff-charges-table th,
.pallet-builder .tariff-charges-table td {
  min-width: 0;
  white-space: nowrap;
}

.tariff-weight-builder {
  grid-column: 1 / -1;
  width: 100%;
}

.tariff-weight-wrap {
  grid-column: 1 / -1;
  width: 100%;
  overflow-x: auto;
}

.tariff-weight-table {
  min-width: 620px;
  table-layout: fixed;
  border: 1px solid var(--line);
}

.tariff-weight-table th,
.tariff-weight-table td {
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.tariff-weight-table th:first-child {
  width: 90px;
}

.tariff-weight-table input {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.tariff-weight-cell.is-selected {
  background: #fff3e8;
}

.dialog-body label:has([name="volumeCategory"]),
.dialog-body label:has([name="cbm"]),
.dialog-body label:has([name="chargeableKg"]),
.dialog-body label:has([name="lastManifestRequestNo"]) {
  justify-self: center;
  width: min(100%, 260px);
}

.charge-line-entry,
.charge-line-row,
.charge-line-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  gap: 10px;
  align-items: end;
}

.charge-line-row,
.charge-line-total {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.charge-line-total {
  grid-template-columns: minmax(0, 1fr) auto;
  font-weight: 700;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 6px 6px;
  text-align: left;
  white-space: nowrap;
}

/* Keep long register values inside their own columns. Resizable registers use fixed layout;
   wrapping here prevents a narrow column's text from visually spilling into its neighbour. */
.table-wrap > table {
  width: 100%;
  table-layout: fixed;
}

.table-wrap th,
.table-wrap td {
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  vertical-align: top;
}

.table-wrap tbody tr,
.table-wrap tbody td {
  height: 34px;
  max-height: 34px;
}

.table-wrap th .sort-header-button,
.table-wrap td .table-inline-link,
.table-wrap td .status-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-inline-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.table-inline-link:hover {
  filter: none;
  transform: none;
  text-decoration: underline;
}

.document-linked-to {
  display: inline;
  line-height: 1.2;
  white-space: nowrap;
}

.document-linked-to strong {
  color: var(--blue);
  font-size: 12px;
}

.document-linked-to span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.kpi[data-dashboard-metric] {
  cursor: pointer;
}

.kpi[data-dashboard-metric]:hover {
  box-shadow: 0 16px 36px rgba(18, 32, 47, 0.08);
}

.alert-list,
.load-board,
.job-list,
.stack-form {
  display: grid;
  gap: 12px;
}

.customer-booking-panel { max-width: 1180px; }
.customer-booking-intro { max-width: 820px; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.customer-booking-form { gap: 18px; }
.customer-booking-step { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 20px; border: 1px solid #dce5f0; border-radius: 14px; background: linear-gradient(135deg, #ffffff, #f8fbff); box-shadow: 0 5px 16px rgba(25, 56, 91, .05); }
.customer-booking-step > div > h3 { margin: 2px 0 4px; color: #17365d; }
.customer-booking-step > div > p { margin: 0 0 16px; color: var(--muted); }
.customer-step-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #1f6fb2; color: #fff; font-weight: 800; box-shadow: 0 3px 8px rgba(31, 111, 178, .24); }
.customer-document-step { border-color: #bcd8f3; background: #f4f9ff; }
.customer-file-picker { display: block; padding: 15px; border: 1px dashed #82b4df; border-radius: 10px; background: #fff; color: #17365d; font-weight: 700; }
.customer-file-picker input { display: block; width: 100%; margin: 10px 0 7px; font-weight: 400; }
.customer-file-picker small { display: block; color: var(--muted); font-weight: 500; }
.customer-booking-step[hidden] { display: none; }

@media (max-width: 680px) {
  .customer-booking-step { grid-template-columns: 32px minmax(0, 1fr); padding: 14px; gap: 10px; }
  .customer-step-number { width: 28px; height: 28px; }
}

.alert {
  display: grid;
  gap: 5px;
  border: 1px solid #f1d7db;
  padding: 14px;
  background: var(--red-soft);
}

.alert strong {
  color: var(--red-text);
}

.hr-announcement-pinned {
  border-color: var(--accent);
  background: var(--green-soft);
}

.hr-announcement-pinned strong {
  color: var(--green-text);
}

.alert span,
.job-chip span,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.job-chip {
  display: grid;
  gap: 4px;
  justify-items: start;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.job-chip.warning {
  color: var(--red-text);
}

.stack-form {
  grid-template-columns: 1fr;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.section-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-access-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.permission-sub-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 4px 24px;
  padding: 8px 12px;
  border-left: 2px solid var(--accent);
  background: var(--blue-soft);
  border-radius: 6px;
}

.permission-group-label {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.permission-group-label span {
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.dropdown-menu {
  position: absolute;
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(18, 32, 47, 0.18);
}

.dropdown-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.dropdown-menu button:hover,
.dropdown-menu button:focus {
  background: #eef6ff;
  filter: none;
  transform: none;
}

.dropdown-menu strong,
.dropdown-menu span {
  overflow-wrap: anywhere;
}

.dropdown-menu span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.action-stack,
.bullet-card,
.summary-card,
.report-preview-page {
  display: grid;
  gap: 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shipment-module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.shipment-landscape-actions,
.shipment-register-panel {
  min-width: 0;
}

.shipment-quick-open-row {
  width: 100%;
  padding-top: 4px;
}

.shipment-quick-open-field {
  display: grid;
  gap: 5px;
  width: min(620px, 100%);
}

.shipment-quick-open-field input {
  width: 100%;
  box-sizing: border-box;
}

.shipment-landscape-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: max-content;
  padding-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

.shipment-landscape-action-row > button {
  flex: 0 0 auto;
  min-width: 94px;
  white-space: nowrap;
}

.shipment-landscape-action-row .shipment-new-action {
  background: var(--accent);
  border-color: var(--accent);
  min-width: 94px;
}

@media (max-width: 980px) {
  .shipment-landscape-action-row {
    padding-bottom: 4px;
  }
}

.shipment-document-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-width: max-content;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line);
}

.shipment-document-actions .secondary-button,
.shipment-document-actions .shipment-primary-action {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.shipment-document-actions .shipment-primary-action {
  min-width: 118px;
}

.shipment-document-actions [data-dialog-action="save-draft"] {
  min-width: 82px;
}

.shipment-document-actions [data-dialog-action="upload-shipment-document"] {
  min-width: 126px;
}

.shipment-document-actions [data-dialog-action="generate-tcn"] {
  min-width: 98px;
}

.shipment-document-actions [data-dialog-action="view-tcn"] {
  min-width: 82px;
}

.shipment-document-actions [data-dialog-action="generate-pod"] {
  min-width: 142px;
}

.shipment-document-actions [data-dialog-action="duplicate-tcn"] {
  min-width: 112px;
}

.shipment-document-actions .shipment-primary-action {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 800;
}

.shipment-document-actions .shipment-primary-action:hover {
  background: var(--accent-dark, #d97706);
  border-color: var(--accent-dark, #d97706);
}

.shipment-document-actions .shipment-document-name {
  flex: 0 0 150px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-document-actions .checkbox-field {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  margin: 0;
  white-space: nowrap;
}
.shipment-document-actions .checkbox-field input {
  width: auto;
  min-height: 16px;
  padding: 0;
}
.shipment-document-actions [data-shipment-document-name] {
  flex: 0 1 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shipment entry windows use the full workspace so the action toolbar does not
   collapse into a cramped strip on wide screens. The existing dialog controls
   remain unchanged for every other record type. */
.record-dialog:has(.shipment-document-actions) {
  width: calc(100vw - 24px);
  height: calc(100vh - 24px);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  margin: 12px;
}

.record-dialog:has(.shipment-document-actions) form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.record-dialog:has(.shipment-document-actions) .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
}

.record-dialog:has(.shipment-document-actions) .dialog-actions {
  display: none;
}

.status-expand-row td {
  background: rgba(0, 0, 0, 0.02);
  padding: 0;
}

.status-expand-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.status-expand-panel h4 {
  margin: 4px 0 0;
}

.status-expand-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-expand-panel-header h4 {
  margin: 0;
}

.inline-status-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.inline-status-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 220px;
  max-width: 100%;
}

.inline-status-form input,
.inline-status-form select {
  width: 100%;
}

.inline-status-form .action-row {
  width: 100%;
  flex-basis: 100%;
}

.shipment-journey {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.shipment-journey-heading h4,
.shipment-journey-heading p {
  margin: 0;
}

.shipment-journey-heading .empty-state {
  margin-top: 3px;
}

.shipment-timeline {
  display: grid;
  gap: 0;
  max-width: 900px;
}

.shipment-timeline-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  position: relative;
}

.shipment-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shipment-timeline-dot {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 12px;
  place-items: center;
  border: 3px solid #58a87c;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #edf7f2;
}

.shipment-timeline-line {
  width: 2px;
  min-height: 28px;
  flex: 1;
  background: var(--line-strong);
}

.shipment-timeline-content {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(18, 32, 47, 0.06);
}

.shipment-timeline-title,
.shipment-timeline-meta,
.shipment-timeline-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}

.shipment-timeline-title {
  justify-content: space-between;
}

.shipment-timeline-title h5,
.shipment-timeline-remark {
  margin: 0;
}

.shipment-timeline-title h5 {
  color: var(--green-text);
  font-size: 15px;
}

.shipment-timeline-state {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shipment-timeline-meta span,
.shipment-timeline-details span {
  display: grid;
  gap: 2px;
  min-width: 130px;
  color: var(--ink);
  font-size: 13px;
}

.shipment-timeline-meta b,
.shipment-timeline-details b,
.shipment-timeline-remark b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shipment-timeline-details {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.shipment-timeline-remark {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
}

.shipment-timeline-card.current .shipment-timeline-dot {
  border-color: #2c77bb;
  background: #2c77bb;
  box-shadow: 0 0 0 4px #e8f2fb;
}

.shipment-timeline-card.current .shipment-timeline-title h5 { color: #2c77bb; }
.shipment-timeline-card.current .shipment-timeline-state { background: #e8f2fb; color: #2c77bb; }
.shipment-timeline-card.cancelled .shipment-timeline-dot { border-color: var(--red-text); box-shadow: 0 0 0 4px var(--red-soft); }
.shipment-timeline-card.cancelled .shipment-timeline-title h5 { color: var(--red-text); }
.shipment-timeline-card.cancelled .shipment-timeline-state { background: var(--red-soft); color: var(--red-text); }
.shipment-timeline-card.delayed .shipment-timeline-dot { border-color: #d7851f; box-shadow: 0 0 0 4px #fff3dd; }
.shipment-timeline-card.delayed .shipment-timeline-title h5 { color: #b66708; }
.shipment-timeline-card.delayed .shipment-timeline-state { background: #fff3dd; color: #b66708; }

.shipment-delay-alerts { display: grid; gap: 8px; }
.shipment-delay-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid #f0bec5; border-radius: 10px; background: var(--red-soft); color: var(--red-text); }
.shipment-delay-alert > span { font-size: 20px; }
.shipment-delay-alert strong, .shipment-delay-alert p { margin: 0; }
.shipment-delay-alert p { margin-top: 3px; font-size: 13px; }
.shipment-register-indicator { display: inline-block; margin-right: 5px; }
tr.shipment-row-delivered td { background: #f0faf4; }
tr.shipment-row-arrival-overdue td, tr.shipment-row-delivery-overdue td { background: #fff0f1; }
tr.shipment-row-delayed td { background: #fff8e9; }
tr.shipment-row-cancelled td { background: #f2f3f5; }

@media (max-width: 600px) {
  .shipment-timeline-card { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; }
  .shipment-timeline-content { padding: 13px; }
  .shipment-timeline-dot { margin-top: 16px; }
  .shipment-timeline-meta span,
  .shipment-timeline-details span { min-width: 100%; }
}

.tariff-detail-preview {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.tariff-preview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.tariff-preview-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.tariff-preview-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 18px;
}

.tariff-preview-heading strong {
  white-space: nowrap;
  color: var(--green-text);
  font-size: 16px;
}

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

.tariff-preview-grid p {
  margin: 0;
  min-width: 0;
}

.tariff-preview-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tariff-preview-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.manifest-jobs-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.manifest-jobs-totals p {
  margin: 0;
  min-width: 0;
}

.manifest-jobs-totals span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.manifest-jobs-totals strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
}

.dialog-picker,
.selected-job-list {
  display: grid;
  gap: 10px;
}

/* The manifest's "Add Shipment" picker + added-shipment list was only ever occupying one of the
   dialog's two grid columns by default, squeezing the shipment table into half the available
   width. Spanning both columns gives it the full width the data actually needs. */
[data-consolidation-picker] {
  grid-column: 1 / -1;
}

.selected-job-chip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.inline-link {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.inline-link:hover {
  filter: none;
  transform: none;
  text-decoration: underline;
}

.bullet-card,
.summary-card,
.report-preview-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.bullet-card p,
.summary-card p {
  margin: 0;
}

.bullet-card p {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 13px;
}

.bullet-card p::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.report-toolbar {
  display: grid;
  gap: 12px;
  align-items: end;
}

.report-toolbar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.summary-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 18px;
}

.summary-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-card p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  color: var(--blue);
}

.report-preview-shell {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef4f8;
}

.report-preview-page {
  min-height: 360px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 32, 47, 0.05);
}

.report-preview-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.report-preview-heading h3,
.report-preview-heading p {
  margin: 0;
}

.report-preview-heading h3 {
  font-size: 20px;
}

.report-preview-heading p {
  color: var(--muted);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge.ok {
  background: var(--green-soft);
  color: var(--green-text);
}

.status-badge.warn {
  background: #fff4d6;
  color: #9b6500;
}

.status-badge.bad {
  background: var(--red-soft);
  color: var(--red-text);
}

.status-badge.neutral {
  background: var(--blue-soft);
  color: var(--blue);
}

.consolidation-jobs {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.job-list-table {
  display: grid;
  gap: 10px;
}

.job-list-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.job-list-main,
.job-list-detail-grid {
  min-width: 0;
}

.branch-sequence-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.branch-sequence-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

.branch-sequence-table th:last-child,
.branch-sequence-table td:last-child {
  border-right: 0;
}

.branch-sequence-table th {
  background: #f5f8fc;
  color: var(--ink);
}

.branch-sequence-table label {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.branch-sequence-table label:last-child {
  margin-bottom: 0;
}

.job-list-main {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.job-list-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.job-list-detail-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
}

.job-list-detail-grid strong {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.record-dialog {
  width: min(1500px, calc(100vw - 16px));
  min-width: 480px;
  min-height: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  resize: both;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.record-dialog::backdrop {
  background: rgba(18, 32, 47, 0.45);
}

.record-dialog form {
  position: relative;
  min-height: 100%;
  padding: 18px 20px 20px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-header > div {
  min-width: 0;
}

.dialog-window-controls {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
  align-items: center;
}

.window-control-button {
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  display: grid;
  place-items: center;
}

.window-control-button:hover {
  background: rgba(18, 32, 47, 0.08);
  color: var(--ink);
  transform: none;
  filter: none;
}

.window-control-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.window-control-close {
  color: var(--muted);
}

.window-control-close:hover {
  background: rgba(208, 56, 73, 0.12);
  color: var(--red-text);
}

.window-control-icon {
  display: block;
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  margin: 14px 0;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-right: 4px;
}

.dialog-body.single-column {
  grid-template-columns: 1fr;
}

/* Keep the User Management access controls together and easy to scan. */
.user-account-access-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-soft);
}

.user-account-access-grid label {
  min-width: 0;
}

@media (max-width: 640px) {
  .user-account-access-grid {
    grid-template-columns: 1fr;
  }
}

.record-dialog.is-maximized {
  width: calc(100vw - 16px);
  height: calc(100vh - 16px);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  margin: 8px;
  resize: none;
  border-radius: 12px;
}

.record-dialog.is-maximized form {
  height: 100%;
}

.record-dialog.is-minimized {
  min-height: unset;
  height: auto;
  max-height: none;
  resize: none;
}

.record-dialog.is-minimized .dialog-body,
.record-dialog.is-minimized .dialog-actions {
  display: none;
}

.dashboard-popup-shell {
  grid-column: 1 / -1;
  min-width: 0;
}

.dashboard-popup-shell .report-preview-shell {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-popup-shell .report-preview-page {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.app-footer {
  padding: 10px 24px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1360px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .date-filter-panel {
    grid-template-columns: repeat(5, minmax(0, auto));
  }

  .filter-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1160px) {
  .app-shell,
  .split-grid,
  .wide-left {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 16px;
  }

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

  .workspace-shell {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

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

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

  .filter-label,
  .filter-status {
    grid-column: 1 / -1;
  }

  .job-list-detail-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

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

@media (max-width: 920px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-card-shell,
  .login-brand-panel {
    padding: 28px;
  }

  .top-actions {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .login-screen,
  .workspace,
  .topbar,
  .api-banner,
  .app-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .login-card-shell,
  .login-brand-panel {
    padding: 22px;
  }

  .nav-list,
  .date-filter-panel,
  .dialog-body,
  .kpi-grid,
  .report-toolbar {
    grid-template-columns: 1fr;
  }

  .job-list-row {
    grid-template-columns: 1fr;
  }

  .job-list-detail-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .tariff-preview-grid {
    grid-template-columns: 1fr;
  }

  .tariff-charge-entry,
  .password-input-wrap {
    grid-template-columns: 1fr;
  }

  .cargo-description-row {
    grid-template-columns: 1fr;
  }

  .brand-heading {
    font-size: 23px;
  }

  .page-heading h1 {
    font-size: 24px;
  }
}

/* Customer portal booking/tracking cleanup */
.customer-booking-panel{max-width:100%;}
.customer-booking-form{gap:18px;}
.customer-booking-step{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;padding:18px;border:1px solid var(--border,#ddd);border-radius:12px;background:var(--panel-bg,#fff);}
.customer-booking-step>div{min-width:0;}
.customer-booking-step>.form-section-grid,.customer-booking-step>.customer-file-picker,.customer-booking-step>.tariff-charge-entry,.customer-booking-step>.tariff-charge-table,.customer-booking-step>.cargo-totals{grid-column:1 / -1;}
.customer-step-number{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;background:var(--accent,#333);color:#fff;}
.customer-booking-step h3{margin:0 0 4px;}
.customer-booking-step p{margin:0 0 10px;}
.customer-tracking-page{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px;}
.customer-tracking-page .panel{min-width:0;}
.customer-tracking-detail{display:flex;flex-direction:column;gap:18px;}
.customer-tracking-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px;border:1px solid var(--border,#ddd);border-radius:12px;}
.customer-tracking-summary>div{min-width:0;padding:8px;}
.customer-tracking-summary h3{margin:4px 0;}
.customer-tracking-summary p{margin:0;}
.customer-tracking-status{display:inline-block;margin-top:4px;}
@media(max-width:900px){.customer-tracking-page{grid-template-columns:1fr}.customer-tracking-summary{grid-template-columns:1fr}.customer-booking-step{grid-template-columns:1fr}.customer-step-number{margin-bottom:2px}}

/* HR Leave Portal */
.hr-page{display:grid;gap:16px}.hr-hero{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:20px;border-radius:14px;background:linear-gradient(135deg,#f5f8ff,#fff);border:1px solid #dce5f4}.hr-hero h2{margin:4px 0}.hr-hero p{margin:4px 0}.hr-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.hr-kpi{padding:16px;border:1px solid #dfe5ec;border-radius:12px;background:#fff;display:grid;gap:4px}.hr-kpi strong{font-size:26px}.hr-kpi span{font-weight:700}.hr-kpi small{color:#667085}.hr-panel{padding:0;overflow:hidden}.hr-panel-head{padding:16px 18px;border-bottom:1px solid #e5e7eb}.hr-panel-head h3{margin:0}.hr-panel-head small{color:#667085}.hr-balance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px}.hr-balance-card{border:1px solid #dfe5ec;border-radius:12px;padding:16px;background:#fff}.hr-balance-number{font-size:30px;font-weight:800;margin-top:8px}.hr-balance-card dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.hr-balance-card dl div{background:#f7f8fa;border-radius:8px;padding:8px}.hr-balance-card dt{font-size:11px;color:#667085}.hr-balance-card dd{margin:2px 0 0;font-weight:700}.hr-projected{border-top:1px solid #eee;padding-top:10px;font-size:12px}.hr-table-wrap{overflow:auto}.hr-table{width:100%;border-collapse:collapse}.hr-table th,.hr-table td{padding:11px 12px;border-bottom:1px solid #edf0f3;text-align:left;vertical-align:top}.hr-table th{font-size:12px;background:#f8fafc}.hr-status{display:inline-block;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}.hr-status-pending{background:#fff4cc}.hr-status-approved{background:#dff7e8}.hr-status-rejected,.hr-status-cancelled{background:#ffe3e3}.hr-weekend-list{display:flex;flex-wrap:wrap;gap:8px;padding:16px}.hr-weekend-list span{padding:9px 12px;border:1px solid #dfe5ec;border-radius:8px}.hr-weekend-list .is-weekend{font-weight:700;background:#eef4ff}.hr-rule-box{padding:18px}.hr-form{padding:16px;display:grid;gap:16px}.hr-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hr-form label{display:grid;gap:6px;font-weight:600}.hr-form input,.hr-form select,.hr-form textarea{width:100%;box-sizing:border-box}.hr-full{grid-column:1/-1}.hr-inline-form{padding:16px}.hr-weekend-checks{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px}.hr-weekend-checks label{display:flex;gap:6px;align-items:center;font-weight:600}.hr-weekend-checks input{width:auto}.hr-calculation{padding:12px;border:1px solid #dbe4f0;border-radius:10px;background:#f7faff}.hr-declaration{display:flex!important;grid-template-columns:none!important;gap:10px!important;align-items:flex-start}.hr-declaration input{width:auto!important;margin-top:3px}.hr-form-message{min-height:20px;font-weight:600}.hr-modal-backdrop,.hr-detail-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1000;display:grid;place-items:center;padding:20px}.hr-modal{background:#fff;width:min(900px,96vw);max-height:92vh;overflow:auto;border-radius:16px;box-shadow:0 25px 80px rgba(0,0,0,.25)}.hr-modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid #e5e7eb}.hr-modal-head h2{margin:0}.hr-detail-grid{display:grid;grid-template-columns:180px 1fr;gap:10px;padding:20px}.hr-detail-grid strong{color:#475467}.hr-detail-grid span{white-space:pre-wrap}@media(max-width:900px){.hr-kpi-grid,.hr-balance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hr-form-grid{grid-template-columns:1fr}}@media(max-width:600px){.hr-kpi-grid,.hr-balance-grid{grid-template-columns:1fr}.hr-hero{align-items:flex-start;flex-direction:column}.hr-detail-grid{grid-template-columns:1fr}.hr-table{min-width:760px}}.hr-hero form.hr-inline-form{padding:0;flex-shrink:0}.hr-branch-picker{grid-template-columns:1fr!important;min-width:160px}.hr-status-sent-back{background:#ffe8cc}.hr-review-form{padding:0 20px 20px;display:grid;gap:10px}.hr-review-form h3{margin:0}.hr-review-form label{display:grid;gap:6px;font-weight:600}.hr-review-form textarea{width:100%;box-sizing:border-box}.hr-warning-box{background:#fff8e6;border:1px solid #f0d998}
/* HR completion additions */
.hr-form-section{padding:16px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;display:grid;gap:12px}.hr-form-section h3{margin:0}.hr-form-section .form-help,.hr-form-section small{color:#667085}.hr-leave-application{width:min(980px,96vw)}.hr-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:#dfe5ec;padding:1px}.hr-cal-head{background:#f8fafc;padding:10px;font-size:12px;font-weight:700;text-align:center}.hr-cal-cell{min-height:82px;background:#fff;padding:8px;display:flex;flex-direction:column;gap:5px}.hr-cal-cell strong{font-size:15px}.hr-cal-cell small{font-size:10px;color:#667085;overflow:hidden;text-overflow:ellipsis}.hr-cal-cell.is-empty{background:#f8fafc}.hr-cal-cell.is-weekend{background:#f3f4f6}.hr-cal-cell.is-holiday{background:#e9f7ee}.hr-cal-cell.is-blackout{background:#fff1f2}.hr-cal-cell.is-leave-approved{outline:2px solid #72b987;outline-offset:-2px}.hr-cal-cell.is-leave-pending{outline:2px solid #e5b93f;outline-offset:-2px}.hr-cal-cell.is-leave-rejected{outline:2px solid #e58a8a;outline-offset:-2px}.hr-legend{display:flex;flex-wrap:wrap;gap:10px;padding:16px}.hr-legend span{padding:8px 12px;border:1px solid #dfe5ec;border-radius:8px;font-size:12px}.hr-legend span:nth-child(1){background:#f3f4f6}.hr-legend span:nth-child(2){background:#e9f7ee}.hr-legend span:nth-child(3){background:#eef8f0}.hr-legend span:nth-child(4){background:#fff1f2}
@media(max-width:600px){.hr-calendar-grid{font-size:11px}.hr-cal-cell{min-height:64px;padding:5px}.hr-cal-head{padding:7px 3px}}


/* Apollo Connected login visual refresh — presentation only */
.login-screen {
  position: relative;
  isolation: isolate;
  padding: clamp(18px, 4vw, 56px);
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 130, 32, 0.18), transparent 22rem),
    radial-gradient(circle at 88% 88%, rgba(66, 94, 123, 0.16), transparent 25rem),
    linear-gradient(135deg, #eef3f8 0%, #f8fafc 52%, #e9eff5 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 47%, rgba(255,255,255,.5) 47.2% 47.7%, transparent 48%);
}

.login-layout {
  width: min(1040px, 100%);
  min-height: 620px;
  grid-template-columns: minmax(330px, 0.92fr) minmax(430px, 1.08fr);
  border: 1px solid rgba(18, 32, 47, 0.13);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(18, 32, 47, 0.2);
}

.login-brand-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 54px);
  background:
    radial-gradient(circle at 20% 18%, rgba(245,130,32,.2), transparent 16rem),
    linear-gradient(155deg, #12202f 0%, #1c3449 56%, #0c1723 100%);
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(245,130,32,.3);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(245,130,32,.05), 0 0 0 55px rgba(245,130,32,.035);
  pointer-events: none;
}

.login-brand-block {
  position: relative;
  z-index: 1;
  gap: 24px;
}

.login-tagline {
  color: #f6b06e;
  font-size: 18px;
  font-weight: 700;
}

.brand-description {
  max-width: 29rem;
  color: #d3dfeb;
  font-size: 14px;
}

.login-card-shell {
  padding: clamp(30px, 5vw, 64px);
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.login-card {
  width: min(410px, 100%);
  gap: 16px;
}

.login-card h2 {
  color: #12202f;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.auth-eyebrow {
  color: #687582;
}

.login-form {
  gap: 14px;
}

.login-form label {
  color: #425e7b;
  font-size: 12px;
  letter-spacing: .02em;
}

.login-form input {
  min-height: 46px;
  border-color: #c7d2de;
  border-radius: 7px;
  padding: 10px 12px;
  box-shadow: 0 2px 7px rgba(18,32,47,.035);
}

.login-form input:focus {
  outline: 3px solid rgba(245,130,32,.18);
  border-color: #f58220;
}

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

.login-mode-button {
  min-height: 40px;
  border-radius: 6px;
  background: #f1f5f8;
  border-color: #d5dfe8;
  font-size: 12px;
}

.login-mode-button.is-active {
  background: #12202f;
  border-color: #12202f;
  box-shadow: 0 5px 12px rgba(18,32,47,.16);
}

.login-form > button[type="submit"] {
  min-height: 46px;
  margin-top: 3px;
  border-radius: 6px;
  background: #f05a22;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(240,90,34,.22);
}

.login-form > button[type="submit"]:hover {
  background: #d94c19;
}

.password-toggle {
  min-height: 46px;
  border-radius: 6px;
  background: #eef3f8;
}

.reset-panel {
  border-radius: 8px;
  background: #f7f9fb;
}

@media (max-width: 920px) {
  .login-layout {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 12px;
  }

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

  .login-brand-panel {
    min-height: 270px;
    padding: 28px 24px;
  }

  .login-card-shell {
    padding: 30px 24px;
  }
}

/* ERP + HR visual completion — presentation only; behavior and selectors unchanged */
.login-screen {
  background:
    radial-gradient(circle at 8% 8%, rgba(245,130,32,.22), transparent 20rem),
    radial-gradient(circle at 92% 92%, rgba(18,32,47,.12), transparent 24rem),
    linear-gradient(135deg, #eef3f8, #fbfcfd 56%, #e7edf3);
}
.login-layout {
  min-height: 650px;
  width: min(1080px, 100%);
  border: 1px solid #c7d2de;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(18,32,47,.22);
}
.login-brand-panel {
  background: linear-gradient(145deg, #071827 0%, #12202f 58%, #20354a 100%);
  border-right: 5px solid #f05a22;
}
.login-card-shell {
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.login-card h2 {
  font-size: 34px;
  color: #071827;
}
.login-form input,
.login-form select {
  min-height: 46px;
  border: 1px solid #b8c6d4;
  border-radius: 6px;
}
.login-form > button[type="submit"] {
  min-height: 48px;
  background: #f05a22;
  border-radius: 5px;
  letter-spacing: .02em;
}

/* The HR session adds this class to #appShell. These overrides make the HR palette visible
   across fixed-color HR widgets as well as the shared ERP shell. */
.app-shell.hr-portal-theme {
  --accent: #0f9d78;
  --accent-deep: #0b7d61;
  --nav: #092d27;
  --nav-soft: #12473b;
  --blue-soft: #edf8f4;
  --line: #d7e8e1;
  --line-strong: #b8d5ca;
  --canvas: #f1f8f5;
  background: #f1f8f5;
}
.app-shell.hr-portal-theme .sidebar {
  background: linear-gradient(180deg, #092d27, #0c3b31 62%, #07231e);
}
.app-shell.hr-portal-theme .topbar {
  border-bottom-color: #b8d5ca;
  background: linear-gradient(90deg, #fff, #f2faf7);
}
.app-shell.hr-portal-theme .nav-list button.active,
.app-shell.hr-portal-theme button:not(.ghost-button):not(.secondary-button):not(.window-control-button) {
  background: #0f9d78;
}
.app-shell.hr-portal-theme .panel,
.app-shell.hr-portal-theme .hr-form-section,
.app-shell.hr-portal-theme .hr-balance-card,
.app-shell.hr-portal-theme .hr-modal {
  border-color: #c6ded5;
  box-shadow: 0 10px 28px rgba(9,45,39,.08);
}
.app-shell.hr-portal-theme .hr-hero {
  background: linear-gradient(120deg, #092d27, #0f6f5a);
  color: #fff;
  border-radius: 10px;
}
.app-shell.hr-portal-theme .hr-hero h1,
.app-shell.hr-portal-theme .hr-hero h2,
.app-shell.hr-portal-theme .hr-hero p,
.app-shell.hr-portal-theme .hr-hero label {
  color: #fff;
}
.app-shell.hr-portal-theme .hr-kpi-card,
.app-shell.hr-portal-theme .hr-balance-card {
  border-top: 4px solid #0f9d78;
  background: #fff;
}
.app-shell.hr-portal-theme .hr-kpi-number,
.app-shell.hr-portal-theme .hr-balance-number {
  color: #0b7d61;
}
.app-shell.hr-portal-theme .hr-table th,
.app-shell.hr-portal-theme .hr-cal-head {
  background: #e8f5f0;
  color: #092d27;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-holiday {
  background: #dff4eb;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-weekend {
  background: #eef6f3;
}
.app-shell.hr-portal-theme input:focus,
.app-shell.hr-portal-theme select:focus,
.app-shell.hr-portal-theme textarea:focus {
  outline: 2px solid #0f9d78;
  outline-offset: 1px;
  border-color: #0f9d78;
}

@media (max-width: 560px) {
  .login-layout { min-height: 0; }
  .login-brand-panel { border-right: 0; border-bottom: 5px solid #f05a22; }
}

/* Unified Apollo palette: ERP, HR, and Maintenance use the same visual language. */
.app-shell.hr-portal-theme {
  --accent: #f05a22;
  --accent-deep: #be3d0d;
  --nav: #071827;
  --nav-soft: #20354a;
  --blue-soft: #eef3f8;
  --line: #d9dde1;
  --line-strong: #c7d2de;
  --canvas: #f4f5f6;
  background: #f4f5f6;
}
.app-shell.hr-portal-theme .sidebar {
  background: linear-gradient(180deg, #071827, #12202f 62%, #071827);
}
.app-shell.hr-portal-theme .topbar {
  border-bottom-color: #d9dde1;
  background: linear-gradient(90deg, #fff, #f8fafc);
}
.app-shell.hr-portal-theme .nav-list button.active,
.app-shell.hr-portal-theme button:not(.ghost-button):not(.secondary-button):not(.window-control-button) {
  background: #f05a22;
}
.app-shell.hr-portal-theme .panel,
.app-shell.hr-portal-theme .hr-form-section,
.app-shell.hr-portal-theme .hr-balance-card,
.app-shell.hr-portal-theme .hr-modal {
  border-color: #d9dde1;
  box-shadow: 0 10px 28px rgba(7,24,39,.07);
}
.app-shell.hr-portal-theme .hr-hero {
  background: linear-gradient(120deg, #071827, #20354a);
  color: #fff;
  border-top: 4px solid #f05a22;
  border-radius: 4px;
}
.app-shell.hr-portal-theme .hr-hero h1,
.app-shell.hr-portal-theme .hr-hero h2,
.app-shell.hr-portal-theme .hr-hero p,
.app-shell.hr-portal-theme .hr-hero label {
  color: #fff;
}
.app-shell.hr-portal-theme .hr-kpi-card,
.app-shell.hr-portal-theme .hr-balance-card {
  border-top: 3px solid #f05a22;
  background: #fff;
}
.app-shell.hr-portal-theme .hr-kpi-number,
.app-shell.hr-portal-theme .hr-balance-number {
  color: #071827;
}
.app-shell.hr-portal-theme .hr-table th,
.app-shell.hr-portal-theme .hr-cal-head {
  background: #f1f3f5;
  color: #071827;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-holiday {
  background: #fff0e9;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-weekend {
  background: #f1f3f5;
}
.app-shell.hr-portal-theme input:focus,
.app-shell.hr-portal-theme select:focus,
.app-shell.hr-portal-theme textarea:focus {
  outline: 2px solid #f05a22;
  outline-offset: 1px;
  border-color: #f05a22;
}

/* Logged-in ERP workspace reference treatment. */
.app-shell:not(.hr-portal-theme) .sidebar {
  background: linear-gradient(180deg, #071827 0%, #12202f 62%, #071827 100%);
  border-right: 4px solid #f05a22;
}
.app-shell:not(.hr-portal-theme) .nav-list button.active {
  background: #f05a22;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 7px 16px rgba(240,90,34,.2);
}
.app-shell:not(.hr-portal-theme) .workspace-shell {
  background: #f4f5f6;
}
.app-shell:not(.hr-portal-theme) .topbar {
  background: #fff;
  border-bottom: 3px solid #f05a22;
  box-shadow: 0 4px 14px rgba(7,24,39,.06);
}
.app-shell:not(.hr-portal-theme) .workspace {
  padding: 28px;
  background: linear-gradient(180deg, #f4f5f6 0%, #eef1f4 100%);
}
.app-shell:not(.hr-portal-theme) .panel,
.app-shell:not(.hr-portal-theme) .kpi {
  border: 1px solid #d9dde1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7,24,39,.07);
}
.app-shell:not(.hr-portal-theme) .panel-header {
  padding-bottom: 12px;
  border-bottom: 2px solid #f05a22;
}
.app-shell:not(.hr-portal-theme) .panel-header h2,
.app-shell:not(.hr-portal-theme) .page-heading h1 {
  color: #071827;
}
.app-shell:not(.hr-portal-theme) .kpi {
  border-top: 3px solid #f05a22;
}
.app-shell:not(.hr-portal-theme) .kpi strong {
  color: #071827;
}
.app-shell:not(.hr-portal-theme) .table-wrap {
  border-radius: 3px;
  border-color: #d9dde1;
}
.app-shell:not(.hr-portal-theme) .table-wrap thead th {
  background: #f1f3f5;
  color: #071827;
}
.app-shell:not(.hr-portal-theme) .primary-button,
.app-shell:not(.hr-portal-theme) .navy-button,
.app-shell:not(.hr-portal-theme) .top-actions > button:not(.secondary-button) {
  background: #f05a22;
  border-radius: 3px;
}
.app-shell:not(.hr-portal-theme) .secondary-button,
.app-shell:not(.hr-portal-theme) .ghost-button,
.app-shell:not(.hr-portal-theme) .blue-button {
  border-radius: 3px;
  border-color: #c7d2de;
  background: #eef3f8;
}
.app-shell:not(.hr-portal-theme) .date-filter-panel {
  border-radius: 3px;
  border-top: 3px solid #071827;
  background: #fff;
}

/* Apollo Connected reference login — visual-only composition */
.login-screen {
  min-height: 100vh;
  padding: 0;
  background: #f4f4f2;
}
.login-layout {
  width: min(1440px, 100vw);
  min-height: min(820px, 100vh);
  grid-template-columns: minmax(390px, 1fr) minmax(520px, 1fr);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.login-brand-panel {
  display: flex;
  align-items: flex-end;
  min-height: min(820px, 100vh);
  padding: clamp(42px, 6vw, 88px);
  border: 0;
  background:
    linear-gradient(90deg, rgba(4,13,24,.94), rgba(4,13,24,.68)),
    radial-gradient(ellipse at 75% 48%, rgba(76,101,118,.34), transparent 42%),
    linear-gradient(145deg, #071827 0%, #12202f 52%, #030a12 100%);
}
.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background:
    linear-gradient(155deg, transparent 0 56%, rgba(245,130,32,.26) 56.2% 56.6%, transparent 56.8%),
    linear-gradient(25deg, transparent 0 69%, rgba(255,255,255,.12) 69.2% 69.5%, transparent 69.7%);
  pointer-events: none;
}
.login-brand-panel::after {
  right: -110px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border-color: rgba(245,130,32,.24);
  box-shadow: 0 0 0 35px rgba(245,130,32,.05), 0 0 0 72px rgba(245,130,32,.03);
}
.login-brand-block {
  width: min(540px, 100%);
  gap: 26px;
}
.login-brand-block .brand-row {
  align-items: flex-start;
}
.login-brand-block .brand-logo-large {
  width: 180px;
  height: 108px;
  border-radius: 0;
  padding: 12px;
  background: #fff;
}
.connected-wordmark {
  color: #f7f8fa !important;
  font-weight: 900;
  letter-spacing: .16em;
}
.connected-wordmark span {
  color: #f05a22 !important;
}
.brand-heading {
  margin-top: 24px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: .98;
  letter-spacing: -.045em;
  text-shadow: 0 4px 22px rgba(0,0,0,.3);
}
.brand-heading span {
  color: #f05a22;
}
.login-tagline {
  color: #fff;
  font-size: 19px;
  font-style: normal;
  font-weight: 500;
}
.brand-divider {
  background: rgba(255,255,255,.28);
}
.brand-description {
  max-width: 470px;
  color: #d7e0e8;
  font-size: 15px;
  line-height: 1.65;
}
.login-card-shell {
  min-height: min(820px, 100vh);
  padding: clamp(44px, 7vw, 100px) clamp(34px, 8vw, 120px);
  background: #f8f8f6;
}
.login-card {
  width: min(540px, 100%);
  gap: 17px;
}
.login-card .auth-eyebrow {
  color: #ad4a2b;
  font-size: 13px;
}
.login-card h2 {
  margin-top: 10px;
  font-size: clamp(38px, 4vw, 54px);
  letter-spacing: -.045em;
}
.login-card .auth-copy {
  margin-top: -8px;
  color: #687582;
  font-size: 16px;
}
.login-form {
  gap: 16px;
  margin-top: 18px;
}
.login-form label {
  color: #1f2933;
  font-size: 13px;
}
.login-form input {
  min-height: 52px;
  border: 1px solid #aeb5ba;
  border-radius: 2px;
  background: #fff;
  box-shadow: none;
}
.login-mode-switch {
  gap: 8px;
  margin-top: 2px;
}
.login-mode-button {
  min-height: 52px;
  border: 1px solid #c5c9cb;
  border-radius: 2px;
  background: #fff;
  color: #31363b;
  font-size: 13px;
}
.login-mode-button.is-active {
  position: relative;
  background: #17212d;
  border-color: #17212d;
}
.login-mode-button.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #f05a22;
}
.login-mode-help {
  color: #687582;
  font-size: 13px;
}
.login-form > button[type="submit"] {
  min-height: 58px;
  margin-top: 34px;
  border-radius: 2px;
  background: #f05a22;
  color: #1a1f24;
  font-size: 17px;
  font-weight: 800;
  box-shadow: none;
}
.login-form > button[type="submit"]:hover {
  background: #d94d1a;
}
.password-toggle {
  min-height: 52px;
  border: 1px solid #c5c9cb;
  border-radius: 2px;
  background: #e8e9e8;
}
.reset-panel {
  margin-top: 12px;
  border: 1px solid #c5c9cb;
  border-radius: 10px;
  background: transparent;
}
.reset-panel summary {
  padding: 16px 18px;
  font-size: 16px;
}
.auth-footer {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #d1d3d2;
  color: #687582;
}
@media (max-width: 820px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 440px; }
  .login-card-shell { min-height: auto; }
}
@media (max-width: 560px) {
  .login-brand-panel { min-height: 360px; padding: 28px 24px; }
  .login-brand-block .brand-logo-large { width: 130px; height: 78px; }
  .brand-heading { font-size: 39px; }
  .login-card-shell { padding: 34px 24px 42px; }
  .login-mode-switch { grid-template-columns: 1fr 1fr; }
}

/* Mobile correction for the reference login: stack complete panels instead of clipping the split view. */
@media (max-width: 900px) {
  .login-screen {
    display: block;
    min-height: 100svh;
    overflow-x: hidden;
  }
  .login-layout {
    display: block !important;
    width: 100%;
    min-height: 0;
    overflow: visible;
  }
  .login-brand-panel,
  .login-card-shell {
    min-height: 0;
    width: 100%;
  }
  .login-brand-panel {
    display: block;
    padding: 42px 28px 38px;
    border-bottom: 5px solid #f05a22;
  }
  .login-brand-block {
    width: 100%;
  }
  .login-brand-block .brand-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
  }
  .login-brand-block .brand-logo-large {
    width: 132px;
    height: 80px;
  }
  .brand-heading {
    margin-top: 12px;
    font-size: clamp(34px, 9vw, 52px);
  }
  .login-card-shell {
    padding: 42px 28px 48px;
  }
  .login-card {
    width: min(540px, 100%);
    margin: 0 auto;
  }
}
@media (max-width: 480px) {
  .login-brand-panel { padding: 30px 20px 32px; }
  .login-brand-block .brand-row {
    grid-template-columns: 1fr;
  }
  .login-brand-block .brand-logo-large {
    width: 150px;
    height: 88px;
  }
  .brand-heading {
    margin-top: 4px;
    font-size: clamp(38px, 12vw, 50px);
  }
  .login-card-shell { padding: 34px 20px 42px; }
  .login-mode-switch { grid-template-columns: 1fr 1fr; }
  .login-form > button[type="submit"] { margin-top: 24px; }
}

/* Desktop reference proportions: approximately 46% brand panel / 54% sign-in panel. */
@media (min-width: 901px) {
  .login-screen {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px;
    background: #eef0ef;
  }
  .login-layout {
    width: min(1320px, calc(100vw - 64px));
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    min-height: min(820px, calc(100vh - 64px));
    max-height: calc(100vh - 64px);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(7,24,39,.14);
  }
  .login-brand-panel,
  .login-card-shell {
    min-height: min(820px, calc(100vh - 64px));
  }
  .login-brand-panel {
    padding: clamp(44px, 5vw, 86px);
  }
  .login-card-shell {
    padding-left: clamp(54px, 7vw, 122px);
    padding-right: clamp(54px, 7vw, 122px);
  }
  .login-card {
    width: min(560px, 100%);
  }
}

/* Final reference alignment: logo above wordmark, then headline; form has generous right-panel breathing room. */
.login-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.login-reference-logo {
  width: 260px !important;
  height: 138px !important;
  margin-bottom: 28px;
  padding: 20px !important;
  border-radius: 0 !important;
  object-fit: contain;
}
.login-reference-wordmark {
  margin-bottom: 26px;
  font-size: 14px;
}
.login-brand-block .brand-heading {
  margin: 0 0 34px;
  font-size: clamp(46px, 5.1vw, 78px);
  line-height: .94;
}
.login-brand-block .login-tagline {
  margin-bottom: 28px;
  font-size: 20px;
}
.login-brand-block .brand-divider {
  margin-bottom: 28px;
}
.login-brand-block .brand-description {
  max-width: 480px;
  font-size: 16px;
}
.login-card-shell {
  align-items: center;
}
.login-card .auth-eyebrow {
  margin-bottom: 4px;
}
.login-card h2 {
  margin: 0 0 2px;
}
.login-card .auth-copy {
  margin: 0 0 22px;
}
.login-card .login-form {
  margin-top: 0;
}
.login-card .reset-panel {
  margin-top: 18px;
}
.login-card .auth-footer {
  margin-top: 28px;
}
@media (max-width: 900px) {
  .login-reference-logo {
    width: 210px !important;
    height: 112px !important;
    margin-bottom: 22px;
  }
  .login-reference-wordmark { margin-bottom: 20px; }
  .login-brand-block .brand-heading {
    font-size: clamp(40px, 10vw, 62px);
    margin-bottom: 26px;
  }
}
@media (max-width: 480px) {
  .login-reference-logo {
    width: 180px !important;
    height: 96px !important;
  }
  .login-brand-block .brand-heading {
    font-size: clamp(38px, 12vw, 54px);
  }
}
/* HR visual parity with ERP — colors and surfaces only; no behavior changes. */
.app-shell.hr-portal-theme {
  --accent: #f05a22;
  --accent-deep: #be3d0d;
  --nav: #071827;
  --nav-soft: #20354a;
  --blue-soft: #eef3f8;
  --line: #d9dde1;
  --line-strong: #c7d2de;
  --canvas: #f4f5f6;
  background: #f4f5f6;
}
.app-shell.hr-portal-theme .sidebar {
  background: linear-gradient(180deg, #071827 0%, #12202f 62%, #071827 100%);
  border-right: 4px solid #f05a22;
}
.app-shell.hr-portal-theme .topbar {
  background: #fff;
  border-bottom: 3px solid #f05a22;
  box-shadow: 0 4px 14px rgba(7,24,39,.06);
}
.app-shell.hr-portal-theme .workspace {
  background: linear-gradient(180deg, #f4f5f6 0%, #eef1f4 100%);
}
.app-shell.hr-portal-theme .nav-list button.active {
  background: #f05a22;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 7px 16px rgba(240,90,34,.2);
}
.app-shell.hr-portal-theme .panel,
.app-shell.hr-portal-theme .kpi,
.app-shell.hr-portal-theme .hr-form-section,
.app-shell.hr-portal-theme .hr-balance-card,
.app-shell.hr-portal-theme .hr-modal,
.app-shell.hr-portal-theme .hr-kpi-card {
  border: 1px solid #d9dde1;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7,24,39,.07);
}
.app-shell.hr-portal-theme .panel-header {
  border-bottom: 2px solid #f05a22;
}
.app-shell.hr-portal-theme .hr-hero {
  background: linear-gradient(120deg, #071827, #20354a);
  border-top: 4px solid #f05a22;
  border-radius: 4px;
}
.app-shell.hr-portal-theme .hr-kpi-card,
.app-shell.hr-portal-theme .hr-balance-card {
  border-top: 3px solid #f05a22;
}
.app-shell.hr-portal-theme .hr-kpi-number,
.app-shell.hr-portal-theme .hr-balance-number {
  color: #071827;
}
.app-shell.hr-portal-theme .hr-table th,
.app-shell.hr-portal-theme .hr-cal-head {
  background: #f1f3f5;
  color: #071827;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-holiday {
  background: #fff0e9;
}
.app-shell.hr-portal-theme .hr-cal-cell.is-weekend {
  background: #f1f3f5;
}
.app-shell.hr-portal-theme button:not(.ghost-button):not(.secondary-button):not(.window-control-button),
.app-shell.hr-portal-theme .primary-button,
.app-shell.hr-portal-theme .navy-button,
.app-shell.hr-portal-theme .top-actions > button:not(.secondary-button) {
  background: #f05a22;
  color: #fff;
  border-radius: 3px;
}
.app-shell.hr-portal-theme .secondary-button,
.app-shell.hr-portal-theme .ghost-button,
.app-shell.hr-portal-theme .blue-button {
  border-radius: 3px;
  border-color: #c7d2de;
  background: #eef3f8;
  color: #071827;
}
/* Keep inactive HR panel navigation normal; highlight only the selected panel. */
.app-shell.hr-portal-theme .nav-list button {
  background: transparent;
  color: #d9e3ee;
  border-radius: 10px;
  box-shadow: none;
}
.app-shell.hr-portal-theme .nav-list button:hover {
  background: #20354a;
  color: #fff;
}
.app-shell.hr-portal-theme .nav-list button.active {
  background: #f05a22;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 7px 16px rgba(240,90,34,.2);
}
.app-shell.hr-portal-theme input:focus,
.app-shell.hr-portal-theme select:focus,
.app-shell.hr-portal-theme textarea:focus {
  outline: 2px solid #f05a22;
  outline-offset: 1px;
  border-color: #f05a22;
}
