:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7f8;
  --ink: #17211f;
  --muted: #64716d;
  --line: #dfe5e3;
  --teal: #22685f;
  --teal-dark: #174c46;
  --amber: #b76b12;
  --brick: #a33a2a;
  --blue: #314f77;
  --green-soft: #e9f6ef;
  --amber-soft: #fff4df;
  --brick-soft: #fae8e4;
  --blue-soft: #eaf0f8;
  --shadow: 0 16px 38px rgba(25, 38, 35, 0.08);
  --radius: 8px;
  --nav-width: 248px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 104, 95, 0.12), transparent 34%),
    #ffffff;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-card {
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-brand {
  margin: -6px 0 22px;
  padding: 0 0 18px;
  color: var(--ink);
  border-bottom-color: var(--line);
}

.login-brand span {
  color: var(--muted);
}

.login-subtitle {
  color: var(--muted);
}

.login-error {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid #f0c8c0;
  border-radius: 6px;
  background: var(--brick-soft);
  color: var(--brick);
  font-weight: 800;
}

.login-form {
  margin-top: 18px;
}

.site-page {
  min-height: 100vh;
  background: #ffffff;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.site-brand strong,
.site-brand small {
  display: block;
}

.site-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-main {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding: clamp(28px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.site-hero {
  max-width: 760px;
}

.site-hero h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.site-hero p {
  max-width: 610px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.site-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  background: #10201d;
  color: #fffdf8;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #e0ad52;
  color: #1c1710;
  border-radius: 6px;
  font-weight: 900;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block strong {
  font-size: 17px;
}

.brand-block span {
  color: #c4cbc6;
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dbe2dd;
  text-align: start;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.main-shell {
  min-width: 0;
  padding: 22px 28px 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 31px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

h3 {
  margin-bottom: 9px;
  font-size: 15px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-select {
  min-width: 174px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.user-select select,
.field select,
.field input,
.field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.customer-paid-box {
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
}

.customer-paid-box small {
  color: var(--muted);
  line-height: 1.4;
}

.customer-paid-box .ghost-button.active {
  background: #e6f4ef;
  color: var(--teal-dark);
  border-color: rgba(34, 104, 95, 0.36);
}

.money-field {
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.money-field input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.money-field strong {
  padding-inline: 10px;
  color: var(--teal);
  font-size: 12px;
  letter-spacing: 0;
}

.user-select select:focus,
.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(34, 104, 95, 0.12);
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 9px 12px;
  font-weight: 800;
  white-space: nowrap;
}

.icon-button svg,
.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.text-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.logout-link {
  text-decoration: none;
}

.user-select.locked select,
.user-select select:disabled {
  color: var(--muted);
  background: var(--surface-2);
  opacity: 1;
}

.primary-button {
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  background: var(--amber-soft);
  color: #5b370d;
  border-color: #e7c18b;
}

.ghost-button {
  background: transparent;
  color: var(--teal);
  border-color: var(--line);
}

.danger-button {
  background: var(--brick-soft);
  color: var(--brick);
  border-color: #e0b7b1;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card,
.panel,
.record-card,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 134px;
  display: grid;
  align-content: space-between;
  padding: 18px;
}

.stat-button {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: start;
}

.stat-button:hover {
  border-color: var(--teal);
}

.stat-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.15;
}

.stat-card span,
.muted,
.meta {
  color: var(--muted);
}

.stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.wide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.order-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.inline-panel {
  margin-top: 14px;
  box-shadow: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.summary-band h2 {
  margin-bottom: 5px;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.tab-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tab-button svg {
  width: 18px;
  height: 18px;
}

.tab-button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar-actions,
.month-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.compact-field {
  min-width: 150px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-field input,
.compact-field select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
}

.table-sort {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: start;
}

.table-sort svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted);
}

.table-sort.active {
  color: var(--teal);
}

.sortable-header {
  cursor: pointer;
  user-select: none;
}

.sortable-header::after {
  content: "↕";
  margin-inline-start: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sortable-header.sorted-asc::after {
  content: "↑";
  color: var(--teal);
}

.sortable-header.sorted-desc::after {
  content: "↓";
  color: var(--teal);
}

.search-box {
  min-width: min(360px, 100%);
  flex: 1;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

.formula-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.order-live-summary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(34, 104, 95, 0.22);
  border-radius: 8px;
  background: #eef8f2;
}

.summary-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.order-formula-line {
  display: grid;
  gap: 5px;
}

.order-live-summary span {
  color: #49615b;
  font-size: 12px;
  font-weight: 900;
}

.order-live-summary strong {
  color: var(--ink);
}

.order-live-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.order-live-totals div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 6px;
  background: #ffffff;
}

.order-live-totals div:last-child strong {
  color: var(--teal);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid #eee8dd;
  text-align: start;
  vertical-align: middle;
  font-size: 14px;
}

th {
  background: #f3f6f5;
  color: #3c4642;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.clickable-row {
  cursor: pointer;
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:hover {
  border-color: rgba(34, 104, 95, 0.36);
  background: #fbfdfc;
}

.clickable-row:hover td,
.selected-row td {
  background: #eef7f5;
}

.selected-row td:first-child {
  box-shadow: inset 4px 0 0 var(--teal);
}

[dir="rtl"] .selected-row td:first-child {
  box-shadow: inset -4px 0 0 var(--teal);
}

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invoice-toggle {
  position: relative;
  min-width: 178px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  isolation: isolate;
  overflow: hidden;
}

.invoice-toggle::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: calc(50% - 2px);
  border-radius: 999px;
  background: var(--green-soft);
  box-shadow: 0 1px 4px rgba(23, 33, 31, 0.08);
  transition:
    transform 160ms ease,
    background 160ms ease;
  z-index: 0;
}

.invoice-toggle.not-issued::before {
  background: var(--brick-soft);
  transform: translateX(100%);
}

[dir="rtl"] .invoice-toggle::before {
  inset: 2px 2px 2px auto;
}

[dir="rtl"] .invoice-toggle.not-issued::before {
  transform: translateX(-100%);
}

.invoice-toggle button {
  position: relative;
  z-index: 1;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
}

.invoice-toggle button.active {
  color: var(--teal);
}

.invoice-toggle.not-issued button.active {
  color: var(--brick);
}

.pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pill.status-new {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.status-quote {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill.status-measure {
  background: #e8e4f4;
  color: #574078;
}

.pill.status-agreed {
  background: #e8e4f4;
  color: #574078;
}

.pill.status-production {
  background: var(--amber-soft);
  color: #72470d;
}

.pill.status-install {
  background: #dcebef;
  color: #205364;
}

.pill.status-done {
  background: var(--green-soft);
  color: #216148;
}

.pill.status-debt {
  background: var(--brick-soft);
  color: var(--brick);
}

.pill.status-paid {
  background: var(--green-soft);
  color: #216148;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  padding: 14px;
  box-shadow: none;
}

.customer-detail {
  margin-bottom: 12px;
}

.customer-orders-list {
  margin-top: 12px;
}

.record-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.record-row + .record-row {
  margin-top: 10px;
}

.record-title {
  margin: 0;
  font-weight: 900;
}

.meta {
  margin: 3px 0 0;
  font-size: 13px;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  background: #e6ded0;
  border-radius: 999px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.total-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mini-total {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.report-line:last-child {
  border-bottom: 0;
}

.mini-total span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 33, 31, 0.48);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-inline-start-width: 5px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(25, 38, 35, 0.16);
  color: var(--ink);
  animation: toast-in 180ms ease-out;
}

.toast.success {
  border-inline-start-color: var(--teal);
}

.toast.error {
  border-inline-start-color: var(--brick);
}

.toast strong {
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 12px;
}

.toast.hide {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-panel {
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 20px;
}

.wide-modal {
  width: min(1120px, 100%);
}

.link-button {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  text-align: start;
  font-weight: 900;
}

.link-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-money {
  min-width: 132px;
}

.worker-payment-fields {
  margin-bottom: 12px;
}

.worker-profile-card {
  margin-bottom: 14px;
}

.worker-total-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quote-sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #ffffff;
}

.quote-lines {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #eadfc9;
  padding-bottom: 8px;
}

.mobile-nav {
  display: none;
}

[dir="rtl"] body {
  font-family:
    "Segoe UI", Tahoma, Arial, sans-serif;
}

[dir="rtl"] .eyebrow,
[dir="rtl"] th {
  text-transform: none;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-grid,
  .order-builder-grid,
  .two-column,
  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header .icon-button {
    width: 100%;
  }

  .app-shell {
    display: block;
    padding-bottom: 74px;
  }

  .sidebar {
    display: none;
  }

  .main-shell {
    padding: 16px 14px 22px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 16px;
  }

  .modal-header {
    flex-direction: column;
  }

  .modal-actions {
    width: 100%;
    justify-content: stretch;
  }

  .modal-actions button,
  .modal-actions a {
    flex: 1 1 150px;
  }

  h1 {
    font-size: 25px;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .order-live-totals {
    grid-template-columns: 1fr;
  }

  .worker-total-strip {
    grid-template-columns: 1fr;
  }

  .user-select {
    min-width: 0;
  }

  .dashboard-grid,
  .form-grid,
  .form-grid.three,
  .total-strip,
  .summary-band {
    grid-template-columns: 1fr;
  }

  .summary-actions {
    justify-content: stretch;
  }

  .summary-actions button {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button,
  .top-actions button {
    width: 100%;
  }

  .panel {
    padding: 14px;
  }

  .mobile-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    gap: 2px;
    padding: 7px;
    overflow-x: auto;
    background: #14211f;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-nav .nav-item {
    min-width: 78px;
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    font-size: 11px;
  }

  .mobile-nav .nav-item svg {
    width: 18px;
    height: 18px;
  }

  table {
    min-width: 660px;
  }
}

@media (max-width: 460px) {
  .top-actions {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 116px;
  }
}
