:root {
  --app-bg: #f4f6fb;
  --app-surface: #ffffff;
  --app-surface-2: #f7f9fd;
  --app-side: #ffffff;
  --app-ink: #0f172a;
  --app-ink-2: #33405c;
  --app-muted: #5c6a86;
  --app-faint: #8a96ae;
  --app-line: rgba(15, 23, 42, 0.1);
  --app-line-2: rgba(15, 23, 42, 0.18);
  --app-accent: #2f6bf0;
  --app-accent-2: #1d54cf;
  --app-accent-soft: rgba(47, 107, 240, 0.1);
  --app-ok: #0f7d5c;
  --app-ok-soft: rgba(15, 125, 92, 0.1);
  --app-warn: #a1620a;
  --app-warn-soft: rgba(201, 122, 12, 0.12);
  --app-bad: #b42318;
  --app-bad-soft: rgba(180, 35, 24, 0.1);
  --app-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --app-radius: 14px;
  --app-radius-sm: 10px;
  --app-rail: 76px;
  --app-side-w: 244px;
  --app-topbar: 64px;
}

:root[data-theme="dark"] {
  --app-bg: #090d18;
  --app-surface: #111a2c;
  --app-surface-2: #16203a;
  --app-side: #0e1524;
  --app-ink: #eef2fb;
  --app-ink-2: #c3ccdf;
  --app-muted: #8e9ab4;
  --app-faint: #6b7793;
  --app-line: rgba(255, 255, 255, 0.09);
  --app-line-2: rgba(255, 255, 255, 0.2);
  --app-accent: #5b8cff;
  --app-accent-2: #8fb0ff;
  --app-accent-soft: rgba(91, 140, 255, 0.16);
  --app-ok: #6ee7b7;
  --app-ok-soft: rgba(52, 211, 153, 0.14);
  --app-warn: #fbbf24;
  --app-warn-soft: rgba(251, 191, 36, 0.14);
  --app-bad: #fca5a5;
  --app-bad-soft: rgba(248, 113, 113, 0.14);
  --app-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.app {
  display: grid;
  grid-template-columns: var(--app-rail) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: "Inter", "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.003em;
}

.app-rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100vh;
  padding: 14px 0 16px;
  background: var(--app-side);
  border-right: 1px solid var(--app-line);
}

.app-rail__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--app-accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.app-rail__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--app-muted);
  cursor: pointer;
}

.app-rail__btn svg {
  width: 19px;
  height: 19px;
}

.app-rail__btn:hover {
  background: var(--app-surface-2);
  color: var(--app-ink-2);
}

.app-rail__btn[aria-current="true"] {
  background: var(--app-accent-soft);
  color: var(--app-accent-2);
}

.app-rail__btn[aria-current="true"]::before {
  position: absolute;
  left: -14px;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--app-accent);
  content: "";
}

.app-rail__spacer {
  flex: 1;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--app-topbar);
  padding: 0 28px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
}

.app-topbar__spacer {
  flex: 1;
}

.app-content {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 26px 32px 64px;
}

.app-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.app-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.app-head p {
  margin: 6px 0 0;
  max-width: 82ch;
  font-size: 13.5px;
  color: var(--app-muted);
}

.app-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.app-card {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.app-card + .app-card,
.app-card + .app-split,
.app-split + .app-card {
  margin-top: 18px;
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--app-line);
}

.app-card__head > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.app-card__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.app-card__head p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--app-muted);
}

.app-card__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.app-card__body {
  padding: 20px;
}

.app-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--app-line);
  background: var(--app-surface-2);
  font-size: 12.5px;
  color: var(--app-faint);
}

.app-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  margin-bottom: 0;
}

.app-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: none;
  border: 0;
  border-right: 1px solid var(--app-line);
  border-radius: 0;
  box-shadow: none;
}

.app-stat:last-child {
  border-right: 0;
}

.app-stat__label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-stat__value {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.app-stat__note {
  font-size: 12px;
  color: var(--app-faint);
}

.app-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.app-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  color: var(--app-ink-2);
}

.app-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  padding: 0 16px;
  background: var(--app-surface-2);
  border-bottom: 1px solid var(--app-line);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-faint);
  text-align: left;
  white-space: nowrap;
}

.app-table td {
  height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-line);
  vertical-align: middle;
}

.app-table tbody tr:last-child td {
  border-bottom: 0;
}

.app-table tbody tr:hover td {
  background: var(--app-accent-soft);
}

.app-table .is-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--app-line-2);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.app-btn:hover {
  border-color: var(--app-line-2);
  background: var(--app-surface-2);
  color: var(--app-ink);
}

.app-btn:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 1px;
}

.app-btn--primary {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
  font-weight: 650;
}

.app-btn--primary:hover {
  background: var(--app-accent-2);
  border-color: var(--app-accent-2);
  color: #fff;
}

:root[data-theme="dark"] .app-btn--primary {
  color: #06101f;
}

:root[data-theme="dark"] .app-btn--primary:hover {
  background: var(--app-accent-2);
  border-color: var(--app-accent-2);
  color: #06101f;
}

.app-btn--small {
  height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.app-btn[aria-pressed="true"] {
  border-color: var(--app-accent-soft);
  background: var(--app-accent-soft);
  color: var(--app-accent-2);
  font-weight: 650;
}

.app-btn[aria-pressed="true"]:hover {
  border-color: var(--app-accent-soft);
  background: var(--app-accent-soft);
  color: var(--app-accent-2);
}

.app-btn--icon {
  width: 34px;
  padding: 0;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.app-toggle::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-line-2);
}

.app-toggle[aria-pressed="true"]::before {
  background: currentColor;
}

.menu-field {
  display: block;
  padding: 6px 8px 8px;
}

.menu-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.menu-field__input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--app-line-2);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-ink);
  font: inherit;
  font-size: 13px;
}

.menu-pop .menu-field__input {
  background: var(--app-surface);
  color: var(--app-ink);
}

.app-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--app-line-2);
  border-radius: 8px;
  background: var(--app-surface-2);
  color: var(--app-ink-2);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.app-tag--ok {
  border-color: transparent;
  background: var(--app-ok-soft);
  color: var(--app-ok);
}

.app-tag--warn {
  border-color: transparent;
  background: var(--app-warn-soft);
  color: var(--app-warn);
}

.app-tag--bad {
  border-color: transparent;
  background: var(--app-bad-soft);
  color: var(--app-bad);
}

.app-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-field > span {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-field > small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--app-faint);
}

.app-field input,
.app-field select,
.app-field textarea {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--app-line-2);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-ink);
  font: inherit;
  font-size: 13.5px;
  width: 100%;
}

.app-field input.dmy-native,
.app-toolbar .app-field input.dmy-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.app-field select[multiple],
.app-form-grid select[multiple],
.modal__body select[multiple] {
  height: auto;
  min-height: 132px;
  padding: 6px;
}

.app-field input:focus,
.app-field select:focus,
.app-field textarea:focus {
  border-color: var(--app-accent);
  outline: 0;
  box-shadow: 0 0 0 3px var(--app-accent-soft);
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-surface-2);
}

.app-toolbar > .app-field {
  flex: 1 1 190px;
  max-width: 420px;
}

.app-toolbar > .app-field:has(select) {
  flex: 0 1 220px;
}

.app-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.app-toolbar .app-btn,
.app-toolbar .app-btn--small {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.app-toolbar .app-field input {
  height: 38px;
}

.app-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--app-muted);
}

.app-empty b {
  display: block;
  margin-bottom: 4px;
  color: var(--app-ink);
}

@media (max-width: 1180px) {
  .app-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-rail {
    position: fixed;
    bottom: 0;
    flex-direction: row;
    width: 100%;
    height: auto;
    padding: 6px 10px;
    border-top: 1px solid var(--app-line);
    border-right: 0;
  }

  .app-rail__mark,
  .app-rail__spacer {
    display: none;
  }

  .app-content {
    padding: 18px 16px 88px;
  }
}

.app-tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  border-bottom: 1px solid var(--app-line);
  overflow-x: auto;
}

.app-tabs__tab {
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--app-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}

.app-tabs__tab:hover {
  color: var(--app-ink-2);
}

.app-tabs__tab[aria-selected="true"] {
  border-bottom-color: var(--app-accent);
  color: var(--app-ink);
  font-weight: 650;
}

.app-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface-2);
  font-size: 13px;
  color: var(--app-ink-2);
}

.app-notice--ok {
  border-color: transparent;
  background: var(--app-ok-soft);
  color: var(--app-ok);
}

.app-notice--warn {
  border-color: transparent;
  background: var(--app-warn-soft);
  color: var(--app-warn);
}

.app-notice--bad {
  border-color: transparent;
  background: var(--app-bad-soft);
  color: var(--app-bad);
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--app-accent-soft);
  color: var(--app-accent-2);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.app-identity__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.app-identity__text b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--app-ink);
}

.app-identity__text small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--app-faint);
}

.app-check {
  width: 16px;
  height: 16px;
  accent-color: var(--app-accent);
}

.app-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  height: 100vh;
  background: var(--app-surface);
  border-left: 1px solid var(--app-line);
  box-shadow: -24px 0 60px -40px rgba(15, 23, 42, 0.5);
}

.app-drawer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--app-line);
}

.app-drawer__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.app-drawer__body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.app-drawer__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--app-line);
  background: var(--app-surface-2);
}

.app-skeleton {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--app-surface-2), var(--app-line), var(--app-surface-2));
  background-size: 200% 100%;
  animation: app-skeleton 1.2s ease-in-out infinite;
}

@keyframes app-skeleton {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.app-kv {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 13px;
}

.app-kv dt {
  color: var(--app-muted);
}

.app-kv dd {
  margin: 0;
  color: var(--app-ink);
  font-weight: 550;
}

.app-list {
  display: flex;
  flex-direction: column;
}

.app-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--app-line);
  font-size: 13.5px;
}

.app-list__row:last-child {
  border-bottom: 0;
}

.app-list__row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.app-fold {
  overflow: hidden;
}

.app-fold__sum {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 20px;
  cursor: pointer;
  list-style: none;
}

.app-fold__sum::-webkit-details-marker {
  display: none;
}

.app-fold__mark {
  color: var(--app-faint);
  transition: transform 0.15s ease;
}

.app-fold[open] .app-fold__mark {
  transform: rotate(90deg);
}

.app-fold__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-fold__text b {
  font-size: 15px;
  font-weight: 650;
  color: var(--app-ink);
}

.app-fold__text small {
  font-size: 12.5px;
  color: var(--app-muted);
}

.app-fold__body {
  border-top: 1px solid var(--app-line);
}

.app-card > .app-stats {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-surface-2);
}

.app-card > .app-notice {
  margin: 0;
  padding: 14px 22px;
  border: 0;
  border-top: 1px solid var(--app-line);
  border-radius: 0;
  background: var(--app-surface);
  color: var(--app-muted);
  font-size: 13px;
}

.app-card > .app-notice + .app-card__foot {
  border-top: 0;
}

.app-card > .app-tabs {
  padding: 0 20px;
}



@media print {
  :root,
  :root[data-theme="dark"] {
    --app-bg: #ffffff;
    --app-surface: #ffffff;
    --app-surface-2: #ffffff;
    --app-ink: #000000;
    --app-ink-2: #111111;
    --app-muted: #333333;
    --app-faint: #555555;
    --app-line: #cccccc;
    --app-line-2: #bbbbbb;
    --app-accent: #000000;
    --app-accent-2: #000000;
    --app-accent-soft: #f2f2f2;
    --app-shadow: none;
  }

  .app-rail,
  .navpanel,
  .topbar,
  .pagehead,
  .app-toolbar,
  .app-btn,
  .app-card__tools,
  .app-tabs,
  .skip-link,
  .toast,
  .overlay,
  .no-print,
  [data-action="print-report"] {
    display: none !important;
  }

  .app,
  .company-shell,
  .workspace {
    display: block !important;
    min-height: 0;
  }

  .app-content,
  .workspace__main {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .app-card,
  .panel {
    border: 1px solid #cccccc;
    border-radius: 0;
    box-shadow: none;
    margin: 0 0 12px;
    break-inside: avoid;
  }

  .app-card__head {
    border-bottom: 1px solid #cccccc;
  }

  .app-fold {
    break-inside: avoid;
  }

  .app-fold > summary {
    display: flex !important;
    cursor: default;
  }

  .app-fold__mark {
    display: none;
  }

  .app-fold > *:not(summary) {
    display: block !important;
    border-top: 0;
  }

  .app-table th {
    position: static;
    background: #ffffff;
  }

  .app-table thead {
    display: table-header-group;
  }

  .app-table td,
  .app-table th {
    border-color: #cccccc;
  }

  .app-notice,
  .app-card__foot {
    background: #ffffff;
  }

  .print-only,
  .print-head {
    display: block !important;
  }
}

.dmy-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.dmy-input[aria-invalid="true"] {
  border-color: var(--app-bad, #b42318);
}

.app-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-surface-2);
}

.app-segmented .app-btn {
  height: 32px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 600;
}

.app-segmented .app-btn:hover {
  background: var(--app-surface);
  color: var(--app-ink);
}

.app-segmented .app-btn--primary {
  background: var(--app-accent);
  color: #ffffff;
}

:root[data-theme="dark"] .app-segmented .app-btn--primary {
  color: #06101f;
}

.app-field--tight {
  min-width: 150px;
}

.app-card__tools .app-field > span {
  font-size: 11px;
}

.app-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 18px 22px;
}

.app-form-row .app-field {
  min-width: 190px;
}

.app-form-row .app-btn {
  height: 38px;
}

.app-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  padding: 20px 22px;
  border-top: 1px solid var(--app-line);
}

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

.app-form-grid fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.app-form-grid legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-form-grid .app-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 18px;
  font-size: 13px;
  color: var(--app-ink-2);
}

.app-form-grid .app-check-row input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
}

.app-form-actions {
  display: flex;
  gap: 10px;
}

.app-provider {
  padding: 16px 0 0;
  border-top: 1px dashed var(--app-line);
}

.app-provider__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.app-provider__head b {
  display: block;
  font-size: 13.5px;
  color: var(--app-ink);
}

.app-provider__head small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--app-faint);
}

.app-provider__docs {
  font-size: 12px;
  color: var(--app-accent-2);
  text-decoration: none;
}

.app-provider__docs:hover {
  text-decoration: underline;
}

.app-form-grid--bare {
  padding: 0;
  border-top: 0;
}

.app-form-section {
  margin: 0;
  padding: 0;
  border: 0;
}

.app-form-section + .app-form-section {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px dashed var(--app-line);
}

.app-form-section > legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--app-ink-2);
}

.app-check-row input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
}

.app-form-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--app-muted);
}

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

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  transform: translate(-50%, -50%);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 18px;
  box-shadow: 0 40px 80px -50px rgba(15, 23, 42, 0.55);
  overflow: hidden;
}

.modal--wide {
  width: min(900px, calc(100vw - 32px));
}

.modal__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--app-line);
}

.modal > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.modal > form > .modal__body {
  flex: 1 1 auto;
  min-height: 0;
}

.modal__head > div {
  min-width: 0;
  flex: 1;
}

.modal__head h2 {
  margin: 2px 0 4px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--app-ink);
}

.modal__head p {
  margin: 0;
  font-size: 13px;
  color: var(--app-muted);
}

.modal__head .icon-button {
  flex: 0 0 auto;
}

.modal__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  overflow-y: auto;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--app-line);
  background: var(--app-surface-2);
}

.modal__body .field,
.modal__body .app-field {
  width: 100%;
}

.modal__body .field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.modal__body .field input,
.modal__body .field select,
.modal__body .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-line-2);
  border-radius: 10px;
  background: var(--app-surface);
  color: var(--app-ink);
  font: inherit;
  font-size: 13.5px;
}

.modal__body .field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

.modal__body .field--inline,
.modal__body .field--check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.modal__body .field:has(input[type="checkbox"]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.modal__body .field:has(input[type="checkbox"]) > span {
  margin: 0;
  white-space: normal;
}

.modal__body .field:has(input[type="checkbox"]) input {
  order: 0;
  flex: 0 0 auto;
}

.modal__body .field--inline > span,
.modal__body .field--check > span {
  margin: 0;
}

.modal__body .field-hint,
.modal__body .table-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--app-faint);
}

.modal__body .form-stack,
.modal__body .button-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__body .field--inline > span,
.modal__body .field--check > span { flex: 0 0 auto; width: auto; max-width: none; margin: 0; }

.modal__body .field:has(input[type="checkbox"]) > span { flex: 0 0 auto; width: auto; margin: 0; }

.modal__body .field--inline > input[type="checkbox"],
.modal__body .field--check > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--app-accent);
}

.modal__body .field--inline,
.modal__body .field--check {
  justify-content: flex-start;
  width: auto;
}

.modal__body .field--inline:has(input[type="checkbox"]),
.modal__body .field--check:has(input[type="checkbox"]) {
  flex-direction: row-reverse;
  justify-content: flex-end;
  width: auto;
}

.modal__body input[type="checkbox"],
.modal__body input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  flex: 0 0 18px !important;
  margin: 0 !important;
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-chips .app-tag {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.app-chips .app-tag b {
  font-weight: 700;
}.app-toolbar--status {
  align-items: center;
  gap: 12px 16px;
}

.app-toolbar--filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.app-toolbar--filters > .app-field {
  max-width: none;
}

.app-toolbar--filters > .app-toolbar__actions {
  margin-left: 0;
  align-items: center;
  padding-bottom: 1px;
}

.app-toolbar--search {
  display: grid;
  grid-template-columns: minmax(0, 420px) auto;
  align-items: end;
  justify-content: start;
  gap: 12px;
}

.app-toolbar--search > .app-toolbar__actions {
  margin-left: 0;
  align-items: center;
  padding-bottom: 1px;
}

@media (max-width: 1000px) {
  .app-toolbar--filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-toolbar--filters > .app-toolbar__actions {
    grid-column: 1 / -1;
  }
}

.app-toolbar--status .app-toolbar__actions {
  align-items: center;
  gap: 8px;
}

.app-chips .app-stat__note {
  margin-left: 2px;
}

.app-card__meta {
  font-size: 12px;
  color: var(--app-faint);
  white-space: nowrap;
}

.app-card .notice {
  margin: 16px 20px;
  border-radius: var(--app-radius-sm);
}

.app-card__body > .notice,
.app-card__foot > .notice,
.modal .notice,
.app-form-grid > .notice {
  margin: 0;
}

.app-card > .notice:first-child {
  margin-top: 0;
}

.app-card .panel__foot--note {
  display: block;
  padding: 12px 20px;
  border-top: 1px solid var(--app-line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--app-faint);
}

.app-notes {
  display: grid;
  gap: 6px;
  padding: 14px 20px;
  border-top: 1px solid var(--app-line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--app-faint);
}

.app-notes p {
  margin: 0;
}

.app-stack {
  display: grid;
  gap: 16px;
}

.app-stack > .app-card {
  margin: 0;
}

.tab-panel > .app-card {
  margin: 0;
}

.app-card .data-table--fixed col.w-number {
  width: 158px;
}

.app-card .data-table--fixed col.w-status {
  width: 132px;
}

.app-card .data-table--fixed col.w-driver {
  width: 122px;
}

.app-card .data-table--fixed col.w-money {
  width: 100px;
}

.app-card .data-table--fixed col.w-actions {
  width: 150px;
}

.app-card .data-table tbody td.col-status {
  padding-right: 4px;
}

.app-card .data-table--duty col.w-vehicle {
  width: 164px;
}

.app-card .data-table--duty col.w-availability {
  width: 152px;
}

.app-card .data-table--duty col.w-position {
  width: 214px;
}

.app-card .data-table--duty col.w-active {
  width: 92px;
}

.app-card .data-table--duty col.w-shift {
  width: 224px;
}

.app-card .data-table--fixed col.w-check {
  width: 44px;
}

.app-card .data-table--fixed col.w-rating {
  width: 92px;
}

.app-card .data-table--fixed col.w-readiness {
  width: 236px;
}

.app-card .data-table--fixed col.w-docs {
  width: 228px;
}

.app-card .data-table--fixed col.w-services {
  width: 190px;
}

.app-card .data-table--fixed col.w-permits {
  width: 176px;
}

.app-card .data-table--fleet-vehicles col.w-status {
  width: 132px;
}

.app-card .data-table--fleet-vehicles col.w-readiness {
  width: 208px;
}

.app-card .data-table--fleet-vehicles col.w-docs {
  width: 198px;
}

.app-card .data-table--fleet-vehicles col.w-permits {
  width: 168px;
}

.app-card .data-table--fixed col.w-validity {
  width: 210px;
}

.app-card .data-table--fixed col.w-issued {
  width: 132px;
}

.app-card .data-table--fixed col.w-authority {
  width: 230px;
}

.app-card .data-table--fixed col.w-crew-code {
  width: 132px;
}

.app-card .data-table--fixed col.w-crew-stat {
  width: 128px;
}

.app-card .data-table--fleet-alerts col.w-alert {
  width: 300px;
}

.app-card .data-table--ride-history col.w-ride-number {
  width: 138px;
}

.app-card .data-table--ride-history col.w-ride-when {
  width: 156px;
}

.app-card .data-table--ride-history col.w-ride-driver {
  width: 148px;
}

.app-card .data-table--ride-history col.w-ride-money {
  width: 118px;
}

.app-card .data-table--fixed col.w-ride-actions {
  width: 138px;
}

.app-card .data-table--passengers col.w-passenger {
  width: 232px;
}

.app-card .data-table--passengers col.w-passenger-rating {
  width: 112px;
}

.app-card .data-table--passengers col.w-passenger-when {
  width: 168px;
}

.app-card .data-table--passengers col.w-passenger-money {
  width: 122px;
}

.app-card .data-table--coupons col.w-coupon-code {
  width: 122px;
}

.app-card .data-table--coupons col.w-coupon-kind {
  width: 110px;
}

.app-card .data-table--coupons col.w-coupon-discount {
  width: 132px;
}

.app-card .data-table--coupons col.w-coupon-min {
  width: 108px;
}

.app-card .data-table--coupons col.w-coupon-uses {
  width: 90px;
}

.app-card .data-table--coupons col.w-coupon-status {
  width: 110px;
}

.app-card .data-table--coupons col.w-coupon-actions {
  width: 214px;
}

.app-card .data-table--prices col.w-price-service {
  width: 176px;
}

.app-card .data-table--prices col.w-price-class {
  width: 156px;
}

.app-card .data-table--prices col.w-price-meter {
  width: 156px;
}

.app-card .data-table--prices col.w-price-methods {
  width: 145px;
}

.app-card .data-table--prices col.w-price-status {
  width: 100px;
}

.app-card .data-table--prices col.w-price-actions {
  width: 154px;
}

.app-card .data-table--zones col.w-zone-name {
  width: 194px;
}

.app-card .data-table--zones col.w-zone-code {
  width: 124px;
}

.app-card .data-table--zones col.w-zone-municipality {
  width: 152px;
}

.app-card .data-table--zones col.w-zone-surge {
  width: 152px;
}

.app-card .data-table--zones col.w-zone-status {
  width: 110px;
}

.app-card .data-table--fixed col.w-zone-actions {
  width: 118px;
}

.app-card .data-table--fixed col.w-zone-price-end {
  width: 214px;
}

.app-card .data-table--fixed col.w-zone-price-amount {
  width: 128px;
}

.app-card .data-table--payments col.w-payment-amount {
  width: 132px;
}

.app-card .data-table--payments col.w-payment-reference {
  width: 224px;
}

.app-card .data-table--payments col.w-payment-provider {
  width: 208px;
}

.app-card .data-table--payments col.w-payment-status {
  width: 168px;
}

.app-card .data-table--classes col.w-class-number {
  width: 124px;
}

.app-card .data-table--classes col.w-class-multiplier {
  width: 132px;
}

.scope-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

.scope-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--app-line-2);
  border-radius: 10px;
  background: var(--app-surface);
  font-size: 13px;
  cursor: pointer;
}

.scope-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 17px;
  accent-color: var(--app-accent);
}

.scope-option:has(input:checked) {
  border-color: var(--app-accent);
  color: var(--app-ink);
  font-weight: 600;
}

.scope-options:disabled .scope-option {
  cursor: default;
  opacity: 0.75;
}

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

.app-card .data-table--classes col.w-class-status {
  width: 132px;
}

.app-card .data-table--classes .app-identity img,
.app-card .data-table--classes .app-identity svg {
  flex: none;
  width: 34px;
  height: 24px;
}

.app-stats--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.app-stats--compact .app-stat {
  min-height: 0;
  padding: 12px 14px;
}

.app-stats--compact .app-stat b {
  font-size: 22px;
}

.app-card .data-table--fleet-alerts col.w-alert-when {
  width: 220px;
}

.app-cell-inline {
  margin-left: 6px;
  font-size: 13px;
  color: var(--app-ink-2);
}

.app-docs--tight {
  margin-top: 6px;
  gap: 4px;
}

.app-card .data-table--fixed col.w-menu {
  width: 78px;
}

.app-cell-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--app-faint);
}

.app-card .audit-code {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--app-faint);
}

.app-card .audit-badge {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--app-line-2);
  vertical-align: middle;
}

.app-card .audit-badge--ok {
  background: var(--app-ok);
}

.app-card .audit-badge--danger {
  background: var(--app-bad);
}

.app-card .audit-badge--accent {
  background: var(--app-accent);
}

.app-cell-clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-doc__date {
  font-size: 12px;
  color: var(--app-faint);
  white-space: nowrap;
}

.app-card .data-table .is-right {
  text-align: right;
}

.app-card .data-table .menu__trigger {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--app-line-2);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-ink-2);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.app-card .data-table .menu__trigger:hover {
  border-color: var(--app-accent);
  color: var(--app-accent-2);
}

.app-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-accent-soft);
}

.app-bulk__count {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--app-surface);
  font-size: 12px;
  font-weight: 650;
  color: var(--app-ink-2);
}

.app-card .cell-actions .app-btn--small {
  height: 30px;
  padding: 0 12px;
}
