:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  --ink: #192b24;
  --muted: #53665c;
  --line: #dce3da;
  --control-line: #879a8c;
  --background: #f2f4ee;
  --surface: #fff;
  --surface-soft: #f5f7f2;
  --surface-accent: #e8f1e5;
  --sidebar: #142822;
  --sidebar-muted: #b1c5b9;
  --primary: #245942;
  --primary-hover: #193f30;
  --focus: #2e7556;
  --accent: #c8eb9d;
  --separator-dark: #3a5147;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 0;
  background: var(--background);
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.5;
}

h1, h2, p { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.topbar :focus-visible, .access-brand :focus-visible { outline-color: var(--accent); }
#pageTitle:focus, #mainContent:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 25;
  top: .85rem;
  left: .85rem;
  padding: .7rem 1rem;
  border-radius: 8px;
  background: white;
  transform: translateY(-170%);
}
.skip-link:focus { transform: translateY(0); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  color: #fff;
  font-size: 1.24rem;
  font-weight: 720;
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
}

.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  top: .55rem;
  width: .62rem;
  height: 1.12rem;
}
.brand-mark::before { left: .52rem; background: #183829; clip-path: polygon(0 24%, 100% 0, 100% 76%, 0 100%); }
.brand-mark::after { right: .52rem; background: #4f7954; clip-path: polygon(0 0, 100% 24%, 100% 100%, 0 76%); }

.environment {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--sidebar-muted);
  font-size: .76rem;
}
.environment > span { width: .42rem; height: .42rem; flex: none; border-radius: 50%; background: #f0ba64; }

.access {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
  background: var(--background);
}

.access-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: clamp(1.65rem, 4vh, 3.7rem);
  overflow: hidden;
  padding: clamp(2rem, 5.1vw, 5rem);
  color: #fff;
  background: radial-gradient(ellipse at 80% 80%, #305a46, transparent 70%), var(--sidebar);
}

.access-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 31% -32% -22% -10%;
  transform: rotate(-24deg) skew(26deg);
  background: repeating-linear-gradient(90deg, #a5caab70 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, #a5caab70 0 1px, transparent 1px 42px);
  opacity: .52;
  mask-image: radial-gradient(ellipse, black, transparent 72%);
}

.access-intro { max-width: 31rem; }
.access-intro p {
  font-size: clamp(2.65rem, 5.1vw, 5.25rem);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: .98;
}
.access-intro span {
  display: block;
  max-width: 23rem;
  margin-top: 1.25rem;
  color: #c3d9cb;
  font-size: 1.05rem;
}

.access-brand .environment { margin-top: auto; }
.access-illustration { position: relative; width: min(100%, 33rem); max-height: 33vh; aspect-ratio: 1.75; margin: auto; }
.access-platform {
  position: absolute;
  inset: 30% 3% 0;
  background: linear-gradient(150deg, #5c8564, #3a624a 55%, #2c4f3d);
  clip-path: polygon(50% 0, 100% 50%, 100% 56%, 50% 100%, 0 56%, 0 50%);
}
.access-platform::after {
  content: "";
  position: absolute;
  inset: 0 0 7%;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: repeating-linear-gradient(151deg, transparent 0 1.3rem, #9dc29825 1.3rem calc(1.3rem + 1px)), #446e53;
}
.access-crate { position: absolute; width: 35%; height: 65%; }
.access-crate-left { left: 14%; bottom: 16%; z-index: 2; }
.access-crate-right { right: 12%; bottom: 22%; z-index: 1; }
.access-crate-back { left: 32%; bottom: 39%; width: 37%; --crate-top: #e0f2bb; --crate-left: #a9c77e; --crate-right: #749859; }
.access-crate::before, .access-crate::after, .access-crate span, .access-crate span::before {
  position: absolute;
  content: "";
  inset: 0;
}
.access-crate::before { clip-path: polygon(50% 0, 100% 26%, 50% 52%, 0 26%); background: var(--crate-top, #9bc2a0); }
.access-crate::after { clip-path: polygon(0 26%, 50% 52%, 50% 100%, 0 74%); background: var(--crate-left, #6b9976); }
.access-crate span { z-index: 1; clip-path: polygon(50% 52%, 100% 26%, 100% 74%, 50% 100%); background: var(--crate-right, #426f53); }
.access-crate span::before {
  inset: 54% 10% auto 65%;
  height: 13%;
  transform: skewY(-25deg);
  background: repeating-linear-gradient(90deg, #263e2f 0 1px, transparent 1px 3px), #d6e4c7;
  box-shadow: 0 0 0 3px #d6e4c7;
}

.access-form { display: grid; place-items: center; padding: 2.25rem clamp(1rem, 4.5vw, 4rem); }
.access-inner {
  width: min(100%, 29rem);
  padding: clamp(1.3rem, 4vw, 2.65rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 40px #1428220c;
}
.access-inner h1 { font-size: clamp(1.95rem, 4vw, 2.55rem); letter-spacing: -.055em; line-height: 1.15; }
.access-inner > p { margin-top: .65rem; }
.access-inner > p:not(.feedback) { color: var(--muted); }
.access-inner form { display: grid; gap: 1rem; margin-top: 1.75rem; }
.access-inner input { min-height: 2.85rem; }
.access-inner button { min-height: 2.85rem; margin-top: .45rem; }

.app { min-height: 100vh; }
.masthead { position: relative; z-index: 5; }
.module-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem .85rem;
  padding: .35rem clamp(1rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.navigation { display: flex; align-items: center; flex-wrap: wrap; gap: .14rem clamp(.17rem, 1.1vw, .9rem); }
.nav-group { position: relative; }
.nav-link {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  gap: .48rem;
  padding: .38rem .67rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.nav-link:hover { background: var(--surface-soft); }
.nav-link[aria-current="page"], .nav-group:has([aria-current="page"]) > summary {
  border-color: #d5e4cc;
  background: var(--surface-accent);
  color: var(--primary-hover);
}
.nav-link .icon { color: var(--primary); }
.nav-group > summary { cursor: pointer; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: "";
  width: .32rem;
  height: .32rem;
  margin: -.18rem .1rem 0 .12rem;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
}
.nav-group[open] > summary::after { margin-top: .14rem; transform: rotate(225deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + .48rem);
  left: 0;
  display: grid;
  min-width: 14rem;
  gap: .13rem;
  padding: .39rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px #14282220;
}
.nav-external { margin-left: auto; color: var(--muted); }
.account {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-inline-start: .83rem;
  border-inline-start: 1px solid var(--separator-dark);
}
.avatar {
  display: grid;
  width: 2.12rem;
  height: 2.12rem;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: #304e41;
  color: #ebf5ec;
  font-size: .8rem;
  font-weight: 650;
}
.account-info { display: grid; min-width: 0; justify-items: start; }
.account-info strong { max-width: 100%; overflow-wrap: anywhere; font-size: .8rem; }
.logout {
  padding: .08rem 0;
  border: 0;
  background: transparent;
  color: var(--sidebar-muted);
  font-size: .78rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.logout:hover { color: white; }
.logout:disabled { opacity: .65; }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  min-height: 4.28rem;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.5rem;
  flex-wrap: wrap;
  padding: .7rem clamp(1.1rem, 3vw, 2.6rem);
  background: var(--sidebar);
  color: #eff5eb;
}
.topbar-brand, .topbar-controls, .company-field { display: flex; min-width: 0; align-items: center; gap: .73rem; }
.topbar-brand .environment { padding-inline-start: .85rem; border-inline-start: 1px solid var(--separator-dark); }
.topbar-controls { max-width: 100%; justify-content: flex-end; flex-wrap: wrap; }
.company-field > span { color: var(--sidebar-muted); font-size: .79rem; font-weight: 620; }
.company-field select {
  width: clamp(9.5rem, 18vw, 15rem);
  min-height: 2.35rem;
  border-color: #6d8979;
  background: #223d31;
  color: #f3f7ee;
  color-scheme: dark;
  text-overflow: ellipsis;
}
.role-badge {
  padding: .24rem .6rem;
  border-radius: 5px;
  background: #304e41;
  color: #d8edde;
  font-size: .72rem;
  font-weight: 650;
  white-space: nowrap;
}

.content {
  width: min(100%, 96rem);
  margin-inline: auto;
  padding: 1.85rem clamp(1.1rem, 3vw, 2.6rem) 3rem;
}
.page-intro {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.45rem;
}
.page-intro h1 {
  font-size: clamp(2rem, 3.2vw, 2.95rem);
  font-weight: 740;
  letter-spacing: -.055em;
  line-height: 1.05;
}
.page-intro p { margin-top: .42rem; color: var(--muted); }
.page-actions:has(> [hidden]) { display: none; }

.button {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .47rem .85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 640;
  line-height: 1.25;
  text-decoration: none;
}
.primary { background: var(--primary); color: #fff; }
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.primary:disabled { background: var(--surface-accent); color: var(--muted); }
.secondary { border-color: var(--control-line); background: #fff; color: var(--ink); }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--surface-accent); }
.secondary:disabled { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.refresh-button { min-height: 2.35rem; }
.icon-button { width: 2.55rem; flex: none; padding: .4rem; background: transparent; color: inherit; }

.field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: .37rem;
  font-size: .83rem;
  font-weight: 640;
}
.field small { color: var(--muted); font-size: .76rem; font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: .45rem .65rem;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 400;
}
textarea { resize: vertical; }
select { padding-right: .45rem; }
input::placeholder { color: var(--muted); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b83949; }
select:disabled, input:disabled { background: var(--surface-soft); }
.field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }

.panel, .metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 3px #14282209;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem 1rem;
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.panel h2 { font-size: 1.15rem; font-weight: 730; letter-spacing: -.027em; line-height: 1.24; }
.panel-head p, .empty-state p { margin-top: .28rem; color: var(--muted); font-size: .83rem; }
.text-link, .row-link {
  color: var(--primary);
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}
.text-link { display: inline-flex; flex: none; align-items: center; gap: .32rem; padding-block: .12rem; }
.text-link:hover, .row-link:hover { text-decoration: underline; }
.row-link { min-height: 2rem; padding: .15rem .4rem; border: 1px solid var(--control-line); border-radius: 6px; background: white; white-space: nowrap; }
.row-link:hover { background: var(--surface-accent); }

.overview-heading { margin-bottom: .7rem; font-size: 1.17rem; font-weight: 735; letter-spacing: -.025em; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.05rem; }
.metric {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: .22rem;
  padding: .8rem .95rem .83rem;
  color: inherit;
  text-decoration: none;
}
.metric:hover { border-color: var(--primary); background: #fcfdfb; }
.metric-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 6px; margin-bottom: .25rem; }
.metric-icon.blue { background: #e7efe4; color: #305d45; }
.metric-icon.violet { background: #eeeee5; color: #575f3a; }
.metric-icon.teal { background: #e2efea; color: #286655; }
.metric-icon.amber { background: #f8efdd; color: #77531f; }
.metric-arrow { position: absolute; top: .87rem; right: .9rem; color: var(--muted); font-size: 1.04rem; line-height: 1; }
.metric:hover .metric-arrow { color: var(--primary-hover); }
.metric-label { color: var(--muted); font-size: .81rem; font-weight: 680; }
.metric strong {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.04;
  font-weight: 750;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.metric-meta { color: var(--muted); font-size: .76rem; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.05rem; margin-bottom: 1.05rem; }
.business-overview { margin-bottom: 1.45rem; }
.business-overview .panel-head { flex-wrap: wrap; align-items: center; border-bottom: 0; }
.business-period { display: flex; align-items: end; flex-wrap: wrap; gap: .45rem; }
.business-period input, .business-period .button { min-height: 2.25rem; }
.business-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin: 0;
  padding: 0 1.15rem 1.15rem;
}
.business-metrics:empty { display: none; }
.business-metric {
  min-width: 0;
  padding: .52rem .75rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}
.business-metric dt { color: var(--muted); font-size: .79rem; font-weight: 650; }
.business-metric dd { margin: .13rem 0 0; font-size: 1.12rem; font-weight: 730; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.business-margin { grid-column: span 2; border-color: #d4e2cf; background: var(--surface-accent); }
.business-margin dd { color: var(--primary-hover); }
.business-highlight {
  position: relative;
  isolation: isolate;
  display: flex;
  grid-row: span 3;
  flex-direction: column;
  justify-content: center;
  min-height: 10rem;
  overflow: hidden;
  padding: 1rem clamp(.85rem, 2vw, 1.65rem);
  border-color: #1d4638;
  background: radial-gradient(ellipse at right bottom, #35664d, transparent 73%), #1c4235;
}
.business-highlight::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30% -1% -38% 34%;
  transform: rotate(-24deg) skew(26deg);
  background: repeating-linear-gradient(90deg, #c0e2ad60 0 1px, transparent 1px 25px),
    repeating-linear-gradient(0deg, #c0e2ad60 0 1px, transparent 1px 25px);
  opacity: .72;
  mask-image: radial-gradient(ellipse at 79% 70%, black, transparent 70%);
}
.business-highlight dt { color: #e0edda; font-size: .9rem; }
.business-highlight dd {
  margin-top: .42rem;
  color: #f3f7eb;
  font-size: clamp(1.6rem, 3.2vw, 3.3rem);
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.06;
}
.business-feedback, .business-loading { margin: .85rem 1rem; }
.business-loading { color: var(--muted); font-size: .85rem; }
.overview-body { padding: .2rem 1.15rem .55rem; }
.overview-line { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.overview-list { list-style: none; padding: 0; margin: 0; }
.overview-list li { padding: .7rem 0; }
.overview-list li + li { border-top: 1px solid var(--line); }
.overview-line strong { overflow-wrap: anywhere; font-size: .85rem; font-weight: 650; }
.overview-line small { display: block; margin-top: .11rem; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.overview-value { flex: none; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { height: .43rem; margin-top: .42rem; overflow: hidden; border-radius: 1rem; background: #e7eee5; }
.meter span { display: block; height: 100%; border-radius: 1rem; background: #4e8068; }

.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .7rem .85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.filters .field { flex: 0 1 12.5rem; }
.filters .search-field { flex: 1 1 13rem; max-width: 24rem; }
.scope-filter {
  flex-basis: 100%;
  overflow-wrap: anywhere;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 650;
}

.table-scroll { overflow: auto; }
.table-scroll:focus-visible { outline-offset: -3px; }
.grid-table {
  width: 100%;
  min-width: 33rem;
  border-collapse: collapse;
  font-size: .82rem;
}
.grid-table.wide { min-width: 47rem; }
.grid-table th, .grid-table td { padding: .68rem .8rem; text-align: left; }
.grid-table th:first-child, .grid-table td:first-child { padding-left: 1.15rem; }
.grid-table th:last-child, .grid-table td:last-child { padding-right: 1.15rem; }
.grid-table th {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .77rem;
  font-weight: 690;
  white-space: nowrap;
}
.grid-table tbody tr + tr td { border-top: 1px solid #e8ede6; }
.grid-table tbody tr:nth-child(even) { background: #fcfdfa; }
.grid-table tbody tr:hover { background: #f1f6ed; }
.grid-table td { overflow-wrap: anywhere; }
.grid-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid-table .actions { text-align: right; white-space: nowrap; }
.cell-object { display: grid; gap: .08rem; min-width: 7rem; }
.cell-object strong { font-weight: 655; }
.cell-object small { color: var(--muted); font-size: .76rem; }
.cell-code { color: #354e41; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .8rem; }
.cell-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .32rem; }
.status {
  display: inline-block;
  padding: .14rem .48rem;
  border-radius: 999px;
  color: #44574c;
  background: #ecf0ec;
  font-size: .74rem;
  font-weight: 650;
  white-space: nowrap;
}
.status.green { background: #e8f6ef; color: #1a6449; }
.status.amber { background: #fff3df; color: #835110; }
.record-details summary { min-height: 1.8rem; color: var(--primary); cursor: pointer; font-weight: 640; }
.record-details dl { display: grid; grid-template-columns: minmax(5rem, auto) 1fr; gap: .1rem .65rem; margin: .3rem 0 0; }
.record-details dt { color: var(--muted); font-weight: 650; }
.record-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.pager {
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  padding: .55rem 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}
.pager-controls { display: flex; gap: .4rem; }
.pager .button { min-height: 2.15rem; }
.empty-state { padding: 1.25rem 1.15rem; }
.empty-state h2 { font-size: 1rem; }
.empty-state p:only-child { margin: 0; }
.overview-body .empty-state { padding: .75rem 0 .55rem; }

.loading-panel { display: flex; align-items: center; gap: .58rem; padding: 1rem 1.15rem; color: var(--muted); }
.loading-indicator { width: .75rem; height: .75rem; border: 2px solid #a5bca9; border-top-color: var(--primary); border-radius: 50%; }
.feedback {
  padding: .68rem .82rem;
  border: 1px solid #edb7be;
  border-radius: 8px;
  background: #fff4f5;
  color: #862d3c;
  font-size: .84rem;
  font-weight: 520;
  overflow-wrap: anywhere;
}
.feedback.positive { border-color: #a2d2b9; background: #ecf9f1; color: #1d5942; }
#loadError { margin-bottom: .85rem; }
.notification {
  position: fixed;
  z-index: 10;
  right: 1.15rem;
  bottom: 1rem;
  display: flex;
  width: max-content;
  max-width: min(28rem, calc(100% - 2.3rem));
  align-items: center;
  gap: .5rem;
  padding: .45rem .45rem .45rem .8rem;
  border: 1px solid #a2d2b9;
  border-radius: 10px;
  background: #ecf9f1;
  color: #1d5942;
  box-shadow: 0 6px 18px #14282226;
  font-size: .86rem;
  font-weight: 630;
}
.notification[data-kind="error"] { border-color: #edb7be; background: #fff4f5; color: #862d3c; }
.notification p { overflow-wrap: anywhere; }
.notification .icon-button { width: 2rem; min-height: 2rem; }
.notification .icon-button:hover { background: #14282213; }

.editor {
  width: min(33rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  box-shadow: 0 18px 64px #0c201860;
}
.editor::backdrop { background: #0c201880; }
.editor-head, .editor-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; padding: 1.05rem 1.2rem; }
.editor-head { border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: 1.35rem; font-weight: 690; letter-spacing: -.037em; }
.editor-head p { margin-top: .25rem; color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; }
.editor-head .editor-company { margin: 0 0 .15rem; color: var(--primary); font-size: .77rem; font-weight: 650; }
.form-fields { display: grid; gap: .85rem; padding: 1.05rem 1.2rem; }
.stock-context { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-accent); color: var(--primary-hover); font-size: .82rem; }
.editor-foot { justify-content: flex-end; border-top: 1px solid var(--line); }

.icon { position: relative; display: inline-block; width: 1.12rem; height: 1.12rem; flex: none; vertical-align: middle; }
.icon::before, .icon::after { position: absolute; box-sizing: border-box; }
.icon-grid {
  background: linear-gradient(currentColor, currentColor) 12% 12% / 34% 34% no-repeat,
    linear-gradient(currentColor, currentColor) 88% 12% / 34% 34% no-repeat,
    linear-gradient(currentColor, currentColor) 12% 88% / 34% 34% no-repeat,
    linear-gradient(currentColor, currentColor) 88% 88% / 34% 34% no-repeat;
}
.icon-box::before { content: ""; inset: 12% 6% 9%; border: 1.5px solid; border-radius: 3px; }
.icon-box::after { content: ""; top: 39%; right: 10%; left: 10%; border-top: 1.5px solid; }
.icon-pin::before { content: ""; inset: 6% 14% 18%; transform: rotate(-45deg); border: 1.5px solid; border-radius: 50% 50% 50% 0; }
.icon-pin::after { content: ""; inset: 31% 40% 48%; border-radius: 50%; background: currentColor; }
.icon-layers::before, .icon-layers::after { content: ""; left: 20%; width: 59%; height: 59%; transform: rotate(45deg) skew(-10deg, -10deg); border: 1.5px solid; border-radius: 2px; }
.icon-layers::before { top: 6%; }
.icon-layers::after { top: 27%; border-top: none; border-left: none; }
.icon-bookmark::before { content: ""; inset: 6% 21% 9%; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%); border-radius: 2px; background: currentColor; }
.icon-ledger::before { content: ""; inset: 6% 12%; border: 1.5px solid; border-left-width: 3px; border-radius: 2px; }
.icon-ledger::after { content: ""; top: 37%; left: 43%; width: 28%; border-top: 1.5px solid; }
.icon-list::before { content: ""; top: 22%; left: 9%; width: 82%; height: 1.5px; border-radius: 1px; background: currentColor; box-shadow: 0 .31rem currentColor, 0 .62rem currentColor; }
.icon-code::before, .icon-code::after { content: ""; top: 32%; width: 39%; height: 39%; transform: rotate(45deg); border: 1.5px solid; }
.icon-code::before { left: 10%; border-top: none; border-right: none; }
.icon-code::after { right: 10%; border-bottom: none; border-left: none; }
.icon-inbound::before, .icon-outbound::before {
  content: "";
  inset: 20% 28%;
  width: 44%;
  height: 44%;
  transform: rotate(45deg);
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
}
.icon-outbound::before { inset-block-start: 22%; transform: rotate(225deg); }
.icon-inbound::after, .icon-outbound::after { content: ""; inset: 75% 12% auto; border-top: 1.5px solid; }
.icon-plus::before, .icon-plus::after, .icon-close::before, .icon-close::after {
  content: "";
  top: calc(50% - .75px);
  left: 14%;
  width: 72%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}
.icon-plus::after { transform: rotate(90deg); }
.icon-close::before { transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.icon-refresh::before { content: ""; inset: 13%; border: 1.5px solid; border-right-color: transparent; border-radius: 50%; }
.icon-refresh::after { content: ""; top: 9%; right: 13%; border: 4px solid transparent; border-right-color: currentColor; transform: rotate(-30deg); }

@media (max-width: 1120px) {
  .metrics { gap: .7rem; }
  .metric { padding-inline: .8rem; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid .panel-head { flex-wrap: wrap; }
}

@media (max-width: 650px) {
  .access { display: flex; flex-direction: column; }
  .access-brand { gap: .8rem; padding: 1.15rem; }
  .access-intro, .access-illustration { display: none; }
  .access-form { flex: 1; align-items: start; padding: 1.55rem 1rem; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: .72rem; padding: .65rem 1rem; }
  .topbar-controls { justify-content: flex-start; gap: .5rem; }
  .company-field { flex: 1 1 8rem; gap: .38rem; }
  .company-field select { width: 100%; min-width: 5.55rem; }
  .account { padding-inline-start: .5rem; }
  .account .avatar, .navigation > .nav-link .icon, .navigation summary .icon { display: none; }
  .module-bar { flex-wrap: wrap; padding-inline: .75rem; }
  .navigation { flex: 1 1 auto; }
  .nav-group { position: static; }
  .nav-dropdown { inset: calc(100% - .1rem) .75rem auto; }
  .nav-link { gap: .28rem; padding-inline: .47rem; font-size: .83rem; }
  .nav-dropdown .nav-link { gap: .55rem; }
  .refresh-button { margin-inline-start: auto; padding-inline: .48rem; }
  .content { padding: 1.12rem 1rem 2.3rem; }
  .page-intro { align-items: flex-start; margin-bottom: 1rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: .85rem; }
  .business-highlight { grid-column: span 2; grid-row: auto; min-height: 6.4rem; }
  .business-highlight dd { font-size: clamp(1.85rem, 6vw, 2.5rem); }
  .business-overview .panel-head, .overview-grid .panel-head { padding-inline: .85rem; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { padding: .8rem; }
  .filters .field { flex: 1 1 8rem; }
  .filters .search-field { max-width: none; flex-basis: 100%; }
  .editor-head, .editor-foot, .form-fields { padding-inline: .85rem; }
}

@media (max-width: 420px) {
  .company-field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .loading-indicator { animation: turn .8s linear infinite; }
  @keyframes turn { to { transform: rotate(360deg); } }
}

