@font-face {
  font-family: Workbench;
  src: local("Avenir Next"), local("Avenir");
}
* {
  box-sizing: border-box;
}
:root {
  --paper: #f1f5f9;
  --surface: #ffffff;
  --ink: #172b46;
  --muted: #52657b;
  --rule: #dce4ee;
  --accent: #205cda;
  --green: #087b61;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button[hidden],
[hidden] {
  display: none !important;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 222px;
  flex-shrink: 0;
  border-right: 1px solid var(--rule);
  padding: 34px 20px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.brand-mark {
  font-family: inherit;
  font-size: 45px;
  font-style: italic;
  letter-spacing: -5px;
  padding-right: 5px;
  color: var(--accent);
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-top: 8px;
  font-weight: 500;
}
.nav-caption,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
}
.nav-caption {
  margin: 50px 12px 14px;
  color: var(--muted);
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav > a {
  display: flex;
  justify-content: space-between;
  padding: 11px 12px;
  font-size: 13px;
  color: #bdcce0;
  border-radius: 3px;
}
nav > a:hover {
  background: #213e60;
}
nav > a[aria-current] {
  background: var(--ink);
  color: var(--surface);
}
.nav-arrow {
  opacity: 0;
}
nav > a:hover .nav-arrow,
nav > a[aria-current] .nav-arrow {
  opacity: 1;
}
.sidebar-foot {
  margin-top: auto;
  padding: 28px 12px 0;
  color: var(--muted);
  font-size: 10px;
}
.connection-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  display: inline-block;
  border-radius: 50%;
  margin-right: 4px;
}
.logout {
  margin-top: 14px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
}
.workspace {
  width: calc(100% - 222px);
  min-width: 0;
}
.topbar {
  height: 77px;
  padding: 0 44px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 12px;
  color: #b5b7af;
}
.scope-form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.scope-form label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
select,
input,
textarea {
  color: var(--ink);
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 3px;
  min-height: 39px;
  padding: 8px 11px;
  width: 100%;
  font-size: 12px;
}
select {
  padding-right: 28px;
}
.scope-form select {
  width: 154px;
  background: transparent;
}
main {
  padding: 41px 44px 70px;
  max-width: 1800px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.eyebrow {
  color: var(--accent);
  margin: 0 0 9px;
}
h1 {
  font-family: inherit;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -1.4px;
  margin: 0 0 13px;
}
.heading-dot {
  color: var(--accent);
}
h2 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.button {
  min-height: 39px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 10px 16px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.button:hover {
  border-color: var(--ink);
}
.button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.button.primary:hover {
  background: #174bb4;
}
.button.small {
  padding: 7px 12px;
  min-height: 34px;
}
.button.danger {
  color: #9c352c;
  border-color: #dabfb7;
}
.text-link {
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.period-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 27px;
}
.period-form label {
  font-size: 10px;
  color: var(--muted);
}
.period-form input {
  margin-top: 5px;
  min-height: 34px;
}
.period-form .text-link {
  margin-bottom: 8px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 35px;
}
.metric {
  padding: 23px 22px 23px 0;
}
.metric + .metric {
  border-left: 1px solid var(--rule);
  padding-left: 23px;
}
.metric-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.metric-value {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 400;
  display: block;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.metric-note {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.metric-value.profit {
  color: var(--green);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.section-title h2 {
  font-size: 16px;
}
.section-title > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
.ledger-list {
  border-top: 1px solid var(--rule);
}
.ledger-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  gap: 16px;
}
.ledger-line small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.ledger-line strong {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.quick-links > a {
  display: flex;
  gap: 15px;
  padding: 24px 20px 24px 0;
  align-items: start;
}
.quick-links > a + a {
  border-left: 1px solid var(--rule);
  padding-left: 20px;
}
.quick-links > a > span {
  font-family: inherit;
  color: var(--accent);
  font-size: 13px;
}
.quick-links p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
}
.quick-links b {
  margin-left: auto;
  font-weight: 400;
}
.table-toolbar {
  display: flex;
  gap: 13px;
  align-items: end;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  flex-wrap: wrap;
}
.search-field {
  flex: 1;
  min-width: 180px;
}
.search-field > span,
.compact-filter {
  font-size: 10px;
  color: var(--muted);
}
.search-field input,
.compact-filter input,
.compact-filter select {
  margin-top: 6px;
}
.compact-filter {
  max-width: 140px;
}
.result-count {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 11px auto;
}
.table-scroll {
  overflow: auto;
  width: 100%;
  border-top: 1px solid var(--rule);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 13px 13px;
  border-bottom: 1px solid var(--rule);
  background: #edf2f8;
}
td {
  padding: 15px 13px;
  border-bottom: 1px solid var(--rule);
  height: 65px;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
th:first-child {
  padding-left: 13px;
}
tbody tr:hover {
  background: #eaf1fa;
}
.cell-main {
  font-weight: 500;
  font-size: 12px;
  white-space: normal;
  min-width: 180px;
  max-width: 340px;
}
.cell-sub {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.badge {
  font-size: 9px;
  border: 1px solid #d8dbd3;
  display: inline-block;
  padding: 3px 7px;
  border-radius: 3px;
  color: #60665d;
}
.badge.active {
  color: #41644d;
  border-color: #cad6c9;
  background: #edf1e8;
}
.row-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}
.row-button {
  background: none;
  border: 0;
  padding: 6px 0;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--ink);
}
.row-button.accent {
  color: var(--accent);
}
.table-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 9px;
  color: var(--muted);
  padding: 14px 0;
}
.empty-state {
  padding: 70px 20px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.empty-symbol {
  font-family: inherit;
  font-size: 40px;
  color: #b7baae;
}
.empty-state h2 {
  margin-top: 8px;
}
.empty-state p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 23px;
}
.page-footer {
  border-top: 1px solid var(--rule);
  margin: 0 44px;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.3px;
}
.notice {
  padding: 14px 17px;
  font-size: 12px;
  background: #eaf1fa;
  border: 1px solid var(--rule);
  margin-bottom: 20px;
}
.notice.error {
  background: #f7eae4;
  color: #913f30;
  border-color: #dfbfb4;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 14px 24px;
  border-radius: 4px;
  z-index: 10;
  font-size: 12px;
  box-shadow: 0 4px 20px #0002;
}
dialog {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  width: min(740px, calc(100% - 30px));
  max-height: 90vh;
  padding: 0;
  border-radius: 5px;
  box-shadow: 0 20px 100px #0002;
}
dialog::backdrop {
  background: #252b2966;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 27px 30px;
  border-bottom: 1px solid var(--rule);
}
.dialog-heading h2 {
  font-family: inherit;
  font-size: 28px;
  font-weight: 400;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 26px;
  color: var(--muted);
  line-height: 1;
  padding: 3px 5px;
}
#record-form {
  padding: 25px 30px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid label,
.auth-form label {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-grid label.full,
.form-section {
  grid-column: 1/-1;
}
.form-grid small,
.auth-form small {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
}
.form-section {
  padding-top: 15px;
  border-top: 1px solid var(--rule);
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
textarea {
  min-height: 75px;
  resize: vertical;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.action-spacer {
  flex: 1;
}
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  border-top: 1px solid var(--ink);
}
.export-item {
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
}
.export-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.shop-panel {
  border-top: 1px solid var(--ink);
  padding-top: 25px;
  margin-bottom: 30px;
}
.shop-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 10px;
  left: 10px;
  padding: 10px;
  background: white;
  z-index: 50;
}
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-shell {
  width: min(100%, 1050px);
  min-height: 610px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.auth-intro {
  padding: 45px;
  background: #eaf1fa;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--rule);
}
.auth-intro h1 {
  font-size: 45px;
  line-height: 1.2;
  margin: 18px 0;
}
.auth-intro p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.auth-intro small {
  font-size: 10px;
  color: var(--muted);
}
.auth-panel {
  padding: 70px 55px;
}
.auth-panel h2 {
  font-family: inherit;
  font-weight: 400;
  font-size: 30px;
  margin-bottom: 15px;
}
.auth-form {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-form .button {
  justify-content: space-between;
  margin-top: 6px;
}
.auth-note {
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  margin-top: 26px;
  line-height: 1.7;
}
@media (min-width: 1500px) {
  main {
    padding-top: 50px;
  }
  .sidebar {
    width: 245px;
  }
  .workspace {
    width: calc(100% - 245px);
  }
  .metric-value {
    font-size: 36px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace {
    width: calc(100% - 190px);
  }
  main {
    padding: 32px 26px 50px;
  }
  .topbar {
    padding: 0 26px;
  }
  .page-footer {
    margin: 0 26px;
  }
  .metric-value {
    font-size: 24px;
  }
  .metric {
    padding-right: 12px;
  }
  .metric + .metric {
    padding-left: 12px;
  }
  .quick-links {
    grid-template-columns: 1fr;
  }
  .quick-links > a + a {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .compact-filter {
    max-width: 120px;
  }
  .page-heading h1 {
    font-size: 38px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 17px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .brand {
    font-size: 20px;
  }
  .brand-mark {
    font-size: 35px;
  }
  .brand-sub {
    font-size: 8px;
    margin-top: 5px;
  }
  .nav-caption,
  .sidebar-foot {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 20px;
    padding-bottom: 12px;
    gap: 4px;
  }
  nav > a {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 11px;
  }
  nav > a .nav-arrow {
    display: none;
  }
  .workspace {
    width: 100%;
  }
  .topbar {
    height: 65px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 6px;
  }
  .scope-form {
    gap: 6px;
  }
  .scope-form label {
    display: none;
  }
  .scope-form select {
    width: 131px;
    font-size: 11px;
    min-height: 34px;
  }
  main {
    padding: 28px 20px 45px;
  }
  .page-heading {
    align-items: start;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 38px;
  }
  .page-heading > .button {
    min-height: 35px;
    padding: 8px 13px;
  }
  .page-heading .muted {
    font-size: 11px;
    max-width: 320px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 20px 12px 20px 0;
  }
  .metric + .metric {
    padding-left: 16px;
  }
  .metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
  }
  .metric:nth-child(4) {
    border-top: 1px solid var(--rule);
  }
  .metric-value {
    font-size: 27px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-note {
    font-size: 9px;
  }
  .page-footer {
    margin: 0 20px;
    font-size: 8px;
  }
  .table-toolbar {
    gap: 10px;
  }
  .search-field {
    min-width: 100%;
    flex: 1;
  }
  .compact-filter {
    flex: 1;
    max-width: none;
    min-width: 90px;
  }
  .result-count {
    width: 100%;
    margin: 2px 0 0;
  }
  .table-bottom {
    font-size: 8px;
  }
  .form-grid {
    gap: 15px;
    grid-template-columns: 1fr;
  }
  .form-grid label.full,
  .form-section {
    grid-column: auto;
  }
  .dialog-heading {
    padding: 22px;
  }
  .dialog-heading h2 {
    font-size: 25px;
  }
  #record-form {
    padding: 22px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .auth-body {
    padding: 20px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    max-width: 440px;
  }
  .auth-intro {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .auth-intro > div,
  .auth-intro > small {
    display: none;
  }
  .auth-panel {
    padding: 32px 26px;
  }
  .auth-panel h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  nav > a {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#shop-result {
  white-space: pre-wrap;
  font-size: 12px;
}
.selection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.selection-bar > span {
  font-size: 11px;
  margin-right: auto;
}
.row-check {
  width: 15px;
  min-height: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-transform: inherit;
  font: inherit;
  letter-spacing: inherit;
}
.period-label {
  display: block;
  color: var(--accent);
  font-size: 10px;
  margin-top: 5px;
}
.dashboard-sales {
  margin: 25px 0 35px;
}
:root {
  --muted: #52657b;
}
.table-scroll {
  position: relative;
  max-width: 100%;
  contain: inline-size;
}
main {
  min-width: 0;
}
.form-grid .full {
  grid-column: 1/-1;
}
@media (max-width: 760px) {
  .button,
  .page-heading > .button,
  .scope-form select {
    min-height: 44px;
  }
  .row-button {
    min-height: 44px;
    padding: 12px 2px;
  }
  .sort-button {
    min-height: 35px;
  }
  .form-grid .full {
    grid-column: auto;
  }
  nav > a {
    min-height: 44px;
  }
}
.group-row {
  background: #eaf1fa;
}
.group-row td {
  height: auto;
  padding: 10px 12px !important;
}
@media (max-width: 760px) {
  #records-table,
  #records-table tbody {
    display: block;
    white-space: normal;
    width: 100%;
    min-width: 0;
  }
  #records-table thead {
    display: none;
  }
  #records-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
    gap: 10px 18px;
  }
  #records-table td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
    text-align: left;
    min-width: 0;
  }
  #records-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-bottom: 3px;
  }
  #records-table td:has(.cell-main) {
    grid-column: 1/-1;
  }
  #records-table td:has(.row-actions) {
    grid-column: 1/-1;
    border-top: 1px solid var(--rule);
    padding-top: 5px;
  }
  .row-actions {
    justify-content: flex-start;
    gap: 22px;
    flex-wrap: wrap;
  }
  .cell-main {
    min-width: 0;
    max-width: none;
    display: block;
  }
  .cell-sub {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .group-row {
    display: block !important;
    padding: 12px !important;
  }
  .group-row td {
    padding: 0 !important;
  }
  .table-scroll {
    overflow-x: hidden;
  }
  #records-table tr[hidden] {
    display: none !important;
  }
  .dashboard-sales table {
    font-size: 10px;
  }
  .dashboard-sales th,
  .dashboard-sales td {
    padding: 10px 6px;
  }
  .sidebar nav {
    position: relative;
    max-width: 100%;
  }
}
@media (max-width: 760px) {
  .sidebar-foot {
    display: block;
    position: absolute;
    top: 19px;
    right: 20px;
    padding: 0;
    margin: 0;
    font-size: 0;
  }
  .sidebar-foot > .connection-dot {
    display: none;
  }
  .sidebar-foot form {
    margin: 0;
  }
  .logout {
    margin: 0;
    font-size: 11px;
    min-height: 44px;
    padding: 5px;
  }
  .sidebar {
    position: relative;
  }
  .auth-intro .brand {
    max-width: 200px;
  }
}

/* Finance workspace: shared component treatment for desktop and mobile. */
:root { --nav: #112840; --accent-soft: #eaf1ff; }
body { font-size: 14px; }
.sidebar { background: var(--nav); color: #fff; border: 0; padding-top: 24px; }
.brand { font-size: 22px; letter-spacing: -.4px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; background: #2d6bea; color: white; border-radius: 8px; font-size: 22px; font-style: normal; font-weight: 750; letter-spacing: -1px; padding: 0; }
.brand-sub { color: #aac0da; letter-spacing: 1.2px; font-size: 9px; margin-top: 5px; }
.nav-caption { color: #8da7c4; margin: 35px 12px 12px; letter-spacing: 1px; }
nav > a { align-items: center; justify-content: flex-start; gap: 11px; font-size: 13px; border-radius: 6px; }
nav > a[aria-current] { background: #2463dc; color: #fff; font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.sidebar-foot { color: #aac0da; border-top: 1px solid #2b4059; padding-top: 18px; }
.connection-dot { background: #41d3ae; width: 6px; height: 6px; }
.logout { color: #d3e0ef; }
.topbar { height: 64px; background: white; padding: 0 30px; }
.breadcrumb { font-size: 12px; }
.scope-form select { background: #f1f5fb; border-color: #c9d6e8; font-weight: 600; }
main { padding: 28px 30px 48px; }
.page-heading { margin-bottom: 22px; gap: 16px; }
h1, .page-heading h1 { font-size: 29px; font-weight: 700; letter-spacing: -.8px; margin-bottom: 8px; line-height: 1.2; }
.heading-dot { display: none; }
.eyebrow { font-size: 10px; letter-spacing: .8px; margin-bottom: 7px; }
h2, h3 { font-weight: 650; }
.muted { font-size: 12px; }
.button { font-size: 12px; border-radius: 6px; gap: 14px; font-weight: 600; }
.button.primary { background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #174bb4; border-color: #174bb4; }
input, select, textarea { border-radius: 5px; font-size: 13px; border-color: #cbd6e3; }
.period-form { background: #e6edf6; border: 1px solid #d7e1ee; border-radius: 7px; padding: 12px 16px; margin-bottom: 18px; }
.period-form label { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.period-form input { margin: 0; width: auto; }
.period-form .text-link { margin-bottom: 9px; color: var(--accent); }
.metrics { gap: 14px; border: 0; margin-bottom: 22px; }
.metric, .metric + .metric { padding: 18px; background: white; border: 1px solid var(--rule); border-top: 3px solid #90a6c2; border-radius: 7px; }
.metric:first-child { border-top-color: #2463dc; background: #eaf1ff; }
.metric:has(.profit) { border-top-color: #087b61; }
.metric-label { font-size: 12px; font-weight: 600; color: #415773; }
.metric-value { font-size: clamp(22px, 2.1vw, 32px); font-weight: 700; letter-spacing: -.8px; margin-top: 9px; }
.metric-note { font-size: 10px; line-height: 1.5; }
.metric-value.loss { color: #b33242; }
.dashboard-grid { gap: 18px; margin-bottom: 22px; }
.dashboard-grid > section, .dashboard-sales, .quick-section, .shop-panel, #table-section, .export-grid { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 20px; min-width: 0; }
.dashboard-sales { margin: 20px 0; }
.dashboard-sales .dashboard-grid > section { padding: 16px; background: #f8fafc; }
.section-title { margin-bottom: 16px; }
.section-title h2 { font-size: 15px; }
.section-title > span { letter-spacing: .5px; }
.ledger-line { padding: 12px 0; }
.ledger-line:last-child { border-bottom: 0; }
.ledger-line strong { font-size: 14px; font-weight: 650; }
.ledger-line small { font-size: 11px; }
.quick-links { border-bottom: 0; }
.quick-links > a { padding-top: 18px; padding-bottom: 4px; }
.quick-links > a > span { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 6px; background: var(--accent-soft); font-weight: 650; }
.quick-links h3 { font-size: 13px; }
.quick-links p { font-size: 11px; }
.table-toolbar { border-top: 0; padding-top: 0; }
.search-field > span, .compact-filter { font-size: 11px; font-weight: 550; }
table { font-size: 12px; }
th { font-size: 10px; font-weight: 650; padding: 11px 12px; }
td { height: 57px; padding: 12px; }
td:first-child { padding-left: 12px; }
.cell-main { font-size: 13px; font-weight: 600; }
.cell-sub { font-size: 10px; }
.row-button { color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; }
.row-button:hover { text-decoration: underline; }
.badge { border-color: #cdd8e7; color: #425c7c; background: #f0f4f9; border-radius: 4px; font-size: 10px; }
.badge.active { color: #06694f; border-color: #b9dfd0; background: #e7f5ef; }
.selection-bar { background: var(--accent-soft); border: 1px solid #c4d6fa; border-radius: 6px; padding: 12px; }
.page-footer { margin: 0 30px; font-size: 10px; }
dialog { background: white; border-radius: 10px; box-shadow: 0 24px 80px #081b4055; }
dialog::backdrop { background: #0c203875; }
.dialog-heading { background: #edf3fc; padding: 22px 26px; }
.dialog-heading h2 { font-size: 23px; font-weight: 650; }
.form-grid label, .auth-form label { font-size: 12px; }
.notice { border-radius: 6px; }
.auth-body { background: #eaf0f7; }
.auth-shell { padding: 0; border-radius: 12px; overflow: hidden; max-width: 960px; min-height: 580px; box-shadow: 0 20px 60px #132b4610; }
.auth-intro { background: var(--nav); color: white; padding: 40px; border: 0; }
.auth-intro h1 { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.auth-intro .eyebrow { color: #7faaff; }
.auth-intro p:not(.eyebrow), .auth-intro small { color: #b9cbe0; font-size: 13px; }
.auth-sectors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 25px; }
.auth-sectors span { border: 1px solid #3a5472; border-radius: 5px; padding: 7px 11px; font-size: 12px; }
.auth-panel { padding: 54px 40px; }
.auth-panel h2 { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.auth-form input { min-height: 44px; }
@media (min-width: 1500px) { main { padding-top: 30px; } }
@media (max-width: 1100px) { .metrics { grid-template-columns: 1fr 1fr; } .metric-value { font-size: 28px; } }
@media (max-width: 760px) {
  .sidebar { padding: 16px 16px 0; }
  .sidebar-foot { border: 0; padding: 0; }
  .brand-mark { width: 34px; height: 34px; font-size: 20px; }
  nav { margin-top: 16px; }
  nav > a { font-size: 12px; gap: 7px; }
  .nav-icon { width: 16px; height: 16px; }
  .topbar { height: 60px; padding: 0 16px; }
  .breadcrumb { font-size: 10px; }
  main { padding: 22px 16px 36px; }
  h1, .page-heading h1 { font-size: 26px; }
  .page-heading { margin-bottom: 18px; }
  .period-form { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .period-form label { width: 100%; justify-content: space-between; }
  .metrics { gap: 10px; }
  .metric, .metric + .metric, .metric:nth-child(3), .metric:nth-child(4) { padding: 14px 12px; border-left: 1px solid var(--rule); border-top: 3px solid #90a6c2; }
  .metric:first-child { border-top-color: #2463dc; }
  .metric:has(.profit) { border-top-color: #087b61; }
  .metric-value { font-size: 23px; white-space: normal; overflow-wrap: anywhere; }
  .metric-label { font-size: 11px; }
  .dashboard-grid > section, .dashboard-sales, .quick-section, .shop-panel, #table-section, .export-grid { padding: 16px; }
  .section-title { flex-wrap: wrap; gap: 8px; }
  .section-title > span { font-size: 9px; }
  .dashboard-sales .dashboard-grid > section { padding: 12px; }
  .dashboard-sales .table-scroll { overflow-x: auto; }
  #records-table tr { padding: 16px 0; }
  #records-table td { padding: 0; }
  #records-table td[data-label]::before { font-size: 10px; }
  .page-footer { margin: 0 16px; font-size: 8px; }
  .auth-body { padding: 16px; }
  .auth-intro { padding: 24px; }
  .auth-panel { padding: 28px 24px; }
  .dialog-heading { padding: 20px; }
}
@media (max-width: 1100px) {
  .export-grid { grid-template-columns: minmax(0, 1fr); }
  .export-item { flex-wrap: wrap; }
}

.period-form { justify-content: space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.period-presets,.period-custom { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.period-presets .button[aria-pressed="true"] { background:var(--accent);border-color:var(--accent);color:white; }
.period-custom label { width:auto; }
.period-custom input { max-width:180px; }
.period-apply { display:none; }
@media(max-width:760px) { .period-presets { width:100%; } .period-presets .button { flex:1; padding:8px;font-size:11px; } .period-custom { width:100%; } .period-custom label { flex:1; } .period-custom input { width:100%;max-width:none; } }

/* Persistent business context, with direct access to each scope. */
.scope-switch { display:flex; align-items:center; gap:14px; }
.scope-caption { font-size:11px; color:var(--muted); }
.scope-options { display:flex; gap:4px; padding:4px; background:#edf2f8; border:1px solid #dce4ee; border-radius:8px; }
.scope-option { display:flex; align-items:center; justify-content:center; gap:7px; padding:8px 12px; border-radius:5px; font-size:12px; font-weight:600; color:#52657b; white-space:nowrap; }
.scope-option:hover { background:#dfe8f5; }
.scope-option[aria-current] { background:white; color:#172b46; box-shadow:0 1px 4px #132b4620; }
.scope-dot { width:6px; height:6px; border-radius:50%; background:#72849a; }
.scope-gpu .scope-dot { background:#2463dc; }
.scope-tcg .scope-dot { background:#087b61; }
.scope-allgemein .scope-dot { background:#a16a17; }
@media(max-width:1100px) { .scope-caption { display:none; } .topbar { flex-wrap:wrap;height:auto;min-height:64px;padding-top:10px;padding-bottom:10px; } }
@media(max-width:760px) { .topbar { gap:10px; } .scope-switch { width:100%; } .scope-options { width:100%; } .scope-option { flex:1; min-height:44px;padding:8px 6px;font-size:11px;gap:5px; } .breadcrumb { padding-top:2px; } }

.inventory-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); background:white;border:1px solid var(--rule);border-radius:8px;margin-bottom:16px; }
.inventory-overview > div { padding:18px 22px; }
.inventory-overview > div + div { border-left:1px solid var(--rule); }
.inventory-overview span { display:block;font-size:12px;color:var(--muted); }
.inventory-overview strong { display:block;font-size:25px;margin-top:5px;font-variant-numeric:tabular-nums; }
.inventory-overview small { font-size:13px;font-weight:500; }
.inventory-status-tabs { display:flex;gap:7px;overflow:auto;padding-bottom:12px;margin-bottom:5px; }
.inventory-status-tab { display:flex;align-items:center;gap:8px;white-space:nowrap;background:white;border:1px solid var(--rule);border-radius:6px;padding:9px 12px;font-size:12px;color:var(--muted); }
.inventory-status-tab span { background:#edf2f8;border-radius:4px;padding:1px 5px;font-size:10px; }
.inventory-status-tab[aria-pressed="true"] { color:var(--accent);border-color:var(--accent);background:var(--accent-soft);font-weight:600; }
.inventory-group-summary { background:#f0f5fc; }
.inventory-group-summary td { border-bottom:1px solid #d1dfee; }
.group-title { text-align:left;font-size:13px;font-weight:650;color:var(--ink);border:0;background:none;padding:0;white-space:normal;min-width:170px;max-width:320px; }
.group-indicator { display:grid;place-items:center;width:23px;height:23px;background:#dbe8fc;color:var(--accent);border-radius:4px;font-size:18px; }
.inventory-page .table-scroll { border-radius:5px; }
.inventory-page .row-actions { gap:10px; }
.inventory-page #records-table tbody tr:not(.inventory-group-summary):not([hidden]):hover { background:#f5f8fc; }
@media(max-width:760px) {
 .inventory-overview > div { padding:12px 10px; }
 .inventory-overview span { font-size:10px; }
 .inventory-overview strong { font-size:18px;overflow-wrap:anywhere; }
 .inventory-overview small { font-size:10px; }
 .inventory-status-tab { min-height:44px; }
 .inventory-page #records-table tr { margin-bottom:12px;padding:16px;border:1px solid var(--rule);border-radius:7px;background:#fff; }
 .inventory-page #records-table .inventory-group-summary { background:#edf4ff;border-color:#cdddf6; }
 .inventory-group-summary td:nth-child(2) { grid-column:1/-1; }
 .inventory-group-summary td:last-child { grid-column:1/-1; }
 .group-title { max-width:none;min-width:0;font-size:14px; }
 .inventory-page #table-section { padding:12px; }
}

.statistics-bars { display:grid;gap:18px;padding:6px 0 16px; }
.statistics-label { display:flex;justify-content:space-between;gap:16px;font-size:12px;margin-bottom:7px; }
.statistics-label span { overflow-wrap:anywhere; }
.statistics-label strong { white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:650; }
.statistics-bar svg { display:block;width:100%;height:12px; }
.chart-track { fill:#edf2f8; }
.chart-fill { fill:#2463dc; }
.chart-color-1 { fill:#087b61; }
.chart-color-2 { fill:#7289af; }
.chart-negative { fill:#bf3d50; }
.chart-zero { stroke:#a7b7cc;stroke-width:1; }
.monthly-chart { display:flex;gap:16px;overflow-x:auto;padding:16px 4px; }
.monthly-column { flex:1;min-width:100px;text-align:center; }
.monthly-column svg { display:block;width:100%;height:180px; }
.monthly-column strong { font-size:12px;font-variant-numeric:tabular-nums; }
.monthly-column > span { font-size:11px;color:var(--muted); }
.negative-number { color:#bf3d50; }
.chart-primary-grid { grid-template-columns:1fr 1fr; }
@media(max-width:760px) { .chart-primary-grid { grid-template-columns:1fr; } .statistics-label { font-size:11px; } }

.distribution-chart { display:flex;align-items:center;gap:28px;min-height:210px; }
.distribution-chart > svg { width:180px;max-width:48%;flex-shrink:0; }
.ring-track { stroke:#edf2f8; }
.ring-color-0 { stroke:#2463dc;background:#2463dc; }
.ring-color-1 { stroke:#087b61;background:#087b61; }
.ring-color-2 { stroke:#d2952b;background:#d2952b; }
.ring-color-3 { stroke:#7289af;background:#7289af; }
.ring-color-4 { stroke:#bf3d50;background:#bf3d50; }
.ring-total { fill:var(--ink);font-size:21px;font-weight:700; }
.ring-caption { fill:var(--muted);font-size:10px; }
.distribution-legend { flex:1;min-width:0; }
.distribution-legend > div { display:flex;gap:8px;align-items:center;padding:9px 0;font-size:12px; }
.distribution-legend strong { margin-left:auto;font-variant-numeric:tabular-nums; }
.legend-dot { width:8px;height:8px;border-radius:50%;flex-shrink:0; }
@media(max-width:760px) { .distribution-chart { gap:16px;min-height:170px; } .distribution-chart > svg { width:135px; } .distribution-legend > div { font-size:11px; } }

/* Consistent spacing and responsive sizing across the workspace. */
.dashboard-details { border:1px solid var(--rule);border-radius:8px;background:white;margin:0 0 20px; }
.dashboard-details > summary { padding:14px 20px;font-size:12px;font-weight:600;color:var(--muted);cursor:pointer; }
.dashboard-details[open] > summary { border-bottom:1px solid var(--rule); }
.dashboard-details > .dashboard-grid { padding:16px;margin:0; }
.dashboard-details .dashboard-grid > section { border:0;padding:8px; }
.dashboard-grid { align-items:start; }
.chart-primary-grid { align-items:stretch; }
.analysis-grid { grid-template-columns:repeat(2,minmax(0,1fr));align-items:start; }
.analysis-period { width:auto;max-width:100%; }
.section-title { flex-wrap:wrap; }
.section-title h2,.section-title h3 { line-height:1.4; }
.distribution-legend > div > span:not(.legend-dot) { overflow-wrap:anywhere;min-width:0; }
.distribution-legend strong { flex-shrink:0; }
.statistics-label { align-items:baseline; }
.monthly-column { flex:0 0 110px; }
.monthly-chart { border-top:1px solid var(--rule); }
.quick-links > a { min-width:0; }
.quick-links > a > div { min-width:0; }
.quick-links > a:hover h3 { color:var(--accent); }
.table-toolbar > label { min-width:0; }
.export-item > div { min-width:0; }
.notice,.empty-state p { overflow-wrap:anywhere; }
.dialog-actions { background:white; }
@media(max-width:1100px) { .analysis-grid,.chart-primary-grid { grid-template-columns:1fr; } .distribution-chart { min-height:170px; } }
@media(max-width:760px) {
 .dashboard-details > summary { padding:14px 16px; }
 .dashboard-details > .dashboard-grid { padding:8px; }
 .dashboard-grid,.metrics { margin-bottom:16px; }
 .dashboard-sales { margin:16px 0; }
 .quick-links > a + a { padding-left:0; }
 .dialog-actions { gap:8px; }
 .dialog-actions .button { white-space:normal; }
 .page-footer { gap:12px; }
}

.stock-columns { display:flex;gap:14px;align-items:end;padding:10px 0 4px; }
.stock-column { flex:1;min-width:0;text-align:center; }
.stock-column svg { display:block;width:100%;height:155px;margin-top:8px; }
.stock-column strong { font-size:13px;font-variant-numeric:tabular-nums; }
.stock-column > span { display:block;font-size:11px;color:var(--muted);margin-top:8px;overflow-wrap:anywhere; }
.cash-compact { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border:1px solid var(--rule);border-radius:7px;background:white;margin:-6px 0 20px;font-size:12px; }
.cash-compact small { margin-left:10px;color:var(--muted);font-size:10px; }
.cash-compact strong { font-size:17px;white-space:nowrap;font-variant-numeric:tabular-nums; }
@media(max-width:760px) { .stock-columns { gap:7px; } .stock-column > span { font-size:10px; } .cash-compact { flex-wrap:wrap;gap:6px; } .cash-compact small { display:block;margin:2px 0 0; } }

.metrics { grid-template-columns:repeat(5,minmax(0,1fr));gap:12px; }
.metric,.metric + .metric { padding:16px; }
.metric-value { font-size:clamp(19px,1.85vw,30px); }
.metric:has(.cash-value) { background:#e9f5f0;border-top-color:#087b61; }
.cash-value { color:#087b61; }
.chart-primary-grid { grid-template-columns:1.4fr 1fr; }
.stock-columns { padding-top:0; }
.stock-column svg { height:90px; }
.revenue-distribution > svg { display:block;width:100%;height:16px;border-radius:4px;margin:18px 0;overflow:hidden; }
.revenue-total { display:flex;align-items:baseline;justify-content:space-between;gap:12px; }
.revenue-total > span { font-size:12px;color:var(--muted); }
.revenue-total > strong { font-size:24px;letter-spacing:-.5px;font-variant-numeric:tabular-nums; }
.revenue-sectors { display:grid;grid-template-columns:1fr 1fr;gap:18px; }
.revenue-sectors > div { display:grid;grid-template-columns:8px 1fr;gap:4px 8px;align-items:center; }
.revenue-sectors strong,.revenue-sectors small { grid-column:2; }
.revenue-sectors strong { font-size:17px;font-variant-numeric:tabular-nums; }
.revenue-sectors small { color:var(--muted);font-size:10px; }
@media(max-width:1100px) { .metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } .chart-primary-grid { grid-template-columns:1fr; } }
@media(max-width:760px) { .metrics { grid-template-columns:1fr 1fr; } .metric:has(.cash-value) { grid-column:1/-1;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 12px; } .metric:has(.cash-value) .metric-note { margin:0; } .cash-value { grid-column:2;grid-row:1/3;margin:0; } .revenue-total > strong { font-size:21px; } .revenue-sectors strong { font-size:16px; } }

.analysis-note { margin:0 0 20px;line-height:1.6; }
.stock-column > span { hyphens:auto; }

.trend-scroll { width:100%;overflow-x:auto;padding:6px 0 0; }
.trend-chart { display:block;width:100%;min-width:640px;height:auto;max-height:300px; }
.trend-grid { stroke:#e5ecf4;stroke-width:1;stroke-dasharray:3 4; }
.trend-axis { font-family:inherit;font-size:11px;fill:var(--muted); }
.trend-value { font-family:inherit;font-size:11px;font-weight:600;fill:var(--ink);font-variant-numeric:tabular-nums; }
@media(max-width:760px) { .trend-chart { width:auto;height:250px; } }

.trend-legend { display:flex;gap:20px;font-size:12px;color:var(--muted);margin-bottom:8px; }
.trend-legend > span { display:flex;gap:7px;align-items:center; }
