/* Business Operations Console — Premium Emerald Operational Enterprise Console
   Shared visual layer only. Business behavior remains in the established app. */

:root {
  color-scheme: light;
  --console-emerald: #032b1a;
  --console-forest: #001f14;
  --console-emerald-700: #075b3b;
  --console-emerald-600: #087553;
  --console-emerald-100: #e8f3ed;
  --console-gold: #d4ad4a;
  --console-gold-light: #e8c96d;
  --console-ivory: #f4ebdd;
  --console-white: #fffdf6;
  --console-surface: rgba(255, 253, 246, 0.96);
  --console-canvas: #faf7f0;
  --console-ink: #17231d;
  --console-muted: #65716a;
  --console-line: #ded8cb;
  --console-line-strong: #c9c0b1;
  --console-blue: #1769c2;
  --console-blue-soft: #e7f1fc;
  --console-amber: #b96b00;
  --console-amber-soft: #fff2d8;
  --console-red: #c52d2d;
  --console-red-soft: #fde8e6;
  --console-gray: #66706c;
  --console-gray-soft: #eef0ee;
  --console-shadow-sm: 0 1px 2px rgba(0, 31, 20, 0.04), 0 6px 20px rgba(0, 31, 20, 0.055);
  --console-shadow-md: 0 18px 45px rgba(0, 31, 20, 0.1);
  --console-radius-sm: 8px;
  --console-radius: 12px;
  --console-radius-lg: 18px;
  --console-sidebar-width: 248px;
  --console-sidebar-collapsed: 78px;
  --console-topbar-height: 64px;
  --bg: var(--console-canvas);
  --panel: var(--console-surface);
  --panel-strong: var(--console-white);
  --sidebar: var(--console-emerald);
  --sidebar-deep: var(--console-forest);
  --ink: var(--console-ink);
  --muted: var(--console-muted);
  --line: var(--console-line);
  --line-strong: var(--console-line-strong);
  --brand: var(--console-emerald-600);
  --brand-deep: var(--console-emerald);
  --accent: var(--console-gold);
  --success: #177245;
  --warning: var(--console-amber);
  --danger: var(--console-red);
  --shadow: var(--console-shadow-sm);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--console-canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--console-ink);
  background:
    radial-gradient(circle at 88% 2%, rgba(212, 173, 74, 0.08), transparent 28rem),
    linear-gradient(180deg, #fdfbf6 0%, var(--console-canvas) 100%);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary,
[tabindex] {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(23, 105, 194, 0.38);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--console-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: var(--console-sidebar-collapsed) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  inset: 0 auto 0 0;
  z-index: 110;
  width: 100%;
  height: 100vh;
  padding: 18px 14px;
  gap: 18px;
  overflow: hidden auto;
  border: 0;
  border-right: 1px solid rgba(232, 201, 109, 0.2);
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(212, 173, 74, 0.12), transparent 18rem),
    linear-gradient(165deg, var(--console-emerald) 0%, var(--console-forest) 100%);
  box-shadow: 12px 0 32px rgba(0, 31, 20, 0.08);
}

.sidebar-brand {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(232, 201, 109, 0.2);
}

.sidebar-brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(232, 201, 109, 0.4);
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-brand .eyebrow {
  margin: 0;
  color: var(--console-gold-light);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  overflow-wrap: anywhere;
}

.sidebar-brand h1 {
  margin: 1px 0 0;
  overflow: hidden;
  color: #fffdf6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-subtitle {
  margin: 2px 0 0;
  color: rgba(255, 253, 246, 0.67);
  font-size: 0.7rem;
  white-space: nowrap;
}

.sidebar-collapse-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.sidebar-collapse-button:hover {
  border-color: rgba(232, 201, 109, 0.62);
  background: rgba(232, 201, 109, 0.1);
}

.sidebar-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.sidebar-nav-label {
  margin: 10px 10px 5px;
  color: rgba(255, 253, 246, 0.47);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sidebar-nav-group {
  min-width: 0;
}

.sidebar-nav-group[hidden],
.sidebar-nav-items[hidden] {
  display: none !important;
}

.sidebar-nav-items {
  display: grid;
  gap: 5px;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  margin: 5px 0 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  color: #fffdf6;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-group-toggle:focus-visible {
  outline: 2px solid var(--console-gold-light);
  outline-offset: 1px;
}

.sidebar-group-chevron {
  font-size: 1rem;
  line-height: 1;
  transition: transform 120ms ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-group-chevron {
  transform: rotate(90deg);
}

/* Compact icon navigation must not hide destinations behind invisible headings. */
@media (min-width: 981px) {
  body.sidebar-collapsed .sidebar-nav-items[hidden] {
    display: grid !important;
  }
}

@media (min-width: 981px) and (max-width: 1280px) {
  .sidebar-nav-items[hidden] {
    display: grid !important;
  }
}

.nav-separator {
  display: none;
}

.nav-button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 253, 246, 0.82);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transform: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.navigation-unseen-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #063c27;
  border-radius: 999px;
  background: #c52a2a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.24);
}

.navigation-unseen-badge[hidden] {
  display: none !important;
}

.nav-button > .navigation-unseen-badge:not([hidden]) {
  display: inline-grid;
}

.portal-nav-button > .navigation-destination-unseen-badge:not([hidden]),
.tab-chip > .navigation-destination-unseen-badge:not([hidden]) {
  display: inline-grid;
}

.portal-nav-button > .navigation-destination-unseen-badge,
.tab-chip > .navigation-destination-unseen-badge {
  top: 2px;
  right: 3px;
  border-color: #fff;
}

.tab-chip:has(> .navigation-destination-unseen-badge:not([hidden])) {
  position: relative;
  padding-right: 27px;
}

.mobile-nav-button > .navigation-unseen-badge {
  top: 2px;
  right: 5px;
}

.nav-button::before {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--console-gold-light);
  font-size: 1.05rem;
  line-height: 1;
}

.nav-button[data-nav-icon="company"]::before { content: "⌂"; }
.nav-button[data-nav-icon="clients"]::before { content: "♙"; }
.nav-button[data-nav-icon="case"]::before { content: "▣"; }
.nav-button[data-nav-icon="documents"]::before { content: "□"; }
.nav-button[data-nav-icon="finance"]::before { content: "₱"; font-weight: 800; }
.nav-button[data-nav-icon="liaison"]::before { content: "◇"; }
.nav-button[data-nav-icon="records"]::before { content: "▥"; }
.nav-button[data-nav-icon="recycle"]::before { content: "↺"; }
.nav-button[data-nav-icon="dashboard"]::before { content: "◉"; }
.nav-button[data-nav-icon="users"]::before { content: "♙"; }
.nav-button[data-nav-icon="backup"]::before { content: "⇧"; }
.nav-button[data-nav-icon="settings"]::before { content: "⚙"; }

.nav-button:hover,
.nav-button.is-active {
  color: #fff;
  border-color: rgba(232, 201, 109, 0.15);
  background: rgba(255, 255, 255, 0.08);
  transform: none;
}

.nav-button.is-active {
  background: linear-gradient(90deg, rgba(8, 117, 83, 0.95), rgba(8, 117, 83, 0.55));
  box-shadow: inset 3px 0 0 var(--console-gold), 0 8px 22px rgba(0, 0, 0, 0.12);
}

.sidebar-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sidebar-stat {
  min-width: 0;
  padding: 9px 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-stat span {
  min-height: 2.2em;
  color: rgba(255, 253, 246, 0.62);
  font-size: 0.63rem;
  line-height: 1.1;
}

.sidebar-stat strong {
  margin-top: 4px;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.05rem;
}

.sidebar-footer {
  display: grid;
  gap: 13px;
  margin-top: auto;
  padding: 14px 8px 2px;
  border: 0;
  border-top: 1px solid rgba(232, 201, 109, 0.2);
  border-radius: 0;
  background: transparent;
}

.sidebar-account-row,
.sidebar-footer-action {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 253, 246, 0.88);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-account-row:hover,
.sidebar-footer-action:hover {
  border-color: rgba(232, 201, 109, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-account-row > span:last-child {
  display: grid;
  min-width: 0;
}

.sidebar-account-row strong,
.sidebar-account-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-row strong { color: #fff; font-size: 0.76rem; }
.sidebar-account-row small { color: rgba(255, 253, 246, 0.6); font-size: 0.66rem; }

.sidebar-account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  flex-shrink: 0;
  border: 1px solid var(--console-gold);
  border-radius: 50%;
  color: var(--console-gold-light);
  background: rgba(0, 31, 20, 0.65);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  font-weight: 800;
}

.sidebar-footer-action > span:first-child {
  display: grid;
  place-items: center;
  color: var(--console-gold-light);
  font-size: 1rem;
}

.sidebar-environment-badge {
  padding: 8px;
  border: 1px solid rgba(212, 173, 74, 0.34);
  border-radius: 10px;
  background: rgba(212, 173, 74, 0.08);
}

.sidebar-health-row,
.sidebar-environment-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #fff;
}

.sidebar-health-row div,
.sidebar-environment-row div {
  display: grid;
  min-width: 0;
}

.sidebar-health-row strong,
.sidebar-environment-row strong {
  font-size: 0.75rem;
}

.sidebar-health-row span:not(.sidebar-health-dot),
.sidebar-environment-row span:not(.sidebar-environment-icon) {
  overflow: hidden;
  color: rgba(255, 253, 246, 0.58);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-health-dot {
  width: 11px;
  height: 11px;
  margin-left: 6px;
  border-radius: 50%;
  background: #57d163;
  box-shadow: 0 0 0 5px rgba(87, 209, 99, 0.1);
}

.sidebar-health-dot.is-warning {
  background: var(--console-amber);
  box-shadow: 0 0 0 5px rgba(185, 107, 0, 0.12);
}

.sidebar-environment-icon {
  display: grid;
  place-items: center;
  color: var(--console-gold-light);
  font-size: 0.73rem;
  font-weight: 800;
}

body.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-brand {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.sidebar-collapsed .sidebar-brand-copy,
body.sidebar-collapsed .sidebar-nav-label,
body.sidebar-collapsed .nav-button span,
body.sidebar-collapsed .sidebar-status,
body.sidebar-collapsed .sidebar-health-row div,
body.sidebar-collapsed .sidebar-environment-row div {
  display: none;
}

body.sidebar-collapsed .sidebar-collapse-button {
  position: absolute;
  right: -2px;
  bottom: -14px;
  transform: rotate(180deg);
}

body.sidebar-collapsed .nav-button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 8px;
}

body.sidebar-collapsed .sidebar-footer {
  justify-items: center;
}

.workspace {
  width: 100%;
  min-width: 0;
  padding: 0 24px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 95;
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: var(--console-topbar-height);
  margin: 0 -24px;
  padding: 8px 24px;
  border: 0;
  border-bottom: 1px solid var(--console-line);
  border-radius: 0;
  background: rgba(255, 253, 246, 0.94);
  box-shadow: 0 5px 18px rgba(0, 31, 20, 0.055);
  backdrop-filter: blur(14px);
}

#businessName {
  display: none !important;
}

.view-section:not(.is-active) {
  display: none !important;
}

.mobile-sidebar-button {
  display: none;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--console-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.topbar-breadcrumb strong {
  overflow: hidden;
  color: var(--console-emerald-700);
  text-overflow: ellipsis;
}

.topbar-search {
  position: relative;
  display: block;
  min-width: 0;
}

.topbar-search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: var(--console-muted);
  font-size: 1.28rem;
  transform: translateY(-53%);
  pointer-events: none;
}

.topbar-search input {
  width: 100%;
  min-height: 42px;
  padding: 8px 14px 8px 41px;
  border: 1px solid var(--console-line);
  border-radius: 9px;
  color: var(--console-ink);
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 31, 20, 0.025);
}

.topbar-search input:focus {
  border-color: var(--console-emerald-600);
  box-shadow: 0 0 0 3px rgba(8, 117, 83, 0.11);
}

.topbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.topbar-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--console-emerald);
  background: transparent;
  font-size: 1.45rem;
  cursor: pointer;
}

.topbar-icon-button:hover {
  background: var(--console-emerald-100);
}

.topbar-alert-count {
  position: absolute;
  top: 3px;
  right: 2px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--console-white);
  border-radius: 999px;
  color: #fff;
  background: var(--console-red);
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1;
}

.console-environment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--console-gold);
  border-radius: 6px;
  color: #8c6100;
  background: #fffaf0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-environment-badge.is-stable {
  border-color: rgba(3, 43, 26, 0.28);
  color: var(--console-white);
  background: var(--console-emerald);
}

.topbar-account-menu {
  position: relative;
  min-width: 0;
}

.topbar-account-menu > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-width: 158px;
  padding: 2px 4px 2px 2px;
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
}

.topbar-account-menu > summary::-webkit-details-marker {
  display: none;
}

.topbar-account-menu > summary::after {
  content: "⌄";
  color: var(--console-emerald);
  font-size: 0.8rem;
}

.topbar-account-menu > summary:hover {
  background: var(--console-emerald-100);
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  flex-shrink: 0;
  border: 1px solid var(--console-gold);
  border-radius: 50%;
  color: var(--console-gold-light);
  background: var(--console-emerald);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  font-weight: 800;
}

.topbar-account-copy {
  display: grid;
  min-width: 0;
  line-height: 1.18;
}

.topbar-account-copy strong,
.topbar-account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-account-copy strong {
  color: var(--console-ink);
  font-size: 0.78rem;
}

.topbar-account-copy small {
  color: var(--console-muted);
  font-size: 0.67rem;
}

.topbar-account-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 180;
  display: grid;
  gap: 6px;
  width: min(280px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--console-line);
  border-radius: 12px;
  background: var(--console-white);
  box-shadow: var(--console-shadow-md);
}

.topbar-account-popover > * {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.environment-badge {
  display: none !important;
}

.content-stack {
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.console-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 24px 0 18px;
}

.console-page-header h1 {
  margin: 1px 0 2px;
  color: var(--console-emerald);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.console-page-header p:last-child {
  margin: 6px 0 0;
  color: var(--console-muted);
  font-size: 0.92rem;
}

.console-page-header .section-kicker {
  margin-bottom: 2px;
}

.console-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.view-section.is-active {
  display: grid;
  gap: 14px;
}

.hero-panel,
.card,
.hub-tab-panel,
.billing-surface {
  border: 1px solid var(--console-line);
  border-radius: var(--console-radius-lg);
  background: var(--console-surface);
  box-shadow: var(--console-shadow-sm);
}

.card,
.hero-panel {
  padding: 18px;
}

.card-head,
.billing-section-heading {
  align-items: center;
  gap: 16px;
  margin-bottom: 13px;
}

.card h3,
.hero-panel h3,
.billing-section-heading h3 {
  color: var(--console-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 1.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.eyebrow,
.section-kicker,
.subsection-title {
  color: var(--console-emerald-700);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.panel-copy,
.helper-copy,
.topbar-text {
  color: var(--console-muted);
  line-height: 1.55;
}

.module-nav-card {
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.module-nav-title {
  display: none;
}

.module-nav-card .portal-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.module-nav-grid,
.module-nav-grid--client,
.module-nav-grid--case,
.module-nav-grid--documents,
.module-nav-grid--billing,
.module-nav-grid--liaison {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  min-height: 0;
  border: 0;
}

.module-nav-grid--documents,
.module-nav-grid--billing {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.module-nav-grid--liaison {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.portal-nav-cell {
  display: block;
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--console-line);
  border-radius: var(--console-radius);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 253, 246, 0.92) 100%);
  box-shadow: var(--console-shadow-sm);
}

.portal-nav-cell:first-child {
  border-left: 1px solid var(--console-line);
}

.module-nav-card .portal-nav-stack {
  display: grid;
  width: 100%;
  gap: 5px;
  justify-items: stretch;
}

.module-nav-card .portal-nav-button:not(.portal-nav-button--subtle) {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  min-height: 38px;
  width: 100%;
  max-width: none;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--console-ink);
  background: transparent;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: left;
}

.module-nav-card .portal-nav-button:not(.portal-nav-button--subtle):hover,
.module-nav-card .portal-nav-button:not(.portal-nav-button--subtle).is-active {
  border-color: rgba(8, 117, 83, 0.18);
  color: var(--console-emerald-700);
  background: var(--console-emerald-100);
}

.module-nav-card .portal-nav-button:not(.portal-nav-button--subtle).is-active {
  box-shadow: inset 3px 0 0 var(--console-emerald-600);
}

.module-nav-card .portal-nav-button--primary {
  min-height: 45px !important;
  color: var(--console-emerald) !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
}

.module-nav-card .portal-nav-button--emphasis {
  font-weight: 800 !important;
}

.module-nav-card .portal-nav-button--regular {
  font-weight: 500 !important;
}

.module-nav-card .portal-nav-button--child {
  min-height: 31px !important;
  padding: 5px 9px !important;
  color: var(--console-muted) !important;
  font-size: 0.72rem !important;
}

.portal-queue-count {
  display: none !important;
}

.portal-queue-description {
  grid-column: 1 / -1;
  display: block;
  margin-top: 2px;
  color: var(--console-muted);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.25;
}

.module-nav-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
  padding: 0;
  gap: 9px;
}

.module-nav-card .portal-nav-button--subtle {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--console-line-strong);
  border-radius: 9px;
  color: var(--console-emerald);
  background: var(--console-white);
  font-size: 0.75rem;
  font-weight: 700;
}

.module-nav-card .portal-nav-button--subtle:hover,
.module-nav-card .portal-nav-button--subtle.is-active {
  border-color: var(--console-emerald-600);
  background: var(--console-emerald-100);
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button,
.inline-action-button,
.danger-button,
button.primary-button,
button.secondary-button,
button.ghost-button,
a.primary-button,
a.secondary-button,
a.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.primary-button,
button.primary-button,
a.primary-button {
  border: 1px solid var(--console-emerald);
  color: #fff;
  background: linear-gradient(145deg, var(--console-emerald-600), var(--console-emerald));
  box-shadow: 0 7px 18px rgba(3, 43, 26, 0.16);
}

.primary-button:hover,
button.primary-button:hover,
a.primary-button:hover {
  background: linear-gradient(145deg, #0a835d, var(--console-emerald-700));
  box-shadow: 0 9px 22px rgba(3, 43, 26, 0.2);
  transform: translateY(-1px);
}

.secondary-button,
.ghost-button,
button.secondary-button,
button.ghost-button,
a.secondary-button,
a.ghost-button {
  border: 1px solid var(--console-line-strong);
  color: var(--console-emerald);
  background: var(--console-white);
  box-shadow: none;
}

.secondary-button:hover,
.ghost-button:hover,
button.secondary-button:hover,
button.ghost-button:hover,
a.secondary-button:hover,
a.ghost-button:hover {
  border-color: var(--console-emerald-600);
  color: var(--console-emerald);
  background: var(--console-emerald-100);
}

.inline-action-button,
.compact-button-cluster .ghost-button,
.table-wrap button,
.table-wrap .link-button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.danger-button,
.ghost-button.danger-button,
button.danger-button {
  border-color: rgba(197, 45, 45, 0.36);
  color: var(--console-red);
  background: #fff;
}

.danger-button:hover,
.ghost-button.danger-button:hover,
button.danger-button:hover {
  border-color: var(--console-red);
  color: #fff;
  background: var(--console-red);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 0.55;
  filter: saturate(0.45);
}

label {
  color: var(--console-ink);
  font-size: 0.78rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--console-line);
  border-radius: 9px;
  color: var(--console-ink);
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 31, 20, 0.025);
}

input,
select {
  padding: 8px 11px;
}

textarea {
  min-height: 88px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #939a96;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--console-line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--console-emerald-600);
  box-shadow: 0 0 0 3px rgba(8, 117, 83, 0.1);
}

input[readonly],
textarea[readonly],
select[disabled] {
  color: #525d57;
  background: #f3f1ec;
}

.stack-form,
.form-grid,
.client-entry-window-form,
.billing-journal-form {
  gap: 14px;
}

.tab-bar,
.compact-tab-bar,
.hub-tab-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--console-line);
  border-radius: 10px;
  background: #f6f3ec;
}

.tab-chip {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--console-muted);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 700;
}

.tab-chip:hover {
  color: var(--console-emerald);
  background: #fff;
}

.tab-chip.is-active {
  border-color: var(--console-emerald);
  color: #fff;
  background: var(--console-emerald);
  box-shadow: 0 5px 12px rgba(3, 43, 26, 0.14);
}

.table-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--console-line);
  border-radius: 12px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #b7b9b5 transparent;
}

.structured-client-details-form {
  gap: 12px;
}

.structured-client-details-section {
  padding: 13px;
  border: 1px solid var(--console-line);
  border-radius: 10px;
  background: #fff;
}

.structured-client-details-section h4 {
  margin: 0 0 10px;
  color: var(--console-emerald-700);
}

.structured-client-legacy-details {
  padding: 11px 13px;
  border: 1px dashed var(--console-line-strong);
  border-radius: 10px;
  background: #faf9f5;
}

.structured-client-legacy-details summary {
  cursor: pointer;
  color: var(--console-muted);
  font-weight: 700;
}

.structured-client-legacy-details[open] summary {
  margin-bottom: 12px;
}

.canonical-client-statement-actions {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.client-finance-modal-card {
  width: min(780px, calc(100vw - 28px));
}

.client-finance-item-fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--console-line);
  border-radius: 10px;
}

.client-finance-item-fieldset legend {
  padding: 0 5px;
  font-weight: 800;
}

.client-finance-item-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.client-finance-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.client-finance-item > span {
  display: grid;
  min-width: 0;
}

.client-finance-pending-items {
  display: grid;
  gap: 7px;
  margin-top: 5px;
}

.client-finance-item.is-pricing-pending {
  border-color: #ead9a5;
  background: #fff9e8;
  cursor: not-allowed;
}

.client-finance-item small,
.billing-metric-card small,
.pricing-pending-note {
  display: block;
  color: var(--console-muted);
  font-size: 0.7rem;
}

tr.is-pricing-pending td {
  background: #fff9e8;
}

.pricing-pending-amount {
  color: #8b6410;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.76rem;
}

.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 42px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--console-line);
  color: #3e4943;
  background: #f2f5f2;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap td {
  padding: 10px 11px;
  border-bottom: 1px solid #ece8df;
  color: #28332d;
  line-height: 1.35;
  vertical-align: middle;
}

.table-wrap tbody tr {
  transition: background 100ms ease;
}

.table-wrap tbody tr:hover,
.table-wrap tbody tr:focus-within {
  background: #f7fbf8;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap td[data-currency],
.billing-money,
.numeric-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.status-chip,
.status-badge,
.billing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--console-gray);
  background: var(--console-gray-soft);
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.05;
  white-space: nowrap;
}

.status-chip.status-complete,
.status-chip.status-completed,
.status-chip.status-approved,
.status-chip.status-verified,
.status-chip.status-confirmed,
.status-chip.status-posted {
  color: #0d6940;
  background: #dff2e7;
}

.status-chip.status-processing,
.status-chip.status-active,
.status-chip.status-in-progress,
.status-chip.status-ongoing {
  color: #175c9d;
  background: var(--console-blue-soft);
}

.status-chip.status-pending,
.status-chip.status-waiting,
.status-chip.status-for-compliance,
.status-chip.status-due-soon {
  color: #975f00;
  background: var(--console-amber-soft);
}

.status-chip.status-overdue,
.status-chip.status-blocked,
.status-chip.status-failed,
.status-chip.status-for-correction,
.status-chip.status-cancelled {
  color: var(--console-red);
  background: var(--console-red-soft);
}

.empty-state-box,
.result-box,
.tip-box {
  border: 1px dashed var(--console-line-strong);
  border-radius: 11px;
  color: var(--console-muted);
  background: #fbfaf6;
}

.result-box.is-error,
.empty-state-box.is-error {
  border-color: rgba(197, 45, 45, 0.4);
  color: #942020;
  background: var(--console-red-soft);
}

/* Preserve the organizational-chart behavior while bringing its legacy color
   palette into the restrained emerald-and-gold operational identity. */
.company-org-node .company-org-avatar {
  border-color: var(--console-gold);
}

.company-org-node-label,
.company-org-node--executive .company-org-node-label {
  background: linear-gradient(145deg, var(--console-emerald), var(--console-forest));
}

.company-org-node--administration .company-org-node-label,
.company-org-node--general .company-org-node-label {
  background: #7a5b16;
}

.company-org-node--operations .company-org-node-label,
.company-org-node--documents .company-org-node-label {
  background: #0a6650;
}

.company-org-node--liaison .company-org-node-label,
.company-org-node--finance .company-org-node-label {
  background: #33734f;
}

.overlay-modal {
  z-index: 250;
  padding: 20px;
}

body.client-entry-modal-active::after {
  z-index: 260;
  background: rgba(0, 31, 20, 0.7);
}

[data-clients-view="client-entry"].entry-modal-mode {
  inset: 18px auto auto 50%;
  z-index: 270;
  height: auto;
  border: 1px solid rgba(217, 203, 178, 0.82);
  border-radius: var(--console-radius-lg);
  background: var(--console-ivory);
  box-shadow: var(--console-shadow-lg);
  transform: translateX(-50%);
}

.overlay-backdrop {
  background: rgba(0, 31, 20, 0.72);
  backdrop-filter: blur(5px);
}

.overlay-card,
.overlay-card-wide,
.overlay-card-activity,
.billing-transaction-modal-card,
.company-org-details-card {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden auto;
  border: 1px solid rgba(212, 173, 74, 0.28);
  border-radius: 16px;
  background: var(--console-white);
  box-shadow: 0 32px 80px rgba(0, 31, 20, 0.3);
}

.overlay-card-wide,
.overlay-card-activity,
.overlay-card-entry-service,
.overlay-card.overlay-card-source-window {
  width: min(1240px, calc(100vw - 40px));
}

.overlay-card > *,
.overlay-card-wide > *,
.overlay-card-activity > * {
  margin-inline: 18px;
}

.overlay-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 !important;
  padding: 14px 18px;
  border-bottom: 1px solid var(--console-line);
  background: rgba(255, 253, 246, 0.96);
  backdrop-filter: blur(12px);
}

.auth-overlay {
  z-index: 500;
  background:
    radial-gradient(circle at 75% 15%, rgba(212, 173, 74, 0.16), transparent 26rem),
    linear-gradient(145deg, var(--console-emerald), var(--console-forest));
}

.auth-panel {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid rgba(212, 173, 74, 0.36);
  border-radius: 18px;
  background: var(--console-white);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.mobile-workspace-page {
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 85% 5%, rgba(212, 173, 74, 0.09), transparent 24rem),
    var(--console-canvas);
}

.mobile-workspace {
  width: min(1320px, 100%);
  margin: 0 auto;
  gap: 14px;
}

.mobile-workspace .topbar,
.mobile-portal-header {
  position: relative;
  display: flex;
  min-height: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--console-line);
  border-radius: 16px;
  background: var(--console-white);
  box-shadow: var(--console-shadow-sm);
}

.mobile-workspace .topbar h1 {
  margin: 2px 0;
  color: var(--console-emerald);
  font-family: Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.coordinator-shared-portal-frame {
  border: 1px solid var(--console-line);
  border-radius: 14px;
  background: var(--console-white);
  box-shadow: var(--console-shadow-sm);
}

.public-inquiry-workspace {
  max-width: 980px;
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: var(--console-sidebar-collapsed) minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    height: 100vh;
    padding-inline: 10px;
    border-right: 1px solid rgba(232, 201, 109, 0.2);
    border-bottom: 0;
  }

  .sidebar-brand {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .sidebar-brand-copy,
  .sidebar-nav-label,
  .nav-button span,
  .sidebar-status,
  .sidebar-health-row div,
  .sidebar-environment-row div {
    display: none;
  }

  .sidebar-collapse-button {
    display: none;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .nav-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 8px;
  }

  .sidebar-footer {
    justify-items: center;
  }

  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .topbar-breadcrumb {
    display: none;
  }

  .module-nav-grid,
  .module-nav-grid--client,
  .module-nav-grid--case {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .module-nav-grid--liaison {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    width: min(286px, calc(100vw - 44px));
    height: 100dvh;
    padding: 18px 14px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-mobile-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 31, 20, 0.58);
    backdrop-filter: blur(2px);
  }

  .sidebar-brand {
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    justify-items: stretch;
  }

  .sidebar-brand-copy,
  .sidebar-nav-label,
  .nav-button span,
  .sidebar-status,
  .sidebar-health-row div,
  .sidebar-environment-row div {
    display: initial;
  }

  .sidebar-collapse-button {
    display: inline-grid;
  }

  body .sidebar-group-toggle {
    display: flex;
  }

  .nav-button {
    grid-template-columns: 28px minmax(0, 1fr);
    justify-items: stretch;
    padding-inline: 11px;
  }

  .sidebar-footer {
    justify-items: stretch;
  }

  .workspace {
    padding-inline: 18px;
  }

  .topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .mobile-sidebar-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--console-line);
    border-radius: 9px;
    color: var(--console-emerald);
    background: var(--console-white);
    cursor: pointer;
  }

  .console-environment-badge,
  .topbar-account-copy {
    display: none;
  }

  .topbar-account-menu > summary {
    grid-template-columns: 38px 14px;
    min-width: 56px;
  }

  .console-page-header {
    align-items: flex-start;
  }

  .module-nav-grid,
  .module-nav-grid--client,
  .module-nav-grid--case,
  .module-nav-grid--documents,
  .module-nav-grid--billing,
  .module-nav-grid--liaison {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .workspace {
    padding: 0 12px 24px;
  }

  [data-clients-view="client-entry"].entry-modal-mode {
    inset: 8px 8px auto;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 16px);
    transform: none;
  }

  .topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar-icon-button,
  .topbar-avatar {
    width: 38px;
    height: 38px;
  }

  .topbar-account-menu > summary {
    grid-template-columns: 38px;
    min-width: 38px;
    padding: 0;
  }

  .topbar-account-menu > summary::after {
    display: none;
  }

  .console-page-header {
    display: grid;
    min-height: 0;
    padding: 18px 0 14px;
  }

  .console-page-header h1 {
    font-size: 1.72rem;
  }

  .console-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .console-page-actions > * {
    width: 100%;
  }

  .module-nav-grid,
  .module-nav-grid--client,
  .module-nav-grid--case,
  .module-nav-grid--documents,
  .module-nav-grid--billing,
  .module-nav-grid--liaison {
    grid-template-columns: 1fr;
  }

  .portal-nav-cell {
    min-height: 0;
  }

  .module-nav-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .module-nav-card .portal-nav-button--subtle {
    justify-content: center;
  }

  .card,
  .hero-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .card-head {
    align-items: flex-start;
  }

  .button-cluster,
  .compact-button-cluster {
    gap: 6px;
  }

  .table-wrap table {
    min-width: 700px;
  }

  .overlay-modal {
    padding: 6px;
  }

  .overlay-card,
  .overlay-card-wide,
  .overlay-card-activity,
  .overlay-card-entry-service,
  .overlay-card.overlay-card-source-window {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 13px;
  }

  .mobile-workspace-page {
    padding: 10px;
  }

  .mobile-workspace .topbar,
  .mobile-portal-header {
    display: grid;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .console-page-header,
  .module-nav-card,
  .environment-badge {
    display: none !important;
  }

  .app-shell,
  .workspace {
    display: block;
    width: 100%;
    padding: 0;
  }

  .card,
  .table-wrap {
    border-color: #999;
    box-shadow: none;
  }
}
/* Secure individual staff access */
.staff-auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(212, 173, 74, 0.15), transparent 32rem),
    linear-gradient(135deg, #001f14 0 42%, #f4ebdd 42% 100%);
}

.staff-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(22rem, 0.6fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 8rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 5rem);
}

.staff-auth-brand {
  color: #fffdf6;
  max-width: 36rem;
  box-sizing: border-box;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: 1.25rem;
  /* Keep every light label on its own opaque surface at any viewport size. */
  background-color: #001f14;
}
.staff-auth-brand h1 { color: #fffdf6; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.02; margin: 0.75rem 0 1rem; }
.staff-auth-brand .eyebrow { color: #e8c96d; letter-spacing: 0.18em; font-weight: 800; text-transform: uppercase; }
.staff-auth-brand > p:last-of-type { color: rgba(255, 253, 246, 0.78); font-size: 1.05rem; }
.staff-auth-security-note { display: grid; gap: 0.25rem; margin-top: 2rem; padding: 1rem 1.1rem; border: 1px solid rgba(232, 201, 109, 0.36); border-radius: 0.85rem; color: rgba(255, 253, 246, 0.78); }
.staff-auth-security-note strong { color: #e8c96d; }
.staff-auth-card { background: rgba(255, 253, 246, 0.98); border: 1px solid rgba(3, 43, 26, 0.16); border-radius: 1.25rem; box-shadow: 0 1.5rem 4rem rgba(0, 31, 20, 0.24); padding: clamp(1.5rem, 4vw, 2.5rem); }
.staff-auth-card h2 { font-size: 2rem; margin: 0.25rem 0 0.5rem; }
.staff-auth-card .stack-form { margin-top: 1.5rem; }

@media (max-width: 760px) {
  .staff-auth-page { background: linear-gradient(180deg, #001f14 0 15rem, #f4ebdd 15rem 100%); }
  .staff-auth-shell { grid-template-columns: 1fr; align-content: start; gap: 1.5rem; padding: 2rem 1rem; }
  .staff-auth-brand h1 { font-size: 2.2rem; }
  .staff-auth-security-note { display: none; }
}

/* Owner console, company administration, access control, backup, and settings */
.owner-dashboard {
  display: grid;
  gap: 18px;
}

.owner-dashboard-banner,
.users-access-header-card,
.backup-hero-card {
  background:
    linear-gradient(112deg, rgba(3, 43, 26, 0.035), transparent 48%),
    var(--surface, #fffdf6);
  border: 1px solid rgba(212, 173, 74, 0.34);
}

.owner-dashboard-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 18px;
}

.owner-dashboard-banner h2 {
  margin: 2px 0 4px;
  color: #032b1a;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.owner-dashboard-banner p:last-child {
  margin: 0;
  color: #5d675f;
}

.owner-environment-note,
.environment-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 300px;
  padding: 11px 14px;
  border: 1px solid rgba(212, 173, 74, 0.72);
  border-radius: 12px;
  background: rgba(255, 253, 246, 0.94);
  color: #032b1a;
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(0, 31, 20, 0.06);
}

.environment-safety-note > span:last-child {
  display: grid;
  gap: 2px;
}

.environment-safety-note strong,
.environment-safety-note small {
  display: block;
}

.environment-safety-note small {
  color: #647168;
  font-size: 0.78rem;
}

body.owner-dashboard-active .console-page-header {
  display: none;
}

body.owner-dashboard-active .legacy-overview-controls {
  display: none !important;
}

.owner-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.owner-kpi-card {
  min-width: 0;
  padding: 18px 14px 16px;
  border: 1px solid rgba(3, 43, 26, 0.13);
  border-radius: 15px;
  background: rgba(255, 253, 246, 0.96);
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 31, 20, 0.055);
}

.owner-kpi-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #0d704a, #001f14);
  color: #fffdf6;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(232, 201, 109, 0.2);
}

.owner-kpi-card small {
  display: block;
  min-height: 2.4em;
  color: #445047;
  font-size: 0.82rem;
  line-height: 1.2;
}

.owner-kpi-card strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #032b1a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1;
}

.owner-kpi-card--alert .owner-kpi-icon {
  background: linear-gradient(145deg, #b7372d, #791c16);
}

.owner-kpi-card--alert strong {
  color: #a52b22;
}

.owner-dashboard-grid {
  display: grid;
  gap: 16px;
}

.owner-dashboard-grid--three {
  grid-template-columns: minmax(260px, 1.05fr) minmax(260px, 1fr) minmax(280px, 1fr);
}

.owner-dashboard-grid--wide {
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.7fr);
}

.owner-panel {
  min-width: 0;
  padding: 18px;
  border-color: rgba(3, 43, 26, 0.13);
}

.owner-panel .card-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 173, 74, 0.32);
}

.owner-panel h3 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.owner-operations-list,
.owner-approval-list,
.owner-timeline,
.owner-system-status {
  display: grid;
  gap: 8px;
}

.owner-operations-list button,
.owner-approval-list > button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(3, 43, 26, 0.1);
  border-radius: 10px;
  background: rgba(244, 235, 221, 0.38);
  color: #032b1a;
  text-align: left;
  cursor: pointer;
}

.owner-approval-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid rgba(3, 43, 26, 0.09);
  border-radius: 10px;
  background: rgba(255, 253, 246, 0.72);
}

.owner-approval-list article > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(212, 173, 74, 0.16);
  color: #8c6812;
}

.owner-approval-list article > div {
  min-width: 0;
}

.owner-approval-list article strong,
.owner-approval-list article small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-approval-list article strong {
  color: #032b1a;
  font-size: 0.82rem;
}

.owner-approval-list article small {
  margin-top: 2px;
  color: #68736b;
  font-size: 0.74rem;
}

.owner-approval-list article > b {
  max-width: 112px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(212, 173, 74, 0.14);
  color: #73530d;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-operations-list button:hover,
.owner-approval-list > button:hover {
  border-color: rgba(3, 43, 26, 0.32);
  background: rgba(121, 168, 61, 0.1);
  transform: translateY(-1px);
}

.owner-operations-list strong,
.owner-approval-list strong {
  color: #0c6a46;
  font-size: 0.8rem;
  white-space: nowrap;
}

.owner-timeline article,
.owner-system-status > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(3, 43, 26, 0.09);
}

.owner-timeline article:last-child,
.owner-system-status > div:last-child {
  border-bottom: 0;
}

.owner-timeline small,
.owner-system-status dt {
  color: #657067;
  font-size: 0.78rem;
}

.owner-timeline strong,
.owner-timeline small {
  display: block;
}

.owner-timeline small {
  margin-top: 2px;
}

#companyEditProfileButton,
#usersAccessCreateButton {
  display: none;
}

#companyTabs,
#usersAccessTabs,
#systemSettingsTabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

#companyTabs .tab-chip,
#usersAccessTabs .tab-chip,
#systemSettingsTabs .tab-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.owner-system-status {
  margin: 0;
}

.owner-system-status dt,
.owner-system-status dd {
  margin: 0;
}

.owner-system-status dd {
  color: #0c6a46;
  font-weight: 800;
  text-align: right;
}

.owner-staff-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.owner-staff-status-grid article {
  padding: 14px;
  border: 1px solid rgba(3, 43, 26, 0.11);
  border-radius: 12px;
  background: rgba(244, 235, 221, 0.35);
}

.owner-staff-status-grid small,
.owner-staff-status-grid strong {
  display: block;
}

.owner-staff-status-grid strong {
  margin-top: 4px;
  color: #032b1a;
  font-size: 1.55rem;
}

.owner-quick-actions {
  grid-column: 1 / -1;
}

.owner-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.owner-quick-action-grid button {
  min-height: 58px;
  border: 1px solid rgba(212, 173, 74, 0.78);
  border-radius: 11px;
  background: #fffdf6;
  color: #032b1a;
  font-weight: 800;
  cursor: pointer;
}

.owner-quick-action-grid button:hover {
  background: #032b1a;
  color: #fffdf6;
}

.owner-quick-action-grid span {
  margin-right: 8px;
  color: #b88316;
  font-size: 1.15rem;
}

/* Company executive views */
.company-overview-panel {
  display: grid;
  gap: 16px;
}

.company-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.company-profile-identity,
.company-profile-contact,
.company-overview-card,
.company-governance-document {
  border: 1px solid rgba(212, 173, 74, 0.36);
  border-radius: 15px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 20px rgba(0, 31, 20, 0.045);
}

.company-profile-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px;
}

.company-profile-mark {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 3px solid #d4ad4a;
  border-radius: 50%;
  background: linear-gradient(145deg, #0c6a46, #001f14);
  color: #e8c96d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 800;
}

.company-profile-identity h3 {
  margin: 0 0 10px;
  color: #032b1a;
  font-size: 1.65rem;
}

.company-profile-identity p {
  margin: 5px 0;
}

.company-profile-contact {
  padding: 22px;
}

.company-profile-contact h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.company-profile-contact dl,
.settings-definition-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.company-profile-contact dl > div,
.settings-definition-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.company-profile-contact dt,
.settings-definition-list dt {
  color: #657067;
}

.company-profile-contact dd,
.settings-definition-list dd {
  margin: 0;
  color: #032b1a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.company-overview-metrics,
.users-access-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.company-overview-metrics article,
.users-access-summary-grid article {
  padding: 16px 18px;
  border: 1px solid rgba(212, 173, 74, 0.45);
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.97);
}

.company-overview-metrics small,
.company-overview-metrics strong,
.company-overview-metrics span,
.users-access-summary-grid small,
.users-access-summary-grid strong {
  display: block;
}

.company-overview-metrics strong,
.users-access-summary-grid strong {
  margin: 3px 0;
  color: #032b1a;
  font-size: 1.7rem;
}

.company-overview-metrics span {
  color: #657067;
  font-size: 0.78rem;
}

.company-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.company-overview-card,
.company-governance-document {
  padding: 18px;
}

.company-overview-copy,
.company-record-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.company-overview-copy > *,
.company-record-list > * {
  margin: 0;
}

.company-record-list article {
  padding: 11px 12px;
  border: 1px solid rgba(3, 43, 26, 0.1);
  border-radius: 10px;
  background: rgba(244, 235, 221, 0.35);
}

.company-governance-document {
  min-height: 280px;
}

.company-governance-document h3 {
  margin-top: 0;
}

/* Users and portal access */
.users-access-header-card,
.backup-hero-card {
  padding: 18px;
}

.users-access-header-card .tabs,
.company-tabs,
.settings-tabs {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.users-access-summary-grid {
  margin-top: 16px;
}

.users-access-summary-grid article:nth-child(2) strong {
  color: #157a45;
}

.users-access-summary-grid article:nth-child(3) strong {
  color: #b88316;
}

.users-access-summary-grid article:nth-child(4) strong {
  color: #a52b22;
}

.secure-access-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.secure-access-flow article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(212, 173, 74, 0.4);
  border-radius: 12px;
}

.secure-access-flow article > strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d4ad4a;
  border-radius: 50%;
  color: #032b1a;
}

.secure-access-flow span,
.secure-access-flow b,
.secure-access-flow small {
  display: block;
}

.secure-access-flow small {
  margin-top: 4px;
  color: #657067;
}

#usersAccessStaffAccountsHost > .card {
  margin: 0;
}

#usersAccessStaffAccountsHost .table-wrap,
#usersRoleMatrix .table-wrap,
#usersLiaisonRestrictions .table-wrap {
  margin-top: 12px;
}

.users-account-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 0.7fr) minmax(160px, 0.6fr);
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(3, 43, 26, 0.1);
  border-radius: 12px;
  background: rgba(244, 235, 221, 0.32);
}

.users-account-toolbar label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #4d5b52;
  font-size: 0.78rem;
  font-weight: 700;
}

.users-account-toolbar input,
.users-account-toolbar select {
  min-height: 42px;
  margin: 0;
}

.overlay-card-medium {
  width: min(760px, calc(100vw - 32px));
}

#staffAccessManageModal .overlay-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100vh - 32px));
}

#staffAccessManageModal form {
  overflow: auto;
  padding: 2px;
}

#staffAccessManageResult {
  margin-top: 12px;
  white-space: pre-line;
}

/* Backup, restore, and system settings */
.backup-restore-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.backup-restore-controls label {
  display: block;
  margin-bottom: 6px;
  color: #445047;
  font-size: 0.82rem;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-card-grid article {
  padding: 16px;
  border: 1px solid rgba(3, 43, 26, 0.12);
  border-radius: 12px;
  background: rgba(244, 235, 221, 0.35);
}

.settings-card-grid strong,
.settings-card-grid span {
  display: block;
}

.settings-card-grid span {
  margin-top: 5px;
  color: #657067;
}

.settings-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

/* Sidebar footer additions */
.sidebar-user-card,
.sidebar-action,
.sidebar-environment {
  width: 100%;
  border: 0;
  color: rgba(255, 253, 246, 0.92);
}

.sidebar-user-card,
.sidebar-action {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-user-card:hover,
.sidebar-action:hover {
  background: rgba(255, 253, 246, 0.09);
}

.sidebar-user-avatar,
.sidebar-action-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(232, 201, 109, 0.55);
  border-radius: 50%;
  color: #e8c96d;
  font-weight: 800;
}

.sidebar-user-copy,
.sidebar-action-copy {
  min-width: 0;
}

.sidebar-user-copy strong,
.sidebar-user-copy small,
.sidebar-action-copy strong,
.sidebar-action-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy small,
.sidebar-action-copy small {
  margin-top: 2px;
  color: rgba(255, 253, 246, 0.58);
  font-size: 0.72rem;
}

.sidebar-environment {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid rgba(212, 173, 74, 0.58);
  border-radius: 999px;
  color: #e8c96d;
  text-align: center;
}

.sidebar-environment strong,
.sidebar-environment small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-environment small {
  color: rgba(255, 253, 246, 0.62);
  font-size: 0.7rem;
}

.app-shell.sidebar-collapsed .sidebar-user-copy,
.app-shell.sidebar-collapsed .sidebar-action-copy,
.app-shell.sidebar-collapsed .sidebar-environment small,
.app-shell.sidebar-collapsed .sidebar-environment strong,
.app-shell.sidebar-collapsed .sidebar-nav-label {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-user-card,
.app-shell.sidebar-collapsed .sidebar-action {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 0;
}

.app-shell.sidebar-collapsed .sidebar-environment {
  width: 38px;
  height: 38px;
  margin-inline: auto;
  padding: 0;
  border-radius: 50%;
}

@media (max-width: 1280px) {
  .owner-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-dashboard-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-dashboard-grid--three > :last-child { grid-column: 1 / -1; }
  .company-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .owner-dashboard-banner { align-items: flex-start; flex-direction: column; }
  .owner-environment-note { max-width: none; }
  .owner-dashboard-grid--wide,
  .company-profile-grid { grid-template-columns: 1fr; }
  .company-overview-metrics,
  .users-access-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .backup-restore-controls { grid-template-columns: 1fr 1fr; }
  .backup-restore-controls > div { grid-column: 1 / -1; }
  .settings-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-account-toolbar { grid-template-columns: 1fr 1fr; }
  .users-account-search { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .owner-kpi-grid,
  .owner-dashboard-grid--three,
  .owner-staff-status-grid,
  .company-overview-metrics,
  .company-overview-grid,
  .users-access-summary-grid,
  .secure-access-flow,
  .settings-card-grid,
  .settings-maintenance-grid {
    grid-template-columns: 1fr;
  }
  .owner-dashboard-grid--three > :last-child { grid-column: auto; }
  .owner-quick-action-grid { grid-template-columns: 1fr; }
  .company-profile-identity { grid-template-columns: 1fr; text-align: center; }
  .company-profile-mark { margin-inline: auto; }
  .company-profile-contact dl > div,
  .settings-definition-list > div { grid-template-columns: 1fr; gap: 2px; }
  .backup-restore-controls { grid-template-columns: 1fr; }
  .backup-restore-controls > div { grid-column: auto; }
  .users-account-toolbar { grid-template-columns: 1fr; }
  .users-account-search { grid-column: auto; }
}
.access-denied-action {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
  min-height: 44px;
  text-decoration: none;
}

/* Scheduling actions must remain readable, not clipped into ellipses. */
#onlineInquiryCancellationStatus .scheduling-followup-table {
  min-width: 620px;
  table-layout: fixed;
}
#onlineInquiryCancellationStatus .scheduling-followup-table :is(th, td) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  max-width: none;
  vertical-align: top;
}
#onlineInquiryCancellationStatus .scheduling-followup-table :is(th, td):nth-child(1) { width: 22%; }
#onlineInquiryCancellationStatus .scheduling-followup-table :is(th, td):nth-child(2) { width: 24%; }
#onlineInquiryCancellationStatus .scheduling-followup-table :is(th, td):nth-child(3) { width: 20%; }
#onlineInquiryCancellationStatus .scheduling-followup-table :is(th, td):nth-child(4) { width: 34%; }

/* Keep client records readable on small screens inside their own scroll area. */
@media (max-width: 1100px) {
  #clientModal .client-records-shell .table-wrap,
  #clientServiceBoard .table-wrap:has(> .mini-table),
  #customerRecordsOfficialPanel,
  #caseMasterlistHost .table-wrap {
    overflow-x: auto;
    scrollbar-gutter: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 12px;
  }

  #clientModal .client-records-shell table.mini-table,
  #clientServiceBoard table.mini-table,
  #customerRecordsOfficialPanel > table,
  #caseMasterlistHost .table-wrap > table {
    width: 100%;
    min-width: 1240px;
    table-layout: auto;
  }

  #clientModal .client-records-shell .table-wrap :is(th, td),
  #clientServiceBoard .mini-table :is(th, td),
  #customerRecordsOfficialPanel :is(th, td),
  #caseMasterlistHost .table-wrap :is(th, td) {
    min-width: 112px;
    max-width: none;
    padding: 10px 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    text-overflow: clip;
  }

  #clientModal .client-records-shell .table-wrap th,
  #clientServiceBoard .mini-table th,
  #customerRecordsOfficialPanel th,
  #caseMasterlistHost .table-wrap th {
    white-space: nowrap;
  }

  #clientServiceBoard .mini-table :is(th, td):first-child,
  #customerRecordsOfficialPanel :is(th, td):first-child,
  #caseMasterlistHost .table-wrap :is(th, td):first-child {
    min-width: 74px;
  }

  #clientServiceBoard .mini-table :is(th, td):nth-child(2),
  #clientServiceBoard .mini-table :is(th, td):nth-child(4),
  #customerRecordsOfficialPanel :is(th, td):nth-child(2),
  #customerRecordsOfficialPanel :is(th, td):nth-child(5),
  #caseMasterlistHost .table-wrap :is(th, td):nth-child(2),
  #caseMasterlistHost .table-wrap :is(th, td):nth-child(5) {
    min-width: 190px;
  }

  #clientServiceBoard .ci-editor,
  #customerRecordsOfficialPanel .ci-editor,
  #caseMasterlistHost .ci-editor {
    box-sizing: border-box;
    width: min(240px, calc(100vw - 114px));
    min-width: min(240px, calc(100vw - 114px));
    max-width: 240px;
    white-space: normal;
  }
}

/* Employee visual edition — 2026-09-12.
   Screen-only, opt-in layer: shared staff login, mobile liaison/coordinator,
   client portal and public website templates do not carry employee-visual.
   Never change display, visibility, order, pointer-events, or behavioral states.
   Original theme variables remain intact for canonical SOA and Documentation.
   Protected interiors are explicitly excluded from generic component rules. */
@media screen {
  body.employee-visual {
    --ev-forest: #123d32;
    --ev-forest-deep: #102f28;
    --ev-green: #21664f;
    --ev-ink: #20382f;
    --ev-muted: #63736b;
    --ev-line: #dce4de;
    --ev-soft: #f0f5f0;
    --ev-canvas: #f5f6f2;
    --ev-font: "Inter", "Segoe UI", Arial, sans-serif;
    background: var(--ev-canvas);
  }

  body.employee-visual::before {
    background-image: none;
    mask-image: none;
  }

  /* Existing desktop/collapsed/mobile navigation geometry is retained. */
  body.employee-visual .sidebar {
    border-right-color: #1e4b3c;
    background: linear-gradient(175deg, var(--ev-forest), var(--ev-forest-deep));
    box-shadow: none;
  }
  body.employee-visual .sidebar-brand {
    border-bottom-color: #ffffff1c;
  }
  body.employee-visual .sidebar-brand-mark {
    border-color: #ffffff2e;
    border-radius: 12px;
    box-shadow: none;
  }
  body.employee-visual .sidebar-brand h1 {
    font-family: var(--ev-font);
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.02em;
  }
  body.employee-visual .sidebar-brand .eyebrow {
    color: #d7cfae;
    letter-spacing: .09em;
  }
  body.employee-visual .sidebar-brand-subtitle {
    color: #c0d0c6;
  }
  body.employee-visual .sidebar-nav-label {
    color: #b5cbbd;
    letter-spacing: .09em;
  }
  body.employee-visual .sidebar-group-toggle:hover,
  body.employee-visual .sidebar-group-toggle:focus-visible {
    color: #fff;
    background: #ffffff0d;
  }
  body.employee-visual .nav-button {
    border-radius: 9px;
    color: #e0ebe4;
    font-weight: 550;
    font-size: .86rem;
  }
  body.employee-visual .nav-button:hover {
    background: #ffffff0d;
    border-color: #ffffff14;
  }
  body.employee-visual .nav-button.is-active {
    color: #fff;
    background: #2b5546;
    border-color: #47735d;
    box-shadow: inset 3px 0 0 #cbd4ac;
  }
  body.employee-visual .nav-button::before {
    color: #cddfcf;
  }
  @media (min-width: 1281px), (max-width: 980px) {
    body.employee-visual:not(.sidebar-collapsed) .nav-button > span:first-child {
      white-space: normal;
      overflow-wrap: normal;
      line-height: 1.35;
    }
  }
  body.employee-visual .sidebar-footer {
    border-top-color: #ffffff1c;
  }
  body.employee-visual .sidebar-environment-badge {
    border-color: #78917d66;
    background: #ffffff06;
  }
  body.employee-visual :is(.sidebar-account-avatar, .topbar-avatar) {
    border-color: #bfcdae;
    box-shadow: none;
    font-family: var(--ev-font);
  }
  body.employee-visual .topbar {
    background: #fffffff5;
    border-bottom-color: var(--ev-line);
    box-shadow: 0 1px 3px #20382f04;
  }
  body.employee-visual .topbar-breadcrumb strong {
    color: var(--ev-forest);
  }
  body.employee-visual .topbar-search input {
    background: #f7f9f6;
    border-color: var(--ev-line);
    box-shadow: none;
  }
  body.employee-visual .topbar-account-popover {
    border-color: var(--ev-line);
    background: #fff;
    box-shadow: 0 12px 35px #173e321c;
  }

  /* All employee hubs keep their established sections and navigation cards. */
  body.employee-visual .console-page-header h1,
  body.employee-visual .owner-dashboard-banner h2 {
    color: var(--ev-forest);
    font-family: var(--ev-font);
    font-size: clamp(1.55rem, 2.1vw, 2rem);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.25;
  }
  body.employee-visual .console-page-header :is(.section-kicker, #consolePageSummary) {
    color: var(--ev-muted);
  }
  body.employee-visual :is(.card, .hero-panel, .hub-tab-panel, .billing-surface, .portal-nav-cell, .owner-kpi-card, .company-governance-document, .backup-hero-card, .users-access-summary-grid article):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-color: var(--ev-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 5px #173e3203;
  }
  body.employee-visual .module-nav-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.employee-visual .portal-nav-cell {
    padding: 10px;
    border-radius: 12px;
  }
  body.employee-visual .module-nav-card .portal-nav-button:not(.portal-nav-button--subtle) {
    color: var(--ev-ink);
    line-height: 1.3;
    border-radius: 7px;
  }
  body.employee-visual .module-nav-card .portal-nav-button:not(.portal-nav-button--subtle):hover,
  body.employee-visual .module-nav-card .portal-nav-button:not(.portal-nav-button--subtle).is-active {
    color: var(--ev-forest);
    background: #eef4ee;
    border-color: #d7e4d8;
  }
  body.employee-visual .module-nav-card .portal-nav-button:not(.portal-nav-button--subtle).is-active {
    box-shadow: inset 3px 0 0 #42775b;
  }
  body.employee-visual :is(.card-head h3, .hero-panel h3, .billing-section-heading h3, .overlay-head h3, .company-profile-identity h3, .company-governance-document h3, .owan-drawer-identity h2):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    color: var(--ev-forest);
    font-family: var(--ev-font);
    font-size: 1.14rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.02em;
  }
  body.employee-visual :is(.section-kicker, .eyebrow, .subsection-title):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.sidebar *) {
    letter-spacing: .085em;
    font-weight: 650;
  }
  body.employee-visual :is(.panel-copy, .helper-copy, .topbar-text):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.sidebar *) {
    color: var(--ev-muted);
  }
  body.employee-visual .owner-dashboard-banner,
  body.employee-visual .company-profile-grid {
    border-color: var(--ev-line);
    background: #fff;
    box-shadow: none;
  }
  body.employee-visual .owner-kpi-card strong {
    font-family: var(--ev-font);
    letter-spacing: -.04em;
  }
  body.employee-visual .owner-kpi-icon {
    border-radius: 10px;
    box-shadow: none;
  }
  body.employee-visual :is(.owner-staff-status-grid article, .company-record-list article, .structured-client-details-section) {
    border-color: var(--ev-line);
    border-radius: 10px;
    background: #f9fbf8;
  }

  /* Existing action variants retain their semantic colors and disabled states. */
  body.employee-visual :is(.primary-button, .secondary-button, .ghost-button, .link-button, .inline-action-button):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.sidebar *) {
    border-radius: 8px;
    font-family: var(--ev-font);
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none;
  }
  body.employee-visual .primary-button:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.danger-button) {
    color: #fff;
    background: var(--ev-forest);
    border-color: var(--ev-forest);
  }
  body.employee-visual .primary-button:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.danger-button):hover:not(:disabled):not([aria-disabled="true"]) {
    background: #20553f;
    border-color: #20553f;
    box-shadow: 0 2px 4px #123d3214;
    transform: none;
  }
  body.employee-visual :is(.secondary-button, .ghost-button, .inline-action-button):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.sidebar *):not(.danger-button):not(.primary-button) {
    color: var(--ev-forest);
    border-color: #cddbd1;
    background: #fff;
  }
  body.employee-visual :is(.secondary-button, .ghost-button, .inline-action-button):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):not(.sidebar *):not(.danger-button):not(.primary-button):hover:not(:disabled):not([aria-disabled="true"]) {
    border-color: #aac2b1;
    background: #eef5ef;
    transform: none;
  }
  body.employee-visual :is(.tab-bar, .billing-toggle-group):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-color: var(--ev-line);
    background: #eef2ed;
    border-radius: 10px;
    box-shadow: none;
  }
  body.employee-visual .tab-chip:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    font-weight: 600;
    border-radius: 7px;
  }
  body.employee-visual .tab-chip.is-active:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    color: var(--ev-forest);
    background: #fff;
    border-color: #cddbd1;
    box-shadow: 0 1px 3px #173e320a;
  }
  body.employee-visual :is(.stack-form, .form-grid, .structured-client-details-form, .users-account-toolbar, .backup-restore-controls) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-color: #d2ddd5;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
  }
  body.employee-visual :is(.stack-form, .form-grid, .users-account-toolbar) :is(input, select, textarea):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)):focus-visible {
    border-color: #689c7c;
    outline: 2px solid #74a483;
    outline-offset: 2px;
    box-shadow: none;
  }

  /* SOA and canonical document tables are never selected by these rules.
     No numeric alignment, width, overflow, sticky position, or row state changes. */
  body.employee-visual .table-wrap:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-color: var(--ev-line);
    border-radius: 10px;
    box-shadow: none;
  }
  body.employee-visual .table-wrap th:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    color: #345547;
    background: #eef3ed;
    border-bottom-color: #d6e1d7;
    font-family: var(--ev-font);
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .025em;
  }
  body.employee-visual .table-wrap td:not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-bottom-color: #e5ebe5;
    font-size: .8rem;
    line-height: 1.45;
  }

  /* Window shells only: existing dimensions, focus, stack and scrolling retained. */
  body.employee-visual :is(.overlay-card, .overlay-card-wide, .overlay-card-activity, .billing-transaction-modal-card, .company-org-details-card):not(:where([data-soa-client-id], [data-soa-client-id] *, .soa-spreadsheet-modal, .soa-spreadsheet-modal *, .bos-document-history, .bos-document-history *, .billing-statement-output, .billing-statement-output *)) {
    border-color: #cfdcd2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 72px #102f2838;
  }
  body.employee-visual .overlay-head {
    background: #fffffff7;
    border-bottom-color: var(--ev-line);
  }
  body.employee-visual .overlay-backdrop {
    background: #153c3059;
    backdrop-filter: blur(3px);
  }
  body.employee-visual :is(.structured-client-legacy-details, #clientModalSummary) {
    border-color: var(--ev-line);
    border-radius: 10px;
    background: #f5f8f3;
  }
  body.employee-visual .ci-editor {
    border-color: #8fab95;
    border-radius: 9px;
    background: #f2f8ed;
    box-shadow: 0 0 0 3px #e4eee0;
  }
  body.employee-visual .ci-value:hover,
  body.employee-visual .ci-value:focus-visible {
    background: #edf5e8;
    border-color: #8fab95;
  }

  /* AI wrappers only; launcher position, drag behavior and generated content stay. */
  body.employee-visual :is(.owan-drawer, .owan-run-region, .owan-conversation-panel) {
    border-color: var(--ev-line);
    background-color: #fff;
    box-shadow: 0 16px 48px #173e321a;
  }
  body.employee-visual .owan-drawer-head {
    border-bottom-color: var(--ev-line);
    background: #fff;
  }
  body.employee-visual .owan-launcher {
    border-color: #78957d;
    background: linear-gradient(145deg, #205441, #123d32);
    box-shadow: 0 8px 24px #173e3226;
  }

  /* Decorative navigation pictograms. CSP permits local data: images.
     Original labels/accessible names and every navigation data hook are retained. */
  body.employee-visual .nav-button[data-nav-icon]::before {
    content: "";
    width: 21px;
    height: 21px;
    margin-inline: 2px;
    border: 0;
    border-radius: 0;
    background-color: currentColor;
    -webkit-mask: var(--ev-nav-icon) center / contain no-repeat;
    mask: var(--ev-nav-icon) center / contain no-repeat;
  }
  body.employee-visual .nav-button[data-nav-icon="dashboard"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221.5%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="clients"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M3%2021v-2a6%206%200%200%201%2012%200v2M16%205a3%203%200%200%201%200%206M18%2015a5%205%200%200%201%203%204v2%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="case"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2218%22%20height%3D%2214%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M8%207V4h8v3M3%2012h18M10%2012v3h4v-3%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="documents"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H6a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V9zM14%203v6h6M8%2013h8M8%2017h6%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="finance"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2215%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%2010h18M7%2015h3M15%2015h2%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="liaison"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2021s7-6.1%207-12A7%207%200%200%200%205%209c0%205.9%207%2012%207%2012z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%222.5%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="company"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021h18M5%2021V5l7-2%207%202v16M9%207h1M14%207h1M9%2011h1M14%2011h1M10%2021v-6h4v6%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="users"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M2%2021v-2a6%206%200%200%201%2012%200v2M17%2010l2-2%202%202v5l-2%202-2-2z%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="records"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%205H5v16h14V5h-3M9%203h6v4H9zM8%2011h8M8%2015h8%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="backup"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2016a5%205%200%200%201-1-10%207%207%200%200%201%2013-1%205.5%205.5%200%200%201%202%2011M8%2015l4-4%204%204M12%2011v10%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="settings"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206h16M4%2012h16M4%2018h16%22%2F%3E%3Ccircle%20cx%3D%228%22%20cy%3D%226%22%20r%3D%222%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2212%22%20r%3D%222%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2218%22%20r%3D%222%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="recycle"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M9%206V3h6v3M5%206l1%2015h12l1-15M10%2010v7M14%2010v7%22%2F%3E%3C%2Fsvg%3E"); }
  body.employee-visual .nav-button[data-nav-icon="owan"] { --ev-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.65%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%202.5%206.5L21%2012l-6.5%202.5L12%2021l-2.5-6.5L3%2012l6.5-2.5z%22%2F%3E%3C%2Fsvg%3E"); }
}

/* Operational Dashboard: presentation only, employee screen scope. */
@media screen {
 body.employee-visual .dashboard-freshness {margin:0;color:#52665e;font-size:12px;line-height:1.5;}
 body.employee-visual .dashboard-kpi {font:inherit;text-align:left;cursor:pointer;position:relative;min-width:0;}
 body.employee-visual .dashboard-kpi:hover:not(:disabled) {border-color:#789e8b;box-shadow:0 3px 12px #123e2810;}
 body.employee-visual .dashboard-kpi:disabled {opacity:1;cursor:default;}
 body.employee-visual .dashboard-kpi strong {font-size:clamp(19px,1.6vw,29px);overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
 body.employee-visual .dashboard-card-caption {color:#5c7167;font-size:11px;display:block;margin-top:5px;}
 body.employee-visual .dashboard-main-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
 body.employee-visual .dashboard-metric-list {display:grid;gap:0;}
 body.employee-visual .dashboard-metric-link {display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;width:100%;border:0;border-bottom:1px solid #e6ebe6;border-radius:0;padding:12px 0;background:transparent;color:#254438;font:inherit;font-size:13px;cursor:pointer;}
 body.employee-visual .dashboard-metric-link strong {white-space:nowrap;font-size:15px;font-variant-numeric:tabular-nums;}
 body.employee-visual .dashboard-metric-link:disabled {color:#728077;opacity:1;cursor:default;}
 body.employee-visual .dashboard-metric-link:hover:not(:disabled) {color:#087052;}
 body.employee-visual .dashboard-schedule-row {display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:12px;align-items:start;width:100%;border:0;border-bottom:1px solid #e6ebe6;padding:14px 0;background:transparent;text-align:left;color:#203e32;font:inherit;cursor:pointer;}
 body.employee-visual .dashboard-schedule-row time {color:#345c4a;font-size:13px;font-weight:650;}
 body.employee-visual .dashboard-schedule-row strong {display:block;font-size:14px;}
 body.employee-visual .dashboard-schedule-row small {display:block;color:#617267;font-size:12px;margin-top:4px;line-height:1.5;}
 body.employee-visual .dashboard-booking-status {color:#436957;background:#eef4ef;padding:3px 7px;border-radius:5px;font-size:11px;max-width:115px;overflow-wrap:anywhere;}
 body.employee-visual .dashboard-delivery-picker {display:grid;gap:9px;margin-top:16px;}
 body.employee-visual .dashboard-delivery-picker label {font-size:12px;color:#546b5d;}
 body.employee-visual .dashboard-delivery-picker select {min-width:0;width:100%;}
 body.employee-visual .dashboard-recent {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;}
 body.employee-visual .dashboard-recent article {display:flex;gap:14px;align-items:start;padding:9px 0;}
 body.employee-visual .dashboard-recent time {flex:0 0 104px;color:#62776a;font-size:12px;}
 body.employee-visual .dashboard-recent strong {display:block;font-size:13px;overflow-wrap:anywhere;}
 body.employee-visual .dashboard-recent small {display:block;color:#66786d;font-size:11px;margin-top:4px;}
 body.employee-visual .dashboard-system > summary {display:flex;justify-content:space-between;gap:15px;cursor:pointer;list-style:none;color:#153f2d;font-weight:650;}
 body.employee-visual .dashboard-system > summary::before {content:"+";margin-right:0;}
 body.employee-visual .dashboard-system[open] > summary::before {content:"−";}
 body.employee-visual .dashboard-system > summary span:first-of-type {margin-right:auto;}
 body.employee-visual #ownerDashboardSystemSummary {font-size:12px;font-weight:400;color:#64786b;}
 body.employee-visual .dashboard-system-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 30px;margin:22px 0;}
 body.employee-visual .dashboard-system-list dt {font-size:12px;color:#61766a;margin-bottom:4px;}
 body.employee-visual .dashboard-system-list dd {margin:0;font-size:13px;overflow-wrap:anywhere;}
 body.employee-visual .dashboard-dialog {width:min(1150px,calc(100vw - 40px));max-width:none;max-height:86vh;padding:26px;border:1px solid #cbd9cf;border-radius:14px;background:#fff;color:#1d382c;box-shadow:0 18px 75px #0a241e40;}
 body.employee-visual .dashboard-dialog::backdrop {background:#092a2266;}
 body.employee-visual .dashboard-dialog-head {display:flex;justify-content:space-between;align-items:start;gap:20px;}
 body.employee-visual .dashboard-dialog-head h2 {font:650 24px/1.2 Arial,sans-serif;margin:4px 0 12px;color:#123b2a;}
 body.employee-visual .dashboard-search {display:grid;gap:7px;font-size:12px;margin:12px 0 18px;max-width:480px;}
 body.employee-visual .dashboard-reference {display:block;color:#6b7a70;font-size:11px;margin-top:5px;}
 body.employee-visual .dashboard-dialog td {vertical-align:top;white-space:normal;overflow-wrap:anywhere;}
 body.employee-visual .dashboard-dialog .table-wrap {max-height:53vh;}
 body.employee-visual .dashboard-dialog table {min-width:700px;width:100%;}
 body.employee-visual .dashboard-warning {color:#895b12;font-size:12px;}
 body.employee-visual .dashboard-kpi:focus-visible,
 body.employee-visual .dashboard-metric-link:focus-visible,
 body.employee-visual .dashboard-schedule-row:focus-visible,
 body.employee-visual .dashboard-system summary:focus-visible {outline:2px solid #a47721;outline-offset:3px;}
 @media(max-width:1100px) {
  body.employee-visual .owner-dashboard .owner-kpi-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  body.employee-visual .dashboard-main-grid {grid-template-columns:minmax(0,1fr);}
 }
 @media(max-width:640px) {
  body.employee-visual .owner-dashboard .owner-kpi-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.employee-visual .dashboard-kpi strong {font-size:20px;}
  body.employee-visual .dashboard-recent, body.employee-visual .dashboard-system-list {grid-template-columns:minmax(0,1fr);}
  body.employee-visual .dashboard-schedule-row {grid-template-columns:68px minmax(0,1fr);}
  body.employee-visual .dashboard-booking-status {grid-column:2;justify-self:start;}
  body.employee-visual .dashboard-dialog {width:calc(100vw - 20px);padding:16px;max-height:90vh;}
  body.employee-visual .dashboard-system > summary {flex-wrap:wrap;}
  body.employee-visual #ownerDashboardSystemSummary {width:100%;}
 }
}


@media screen {
 body.employee-visual #ownerActionQueuePanel > .table-wrap {max-height:430px;overflow:auto;}
 body.employee-visual .dashboard-schedule-row {border-radius:0;}
 body.employee-visual .dashboard-kpi .owner-kpi-icon {align-self:flex-start;}
}


:root{--brand:#0f6d66;--sidebar:#0f6d66;--brand-deep:#0f6d66;--console-emerald:#0f6d66;--green:#0f6d66;--accent:#c9a56a;--console-gold:#c9a56a;--gold:#c9a56a;}
