:root {
  color-scheme: light;
  --bg: #eef4f2;
  --panel: #ffffff;
  --soft: #f7faf9;
  --ink: #14212b;
  --muted: #5f6f7c;
  --line: #dbe3e8;
  --line-strong: #c3d1d7;
  --accent: #0f766e;
  --accent-dark: #0a5d57;
  --command: #10242d;
  --command-soft: #18323c;
  --command-line: #2d4a54;
  --command-ink: #edf8f6;
  --command-muted: #b8cbd0;
  --warn: #a16207;
  --ok: #157347;
  --overflow: #6d28d9;
  --shadow: 0 14px 30px rgba(16, 36, 45, 0.18);
  --shadow-soft: 0 10px 24px rgba(20, 33, 43, 0.08);
  --radius: 8px;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-shell {
  display: grid;
  gap: 16px;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 36, 45, 0.08), transparent 42%), var(--bg);
}

.auth-card, .queue-panel, .admin-placeholder, .admin-panel, .admin-sidebar, .detail-page {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-card h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.05; letter-spacing: 0; }
.auth-card h2 { margin-bottom: 14px; font-size: 18px; line-height: 1.2; letter-spacing: 0; }
.auth-card-compact { padding: 20px; }
.auth-copy { margin-bottom: 22px; color: var(--muted); line-height: 1.4; }

label { display: grid; gap: 7px; color: #33404b; font-size: 13px; font-weight: 850; }
.auth-card label + label { margin-top: 14px; }

input, select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  outline: 0;
}

input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14); }

.error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #9a3412;
  font-size: 13px;
  font-weight: 750;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  font-weight: 850;
  white-space: nowrap;
}

.btn:hover, .btn:focus-visible { border-color: #afbec7; box-shadow: 0 6px 14px rgba(20, 33, 43, 0.08); }
.btn.primary { border-color: var(--accent); color: #ffffff; background: var(--accent); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--accent-dark); }
.btn.subtle { color: var(--command-ink); border-color: rgba(237, 248, 246, 0.24); background: rgba(255, 255, 255, 0.1); }
.btn.danger { color: #7c2d12; border-color: #f3c5a6; background: #fff7ed; }
.btn.full { width: 100%; margin-top: 10px; }

.app-shell { min-height: 100vh; }

.operator-command {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(280px, 520px) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--command-line);
  background: linear-gradient(135deg, #10242d 0%, #173740 62%, #12302f 100%);
  box-shadow: var(--shadow);
}

.brand { display: flex; min-width: 0; align-items: center; gap: 12px; }

.profile-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(237, 248, 246, 0.26);
  border-radius: 50%;
  color: var(--command-ink);
  background: rgba(255, 255, 255, 0.1);
}

.profile-button:hover, .profile-button:focus-visible {
  border-color: rgba(237, 248, 246, 0.62);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(237, 248, 246, 0.12);
}

.profile-button svg { width: 22px; height: 22px; }
.brand h1 { margin: 0; color: var(--command-ink); font-size: 20px; line-height: 1.12; letter-spacing: 0; }

.header-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.header-ops span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(237, 248, 246, 0.17);
  border-radius: 999px;
  color: var(--command-muted);
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.header-ops strong { color: #ffffff; font-weight: 900; }

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(237, 248, 246, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.searchbox span { color: var(--command-muted); font-size: 13px; font-weight: 850; }
.searchbox input { min-width: 0; border: 0; color: #ffffff; background: transparent; }
.searchbox input::placeholder { color: rgba(237, 248, 246, 0.68); }

.top-actions { display: flex; gap: 8px; justify-content: flex-end; }
.operator-command .btn { border-color: rgba(237, 248, 246, 0.24); color: var(--command-ink); background: rgba(255, 255, 255, 0.11); }
.operator-command .btn.primary { border-color: #43c0b2; color: #06231f; background: #8ee4d7; }

.admin-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--command-line);
  color: var(--command-ink);
  background:
    linear-gradient(145deg, rgba(20, 86, 132, 0.2), transparent 44%),
    linear-gradient(180deg, #071525 0%, #0a1728 100%);
  box-shadow: 0 16px 36px rgba(7, 21, 37, 0.18);
}
.admin-command h1 { margin: 0 0 4px; color: #ffffff; font-size: 20px; font-weight: 850; }
.admin-command p { margin-bottom: 0; color: var(--command-muted); }
.user-block { display: grid; justify-items: end; gap: 4px; }
.user-block strong { color: #ffffff; }
.user-block span { color: var(--command-muted); font-size: 13px; }
.admin-command .btn.subtle {
  color: #b7c5d8;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
}

.admin-command .btn.subtle:hover,
.admin-command .btn.subtle:focus-visible {
  border-color: rgba(203, 213, 225, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 132px);
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-nav-item {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #334155;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.admin-nav-item:hover, .admin-nav-item:focus-visible {
  border-color: #dbeafe;
  background: #f8fbff;
  outline: 0;
}

.admin-nav-item.active {
  border-color: #dbeafe;
  color: var(--blue);
  background: linear-gradient(90deg, rgba(15, 93, 223, 0.11), rgba(15, 93, 223, 0.035));
  box-shadow: inset 3px 0 0 var(--blue);
}

.admin-nav-item.locked {
  color: #8b99a3;
  background: #f3f6f6;
}

.admin-panel {
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.admin-section-head h2 { margin: 0 0 4px; color: #0f172a; font-size: 21px; font-weight: 850; }
.admin-section-head p:last-child { margin: 0; color: #64748b; font-size: 13px; font-weight: 700; line-height: 1.35; }
.admin-section { background: #f6f8fb; }

.admin-table-wrap {
  padding: 12px;
  overflow: auto;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
}

.admin-table th, .admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-table td {
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.admin-table tbody tr:hover,
.admin-table tbody tr:focus-within {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(150px, 0.8fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.admin-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-deals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(380px, 0.9fr);
  gap: 12px;
  padding: 12px;
  background: #f6f8fb;
}

#admin-deals-section .admin-deals-grid {
  grid-template-columns: minmax(0, 1fr);
}

#admin-deals-section #admin-deal-detail {
  display: none;
}

.admin-deals-grid .admin-table-wrap { padding: 0; }
.admin-deals-table { min-width: 980px; }
.admin-deal-row { cursor: pointer; }
.admin-deal-row:hover, .admin-deal-row:focus-visible {
  background: #f4faf8;
  outline: 0;
}

.admin-detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.admin-detail-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.admin-detail-empty strong { color: var(--ink); font-size: 20px; }

.admin-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.admin-detail-header h3 { margin: 0 0 4px; color: #0f172a; font-size: 18px; font-weight: 850; line-height: 1.15; }
.admin-detail-header p:last-child { margin: 0; color: #64748b; font-size: 12px; font-weight: 750; }
.admin-detail-panel .detail-actions { padding: 12px; border-bottom: 1px solid var(--line); }
.admin-detail-panel .deal-metrics { padding: 12px; border-bottom: 1px solid var(--line); }

.admin-profit-card {
  margin: 12px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf5;
}

.admin-profit-card label {
  display: block;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-profit-card strong {
  display: block;
  margin-top: 4px;
  color: #047857;
  font-size: 18px;
}

.admin-detail-list {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-detail-list dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.admin-detail-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.report-filters {
  grid-template-columns: minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(170px, 0.9fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.report-search-field {
  min-width: 220px;
}

.admin-reports-content {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f6f8fb;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
}

.summary-cell.report-profit strong { color: var(--ok); }
.summary-cell.report-loss strong { color: #9a3412; }
.summary-cell.report-net strong { color: var(--blue); }

.admin-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-tab {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.report-tab:hover,
.report-tab:focus-visible,
.report-tab.active {
  border-color: rgba(0, 102, 204, 0.3);
  color: #0052cc;
  background: #eff6ff;
  outline: 0;
}

.report-filter-summary {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #64748b;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.report-gap-note {
  padding: 10px 12px;
  border: 1px solid #d8cda3;
  border-radius: var(--radius);
  color: #6f5607;
  background: #fff9e8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.report-workspace-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-workspace-panel .pane-head {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.report-placeholder-table {
  min-width: 760px;
}

.report-breakdowns-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-breakdown {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.report-breakdown .admin-table-wrap { padding: 0; }
.report-table { min-width: 620px; border: 0; border-radius: 0; box-shadow: none; }

.payment-filters {
  grid-template-columns: minmax(260px, 1.35fr) minmax(140px, 0.7fr) minmax(130px, 0.65fr) minmax(130px, 0.65fr) minmax(130px, 0.65fr) minmax(130px, 0.65fr) minmax(150px, 0.8fr) minmax(140px, 0.75fr) auto auto;
}

.admin-payments-table {
  min-width: 1080px;
}

.admin-payment-row:hover, .admin-payment-row:focus-visible {
  background: #f4faf8;
  outline: 0;
}

.admin-payment-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

main { max-width: 1600px; margin: 0 auto; padding: 18px 22px 80px; }
.view { display: block; }
.workspace-grid { display: grid; min-height: calc(100vh - 112px); }

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f2f7f6);
}
.pane-head h2 { margin: 0; font-size: 20px; letter-spacing: 0; }

.queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #edf5f3;
}

.summary-cell, .metric-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #ccdadf;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(20, 33, 43, 0.04);
}

.summary-cell label, .metric-card label, .field > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.summary-cell strong, .metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0;
}

.summary-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 800; }
.summary-cell.collected strong, .metric-card.collected strong { color: var(--accent-dark); }
.summary-cell.remaining, .metric-card.remaining { border-color: #b7d6d0; background: #f1faf8; }
.summary-cell.remaining strong, .metric-card.remaining strong { color: var(--accent-dark); font-size: 22px; }
.metric-card.remaining.warning { border-color: #e6c777; background: #fff8e6; }
.metric-card.remaining.warning label, .metric-card.remaining.warning strong { color: var(--warn); }
.metric-card.remaining.success { border-color: #bee2cb; background: #f0faf3; }
.metric-card.remaining.success label, .metric-card.remaining.success strong { color: var(--ok); }
.metric-card.remaining.overflow { border-color: #c4b5fd; background: #f5f3ff; }
.metric-card.remaining.overflow label, .metric-card.remaining.overflow strong { color: var(--overflow); }

.state-line {
  min-height: 22px;
  padding: 9px 12px 0;
  color: var(--muted);
  background: #edf5f3;
  font-size: 13px;
  font-weight: 800;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 12px;
  min-height: 360px;
  padding: 12px;
  background: #edf5f3;
}

.deal-card {
  display: grid;
  gap: 11px;
  min-height: 250px;
  padding: 13px;
  border: 1px solid #c5d5da;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
  box-shadow: 0 9px 22px rgba(20, 33, 43, 0.1);
}
.deal-card.highlighted { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14), 0 9px 22px rgba(20, 33, 43, 0.1); }
.deal-meta, .deal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.recipient { font-size: 18px; font-weight: 900; line-height: 1.18; letter-spacing: 0; }
.requisites { color: var(--muted); font-size: 12px; line-height: 1.35; }
.deal-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.deal-metrics .metric-card { padding: 9px; }
.deal-metrics .metric-card strong { font-size: 14px; }
.deal-metrics .metric-card.remaining strong { font-size: 18px; }

.progress-bar {
  height: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef3f6;
}
.progress-fill {
  width: var(--progress);
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.progress-fill.warning { background: var(--warn); }
.progress-fill.success { background: var(--ok); }
.progress-fill.overflow { background: var(--overflow); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f7fafb;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}
.empty-state strong { color: var(--ink); font-size: 20px; }

.admin-placeholder { padding: 22px; border-radius: 8px; background: #ffffff; }
.admin-placeholder h2,
.admin-placeholder h3 { margin-bottom: 8px; color: #0f172a; font-size: 18px; font-weight: 850; }
.admin-placeholder p:last-child { margin-bottom: 0; color: #64748b; font-size: 13px; font-weight: 700; }

.message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bee2cb;
  border-radius: var(--radius);
  color: #14532d;
  background: #f0faf3;
  font-size: 13px;
  font-weight: 800;
}
.message.error-message { border-color: #f1c38b; color: #7c4a03; background: #fff8e6; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(11, 22, 30, 0.38);
}
.overlay.open { display: block; }
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(500px, 100vw);
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}
.surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.surface-head h2 { margin: 0 0 4px; }
.surface-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.form-body { display: grid; gap: 12px; padding: 16px; }
.field { display: grid; gap: 6px; }
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.segmented label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.segmented input { width: 16px; min-height: 16px; accent-color: var(--accent); }
.assigned-note {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--soft);
  font-size: 13px;
  font-weight: 850;
}
.assigned-note strong { display: block; margin-top: 3px; color: var(--ink); }

@media (max-width: 1280px) {
  .deal-grid { grid-template-columns: repeat(3, minmax(230px, 1fr)); }
  .report-summary-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
}

@media (max-width: 1050px) {
  .operator-command { grid-template-columns: 1fr; }
  .top-actions { justify-content: flex-start; flex-wrap: wrap; }
  .queue-summary, .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-filters, .admin-deals-grid, .report-breakdowns-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .operator-command, .admin-command, main { padding-inline: 14px; }
  .brand { align-items: flex-start; }
  .header-ops { align-items: flex-start; flex-direction: column; }
  .searchbox {
    height: auto;
    min-height: 46px;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 8px;
  }
  .top-actions, .queue-summary, .deal-grid, .deal-metrics, .segmented {
    grid-template-columns: 1fr;
  }
  .top-actions { display: grid; width: 100%; }
  .top-actions .btn { width: 100%; }
  .admin-command { align-items: flex-start; flex-direction: column; }
  .user-block { justify-items: start; }
  .admin-sidebar { grid-template-columns: 1fr; }
  .admin-section-head { flex-direction: column; }
  .admin-section-head .btn { width: 100%; }
  .admin-detail-header { flex-direction: column; }
  .admin-detail-list { grid-template-columns: 1fr; }
  .report-summary-grid { grid-template-columns: 1fr; }
}

.deal-card:hover, .deal-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1), 0 9px 22px rgba(20, 33, 43, 0.1);
  outline: 0;
}

.progress-bar.large { height: 18px; }
.pill.warning { color: var(--warn); border-color: #e6c777; background: #fff8e6; }
.pill.success { color: var(--ok); border-color: #bee2cb; background: #f0faf3; }
.pill.overflow { color: var(--overflow); border-color: #c4b5fd; background: #f5f3ff; }
.pill.danger { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.empty-state.compact { min-height: 160px; }

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.form-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.button-row { display: flex; justify-content: flex-end; gap: 10px; }
.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.checkline input { width: 16px; min-height: 16px; accent-color: var(--accent); }

.detail-page { overflow: hidden; }
.detail-control-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #edf6f4 100%);
}
.detail-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.detail-title-row h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.12; letter-spacing: 0; }
.detail-title-row p:last-child { margin: 0; color: var(--muted); font-weight: 800; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-progress-block { display: grid; gap: 8px; }
.progress-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 850; }
.progress-label strong { color: var(--ink); font-size: 16px; }

.detail-work-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  gap: 14px;
  padding: 14px;
  background: #edf5f3;
}
.history-panel, .requisite-panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(20, 33, 43, 0.07);
}
.inline-head { padding: 12px; }
.inline-head h3 { margin: 0; font-size: 18px; }
.payment-list { display: grid; gap: 10px; padding: 12px; }
.payment-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) minmax(220px, 1.4fr) minmax(110px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfefd;
}
.payment-row:hover, .payment-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
  outline: 0;
}
.payment-row div { display: grid; gap: 4px; min-width: 0; }
.payment-row strong { font-size: 17px; }
.payment-row span { color: var(--muted); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.payment-actions { justify-items: end; }
.link-button {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 900;
}
.requisite-panel { padding: 14px; }
.requisite-panel dl { display: grid; gap: 9px; margin: 0; }
.requisite-panel dt { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.requisite-panel dd { margin: -5px 0 0; font-weight: 850; overflow-wrap: anywhere; }

.receipt-modal { width: min(760px, calc(100vw - 28px)); }
.receipt-preview { padding: 16px; background: #edf5f3; }
.pdf-mock {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: repeating-linear-gradient(180deg, #ffffff, #ffffff 22px, #f5f8f8 23px, #f5f8f8 24px);
  text-align: center;
}
.pdf-mock strong { color: var(--ink); font-size: 22px; }
.pdf-lines {
  width: min(360px, 80%);
  height: 110px;
  margin-top: 14px;
  border-block: 12px solid #dce7e8;
  background: linear-gradient(#dce7e8 0 0) 0 20px / 100% 10px no-repeat,
    linear-gradient(#dce7e8 0 0) 0 50px / 82% 10px no-repeat,
    linear-gradient(#dce7e8 0 0) 0 80px / 64% 10px no-repeat;
}

.operator-panel-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.4fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #edf5f3;
  box-shadow: 0 8px 20px rgba(20, 33, 43, 0.06);
}

.statistics-tools {
  grid-template-columns: 1fr;
}

.quick-filter-panel {
  display: grid;
  gap: 10px;
}

.period-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.period-chip {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
}

.period-chip.active {
  color: #ffffff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.date-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.archive-results {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.archive-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(320px, 1.6fr) minmax(180px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fbfefd;
  box-shadow: 0 6px 18px rgba(20, 33, 43, 0.06);
}

.archive-row > div:first-child {
  display: grid;
  gap: 5px;
}

.archive-row > div:first-child strong {
  font-size: 17px;
}

.archive-row > div:first-child span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.statistics-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.statistics-cards .summary-cell {
  min-height: 118px;
  background: #fbfefd;
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(20, 33, 43, 0.06);
}

.statistics-cards .summary-cell strong {
  font-size: 26px;
}

.polished-empty {
  border: 1px dashed var(--line-strong);
  background: #fbfefd;
}

@media (max-width: 1050px) {
  .detail-work-area { grid-template-columns: 1fr; }
  .payment-row { grid-template-columns: 1fr; }
  .operator-panel-tools { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 1fr; }
  .archive-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .detail-title-row { grid-template-columns: 1fr; }
  .button-row { display: grid; }
  .date-filter-row,
  .statistics-cards { grid-template-columns: 1fr; }
}


.archive-filters {
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
}

.admin-archive-table {
  min-width: 1120px;
}

.admin-archive-row {
  cursor: pointer;
}

.admin-archive-row:hover,
.admin-archive-row:focus-visible {
  background: #f4faf8;
  outline: 0;
}

.archive-detail-header {
  background: #edf5f3;
  border-bottom: 1px solid var(--line);
}


.receipt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  background: #edfdfb;
  font-size: 11px;
  font-weight: 900;
}

.receipt-file-action {
  position: relative;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.danger-link {
  color: var(--danger);
}

.pdf-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* Visual Refresh Only: reference-aligned FinTech SaaS surface without workflow changes. */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #d8e0ea;
  --accent: #0f8f78;
  --accent-dark: #067560;
  --blue: #0f5ddf;
  --blue-dark: #0b49b7;
  --command: #071525;
  --command-soft: #0e2238;
  --command-line: rgba(148, 163, 184, 0.18);
  --command-ink: #f8fafc;
  --command-muted: #9fb0c5;
  --warn: #f59e0b;
  --ok: #0f8f78;
  --danger: #dc2626;
  --overflow: #7c3aed;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at 14% 0%, rgba(15, 93, 223, 0.06), transparent 28%),
    linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
}

.auth-card,
.queue-panel,
.admin-placeholder,
.admin-panel,
.admin-sidebar,
.detail-page,
.history-panel,
.requisite-panel,
.modal,
.drawer,
.admin-detail-panel,
.admin-table,
.report-breakdown {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.btn {
  min-height: 38px;
  padding: 0 13px;
  border-color: var(--line);
  border-radius: 7px;
  color: #152238;
  background: #ffffff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.02);
}

.btn:hover,
.btn:focus-visible {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  outline: 0;
}

.btn.primary {
  border-color: var(--blue);
  color: #ffffff;
  background: linear-gradient(180deg, #1769e8, var(--blue));
  box-shadow: 0 8px 20px rgba(15, 93, 223, 0.2);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: linear-gradient(180deg, #0f5ddf, var(--blue-dark));
}

.btn.danger {
  color: var(--danger);
  border-color: #fecaca;
  background: #fffafa;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
  opacity: 0.72;
}

.btn:disabled:hover,
.btn:disabled:focus-visible {
  border-color: #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
}

input,
select {
  min-height: 38px;
  border-color: var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
}

input:focus,
select:focus {
  border-color: #9bbcf4;
  box-shadow: 0 0 0 3px rgba(15, 93, 223, 0.12);
}

main {
  max-width: 1480px;
  padding: 20px 24px 72px;
}

.operator-command {
  min-height: 72px;
  grid-template-columns: minmax(360px, 1.05fr) minmax(260px, 420px) auto;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--command-line);
  background:
    linear-gradient(145deg, rgba(20, 86, 132, 0.22), transparent 44%),
    linear-gradient(180deg, #071525 0%, #0a1728 100%);
  box-shadow: 0 16px 36px rgba(7, 21, 37, 0.18);
}

.profile-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  color: #e7f9ff;
  background: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 26px rgba(8, 47, 73, 0.28);
}

.brand h1 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
}

.header-ops {
  gap: 6px;
}

.header-ops span {
  min-height: 22px;
  padding: 0 8px;
  border-color: rgba(148, 163, 184, 0.16);
  color: var(--command-muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 700;
}

.header-ops strong {
  color: #ffffff;
}

.searchbox {
  height: 40px;
  border-color: rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.085);
  box-shadow: none;
}

.searchbox span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.searchbox input {
  font-size: 13px;
}

.operator-command .btn {
  min-height: 38px;
  color: #e5edf8;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
}

.operator-command .btn:hover,
.operator-command .btn:focus-visible {
  border-color: rgba(203, 213, 225, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.operator-command .btn.primary {
  color: #ffffff;
  border-color: #1d64e8;
  background: linear-gradient(180deg, #1d6ff2, #0d55d7);
  box-shadow: 0 12px 26px rgba(15, 93, 223, 0.35);
}

.operator-command .btn.subtle {
  color: #b7c5d8;
}

.queue-panel {
  overflow: hidden;
  border-radius: 9px;
  background: #ffffff;
}

.pane-head {
  align-items: center;
  min-height: 66px;
  padding: 16px 18px;
  background: #ffffff;
}

.pane-head h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 850;
}

.eyebrow {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

.pill {
  min-height: 26px;
  padding: 0 9px;
  border-color: #dbeafe;
  color: #14532d;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 750;
}

.pill.warning {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.pill.success {
  color: #047857;
  border-color: #bbf7d0;
  background: #dcfce7;
}

.pill.overflow {
  color: #5b21b6;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.pill.danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.queue-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  background: #ffffff;
}

.queue-summary .summary-cell {
  border-width: 0 1px 1px 0;
  border-radius: 0;
  box-shadow: none;
}

.summary-cell,
.metric-card {
  padding: 12px;
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.summary-cell label,
.metric-card label,
.field > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.summary-cell strong,
.metric-card strong {
  color: #111827;
  font-size: 15px;
  font-weight: 850;
}

.summary-cell.collected strong,
.metric-card.collected strong {
  color: #047857;
}

.summary-cell.remaining,
.metric-card.remaining {
  border-color: #dbeafe;
  background: #f8fbff;
}

.summary-cell.remaining strong,
.metric-card.remaining strong {
  color: #075985;
  font-size: 18px;
}

.state-line {
  min-height: 0;
  padding: 8px 18px 0;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
}

.deal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 360px;
  padding: 0;
  background: #ffffff;
}

.deal-card {
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 1.2fr) minmax(220px, 1.45fr) minmax(230px, 1.5fr) minmax(110px, 0.6fr);
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 13px 18px;
  border-width: 0 0 1px;
  border-color: #edf2f7;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.deal-card:hover,
.deal-card:focus-visible {
  border-color: #dbeafe;
  background: linear-gradient(90deg, rgba(15, 93, 223, 0.075), rgba(15, 93, 223, 0.02) 58%, transparent);
  box-shadow: inset 3px 0 0 var(--blue);
}

.deal-card.highlighted {
  border-color: #dbeafe;
  background: linear-gradient(90deg, rgba(15, 93, 223, 0.1), rgba(15, 93, 223, 0.025) 58%, transparent);
  box-shadow: inset 3px 0 0 var(--blue);
}

.deal-meta,
.deal-footer {
  display: grid;
  justify-content: start;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.deal-meta span:first-child {
  color: var(--blue);
  font-weight: 850;
}

.recipient {
  color: #0f172a;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.requisites {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.deal-card > .progress-bar {
  width: 100%;
}

.deal-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.deal-card .deal-metrics .metric-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.deal-card .deal-metrics .metric-card label {
  margin-bottom: 3px;
  color: #94a3b8;
  font-size: 10px;
}

.deal-card .deal-metrics .metric-card strong,
.deal-card .deal-metrics .metric-card.remaining strong {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.deal-card .deal-metrics .metric-card.remaining strong {
  color: #075985;
}

.progress-bar {
  height: 7px;
  border: 0;
  background: #e8edf3;
}

.progress-bar.large {
  height: 9px;
}

.progress-fill {
  background: #0f8f78;
}

.progress-fill.warning {
  background: var(--warn);
}

.progress-fill.success {
  background: #0f8f78;
}

.progress-fill.overflow {
  background: var(--overflow);
}

.detail-page {
  overflow: hidden;
  background: #ffffff;
}

.detail-control-panel {
  gap: 16px;
  padding: 20px;
  border-bottom-color: var(--line);
  background: #ffffff;
}

.detail-title-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.detail-title-row h2 {
  color: #0f172a;
  font-size: 26px;
  font-weight: 850;
}

.detail-title-row p:last-child {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.detail-actions {
  gap: 10px;
}

.detail-progress-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.progress-label {
  color: #64748b;
}

.progress-label strong {
  color: #0f172a;
}

.detail-work-area {
  gap: 14px;
  padding: 14px;
  background: #f6f8fb;
}

.history-panel,
.requisite-panel {
  border-radius: 8px;
  background: #ffffff;
}

.inline-head {
  min-height: 58px;
  background: #ffffff;
}

.inline-head h3 {
  font-size: 16px;
}

.payment-list {
  gap: 0;
  padding: 0;
}

.payment-row {
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) minmax(220px, 1.4fr) minmax(110px, auto);
  padding: 12px 14px;
  border-width: 1px 0 0;
  border-color: #edf2f7;
  border-radius: 0;
  background: #ffffff;
}

.payment-row:hover,
.payment-row:focus-visible {
  border-color: #dbeafe;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.payment-row strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
}

.payment-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

.danger-link {
  color: var(--danger);
}

.requisite-panel {
  padding: 16px;
}

.requisite-panel dl {
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
  gap: 13px 16px;
}

.requisite-panel dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.requisite-panel dd {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.overlay {
  background: rgba(9, 21, 36, 0.42);
  backdrop-filter: blur(5px);
}

.drawer,
.modal {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
}

.surface-head {
  padding: 18px;
  background: #ffffff;
}

.surface-head h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 850;
}

.form-body {
  gap: 13px;
  padding: 18px;
  background: #fbfdff;
}

.segmented label,
.checkline,
.assigned-note {
  border-color: var(--line);
  background: #ffffff;
}

.period-chip {
  min-height: 34px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
}

.period-chip.active {
  border-color: var(--blue);
  background: var(--blue);
}

.operator-panel-tools,
.archive-row,
.statistics-cards .summary-cell {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.receipt-badge {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff7f7;
}

@media (max-width: 1180px) {
  .deal-card {
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(210px, 1.4fr);
  }
  .deal-card .progress-bar,
  .deal-card .deal-footer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  main {
    padding-inline: 12px;
  }
  .operator-command {
    gap: 12px;
    padding: 12px;
  }
  .deal-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 14px;
    border-width: 0 0 1px;
  }
  .queue-summary,
  .deal-card .deal-metrics {
    grid-template-columns: 1fr;
  }
  .detail-title-row,
  .detail-work-area,
  .payment-row,
  .requisite-panel dl {
    grid-template-columns: 1fr;
  }
}

/* Operator UI Density Polish v1: compact existing workflow without behavior changes. */
:root {
  --overflow: #0f8f78;
}

#operator-workspace .queue-panel {
  border-radius: 8px;
}

#operator-workspace .pane-head {
  min-height: 52px;
  padding: 11px 16px;
}

#operator-workspace .pane-head h2 {
  font-size: 21px;
}

#operator-workspace .queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 0;
  border-top: 1px solid #eef2f7;
  background: #ffffff;
}

#operator-workspace .queue-summary .summary-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 10px;
  min-height: 48px;
  padding: 8px 12px;
}

#operator-workspace .queue-summary .summary-cell label {
  font-size: 10px;
}

#operator-workspace .queue-summary .summary-cell strong {
  margin-top: 0;
  font-size: 14px;
  line-height: 1;
  text-align: right;
}

#operator-workspace .queue-summary .summary-cell.remaining strong {
  font-size: 16px;
}

#operator-workspace .queue-summary .summary-cell small {
  grid-column: 1 / -1;
  margin-top: -1px;
  font-size: 10px;
}

#operator-workspace .state-line {
  min-height: 14px;
  padding: 5px 16px 0;
  font-size: 11px;
}

#operator-workspace .deal-grid {
  min-height: 0;
}

#operator-workspace .deal-card {
  grid-template-columns:
    minmax(120px, 0.95fr)
    minmax(150px, 1.15fr)
    minmax(150px, 1fr)
    minmax(90px, 0.7fr)
    minmax(200px, 1.35fr)
    minmax(94px, 0.65fr);
  gap: 10px;
  min-height: 58px;
  padding: 9px 16px;
}

#operator-workspace .deal-meta,
#operator-workspace .deal-footer {
  gap: 2px;
  font-size: 11px;
  line-height: 1.25;
}

#operator-workspace .recipient {
  font-size: 13px;
  line-height: 1.2;
}

#operator-workspace .requisites {
  font-size: 11px;
  line-height: 1.25;
}

#operator-workspace .deal-card .progress-bar {
  height: 5px;
  min-width: 82px;
}

#operator-workspace .deal-card .deal-metrics {
  gap: 6px;
}

#operator-workspace .deal-card .deal-metrics .metric-card label {
  margin-bottom: 1px;
  font-size: 9px;
}

#operator-workspace .deal-card .deal-metrics .metric-card strong,
#operator-workspace .deal-card .deal-metrics .metric-card.remaining strong {
  font-size: 12px;
  line-height: 1.1;
}

#operator-workspace .deal-card .pill {
  min-height: 21px;
  padding-inline: 7px;
  font-size: 11px;
}

#operator-workspace .metric-card.remaining.overflow,
#operator-workspace .pill.overflow {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

#operator-workspace .metric-card.remaining.overflow label,
#operator-workspace .metric-card.remaining.overflow strong,
#operator-workspace .pill.overflow {
  color: #047857;
}

#operator-workspace .progress-fill.overflow {
  background: #0f8f78;
}

#operator-workspace .detail-page {
  border-radius: 8px;
}

#operator-workspace .detail-control-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 12px 16px;
}

#operator-workspace .detail-title-row {
  grid-column: 1 / 2;
  gap: 10px;
}

#operator-workspace .detail-title-row .btn {
  min-height: 32px;
  padding-inline: 10px;
}

#operator-workspace .detail-title-row h2 {
  font-size: 21px;
  line-height: 1.1;
}

#operator-workspace .detail-title-row p:last-child {
  font-size: 12px;
}

#operator-workspace .detail-title-row .eyebrow {
  margin-bottom: 3px;
  font-size: 9px;
}

#operator-workspace .detail-title-row > .pill {
  min-height: 24px;
  align-self: center;
}

#operator-workspace .detail-actions {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: center;
  justify-content: flex-end;
}

#operator-workspace .detail-actions .btn {
  min-height: 34px;
  padding-inline: 11px;
  border-radius: 7px;
  font-size: 12px;
}

#operator-workspace .detail-progress-block {
  grid-column: 1 / 2;
  gap: 6px;
  padding: 8px 10px;
}

#operator-workspace .detail-progress-block .progress-label {
  font-size: 11px;
}

#operator-workspace .detail-progress-block .progress-label strong {
  font-size: 13px;
}

#operator-workspace .detail-progress-block .progress-bar.large {
  height: 6px;
}

#operator-workspace .detail-control-panel > .deal-metrics {
  grid-column: 2 / 3;
  align-self: stretch;
  min-width: min(390px, 40vw);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

#operator-workspace .detail-control-panel > .deal-metrics .metric-card {
  display: grid;
  align-content: center;
  min-height: 46px;
  padding: 7px 10px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

#operator-workspace .detail-control-panel > .deal-metrics .metric-card:last-child {
  border-right: 0;
}

#operator-workspace .detail-control-panel > .deal-metrics .metric-card label {
  font-size: 9px;
}

#operator-workspace .detail-control-panel > .deal-metrics .metric-card strong {
  margin-top: 2px;
  font-size: 13px;
}

#operator-workspace .detail-control-panel > .deal-metrics .metric-card.remaining strong {
  font-size: 15px;
}

#operator-workspace .detail-work-area {
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 320px);
  gap: 12px;
  padding: 12px;
}

#operator-workspace .history-panel {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#operator-workspace .inline-head {
  min-height: 46px;
  padding: 10px 12px;
}

#operator-workspace .inline-head h3 {
  font-size: 15px;
}

#operator-workspace .payment-list {
  gap: 0;
  padding: 0;
}

#operator-workspace .payment-row {
  grid-template-columns: minmax(130px, 0.9fr) minmax(150px, 0.9fr) minmax(210px, 1.25fr) minmax(92px, auto);
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
}

#operator-workspace .payment-row strong {
  font-size: 14px;
}

#operator-workspace .payment-row span {
  font-size: 11px;
  line-height: 1.25;
}

#operator-workspace .payment-row div {
  gap: 2px;
}

#operator-workspace .payment-actions {
  align-content: center;
}

#operator-workspace .requisite-panel {
  padding: 12px;
}

#operator-workspace .requisite-panel dl {
  gap: 8px 12px;
}

#operator-workspace .requisite-panel dt {
  font-size: 10px;
}

#operator-workspace .requisite-panel dd {
  font-size: 12px;
}

#operator-workspace .drawer {
  width: min(460px, 100vw);
}

#operator-workspace .drawer .surface-head,
#operator-workspace .modal .surface-head {
  padding: 14px 16px;
}

#operator-workspace .drawer .form-body,
#operator-workspace .modal .form-body {
  gap: 10px;
  padding: 14px 16px;
}

#operator-workspace .drawer input,
#operator-workspace .drawer select,
#operator-workspace .modal input,
#operator-workspace .modal select {
  min-height: 36px;
}

@media (max-width: 1180px) {
  #operator-workspace .deal-card {
    grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.2fr) minmax(190px, 1.4fr);
    min-height: 64px;
  }

  #operator-workspace .detail-control-panel {
    grid-template-columns: 1fr;
  }

  #operator-workspace .detail-actions,
  #operator-workspace .detail-progress-block,
  #operator-workspace .detail-control-panel > .deal-metrics {
    grid-column: 1 / -1;
  }

  #operator-workspace .detail-actions {
    grid-row: auto;
    justify-content: flex-start;
  }

  #operator-workspace .detail-control-panel > .deal-metrics {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  #operator-workspace .queue-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #operator-workspace .queue-summary .summary-cell {
    grid-template-columns: 1fr;
  }

  #operator-workspace .queue-summary .summary-cell strong {
    text-align: left;
  }

  #operator-workspace .deal-card,
  #operator-workspace .payment-row {
    grid-template-columns: 1fr;
  }

  #operator-workspace .detail-title-row {
    grid-template-columns: 1fr;
  }
}

/* Operator Archive Modal Redesign: compact SaaS list, workflow unchanged. */
#archive-overlay .wide-modal {
  width: min(1280px, calc(100vw - 40px));
  max-height: min(820px, calc(100vh - 40px));
  overflow: hidden;
}

#archive-overlay .surface-head {
  align-items: center;
  padding: 14px 18px;
}

#archive-overlay .surface-head h2 {
  font-size: 21px;
}

#archive-overlay .surface-head p:last-child {
  margin-top: 2px;
  font-size: 12px;
}

#archive-overlay .operator-panel-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 10px 12px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

#archive-overlay .operator-panel-tools > .field {
  flex: 1 1 340px;
  min-width: 280px;
}

#archive-overlay .operator-panel-tools .field > span,
#archive-overlay .quick-filter-panel .field > span {
  font-size: 9px;
}

#archive-overlay #archive-search {
  min-height: 34px;
}

#archive-overlay .quick-filter-panel {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

#archive-overlay .period-chips {
  flex-wrap: nowrap;
  gap: 6px;
}

#archive-overlay .period-chip {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 11px;
}

#archive-overlay .date-filter-row {
  display: flex;
  align-items: end;
  gap: 8px;
}

#archive-overlay .date-filter-row .field {
  width: 132px;
}

#archive-overlay .date-filter-row input {
  min-height: 34px;
  padding-inline: 8px;
}

#archive-overlay #archive-status {
  min-height: 28px;
  padding: 8px 14px 0;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
  font-size: 11px;
}

#archive-overlay .archive-results {
  display: grid;
  gap: 0;
  max-height: calc(100vh - 270px);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

#archive-overlay .archive-row {
  display: grid;
  grid-template-columns:
    minmax(72px, 0.45fr)
    minmax(116px, 0.75fr)
    minmax(210px, 1.35fr)
    minmax(132px, 0.95fr)
    minmax(100px, 0.72fr)
    minmax(108px, 0.78fr)
    minmax(104px, 0.74fr)
    minmax(140px, auto);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 9px 12px;
  border-width: 0 0 1px;
  border-color: #eef2f7;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

#archive-overlay .archive-row:hover,
#archive-overlay .archive-row:focus-within {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

#archive-overlay .archive-cell {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#archive-overlay .archive-cell span {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#archive-overlay .archive-cell strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#archive-overlay .archive-id strong {
  color: var(--blue);
}

#archive-overlay .archive-requisite strong {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

#archive-overlay .archive-cell.numeric {
  justify-items: end;
  text-align: right;
}

#archive-overlay .archive-result.positive strong {
  color: #047857;
}

#archive-overlay .archive-result.negative strong {
  color: #dc2626;
}

#archive-overlay .archive-result.zero strong {
  color: #64748b;
}

#archive-overlay .archive-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#archive-overlay .archive-actions .btn {
  min-height: 32px;
  padding-inline: 10px;
  border-radius: 7px;
  font-size: 11px;
}

#archive-overlay .polished-empty {
  margin: 12px;
}

@media (max-width: 1180px) {
  #archive-overlay .wide-modal {
    width: min(1040px, calc(100vw - 28px));
  }

  #archive-overlay .operator-panel-tools {
    flex-wrap: wrap;
  }

  #archive-overlay .archive-row {
    grid-template-columns:
      minmax(56px, 0.42fr)
      minmax(76px, 0.62fr)
      minmax(140px, 1.2fr)
      minmax(96px, 0.8fr)
      minmax(72px, 0.62fr)
      minmax(72px, 0.62fr)
      minmax(76px, 0.64fr)
      minmax(100px, auto);
    gap: 8px;
    padding-inline: 10px;
  }

  #archive-overlay .archive-cell strong {
    font-size: 11px;
  }

  #archive-overlay .archive-cell span {
    font-size: 8px;
  }

  #archive-overlay .archive-actions .btn {
    min-height: 30px;
    padding-inline: 8px;
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  #archive-overlay .wide-modal {
    width: calc(100vw - 20px);
  }

  #archive-overlay .operator-panel-tools,
  #archive-overlay .quick-filter-panel,
  #archive-overlay .date-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  #archive-overlay .period-chips {
    flex-wrap: wrap;
  }

  #archive-overlay .operator-panel-tools > .field,
  #archive-overlay .date-filter-row .field {
    width: 100%;
    min-width: 0;
  }

  #archive-overlay .archive-row {
    grid-template-columns: 1fr 1fr;
    min-height: 0;
  }

  #archive-overlay .archive-requisite,
  #archive-overlay .archive-actions {
    grid-column: 1 / -1;
  }

  #archive-overlay .archive-cell.numeric {
    justify-items: start;
    text-align: left;
  }

  #archive-overlay .archive-actions {
    justify-content: flex-start;
  }
}

/* Operator Archive CRM Table: approved table presentation, workflow unchanged. */
#archive-overlay .wide-modal {
  width: min(1280px, calc(100vw - 40px));
}

#archive-overlay .operator-panel-tools {
  align-items: center;
}

#archive-overlay .archive-results {
  display: block;
  max-height: calc(100vh - 252px);
  overflow: hidden;
  border-top: 1px solid #eef2f7;
}

#archive-overlay .archive-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: inherit;
  min-height: 240px;
  background: #ffffff;
}

#archive-overlay .archive-table-head,
#archive-overlay .archive-row {
  display: grid;
  grid-template-columns:
    minmax(68px, 0.52fr)
    minmax(118px, 0.86fr)
    minmax(210px, 1.55fr)
    minmax(112px, 0.84fr)
    minmax(98px, 0.72fr)
    minmax(104px, 0.76fr)
    minmax(96px, 0.7fr)
    minmax(128px, auto);
  column-gap: 14px;
  align-items: center;
}

#archive-overlay .archive-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

#archive-overlay .archive-table-head span:nth-child(n+5):nth-child(-n+7) {
  text-align: right;
}

#archive-overlay .archive-table-head span:last-child {
  text-align: right;
}

#archive-overlay .archive-table-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#archive-overlay .archive-row {
  min-height: 66px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  cursor: pointer;
}

#archive-overlay .archive-row:hover,
#archive-overlay .archive-row:focus-within {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

#archive-overlay .archive-cell {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#archive-overlay .archive-cell strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#archive-overlay .archive-cell span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

#archive-overlay .archive-deal strong {
  color: var(--blue);
}

#archive-overlay .archive-requisite strong {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

#archive-overlay .archive-date,
#archive-overlay .archive-money,
#archive-overlay .archive-result {
  justify-items: end;
  text-align: right;
}

#archive-overlay .archive-result strong {
  font-size: 12px;
}

#archive-overlay .archive-result.positive strong {
  color: #047857;
}

#archive-overlay .archive-result.negative strong {
  color: #dc2626;
}

#archive-overlay .archive-result.zero strong {
  color: #64748b;
}

#archive-overlay .archive-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#archive-overlay .archive-actions .btn {
  min-height: 30px;
  padding-inline: 10px;
  border-radius: 7px;
  font-size: 11px;
}

#archive-overlay .archive-actions .btn.primary {
  box-shadow: none;
}

#archive-overlay .archive-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

#archive-overlay .archive-page-size,
#archive-overlay .archive-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#archive-overlay .archive-table-footer .btn {
  min-height: 28px;
  padding-inline: 9px;
  font-size: 11px;
}

#archive-overlay .archive-pagination > span {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  #archive-overlay .archive-table-head,
  #archive-overlay .archive-row {
    grid-template-columns:
      minmax(58px, 0.45fr)
      minmax(86px, 0.72fr)
      minmax(156px, 1.45fr)
      minmax(88px, 0.76fr)
      minmax(74px, 0.62fr)
      minmax(78px, 0.66fr)
      minmax(74px, 0.62fr)
      minmax(102px, auto);
    column-gap: 8px;
    padding-inline: 10px;
  }

  #archive-overlay .archive-cell strong,
  #archive-overlay .archive-result strong {
    font-size: 11px;
  }

  #archive-overlay .archive-cell span {
    font-size: 10px;
  }

  #archive-overlay .archive-table-head {
    font-size: 8px;
  }
}

@media (max-width: 760px) {
  #archive-overlay .archive-table {
    min-height: 0;
  }

  #archive-overlay .archive-table-head {
    display: none;
  }

  #archive-overlay .archive-row {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
    min-height: 0;
    padding: 12px;
  }

  #archive-overlay .archive-requisite,
  #archive-overlay .archive-actions {
    grid-column: 1 / -1;
  }

  #archive-overlay .archive-date,
  #archive-overlay .archive-money,
  #archive-overlay .archive-result {
    justify-items: start;
    text-align: left;
  }

  #archive-overlay .archive-actions {
    justify-content: flex-start;
  }

#archive-overlay .archive-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Operator Statistics Modal Polish: compact CRM dialog, workflow unchanged. */
#operator-statistics-overlay .statistics-modal {
  width: min(600px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow: hidden;
}

#operator-statistics-overlay .surface-head {
  align-items: flex-start;
  padding: 16px 18px 12px;
}

#operator-statistics-overlay .surface-head h2 {
  font-size: 20px;
  line-height: 1.15;
}

#operator-statistics-overlay .surface-head p:last-child {
  margin-top: 3px;
  font-size: 12px;
}

#operator-statistics-overlay .operator-panel-tools.statistics-tools {
  display: block;
  padding: 0 18px 12px;
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

#operator-statistics-overlay .quick-filter-panel {
  display: grid;
  gap: 10px;
}

#operator-statistics-overlay .period-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#operator-statistics-overlay .period-chip {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11px;
}

#operator-statistics-overlay .date-filter-row {
  display: flex;
  gap: 8px;
}

#operator-statistics-overlay .date-filter-row .field {
  flex: 1 1 0;
}

#operator-statistics-overlay .date-filter-row input {
  min-height: 34px;
}

#operator-statistics-overlay #operator-statistics-status {
  min-height: 18px;
  padding: 0 18px 8px;
  font-size: 11px;
}

#operator-statistics-overlay .statistics-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 14px;
}

#operator-statistics-overlay .statistics-cards .summary-cell {
  display: grid;
  align-content: center;
  min-height: 88px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

#operator-statistics-overlay .statistics-cards .summary-cell label {
  margin: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

#operator-statistics-overlay .statistics-cards .summary-cell strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

#operator-statistics-overlay .statistics-footer {
  margin: 0;
  padding: 0 18px 16px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 560px) {
  #operator-statistics-overlay .statistics-cards,
  #operator-statistics-overlay .date-filter-row {
    grid-template-columns: 1fr;
  }

  #operator-statistics-overlay .date-filter-row {
    flex-direction: column;
  }
}

/* Admin Workspace foundation alignment: inherit Operator v1.0 visual language without workflow changes. */
#admin-header.admin-command {
  min-height: 72px;
}

#admin-header .eyebrow {
  color: var(--command-muted);
}

#admin-header #admin-subtitle {
  font-size: 13px;
  font-weight: 700;
}

#admin-workspace .admin-layout {
  gap: 16px;
}

#admin-workspace .admin-sidebar,
#admin-workspace .admin-panel,
#admin-workspace .admin-placeholder,
#admin-workspace .admin-detail-panel,
#admin-workspace .report-breakdown {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

#admin-workspace .admin-sidebar {
  align-self: start;
  gap: 6px;
}

#admin-workspace .admin-nav-item {
  min-height: 38px;
}

#admin-workspace .admin-panel {
  min-width: 0;
}

#admin-workspace .admin-section-head {
  align-items: center;
}

#admin-workspace .admin-section-head .eyebrow,
#admin-workspace .admin-detail-header .eyebrow {
  font-size: 10px;
}

#admin-workspace .admin-section {
  background: #f6f8fb;
}

#admin-workspace .admin-filters {
  gap: 8px;
  background: #f8fafc;
}

#admin-workspace .admin-users-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(130px, 0.34fr) minmax(150px, 0.38fr) auto;
}

#admin-workspace .admin-users-search {
  min-width: 0;
}

#admin-workspace .admin-filters .field > span {
  font-size: 10px;
}

#admin-workspace .admin-filters input,
#admin-workspace .admin-filters select {
  min-height: 36px;
}

#admin-workspace .admin-table-wrap {
  background: transparent;
}

#admin-workspace .admin-table {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: none;
}

#admin-workspace .admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

#admin-workspace .admin-table th,
#admin-workspace .admin-table td {
  padding-block: 10px;
}

#admin-workspace .admin-table td strong {
  color: #0f172a;
}

#admin-workspace .profit-positive {
  color: var(--ok);
}

#admin-workspace .profit-negative {
  color: var(--danger);
}

#admin-workspace .admin-deals-table td:nth-child(4),
#admin-workspace .admin-deals-table td:nth-child(5),
#admin-workspace .admin-deals-table td:nth-child(6),
#admin-workspace .admin-payments-table td:nth-child(5),
#admin-workspace .admin-payments-table td:nth-child(6),
#admin-workspace .admin-payments-table td:nth-child(7),
#admin-workspace .admin-archive-table td:nth-child(4),
#admin-workspace .admin-archive-table td:nth-child(5),
#admin-workspace .admin-archive-table td:nth-child(6),
#admin-workspace .admin-archive-table td:nth-child(11),
#admin-workspace .admin-archive-table td:nth-child(12) {
  text-align: right;
}

#admin-workspace .admin-deals-table th:nth-child(4),
#admin-workspace .admin-deals-table th:nth-child(5),
#admin-workspace .admin-deals-table th:nth-child(6),
#admin-workspace .admin-payments-table th:nth-child(5),
#admin-workspace .admin-payments-table th:nth-child(6),
#admin-workspace .admin-payments-table th:nth-child(7),
#admin-workspace .admin-archive-table th:nth-child(4),
#admin-workspace .admin-archive-table th:nth-child(5),
#admin-workspace .admin-archive-table th:nth-child(6),
#admin-workspace .admin-archive-table th:nth-child(11),
#admin-workspace .admin-archive-table th:nth-child(12) {
  text-align: right;
}

#admin-workspace .report-deals-table td:nth-child(5),
#admin-workspace .report-deals-table td:nth-child(6),
#admin-workspace .report-deals-table td:nth-child(7),
#admin-workspace .report-deals-table td:nth-child(8),
#admin-workspace .report-deals-table td:nth-child(9),
#admin-workspace .report-deals-table td:nth-child(10),
#admin-workspace .report-deals-table th:nth-child(5),
#admin-workspace .report-deals-table th:nth-child(6),
#admin-workspace .report-deals-table th:nth-child(7),
#admin-workspace .report-deals-table th:nth-child(8),
#admin-workspace .report-deals-table th:nth-child(9),
#admin-workspace .report-deals-table th:nth-child(10) {
  text-align: right;
}

#admin-workspace .report-payments-table td:nth-child(7),
#admin-workspace .report-payments-table td:nth-child(8),
#admin-workspace .report-payments-table td:nth-child(10),
#admin-workspace .report-payments-table td:nth-child(11),
#admin-workspace .report-payments-table th:nth-child(7),
#admin-workspace .report-payments-table th:nth-child(8),
#admin-workspace .report-payments-table th:nth-child(10),
#admin-workspace .report-payments-table th:nth-child(11) {
  text-align: right;
}

#admin-workspace .report-profit-table td:nth-child(n+2),
#admin-workspace .report-profit-table th:nth-child(n+2) {
  text-align: right;
}

#admin-workspace .report-operators-table td:nth-child(n+4),
#admin-workspace .report-operators-table th:nth-child(n+4) {
  text-align: right;
}

#admin-workspace .report-alerts-table td:nth-child(6),
#admin-workspace .report-alerts-table th:nth-child(6) {
  text-align: right;
}

#admin-workspace .admin-users-table {
  min-width: 860px;
}

#admin-workspace .admin-users-table td:nth-child(5),
#admin-workspace .admin-users-table td:nth-child(6) {
  color: #64748b;
  font-weight: 750;
}

#admin-workspace .admin-deal-row,
#admin-workspace .admin-archive-row {
  cursor: pointer;
}

#admin-workspace .admin-detail-header {
  align-items: center;
}

#admin-workspace .admin-detail-panel .detail-actions,
#admin-workspace .admin-detail-panel .deal-metrics {
  background: #ffffff;
}

#admin-workspace .admin-detail-panel .detail-actions .btn,
#admin-workspace .admin-archive-table .btn,
#admin-workspace .admin-payments-table .btn,
#admin-workspace .admin-users-table .btn,
#admin-workspace .admin-user-card-deals-table .btn,
#admin-workspace .link-button {
  min-height: 30px;
  padding-inline: 10px;
  border-radius: 7px;
  font-size: 11px;
}

#admin-workspace .admin-user-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

#admin-workspace .admin-payments-table .link-button {
  min-height: 30px;
}

#admin-workspace .admin-activity-table td:nth-child(5) {
  min-width: 260px;
}

#admin-workspace .admin-activity-row[data-admin-activity-deal-id] {
  cursor: pointer;
}

#admin-workspace .admin-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  color: #64748b;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

#admin-workspace .admin-payments-footer strong,
#admin-workspace .admin-users-footer strong,
#admin-workspace .admin-activity-footer strong {
  color: #0f172a;
}

#admin-workspace .admin-activity-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
}

#admin-workspace .activity-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#admin-workspace .admin-profit-card,
#admin-workspace .admin-report-card {
  box-shadow: none;
}

#admin-workspace .admin-detail-list {
  background: #ffffff;
}

#admin-workspace .admin-reports-content {
  background: #f6f8fb;
}

#admin-workspace .report-summary-grid .summary-cell {
  min-height: 78px;
}

#admin-workspace .report-kpi-card {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#admin-workspace .report-kpi-card:hover,
#admin-workspace .report-kpi-card:focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
}

#admin-workspace .report-activity-row {
  cursor: pointer;
}

#admin-workspace .report-activity-row:hover,
#admin-workspace .report-deal-row:hover,
#admin-workspace .report-payment-row:hover,
#admin-workspace .report-profit-row:hover,
#admin-workspace .report-operator-row:hover,
#admin-workspace .report-alert-row:hover {
  background: #f8fbff;
}

#admin-workspace .report-deal-row,
#admin-workspace .report-payment-row,
#admin-workspace .report-profit-row,
#admin-workspace .report-operator-row,
#admin-workspace .report-alert-row {
  cursor: pointer;
}

#admin-workspace .report-deals-table {
  min-width: 1320px;
}

#admin-workspace .report-payments-table {
  min-width: 1240px;
}

#admin-workspace .report-profit-table {
  min-width: 1280px;
}

#admin-workspace .report-operators-table {
  min-width: 1540px;
}

#admin-workspace .report-alerts-table {
  min-width: 1180px;
}

#admin-workspace .report-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

#admin-workspace .report-sort-button:hover,
#admin-workspace .report-sort-button:focus-visible,
#admin-workspace .report-sort-button.active {
  color: #0052cc;
  outline: 0;
}

#admin-workspace .report-deals-summary,
#admin-workspace .report-payments-summary,
#admin-workspace .report-profit-summary,
#admin-workspace .report-operators-summary,
#admin-workspace .report-alerts-summary {
  flex-wrap: wrap;
  justify-content: flex-start;
  border-top: 0;
  border-radius: 0;
}

#admin-workspace .report-alert-clear strong {
  color: var(--ok);
}

#admin-workspace .report-pagination {
  border-top: 0;
}

#admin-workspace .report-pagination span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#admin-workspace .report-export-panel {
  display: grid;
  gap: 14px;
}

#admin-workspace .report-export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#admin-workspace .report-export-grid > div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

#admin-workspace .report-export-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

#admin-workspace .report-export-grid strong {
  color: #0f172a;
  font-size: 13px;
}

#admin-workspace .report-export-actions {
  justify-content: flex-start;
}

#admin-workspace .compact-page-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

#admin-workspace .compact-page-button:disabled {
  cursor: default;
  opacity: 0.45;
}

#admin-workspace .compact-page-button:not(:disabled):hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #f8fafc;
}

#admin-workspace .report-gap-note {
  box-shadow: none;
}

#admin-workspace .payment-row {
  min-height: 54px;
}

#admin-workspace .admin-placeholder {
  display: grid;
  min-height: 220px;
  align-content: center;
  gap: 8px;
}

#admin-workspace #admin-full-page-detail-section.detail-page {
  border-radius: 8px;
  background: #ffffff;
}

#admin-workspace #admin-user-card-section.detail-page {
  border-radius: 8px;
  background: #ffffff;
}

#admin-workspace .admin-user-row,
#admin-workspace .admin-user-card-deal-row {
  cursor: pointer;
}

#admin-workspace .admin-user-card-header {
  padding: 12px 16px;
}

#admin-workspace .admin-user-card-content {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f6f8fb;
}

#admin-workspace .admin-user-card-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

#admin-workspace .admin-user-card-block .pane-head {
  padding: 11px 12px;
}

#admin-workspace .admin-user-account-compact {
  box-shadow: none;
}

#admin-workspace .admin-user-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}

#admin-workspace .admin-user-account-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.15;
}

#admin-workspace .admin-user-account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 10px 12px 8px;
}

#admin-workspace .admin-user-account-item {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

#admin-workspace .admin-user-account-item span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

#admin-workspace .admin-user-account-item strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#admin-workspace .admin-user-permissions {
  display: grid;
  gap: 6px;
  padding: 0 12px 10px;
}

#admin-workspace .admin-user-permissions label {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

#admin-workspace .admin-user-permissions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#admin-workspace .admin-user-card-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
}

#admin-workspace .admin-user-card-period .period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#admin-workspace .admin-user-card-period .period-chip {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

#admin-workspace .admin-user-card-period .period-chip:hover,
#admin-workspace .admin-user-card-period .period-chip.active {
  border-color: rgba(0, 102, 204, 0.3);
  background: #eff6ff;
  color: #0052cc;
}

#admin-workspace .admin-user-card-date-input {
  width: 150px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
}

#admin-workspace .admin-user-card-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

#admin-workspace .admin-user-card-kpis .summary-cell {
  min-height: 76px;
}

#admin-workspace .admin-user-card-actions {
  padding: 0 12px 12px;
}

#admin-workspace .admin-user-danger-zone {
  border-color: #fecaca;
  background: #fff7f7;
}

#admin-workspace .admin-user-card-deals-table {
  min-width: 820px;
}

#admin-workspace .admin-user-card-deals-table th:nth-child(4),
#admin-workspace .admin-user-card-deals-table td:nth-child(4),
#admin-workspace .admin-user-card-deals-table th:nth-child(5),
#admin-workspace .admin-user-card-deals-table td:nth-child(5),
#admin-workspace .admin-user-card-deals-table th:nth-child(6),
#admin-workspace .admin-user-card-deals-table td:nth-child(6) {
  text-align: right;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 12px 16px;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row {
  grid-column: 1 / 2;
  gap: 10px;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row .btn {
  min-height: 32px;
  padding-inline: 10px;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row h2 {
  font-size: 21px;
  line-height: 1.1;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row p:last-child {
  font-size: 12px;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row .eyebrow {
  margin-bottom: 3px;
  font-size: 9px;
}

#admin-workspace #admin-full-page-detail-section .detail-title-row > .pill {
  min-height: 24px;
  align-self: center;
}

#admin-workspace #admin-full-page-detail-section .detail-actions {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: center;
  justify-content: flex-end;
}

#admin-workspace #admin-full-page-detail-section .detail-actions .btn {
  min-height: 34px;
  padding-inline: 11px;
  border-radius: 7px;
  font-size: 12px;
}

#admin-workspace #admin-full-page-detail-section .detail-progress-block {
  grid-column: 1 / 2;
  gap: 6px;
  padding: 8px 10px;
}

#admin-workspace #admin-full-page-detail-section .detail-progress-block .progress-label {
  font-size: 11px;
}

#admin-workspace #admin-full-page-detail-section .detail-progress-block .progress-label strong {
  font-size: 13px;
}

#admin-workspace #admin-full-page-detail-section .detail-progress-block .progress-bar.large {
  height: 6px;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics {
  grid-column: 2 / 3;
  align-self: stretch;
  min-width: min(390px, 40vw);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics .metric-card {
  display: grid;
  align-content: center;
  min-height: 46px;
  padding: 7px 10px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics .metric-card:last-child {
  border-right: 0;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics .metric-card label {
  font-size: 9px;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics .metric-card strong {
  margin-top: 2px;
  font-size: 13px;
}

#admin-workspace #admin-full-page-detail-section .detail-control-panel > .deal-metrics .metric-card.remaining strong {
  font-size: 15px;
}

#admin-workspace #admin-full-page-detail-section .detail-work-area {
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 320px);
  gap: 12px;
  padding: 12px;
}

#admin-workspace #admin-full-page-detail-section .history-panel {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#admin-workspace #admin-full-page-detail-section .payment-list {
  padding: 8px;
}

#admin-workspace #admin-full-page-detail-section .payment-row {
  min-height: 54px;
}

#admin-workspace #admin-full-page-detail-section .requisite-panel {
  padding: 12px;
}

#admin-workspace #admin-full-page-detail-section .requisite-panel dl {
  gap: 7px;
}

#admin-workspace .admin-dashboard-content {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f6f8fb;
}

#admin-workspace .admin-dashboard-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

#admin-workspace .admin-dashboard-scope h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

#admin-workspace .admin-scope-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#admin-workspace .admin-scope-chip,
#admin-workspace .admin-dashboard-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

#admin-workspace .admin-scope-chip.active,
#admin-workspace .admin-dashboard-tab.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f4f8a;
}

#admin-workspace .scope-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

#admin-workspace .scope-dot.active { background: var(--ok); }
#admin-workspace .scope-dot.muted { background: #94a3b8; }

#admin-workspace .admin-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

#admin-workspace .admin-dashboard-kpis .summary-cell,
#admin-workspace .admin-dashboard-kpi {
  min-height: 78px;
}

#admin-workspace .admin-dashboard-kpi {
  appearance: none;
  text-align: left;
  cursor: pointer;
}

#admin-workspace .admin-dashboard-kpi[aria-disabled="true"] {
  cursor: default;
}

#admin-workspace .admin-dashboard-kpi:not([aria-disabled="true"]):hover,
#admin-workspace .admin-dashboard-kpi:not([aria-disabled="true"]):focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
}

#admin-workspace .admin-dashboard-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

#admin-workspace .admin-dashboard-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

#admin-workspace .admin-dashboard-search {
  width: min(420px, 100%);
  height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
}

#admin-workspace .admin-dashboard-search span {
  color: #64748b;
}

#admin-workspace .admin-dashboard-search input {
  color: #0f172a;
}

#admin-workspace .admin-dashboard-search input::placeholder {
  color: #94a3b8;
}

#admin-workspace .admin-dashboard-refresh {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

#admin-workspace .admin-dashboard-refresh strong {
  color: #0f172a;
}

#admin-workspace .admin-dashboard-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

#admin-workspace .admin-dashboard-deals-table {
  min-width: 900px;
}

#admin-workspace .admin-dashboard-deals-table th:nth-child(4),
#admin-workspace .admin-dashboard-deals-table td:nth-child(4),
#admin-workspace .admin-dashboard-deals-table th:nth-child(5),
#admin-workspace .admin-dashboard-deals-table td:nth-child(5) {
  text-align: right;
}

@media (max-width: 1050px) {
  #admin-workspace .admin-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #admin-workspace .admin-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #admin-workspace .admin-user-account-grid,
  #admin-workspace .admin-user-card-kpis,
  #admin-workspace .report-export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #admin-workspace .admin-dashboard-scope,
  #admin-workspace .admin-dashboard-control {
    align-items: stretch;
    flex-direction: column;
  }

  #admin-workspace .admin-scope-chips,
  #admin-workspace .admin-dashboard-refresh {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  #admin-header.admin-command {
    min-height: 0;
  }

  #admin-workspace .admin-section-head {
    align-items: stretch;
  }

  #admin-workspace .admin-sidebar {
    grid-template-columns: 1fr;
  }

  #admin-workspace .admin-dashboard-kpis {
    grid-template-columns: 1fr;
  }

  #admin-workspace .admin-user-account-grid,
  #admin-workspace .admin-user-card-kpis,
  #admin-workspace .report-export-grid {
    grid-template-columns: 1fr;
  }

  #admin-workspace .admin-user-card-period {
    align-items: stretch;
    flex-direction: column;
  }

  #admin-workspace .admin-dashboard-search {
    width: 100%;
  }
}
