:root {
  --page-bg: #f3f1ef;
  --panel-bg: #ffffff;
  --panel-soft: #faf9f7;
  --line: #d8d4cf;
  --line-soft: #e8e4df;
  --heading: #161616;
  --text: #2d3338;
  --muted: #65707a;
  --navy: #234f67;
  --navy-dark: #173748;
  --navy-soft: #2e627d;
  --gold: #c8a132;
  --green: #609564;
  --orange: #bf7b41;
  --gray-tile: #88939f;
  --blue: #31708c;
  --teal: #4a9ba0;
  --danger: #c35e73;
  --shadow: 0 10px 24px rgba(16, 29, 38, 0.08);
  --shadow-soft: 0 4px 14px rgba(16, 29, 38, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-soft); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--heading);
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.enterprise-shell {
  min-height: 100vh;
}

.enterprise-header {
  display: grid;
  grid-template-columns: 240px minmax(280px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: .35rem .9rem;
  background: #f7f7f7;
  border-bottom: 1px solid #cfcfcf;
}

.enterprise-brand-wrap {
  display: flex;
  align-items: center;
}

.enterprise-brand {
  display: inline-flex;
  align-items: center;
}

.enterprise-brand-logo {
  width: clamp(180px, 16vw, 260px);
  max-width: 100%;
  height: auto;
  display: block;
  background: transparent;
}

.enterprise-brand-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 .35rem;
  color: var(--navy-dark);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: lowercase;
}

.enterprise-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid #c4cdd3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.enterprise-menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 999px;
  display: block;
}

.enterprise-nav-wrap {
  display: block;
}

.enterprise-search {
  position: relative;
  display: flex;
  align-items: center;
}

.enterprise-search-icon {
  position: absolute;
  left: .85rem;
  color: #5d6670;
  font-size: 1rem;
}

.enterprise-search-input {
  width: 100%;
  height: 40px;
  padding: 0 1rem 0 2.3rem;
  border: 1px solid #bfc6cb;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.enterprise-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .9rem;
  flex-wrap: wrap;
}

.enterprise-header-link {
  color: var(--heading);
  font-size: .9rem;
  white-space: nowrap;
}

.enterprise-user-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--heading);
}

.enterprise-user-chip strong,
.enterprise-user-chip small {
  display: block;
}

.enterprise-user-chip small {
  color: var(--muted);
  font-size: .76rem;
}

.enterprise-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e7edf2;
  color: var(--navy-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.enterprise-logout {
  border: 1px solid #b7c2ca;
  background: #fff;
  color: var(--navy-dark);
  border-radius: 4px;
  padding: .55rem .8rem;
  font-weight: 600;
  cursor: pointer;
}

.enterprise-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 .5rem;
  background: var(--navy);
  border-bottom: 1px solid rgba(0, 0, 0, .15);
  overflow-x: auto;
}

.enterprise-nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 .9rem;
  color: rgba(255,255,255,.96);
  font-size: .88rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.enterprise-nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.enterprise-nav-link.active {
  background: rgba(255,255,255,.12);
  border-bottom-color: #f3d48d;
  font-weight: 700;
}

.enterprise-workspace {
  padding: 1rem;
}

.content-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .9rem;
}

.eyebrow {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6c7e8e;
  margin-bottom: .3rem;
}

.content-title {
  font-size: 1.75rem;
}

.content-top-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.status-chip,
.hero-badge,
.mini-pill,
.portal-chip,
.filter-summary,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: #eef3f6;
  color: #36586f;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid #d7e1e8;
}

.status-chip.soft,
.hero-badge.soft,
.portal-chip.soft {
  background: #f6f2e7;
  color: #7d6a2d;
  border-color: #e6dcc0;
}

.content-panel,
.card,
.table-shell,
.portal-card,
.filter-toggle-card,
.centered-login-card {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.content-panel {
  padding: 1rem;
}

.home-content-panel {
  padding: .95rem;
}

.page-header,
.section-title,
.portal-card-header,
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header {
  margin-bottom: 1rem;
}

.page-header p,
.section-subtitle,
.filter-subtitle {
  margin: .25rem 0 0;
  color: var(--muted);
}

.card,
.portal-card,
.filter-card,
.table-shell {
  padding: 1rem;
  margin-bottom: 1rem;
}

.actions,
.form-actions,
.filter-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .62rem 1rem;
  border: 1px solid #adbb86;
  border-radius: 4px;
  background: #d8e4ba;
  color: #20303c;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.btn:hover {
  filter: brightness(.98);
  color: #20303c;
}

.btn-teal {
  background: #d8e4ba;
  border-color: #adbb86;
}

.btn-secondary {
  background: #edf2f6;
  border-color: #c6d1d9;
  color: #24485f;
}

.btn-danger {
  background: #f5d9df;
  border-color: #d9adb8;
  color: #7e3144;
}

.btn-small {
  min-height: 32px;
  padding: .45rem .75rem;
}

.btn-block {
  width: 100%;
}

.table-shell {
  padding: 0;
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.table th,
.table td,
.indicator-table th,
.indicator-table td {
  padding: .78rem .75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.table thead th,
.indicator-table thead th {
  background: #f4f3f1;
  font-size: .86rem;
  color: #223949;
  font-weight: 700;
}

.table tbody tr:nth-child(even),
.indicator-table tbody tr:nth-child(even) {
  background: #fbfbfa;
}

.table tbody td,
.indicator-table tbody td {
  transition: background-color .15s ease, box-shadow .15s ease;
}

.table tbody tr:hover td,
.indicator-table tbody tr:hover td {
  background: #d6e8f4;
}

.table tbody tr:hover td:first-child,
.indicator-table tbody tr:hover td:first-child {
  box-shadow: inset 4px 0 0 var(--navy-soft);
}

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

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

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

label {
  display: block;
  margin-bottom: .25rem;
  font-weight: 700;
  color: #223949;
}

.input,
.form-control,
select.input,
select.form-control,
textarea.input,
textarea.form-control,
.enterprise-search-input {
  font: inherit;
}

.input,
.form-control,
select.input,
select.form-control,
textarea.input,
textarea.form-control {
  width: 100%;
  min-height: 40px;
  padding: .62rem .75rem;
  border: 1px solid #c8d0d6;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.input:focus,
.form-control:focus,
.enterprise-search-input:focus {
  outline: none;
  border-color: #7ba1b8;
  box-shadow: 0 0 0 3px rgba(49,112,140,.12);
}

textarea.input,
textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.filter-toggle-card {
  overflow: hidden;
  margin-bottom: 1rem;
}

.filter-toggle-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem 1rem;
  cursor: pointer;
  background: #f6f5f3;
}

.filter-toggle-summary::-webkit-details-marker {
  display: none;
}

.filter-toggle-summary::after {
  content: "⌄";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  color: #486278;
  transition: transform .2s ease;
}

.filter-toggle-card[open] .filter-toggle-summary::after {
  transform: rotate(180deg);
}

.filter-toggle-body {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.filter-card {
  background: #fff;
}

.filter-form {
  display: grid;
  gap: .9rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .85rem;
  align-items: end;
}

.filter-field {
  min-width: 0;
}

.details-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: .65rem 1rem;
}

.details-grid dt {
  font-weight: 700;
  color: #223949;
}

.details-grid dd {
  margin: 0;
}

.detail-metric {
  font-weight: 700;
  color: var(--heading);
}

.detail-subtext {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}

.inline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
}

.inline-list li {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}


.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  position: relative;
  padding: .9rem 0 .9rem 1.2rem;
  border-bottom: 1px solid var(--line-soft);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-soft);
}

.history-category-heading {
  font-size: 1.18rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin: 1.15rem 0 .75rem;
}

.alert {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.alert-success {
  background: #edf8ec;
  color: #2d6b40;
  border-color: #cfe7cf;
}

.alert-error {
  background: #fff0f3;
  color: #934055;
  border-color: #e9c5cf;
}

.alert-warning {
  background: #fff7e6;
  color: #8c6725;
  border-color: #ebdcab;
}

.text-danger {
  display: block;
  margin-top: .3rem;
  color: #b23f58;
  font-size: .88rem;
}

.text-success {
  color: #2d6b40;
}

.badge-success { background: #e8f4eb; color: #2b6940; border-color: #cfe4d5; }
.badge-danger { background: #ffeef1; color: #943d53; border-color: #ebc7d0; }
.badge-info { background: #ecf5fa; color: #2c6685; border-color: #d2e4ef; }

code {
  background: #eef4f7;
  padding: .14rem .42rem;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 1rem 0;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(180deg, #eef2f5 0%, #f7f4ef 100%);
}

.login-center-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-card {
  width: min(520px, 100%);
  padding: 2rem;
}

.centered-login-card {
  text-align: center;
}

.enterprise-login-card {
  border-top: 5px solid var(--navy);
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  background: transparent;
}

.login-brand-logo {
  width: min(420px, 100%);
  height: auto;
  display: block;
  background: transparent;
}

.login-brand-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 72px;
  padding: .85rem 1.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--navy-dark);
  box-shadow: none;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: lowercase;
}

.login-title {
  margin-bottom: .45rem;
}

.login-subtitle {
  max-width: 360px;
  margin: 0 auto 1.2rem;
}

.centered-login-card form {
  text-align: left;
}

.credentials-note {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: #f7f8fa;
  border: 1px solid #d8e1e8;
}

.centered-note {
  text-align: center;
}

.home-portal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  gap: 1rem;
}

.home-portal.no-right-sidebar {
  grid-template-columns: 260px minmax(0, 1fr);
}

.portal-column {
  min-width: 0;
}

.portal-card {
  padding: .95rem;
}

.portal-card-title {
  font-size: 1rem;
}

.portal-card-tiles {
  padding-bottom: 1.1rem;
}

.reminder-list,
.shortcut-list,
.legend-list {
  display: grid;
  gap: .65rem;
}

.reminder-item {
  border-left: 4px solid #7aa0b5;
  padding: .2rem 0 .2rem .6rem;
}

.reminder-link {
  display: block;
  background: #fcfdfd;
  border-radius: 6px;
  border: 1px solid #dde6ec;
  padding: .6rem .7rem .6rem .85rem;
  color: inherit;
}

.reminder-link:hover {
  background: #f4f8fb;
  color: inherit;
}

.reminder-item strong {
  display: block;
  font-size: 1.35rem;
  color: #183142;
}

.reminder-item span {
  color: var(--muted);
  font-size: .9rem;
}

.accent-blue { border-left-color: #2c6b86; }
.accent-gold { border-left-color: #d0931e; }
.accent-orange { border-left-color: #bf7b41; }
.accent-green { border-left-color: #6c9860; }
.accent-purple { border-left-color: #8467b3; }

.shortcut-item {
  display: block;
  padding: .6rem .7rem;
  background: #fafafb;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  color: #234f67;
  font-weight: 600;
}

.shortcut-item:hover {
  background: #f1f7fb;
}

.tiles-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .4rem;
}

.tile-link {
  min-height: 104px;
  border-radius: 4px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  text-align: center;
  padding: 1rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

.tile-link:hover {
  color: #fff;
  filter: brightness(.98);
}

.tile-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.tile-text {
  max-width: 160px;
  line-height: 1.25;
}

.tile-link.yellow { background: linear-gradient(135deg, #c3a11f, #d6b84c); }
.tile-link.green { background: linear-gradient(135deg, #5d9262, #76a77b); }
.tile-link.orange { background: linear-gradient(135deg, #b17243, #c98a5c); }
.tile-link.gray { background: linear-gradient(135deg, #818c98, #9ca6b1); }

.kpi-row,
.financial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .35rem;
}

.kpi-box,
.financial-box {
  padding: .8rem;
  border: 1px solid var(--line-soft);
  background: #fff;
  border-radius: 6px;
}

.kpi-box span,
.financial-box span {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  margin-bottom: .2rem;
}

.kpi-box strong,
.financial-box strong {
  display: block;
  font-size: 1.55rem;
  color: #162d3d;
}

.kpi-box small {
  color: #4b7d46;
}

.kpi-box-alert small {
  color: #a06426;
}

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .9rem;
}

.gauge-card {
  text-align: center;
}

.semi-gauge {
  --gauge-angle: 110deg;
  position: relative;
  width: 200px;
  height: 102px;
  margin: .9rem auto .5rem;
  overflow: hidden;
}

.semi-gauge::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #5d8d43 0deg, #5d8d43 var(--gauge-angle), #dce5d6 var(--gauge-angle), #dce5d6 180deg, transparent 180deg);
}

.semi-gauge::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: #fff;
}

.semi-gauge-value {
  position: relative;
  z-index: 1;
  font-size: 1.9rem;
  font-weight: 700;
  color: #152f40;
  margin-top: -.3rem;
}

.muted-note {
  font-size: .9rem;
  margin-bottom: 0;
}

.mini-bars {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  align-items: end;
  padding: 1rem .25rem .4rem;
  border-bottom: 2px solid #667380;
  margin-bottom: .8rem;
}

.mini-bar-stack {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: .55rem;
}

.mini-bar {
  width: 32px;
  min-height: 18px;
  border-radius: 4px 4px 0 0;
}

.bar-blue { background: #2e647d; }
.bar-teal { background: #6bb2b1; }
.bar-gold { background: #d89a23; }
.bar-green { background: #9cc577; }

.bar-label {
  display: block;
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}

.legend-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .8rem;
  font-size: .82rem;
  color: var(--muted);
}

.legend-list span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-blue { background: #2e647d; }
.legend-teal { background: #6bb2b1; }
.legend-gold { background: #d89a23; }
.legend-green { background: #9cc577; }

.responsive-table td.actions,
.responsive-table td.table-actions {
  white-space: normal;
}

.mobile-section-note {
  display: none;
  margin: 0 0 .85rem;
  font-size: .88rem;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .home-portal {
    grid-template-columns: 1fr;
  }

  .portal-column-left,
  .portal-column-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 980px) {
  .enterprise-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "search search"
      "actions actions";
    align-items: start;
  }

  .enterprise-brand-wrap { grid-area: brand; }
  .enterprise-menu-toggle { grid-area: toggle; display: inline-flex; }
  .enterprise-search { grid-area: search; }
  .enterprise-header-actions {
    grid-area: actions;
    justify-content: flex-start;
  }

  .enterprise-nav-wrap {
    display: none;
    border-bottom: 1px solid rgba(0, 0, 0, .15);
  }

  html.nav-open .enterprise-nav-wrap {
    display: block;
  }

  .enterprise-nav {
    flex-direction: column;
    align-items: stretch;
    padding: .35rem;
    gap: .2rem;
  }

  .enterprise-nav-link {
    width: 100%;
    min-height: 42px;
    border-radius: 6px;
    border-bottom: 0;
  }

  .content-topbar,
  .page-header,
  .portal-card-header,
  .section-title,
  .filter-header {
    flex-direction: column;
  }

  .tiles-row,
  .kpi-row,
  .financial-grid,
  .form-grid,
  .grid-2,
  .portal-column-left,
  .portal-column-right {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 720px) {
  .enterprise-workspace,
  .content-panel,
  .home-content-panel {
    padding: .75rem;
  }

  .enterprise-header {
    padding: .55rem .75rem;
    gap: .75rem;
  }

  .enterprise-brand-logo {
    width: 124px;
  }

  .enterprise-brand-text {
    min-height: 42px;
    font-size: 1.25rem;
  }

  .enterprise-header-actions {
    gap: .6rem;
  }

  .enterprise-header-link,
  .enterprise-search {
    display: none;
  }

  .enterprise-user-chip {
    flex: 1 1 100%;
  }

  .enterprise-logout {
    width: 100%;
  }

  .content-title {
    font-size: 1.35rem;
  }

  .page-header > h1,
  .page-header > div,
  .page-header > a,
  .page-header .actions,
  .actions,
  .form-actions,
  .filter-actions,
  .content-top-actions {
    width: 100%;
  }

  .actions,
  .form-actions,
  .filter-actions,
  .content-top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn,
  .form-actions .btn,
  .filter-actions .btn,
  .content-top-actions .btn,
  .page-header .btn {
    width: 100%;
  }

  .filter-toggle-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-summary {
    width: 100%;
    justify-content: space-between;
  }

  .tiles-row,
  .kpi-row,
  .financial-grid,
  .form-grid,
  .grid-2,
  .filter-grid,
  .portal-column-left,
  .portal-column-right,
  .legend-list {
    grid-template-columns: 1fr;
  }

  .home-portal.no-right-sidebar {
    grid-template-columns: 1fr;
  }

  .portal-card,
  .card,
  .filter-card {
    padding: .85rem;
  }

  .tile-link {
    min-height: 92px;
  }

  .tile-text {
    max-width: none;
  }

  .table {
    font-size: .95rem;
  }

  .responsive-table {
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: .9rem;
    padding: .85rem .9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(108px, 42%) 1fr;
    gap: .75rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--line-soft);
    white-space: normal;
    word-break: break-word;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #223949;
  }

  .responsive-table td[colspan] {
    display: block;
    text-align: center;
  }

  .responsive-table td[colspan]::before {
    content: none;
  }

  .responsive-table td.actions,
  .responsive-table td.table-actions {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-top: .7rem;
  }

  .responsive-table td.actions::before,
  .responsive-table td.table-actions::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .15rem;
  }

  .responsive-table td.actions a,
  .responsive-table td.table-actions a {
    display: inline-flex;
    width: fit-content;
  }

  .indicator-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .mini-bars {
    gap: .45rem;
  }

  .auth-shell {
    padding: 1rem;
  }

  .glass-card {
    padding: 1.25rem;
  }
}


.table-actions-cell {
  white-space: nowrap;
  width: 1%;
}

.edit-row td {
  background: #f8fbfd;
  padding: 0 !important;
}

.inline-edit-card {
  padding: 1rem;
  border-top: 1px solid var(--line-soft);
}

.compact-form-grid {
  gap: .85rem;
}

.inline-edit-actions {
  margin-top: .85rem;
}

@media (max-width: 900px) {
  .compact-form-grid {
    grid-template-columns: 1fr;
  }

  .table-actions-cell {
    white-space: normal;
  }
}

.js-collapsible-card {
  position: relative;
}

.card-collapsible-body {
  position: relative;
  overflow: hidden;
  transition: max-height .25s ease;
}

.js-collapsible-card.can-collapse:not(.is-expanded) .card-collapsible-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.97) 82%);
}

.card-collapsible-toggle {
  margin-top: .9rem;
}

@media (max-width: 900px) {
  .card-collapsible-toggle {
    width: 100%;
  }
}

.enterprise-account-link {
  font-weight: 700;
}

.login-center-shell-wide {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(320px, 420px);
  gap: 1.2rem;
  align-items: start;
}

.recovery-card {
  width: 100%;
}

.compact-title {
  font-size: 1.45rem;
}

.compact-subtitle,
.compact-note {
  margin-bottom: 1rem;
}

.page-subtitle {
  margin-top: .35rem;
  color: var(--muted);
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header p {
  margin: .35rem 0 0;
}

.form-grid-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .login-center-shell-wide,
  .account-grid {
    grid-template-columns: 1fr;
  }
}


.login-helper-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.login-helper-links.stacked-links {
  margin-top: 1.1rem;
}

.account-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(15, 118, 110, .08);
  border: 1px solid rgba(15, 118, 110, .18);
}

.account-link-button:hover {
  background: rgba(15, 118, 110, .14);
  color: var(--primary-dark);
}

.recovery-page-card {
  max-width: 460px;
}

.clickable-row {
  cursor: pointer;
}

.table-action-text {
  font-weight: 700;
  text-decoration: none;
}

.table-action-text:hover {
  text-decoration: underline;
}

.table-action-text--danger {
  color: #b23f58;
}

.clickable-row:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: -2px;
}

.table .clickable-row:hover td {
  background: #f6f9fb;
}

@media (max-width: 720px) {
  .responsive-table .clickable-row:hover td {
    background: transparent;
  }

  .responsive-table .clickable-row:hover {
    border-color: #b9c8d2;
    box-shadow: 0 8px 20px rgba(16, 29, 38, 0.09);
  }
}


.icon-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #365469;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.icon-action-link:hover {
  background: #f6f9fb;
  border-color: #b9c8d2;
  box-shadow: 0 4px 12px rgba(16, 29, 38, 0.08);
  transform: translateY(-1px);
}

.icon-action-link:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: 2px;
}

.icon-action-link--danger {
  color: #b23f58;
}

.icon-action-link--history {
  color: #486278;
}

.icon-action-symbol {
  font-size: 1rem;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inventory-category-block {
  margin-top: 1rem;
}

.inventory-category-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0 0 .55rem;
}

.inventory-category-heading {
  font-size: 1.08rem;
  font-weight: 800;
}

.inventory-category-pill {
  display: inline-flex;
  align-items: center;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: #eef3f6;
  border: 1px solid #d7e2e9;
  color: #24485f;
  font-weight: 800;
}

select optgroup {
  font-weight: 800;
  color: #173748;
}


.stack-gap-md {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll-wrap > .table,
.table-scroll-wrap > .indicator-table {
  min-width: 100%;
}

@media (max-width: 720px) {
  body {
    -webkit-tap-highlight-color: rgba(35, 79, 103, 0.12);
  }

  .enterprise-nav-link,
  .btn,
  .table-action-text,
  .enterprise-logout,
  .filter-toggle-summary {
    min-height: 44px;
  }

  .btn,
  .enterprise-logout,
  .table-action-text {
    justify-content: center;
  }

  .input,
  .form-control,
  select.input,
  select.form-control,
  textarea.input,
  textarea.form-control {
    min-height: 46px;
    font-size: 16px;
  }

  textarea.input,
  textarea.form-control {
    min-height: 120px;
  }

  .page-header,
  .section-header,
  .content-topbar {
    gap: .75rem;
  }

  .content-top-actions .status-chip {
    display: none;
  }

  .card,
  .portal-card,
  .filter-card,
  .content-panel {
    border-radius: 14px;
  }

  .card h3,
  .portal-card-title,
  .section-header h2,
  .page-header h1 {
    line-height: 1.25;
  }

  .details-grid dt,
  .details-grid dd {
    padding: .15rem 0;
  }

  .details-grid dd {
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .details-grid dd:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .inline-list {
    gap: .55rem;
  }

  .table-scroll-wrap {
    overflow: visible;
  }

  .responsive-table td {
    align-items: start;
    grid-template-columns: minmax(112px, 40%) 1fr;
  }

  .responsive-table td.actions,
  .responsive-table td.table-actions {
    align-items: stretch;
  }

  .responsive-table td.actions a,
  .responsive-table td.actions button,
  .responsive-table td.table-actions a,
  .responsive-table td.table-actions button {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: .65rem .8rem;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
  }

  .responsive-table td.actions a.table-action-text--danger,
  .responsive-table td.actions button.table-action-text--danger,
  .responsive-table td.table-actions a.table-action-text--danger,
  .responsive-table td.table-actions button.table-action-text--danger {
    background: #fff4f6;
    border-color: #ebc7d0;
  }

  .responsive-table .clickable-row {
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
  }

  .responsive-table .clickable-row:active {
    transform: scale(.995);
  }

  .filter-toggle-summary {
    padding: .85rem .9rem;
  }

  .mobile-section-note {
    display: block;
  }
}

/* UX stabilization: grouped navigation, breadcrumbs, search, help and empty states */
.enterprise-search {
  gap: .45rem;
}

.enterprise-search-button {
  min-height: 40px;
  padding: 0 .85rem;
  border: 1px solid #b7c2ca;
  border-radius: 4px;
  background: #edf2f6;
  color: #24485f;
  font-weight: 700;
  cursor: pointer;
}

.enterprise-nav {
  align-items: stretch;
  gap: .25rem;
}

.enterprise-nav-group {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border-right: 1px solid rgba(255,255,255,.18);
}

.enterprise-nav-group:last-child {
  border-right: 0;
}

.enterprise-nav-group-label {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 .6rem;
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .84rem;
}

.breadcrumb a {
  color: #36586f;
  font-weight: 700;
}

.search-page-form {
  display: grid;
  gap: .5rem;
}

.search-page-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: .65rem;
}

.search-results-list {
  display: grid;
  gap: .75rem;
}

.search-result-card {
  display: grid;
  gap: .35rem;
  padding: .85rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}

.search-result-card:hover {
  border-color: #b9c8d2;
  background: #f6f9fb;
  color: inherit;
}

.search-result-card strong {
  color: var(--heading);
  font-size: 1.04rem;
}

.search-result-card small {
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 1.25rem;
  border: 1px dashed #c9d2d9;
  border-radius: 12px;
  background: #fbfcfd;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: .35rem;
}

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

.help-card p {
  margin-top: .45rem;
}

.form-helper,
.live-preview {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.4;
}

.live-preview {
  margin-top: .45rem;
  padding: .7rem .8rem;
  border-radius: 8px;
  background: #f4f8fb;
  border: 1px solid #d7e4ec;
}

@media (max-width: 980px) {
  .enterprise-nav-group {
    display: grid;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
    padding-bottom: .35rem;
  }

  .enterprise-nav-group-label {
    height: auto;
    min-height: 28px;
    padding: .35rem .55rem .15rem;
  }
}

@media (max-width: 720px) {
  .enterprise-search-button {
    width: 100%;
  }

  .search-page-row,
  .help-grid {
    grid-template-columns: 1fr;
  }
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1rem;
  padding: .45rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f8fafb;
}

.section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe3ea;
  font-weight: 700;
  color: #36586f;
}

.section-tabs a:hover {
  background: #eef5f9;
}

@media (max-width: 720px) {
  .section-tabs {
    border-radius: 12px;
  }

  .section-tabs a {
    width: 100%;
    justify-content: center;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: .5rem;
  z-index: 1000;
  padding: .65rem .9rem;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 8px;
  font-weight: 800;
}

.skip-link:focus {
  left: .5rem;
}

/* Dropdown main navigation */
.enterprise-nav {
  overflow: visible;
}

.enterprise-nav-menu {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  color: #fff;
}

.enterprise-nav-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 38px;
  padding: 0 .95rem;
  color: rgba(255,255,255,.96);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  user-select: none;
}

.enterprise-nav-menu > summary::-webkit-details-marker {
  display: none;
}

.enterprise-nav-menu > summary::after {
  content: "▾";
  font-size: .72rem;
  transition: transform .16s ease;
  opacity: .9;
}

.enterprise-nav-menu[open] > summary::after {
  transform: rotate(180deg);
}

.enterprise-nav-menu > summary:hover,
.enterprise-nav-menu[open] > summary,
.enterprise-nav-top-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.enterprise-nav-menu.has-active > summary,
.enterprise-nav-top-link.active {
  background: rgba(255,255,255,.12);
  border-bottom-color: #f3d48d;
  color: #fff;
}

.enterprise-nav-top-link {
  border-bottom: 3px solid transparent;
}

.enterprise-nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 230px;
  display: grid;
  gap: .15rem;
  padding: .45rem;
  background: #fff;
  border: 1px solid #d5dde3;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow);
}

.enterprise-nav-submenu .enterprise-nav-link {
  width: 100%;
  height: auto;
  min-height: 40px;
  justify-content: flex-start;
  padding: .65rem .75rem;
  color: var(--heading);
  border-bottom: 0;
  border-radius: 8px;
  white-space: normal;
}

.enterprise-nav-submenu .enterprise-nav-link:hover {
  background: #edf2f6;
  color: var(--navy-dark);
}

.enterprise-nav-submenu .enterprise-nav-link.active {
  background: #e5eef4;
  color: var(--navy-dark);
  border-bottom: 0;
  font-weight: 800;
}

@media (max-width: 980px) {
  .enterprise-nav {
    overflow: visible;
  }

  .enterprise-nav-menu,
  .enterprise-nav-top-link {
    width: 100%;
  }

  .enterprise-nav-menu {
    display: grid;
  }

  .enterprise-nav-menu > summary,
  .enterprise-nav-top-link {
    width: 100%;
    min-height: 42px;
    height: auto;
    border-radius: 6px;
    border-bottom: 0;
    padding: .75rem .9rem;
  }

  .enterprise-nav-menu.has-active > summary,
  .enterprise-nav-top-link.active {
    border-bottom: 0;
  }

  .enterprise-nav-submenu {
    position: static;
    min-width: 0;
    margin: 0 .25rem .35rem;
    padding: .25rem;
    background: rgba(255,255,255,.08);
    border: 0;
    border-radius: 8px;
    box-shadow: none;
  }

  .enterprise-nav-submenu .enterprise-nav-link {
    color: rgba(255,255,255,.96);
    background: transparent;
    padding-left: 1.25rem;
  }

  .enterprise-nav-submenu .enterprise-nav-link:hover,
  .enterprise-nav-submenu .enterprise-nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
  }
}
