@font-face {
  font-family: Vazirmatn;
  src: url("../shared/assets/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #101110;
  --surface: #1a1b19;
  --surface-2: #242521;
  --text: #f5f3ed;
  --muted: #a9aaa2;
  --line: #383a33;
  --accent: #ffb78c;
  --accent-ink: #24180f;
  --accent-text: #ffb78c;
  --good: #9ddbb6;
  --warning: #e8c17b;
  --danger: #ff9393;
  --radius: 9px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  font-family: Vazirmatn, system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f3f3ef;
  --surface: #fff;
  --surface-2: #eaece5;
  --text: #20221e;
  --muted: #63675c;
  --line: #d8dbd0;
  --accent: #f7ad7e;
  --accent-ink: #271c14;
  --accent-text: #925020;
  --good: #287647;
  --warning: #886115;
  --danger: #af3035;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: var(--accent-text);
}
button,
a,
input,
select,
textarea,
summary,
[tabindex] {
  -webkit-tap-highlight-color: #ffb78c15;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.55;
  font-weight: 720;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 650;
}
svg {
  display: block;
  flex-shrink: 0;
}
.icon {
  vertical-align: middle;
  display: inline-block;
  flex: none;
}
small,
.small {
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.good {
  color: var(--good);
}
.warning {
  color: var(--warning);
}
.danger {
  color: var(--danger);
}
.technical {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mono {
  font-family: ui-monospace, monospace;
  direction: ltr;
  unicode-bidi: plaintext;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.boot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  min-height: 80dvh;
  color: var(--muted);
}
.spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.app-shell {
  max-width: 1160px;
  margin-inline: auto;
  min-height: 100dvh;
}
.app-header {
  padding: calc(19px + var(--safe-top)) 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand-mark {
  color: var(--accent-text);
  width: 33px;
}
.brand strong {
  display: block;
  font-size: 15px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.admin-label {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  color: var(--muted);
  margin-inline-start: 6px;
  font-weight: 400;
}
.header-tools {
  display: flex;
  gap: 4px;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: none;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.route-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 0;
  font-size: 11px;
  color: var(--muted);
}
.route-bar .btn {
  padding: 6px 7px;
  min-height: 38px;
  border: none;
}
.app-main {
  padding: 22px 18px calc(105px + var(--safe-bottom));
  min-width: 0;
}
.app-main > div,
.app-main > section {
  min-width: 0;
}
.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1160px;
  margin: auto;
  padding: 10px 10px calc(10px + var(--safe-bottom));
  gap: 3px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 53px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
}
.nav-item[aria-current="page"] {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.nav-item .icon {
  width: 20px;
  height: 20px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.page-heading > div {
  min-width: 0;
}
.page-heading p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.eyebrow {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading .btn {
  font-size: 11px;
  min-height: 38px;
  padding: 6px 9px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.panel + .panel {
  margin-top: 16px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.stack > .panel + .panel {
  margin-top: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  text-align: center;
  line-height: 1.6;
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
}
.btn.ghost {
  border-color: transparent;
  color: var(--muted);
}
.btn.small {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 10px;
}
.btn.full,
.full {
  width: 100%;
}
.action-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.action-row > .btn {
  flex: 1;
  min-width: 100px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1.6;
  white-space: normal;
}
.badge i {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  flex: none;
}
.notice {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--muted);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.notice.warning {
  border-inline-start-color: var(--warning);
}
.notice.danger {
  border-inline-start-color: var(--danger);
}
.notice.good,
.notice.success {
  border-inline-start-color: var(--good);
  color: var(--good);
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.empty h2 {
  color: var(--text);
  font-size: 16px;
}
.empty p {
  font-size: 12px;
}
.data-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.data-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: start;
  min-width: 0;
  color: var(--text);
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row > span:first-child {
  min-width: 0;
}
.data-row strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.data-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.row-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  max-width: 45%;
  font-size: 12px;
}
.row-tail > .icon {
  transform: scaleX(-1);
  color: var(--muted);
}
.data-row:hover {
  background: var(--surface-2);
}
.data-row:focus-visible {
  outline-offset: -4px;
}
.facts {
  margin: 0;
  border-block: 1px solid var(--line);
}
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.facts > div:last-child {
  border-bottom: 0;
}
.facts dt {
  color: var(--muted);
  flex: 0 1 45%;
}
.facts dd {
  margin: 0;
  text-align: end;
  overflow-wrap: anywhere;
  min-width: 0;
}
.stat {
  padding: 15px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.stat strong {
  display: block;
  font-size: 26px;
  line-height: 1.45;
  margin-top: 5px;
  font-weight: 570;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat > span {
  font-size: 10px;
  color: var(--muted);
}
.metric {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.metric-value {
  font-variant-numeric: tabular-nums;
  font-size: 36px;
  font-weight: 570;
  line-height: 1.4;
  letter-spacing: -1px;
}
.metric-value small {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}
.day-card {
  padding: 21px 20px 0;
  position: relative;
  overflow: hidden;
}
.day-card .metric-value {
  font-size: 42px;
  margin: 18px 0 6px;
}
.day-card .revenue-definition {
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 55ch;
}
.day-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-inline: -20px;
  border-top: 1px solid var(--line);
}
.day-stats > div {
  padding: 15px 12px;
  border-inline-end: 1px solid var(--line);
}
.day-stats > div:last-child {
  border: 0;
}
.day-stats small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.day-stats strong {
  display: block;
  font-size: 21px;
  font-weight: 550;
}
.overview-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}
.overview-actions .btn {
  min-height: 49px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.workspace-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 14px;
  text-align: start;
  min-width: 0;
}
.workspace-tile .icon {
  color: var(--muted);
}
.workspace-tile strong {
  font-size: 13px;
}
.workspace-tile small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.workspace-tile:hover {
  border-color: var(--accent-text);
}
.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}
.search-form input {
  flex: 1;
  width: 0;
}
.search-form .btn {
  height: 48px;
}
.customer-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.customer-head h1 {
  font-size: 25px;
  overflow-wrap: anywhere;
}
.customer-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.customer-balance {
  padding: 20px 0;
}
.customer-balance strong {
  font-size: 38px;
  font-weight: 550;
  display: block;
}
.customer-balance small {
  color: var(--muted);
  font-size: 11px;
}
.danger-zone {
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
  border-radius: 8px;
  padding: 17px;
  margin-top: 22px;
}
.danger-zone > h2 {
  color: var(--danger);
  font-size: 14px;
}
.danger-zone > p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.subscription-reading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 21px 0;
}
.subscription-reading strong {
  display: block;
  font-size: 30px;
  font-weight: 570;
}
.subscription-reading small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.process-track {
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}
.process-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  width: var(--progress, 0%);
  transition: width 0.5s ease;
}
.history {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}
.history-item {
  position: relative;
  padding: 0 23px 24px 0;
  border-inline-start: 1px solid var(--line);
  margin-inline-start: 5px;
}
.history-item:before {
  content: "";
  position: absolute;
  inset-inline-start: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--surface);
  border: 2px solid var(--accent-text);
  border-radius: 50%;
}
.history-item:last-child {
  border: 0;
}
.history-item h3 {
  font-size: 13px;
}
.history-item .facts {
  margin-top: 10px;
}
.history-item p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.health-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.health-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.health-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.checklist li:last-child {
  border: 0;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.toggle-row:last-child {
  border: 0;
}
.toggle-row strong {
  font-size: 12px;
  display: block;
}
.toggle-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.toggle-row .btn {
  flex: none;
  min-width: 68px;
}
.catalog-card {
  position: relative;
}
.catalog-card.is-paused {
  border-inline-start: 3px solid var(--warning);
}
.catalog-card .section-heading {
  align-items: flex-start;
}
.catalog-card .price {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.catalog-card del {
  font-size: 11px;
  color: var(--muted);
  margin-inline-end: 8px;
}
.technical-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}
.technical-copy bdi {
  flex: 1;
  min-width: 0;
  font-size: 11px;
}
.technical-copy .btn {
  flex: none;
  min-width: 40px;
  padding: 7px;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
  padding: 11px 12px;
  min-height: 46px;
  font-size: 13px;
}
textarea {
  resize: vertical;
}
select[multiple] {
  min-height: 140px;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 19px;
  height: 19px;
  flex: none;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field label {
  font-size: 12px;
  color: var(--text);
}
.field small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.field-error {
  font-size: 11px;
  color: var(--danger);
}
.field-error:empty {
  display: none;
}
[aria-invalid="true"] {
  border-color: var(--danger) !important;
}
.form-grid {
  display: grid;
  gap: 16px;
}
.form-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.form-description {
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.9;
}
.form-description:empty {
  display: none;
}
.sheet-error:empty {
  display: none;
}
.sheet-error {
  color: var(--danger);
  padding: 12px 0;
  font-size: 12px;
  line-height: 1.8;
}
.segmented {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.segmented button {
  padding: 8px 11px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  font-size: 11px;
}
.segmented button[aria-pressed="true"],
.segmented button.active {
  background: var(--surface-2);
  color: var(--accent-text);
  border-color: var(--accent-text);
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chips .btn {
  font-size: 10px;
  min-height: 35px;
}
.projection {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 7px;
  margin-top: 14px;
}
.projection .facts {
  font-size: 11px;
}
.projection:empty {
  display: none;
}
details {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  margin-top: 14px;
}
summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
details[open] > summary {
  margin-bottom: 12px;
}
.scroll-table {
  max-width: 100%;
  overflow: auto;
  margin-top: 14px;
  max-height: 420px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
}
table .technical {
  white-space: nowrap;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  direction: ltr;
}
.revenue-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
  min-width: 0;
}
.revenue-chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.chart-current {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-previous {
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 5 4;
  opacity: 0.65;
}
.chart-point {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 3;
}
.chart-bar {
  fill: var(--accent);
}
.chart-readout {
  font-size: 12px;
  min-height: 48px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.chart-controls input {
  padding: 0 !important;
  border: 0 !important;
  min-height: 32px !important;
  accent-color: var(--accent);
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  direction: ltr;
}
.metric-controls {
  margin-bottom: 15px;
}
.breakdown-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.breakdown-row:last-child {
  border: 0;
}
.breakdown-row .row {
  font-size: 12px;
}
.share-track {
  height: 3px;
  background: var(--line);
  margin-top: 9px;
}
.share-track span {
  display: block;
  height: 100%;
  background: var(--accent-text);
}
.revenue-summaries .stat:first-child {
  grid-column: 1/-1;
}
.delta {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  color: var(--text);
  width: min(100%, 580px);
  max-width: 100%;
  max-height: calc(100dvh - 20px);
  margin: 0 auto;
  inset: auto 0 0;
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(5px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.dialog-header h2 {
  font-size: 19px;
}
.dialog-body {
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px calc(15px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}
.dialog-actions:empty {
  display: none;
}
.dialog-actions .btn {
  flex: 1;
  min-width: 110px;
}
.confirmation-copy {
  font-size: 13px;
  line-height: 2;
}
.confirmation-copy ul {
  padding-inline-start: 20px;
}
.confirmation-copy li {
  margin-block: 8px;
}
#toast {
  position: fixed;
  z-index: 100;
  inset-inline: 20px;
  bottom: calc(98px + var(--safe-bottom));
  margin: auto;
  max-width: 530px;
  pointer-events: none;
  padding: 13px 17px;
  background: var(--text);
  color: var(--bg);
  border-radius: 9px;
  box-shadow: 0 8px 30px #0003;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  font-size: 12px;
}
#toast.visible {
  opacity: 1;
  transform: translateY(0);
}
.access-gate {
  max-width: 450px;
  margin: 15dvh auto;
  padding: 28px 20px;
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}
.access-gate > .icon {
  color: var(--danger);
}
.access-gate p {
  color: var(--muted);
  font-size: 13px;
}
.access-gate .btn {
  width: 100%;
}
.demo-caption {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 20px;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
}
.job-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.job-counters > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}
.job-counters strong {
  display: block;
  font-size: 20px;
}
.job-counters small {
  font-size: 10px;
  color: var(--muted);
}
.rule-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  margin-block: 10px;
  background: var(--bg);
}
.rule-group .rule-group {
  background: var(--surface);
}
.rule-leaf {
  padding: 12px;
  border-inline-start: 2px solid var(--accent-text);
  margin-top: 10px;
  background: var(--surface-2);
  border-radius: 5px;
}
.code-token {
  font-family: ui-monospace, monospace;
  direction: ltr;
}
.bankcard-number {
  direction: ltr;
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  letter-spacing: 1.3px;
}
.safe-amount {
  font-size: 35px;
  font-variant-numeric: tabular-nums;
}
.route-loading {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--accent);
  z-index: 150;
  transform-origin: right;
  animation: loadbar 1.3s ease-in-out infinite;
}
@keyframes loadbar {
  0% {
    transform: scaleX(0.1);
  }
  50% {
    transform: scaleX(0.8);
  }
  100% {
    transform: scaleX(0.1);
  }
}
@media (min-width: 650px) {
  .app-main {
    padding: 30px 30px 115px;
  }
  .app-header {
    padding-inline: 30px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
  }
  .dashboard-grid > .stack {
    min-width: 0;
  }
  .catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
  .catalog-grid > .panel + .panel {
    margin-top: 0;
  }
  .workspace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .form-grid.columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .revenue-summaries {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .revenue-summaries .stat:first-child {
    grid-column: auto;
  }
  dialog {
    inset: 0;
    margin: auto;
    border-radius: 13px;
    max-height: calc(100dvh - 50px);
  }
  dialog.wide {
    width: min(760px, calc(100% - 40px));
  }
}
@media (min-width: 1050px) {
  .app-shell {
    border-inline: 1px solid var(--line);
  }
  .app-main,
  .route-bar {
    margin-inline-start: 190px;
  }
  .bottom-nav {
    width: 174px;
    inset-inline-start: max(12px, calc((100vw - 1160px) / 2 + 12px));
    inset-inline-end: auto;
    top: 112px;
    bottom: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: none;
    border: 0;
    gap: 6px;
  }
  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 15px 18px;
    font-size: 12px;
    gap: 13px;
  }
  .app-header {
    padding-block: 24px;
  }
  .app-main {
    padding-bottom: 45px;
  }
  #toast {
    bottom: 25px;
  }
}
@media (max-width: 374px) {
  .app-main {
    padding-inline: 13px;
  }
  .app-header {
    padding-inline: 15px;
  }
  .page-heading {
    gap: 9px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .panel {
    padding: 15px;
  }
  .day-card {
    padding-inline: 16px;
  }
  .day-stats {
    margin-inline: -16px;
  }
  .day-card .metric-value {
    font-size: 36px;
  }
  .grid-3 {
    gap: 6px;
  }
  .stat {
    padding: 12px 9px;
  }
  .stat strong {
    font-size: 22px;
  }
  .btn {
    padding-inline: 10px;
    font-size: 11px;
  }
  .dialog-body {
    padding: 16px;
  }
  .dialog-header {
    padding: 13px 15px;
  }
  .dialog-actions {
    padding-inline: 16px;
  }
  .row-tail {
    gap: 5px;
  }
  .data-row {
    padding: 14px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Workspace composition and domain instruments. */
#view {
  outline: none;
}
#view > * + * {
  margin-top: 20px;
}
#view > .page-heading {
  margin-top: 0;
}
#view > .page-heading + * {
  margin-top: 0;
}
.brand {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 44px;
  text-align: start;
}
.brand-mark {
  font-family: Georgia, serif;
  font-size: 37px;
  font-style: italic;
  line-height: 1;
}
.brand > span:last-child {
  font-size: 15px;
  font-weight: 650;
}
.admin-label {
  border: 0;
  padding: 0;
}
.route-bar {
  padding-inline: 0;
  margin-inline-start: 0 !important;
}
.day-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 18px 18px 0;
}
.day-card > .row {
  font-size: 12px;
}
.day-amount {
  font-size: 43px;
  font-weight: 580;
  letter-spacing: -1.5px;
  text-align: start;
  direction: ltr;
  margin: 25px 0 23px;
  line-height: 1.2;
  color: var(--accent-text);
}
.day-amount small {
  font-size: 12px;
  letter-spacing: 0;
  margin-inline-start: 6px;
}
.day-card .day-stats {
  margin-inline: -18px;
}
.day-stats .stat {
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: start;
}
.day-card > p.small {
  margin: 0 -18px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  gap: 18px;
}
.workspace-grid {
  margin-top: 20px;
}
.customer-head {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 24px;
}
.customer-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-size: 29px;
}
.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.customer-balance {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  padding: 10px 0 15px;
  overflow-wrap: anywhere;
}
.subscription-reading {
  display: block;
  padding: 21px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.subscription-reading.expired {
  border-inline-start: 3px solid var(--danger);
}
.subscription-reading > .grid-2 {
  margin: 24px 0 18px;
}
.subscription-reading .metric-value {
  font-size: 29px;
}
.subscription-reading .metric p {
  margin-top: 12px;
  font-size: 12px;
}
.subscription-reading strong {
  font-size: inherit;
}
.process-fill.danger {
  background: var(--danger);
}
.process-fill.warning {
  background: var(--warning);
}
.history {
  list-style: none;
  padding: 0;
}
.history-item {
  padding-inline-start: 20px;
  padding-inline-end: 0;
}
.history-item strong {
  font-size: 12px;
}
.history-item small {
  font-size: 10px;
}
blockquote {
  margin: 12px 0 0;
  padding: 10px 13px;
  border-inline-start: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.catalog-grid {
  display: grid;
  gap: 15px;
}
.catalog-card {
  padding: 19px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.catalog-card > .btn {
  margin-top: 18px;
}
.catalog-price {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  margin: 20px 0 12px;
}
.catalog-card .checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.checklist > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.panel > .checklist {
  margin-bottom: 18px;
  grid-template-columns: 1fr 1fr;
}
.panel .section-heading {
  flex-wrap: wrap;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.metric > .badge {
  margin-top: 4px;
}
.metric-value {
  overflow-wrap: anywhere;
}
.health-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.health-row > span {
  min-width: 0;
}
.health-row strong {
  font-size: 12px;
}
.health-row small {
  font-size: 10px;
}
.revenue-summaries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.revenue-summaries .stat strong {
  font-size: 24px;
}
.revenue-summaries .stat:first-child strong {
  font-size: 34px;
  color: var(--accent-text);
}
.metric-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chart-readout strong {
  display: block;
  font-size: 17px;
  margin-top: 4px;
}
.chart-cursor {
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.4;
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-inline-end: 4px;
}
.legend-dot.previous {
  background: var(--muted);
}
#revenue-point {
  min-height: 44px;
  padding: 0;
  border: 0;
  accent-color: var(--accent);
}
.table-wrap {
  width: 100%;
  max-height: 450px;
  overflow: auto;
}
caption {
  text-align: start;
  padding: 10px 0;
  color: var(--muted);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  min-width: 0;
}
legend {
  font-size: 11px;
  color: var(--muted);
}
.dialog-header {
  padding: 17px 19px;
}
.dialog-header h2 {
  font-size: 19px;
  overflow-wrap: anywhere;
}
.dialog-body {
  padding: 20px;
  min-height: 0;
  overflow: auto;
}
.dialog-body > form > .dialog-actions {
  position: sticky;
  bottom: -20px;
  margin: 20px -20px -20px;
}
.dialog-actions {
  padding: 14px 20px calc(15px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}
.dialog-actions .btn {
  flex: 1;
  min-width: 100px;
}
.dialog-body .panel + .panel {
  margin-top: 16px;
}
.dialog-body > .notice + .stack {
  margin-top: 18px;
}
.warning-list {
  padding-inline-start: 20px;
  font-size: 12px;
  line-height: 2;
  color: var(--warning);
}
.warning-list li + li {
  margin-top: 8px;
}
.route-loading {
  position: static;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 15px;
  height: 40dvh;
  background: none;
  color: var(--muted);
  animation: none;
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.fin-rule-group {
  border: 1px solid var(--line);
  border-inline-start: 2px solid var(--accent-text);
  border-radius: 8px;
  padding: 14px;
  margin-top: 14px;
  background: var(--surface);
}
.fin-rule-group .fin-rule-group {
  padding: 12px;
  background: var(--bg);
}
.fin-rule-leaf {
  margin-block: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.fin-rule-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fin-audit {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.fin-audit:last-child {
  border: 0;
}
.fin-audit p {
  margin-top: 8px;
}
.fin-help {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.fin-card-number {
  direction: ltr;
  text-align: start;
  font-size: 23px;
  letter-spacing: 1.3px;
  font-variant-numeric: tabular-nums;
}
.fin-builder-actions {
  position: sticky;
  bottom: 85px;
  background: var(--bg);
  padding: 12px 0;
  z-index: 5;
}
.app-main > .route-bar {
  margin: 0;
}
.danger-zone .btn {
  margin-top: 14px;
}
.dialog-body .form-grid {
  margin-top: 12px;
}
.dialog-body .form-description {
  margin-bottom: 16px;
}
@media (min-width: 650px) {
  .dashboard-grid {
    grid-template-columns: 1.15fr 1fr;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .revenue-summaries {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .revenue-summaries .stat:first-child {
    grid-column: auto;
  }
  .revenue-summaries .stat:first-child strong {
    font-size: 26px;
  }
  .revenue-summaries .stat strong {
    font-size: 23px;
  }
  .day-amount {
    font-size: 48px;
  }
  .dialog-body > form > .dialog-actions {
    bottom: -20px;
  }
  .customer-balance {
    font-size: 36px;
  }
}
@media (min-width: 1050px) {
  .fin-builder-actions {
    bottom: 0;
  }
  .app-main {
    padding-inline: 25px;
  }
  .day-amount {
    font-size: 45px;
  }
}
@media (max-width: 380px) {
  .fin-rule-fields {
    grid-template-columns: 1fr;
  }
  .fin-rule-group {
    padding: 10px;
  }
  .fin-rule-group .fin-rule-group {
    padding: 8px;
  }
  .dialog-body {
    padding: 16px;
  }
  .dialog-body > form > .dialog-actions {
    bottom: -16px;
    margin-inline: -16px;
    margin-bottom: -16px;
  }
  .day-amount {
    font-size: 39px;
  }
  .metric-value {
    font-size: 31px;
  }
  .app-header {
    padding-block: 13px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.btn,
.btn.small,
.chips .btn,
.section-heading .btn,
.segmented button,
.route-bar .btn {
  min-height: 44px;
}
.dialog-body [data-inline-error]:not([hidden]) {
  margin-bottom: 16px;
}
.dialog-body [data-inline-error][hidden] {
  display: none;
}
.metric > .metric-value {
  width: 100%;
}
#view > .notice + .stack {
  margin-top: 20px;
}
