:root {
  --bg: #060b1b;
  --bg2: #0a1328;
  --panel: rgba(18, 29, 56, 0.92);
  --panel-2: rgba(15, 24, 44, 0.96);
  --line: rgba(118, 144, 211, 0.16);
  --text: #eef3ff;
  --muted: #94a3c7;
  --blue: #597bff;
  --blue-2: #7b69ff;
  --green: #26c48b;
  --danger: #ff6f91;
  --yellow: #f3b64b;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(77, 65, 178, 0.22), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(33, 194, 148, 0.10), transparent 24%),
    linear-gradient(180deg, #040915 0%, #071226 100%);
}

a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; padding: 18px 14px;
  background: rgba(8, 13, 29, 0.92); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 4px 6px; }
.brand-badge {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); font-weight: 800; font-size: 20px;
  box-shadow: 0 10px 26px rgba(89, 123, 255, 0.32);
}
.brand-title { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.brand-subtitle { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 6px; }
.nav-link {
  display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px;
  color: var(--muted); border: 1px solid transparent; font-size: 13px; font-weight: 600;
}
.nav-link:hover { color: var(--text); background: rgba(31, 49, 95, 0.34); border-color: var(--line); }
.nav-link.active {
  color: white; background: linear-gradient(135deg, rgba(65, 95, 214, 0.55), rgba(79, 53, 201, 0.45));
  border-color: rgba(127, 154, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.content { padding: 20px 20px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 14px; }
.crumbs { color: #7e8ebd; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; gap: 8px; }
.chip {
  min-height: 34px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center;
  background: rgba(69, 86, 156, 0.35); border: 1px solid var(--line); font-size: 12px; font-weight: 700;
}
.chip.ghost { background: rgba(255,255,255,0.02); color: var(--muted); font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card, .quick-card, .panel {
  background: linear-gradient(180deg, rgba(16, 25, 50, 0.94), rgba(12, 21, 39, 0.96));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card {
  position: relative; overflow: hidden; padding: 14px 14px 16px; min-height: 96px;
}
.stat-card::after {
  content: ""; position: absolute; inset: auto -18px -28px auto; width: 100px; height: 100px;
  border-radius: 50%; filter: blur(24px); opacity: 0.20;
  background: radial-gradient(circle, rgba(101, 110, 255, 0.85), transparent 60%);
}
.stat-card span { position: relative; color: var(--muted); font-size: 13px; }
.stat-card strong { position: relative; display: block; margin-top: 14px; font-size: 22px; font-weight: 800; }
.quick-grid, .cards-grid { display: grid; gap: 14px; }
.quick-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-card { display: block; padding: 16px; min-height: 116px; }
.quick-card h3 { margin: 0 0 8px; font-size: 18px; }
.quick-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cards-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 14px; }
.card-form { display: grid; gap: 10px; align-content: start; }
.highlight-card { border-style: dashed; }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.card-head h3 { margin: 0; font-size: 17px; }
.muted { color: var(--muted); font-size: 12px; }
.field-row, .meta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
input, select, textarea, button {
  width: 100%; border-radius: 10px; border: 1px solid var(--line); padding: 9px 10px;
  background: rgba(7, 13, 26, 0.82); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 84px; }
.switch-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.switch-row input[type='checkbox'] { width: auto; }
.btn, button {
  cursor: pointer; border: 1px solid transparent; background: linear-gradient(135deg, var(--blue), var(--blue-2));
  font-weight: 700; box-shadow: 0 10px 24px rgba(88, 115, 255, 0.20);
}
.btn.secondary { background: rgba(255,255,255,0.04); border-color: var(--line); box-shadow: none; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.simple-stack { display: grid; gap: 10px; }
.line-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.meta-badge {
  display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: rgba(74, 108, 255, 0.18); border: 1px solid rgba(115, 141, 255, 0.18); color: #d7e2ff; font-size: 12px;
}
.empty { text-align: center; color: var(--muted); padding: 20px 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap { word-break: break-all; }
.order-toolbar { margin-bottom: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-filter {
  min-height: 32px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.chip-filter.active { color: var(--text); background: rgba(89, 123, 255, 0.16); border-color: rgba(127, 154, 255, 0.32); }
.orders-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; align-items: start; }
.order-list-panel, .order-detail-panel { min-height: 520px; }
.table-wrap { overflow: auto; border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
.data-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: rgba(10, 17, 33, 0.96); }
.row-active td { background: rgba(89, 123, 255, 0.08); }
.status-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid transparent;
}
.status-new, .status-waiting { background: rgba(89,123,255,.16); color: #cdd8ff; border-color: rgba(89,123,255,.24); }
.status-in_progress, .status-processing { background: rgba(243,182,75,.14); color: #ffe2a2; border-color: rgba(243,182,75,.22); }
.status-approved { background: rgba(38,196,139,.14); color: #b5f5dd; border-color: rgba(38,196,139,.22); }
.status-rejected, .status-canceled { background: rgba(255,111,145,.14); color: #ffc4d2; border-color: rgba(255,111,145,.22); }
.status-done { background: rgba(66,215,127,.12); color: #b9ffd7; border-color: rgba(66,215,127,.20); }
.status-timeout { background: rgba(255,188,86,.14); color: #ffe0a5; border-color: rgba(255,188,86,.24); }
.status-pending { background: rgba(108,127,255,.16); color: #dce4ff; border-color: rgba(108,127,255,.24); }
.status-paid { background: rgba(66,215,127,.12); color: #b9ffd7; border-color: rgba(66,215,127,.20); }
.detail-head { margin-bottom: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.detail-box {
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.detail-label { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.detail-value { font-size: 15px; font-weight: 700; }
.info-block {
  display: grid; gap: 8px; padding: 12px; margin-bottom: 12px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02);
}
.info-row { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.info-row span { color: var(--muted); font-size: 12px; }
.info-row strong { font-size: 12px; text-align: right; max-width: 60%; }
.action-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.status-btn { min-height: 36px; font-size: 12px; }
.status-btn.work { background: linear-gradient(135deg, #6c7bff, #5367ee); }
.status-btn.approve { background: linear-gradient(135deg, #22c48b, #1b9d70); }
.status-btn.reject { background: linear-gradient(135deg, #ff6f91, #e24d76); }
.status-btn.done { background: linear-gradient(135deg, #4dd17a, #2faf5e); }
.order-empty { min-height: 420px; display: grid; place-items: center; }

@media (max-width: 1440px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .cards-grid.three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .orders-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-grid, .cards-grid.three-col, .cards-grid.two-col, .quick-grid.two-col { grid-template-columns: 1fr; }
}


.orders-accordion-wrap { display: block; }
.order-list-full { min-height: 0; }
.accordion-table { min-width: 100%; }
.order-main-row td { background: transparent; }
.order-toggle-btn { min-width: 88px; }
.order-detail-row[hidden] { display: none; }
.order-detail-row td { padding: 0 0 12px; background: transparent; }
.order-detail-card {
  margin: 0 12px 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 23, 43, 0.98), rgba(11, 19, 35, 0.98));
}
.detail-grid-wide { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 12px; }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.compact-status-form { gap: 10px; }
.action-row-inline { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1200px) {
  .detail-grid-wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-columns, .action-row-inline { grid-template-columns: 1fr; }
}


/* stable shell + dashboard */
.dashboard-toolbar { display:grid; gap:8px; margin-bottom:14px; padding:14px 16px; }
.compact-panel { padding: 14px 16px; }
.period-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.period-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.period-chip, .chart-tab, .chip-filter {
  display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 14px;
  border-radius:12px; border:1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--muted); font-size:12px; font-weight:700;
}
.period-chip.active, .chart-tab.active, .chip-filter.active {
  color:#fff; background: linear-gradient(135deg, rgba(92,120,255,0.70), rgba(111,83,255,0.60));
  border-color: rgba(127,154,255,0.28);
}
.period-caption, .chart-footer { color: var(--muted); font-size: 12px; }
.three-kpi-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.dashboard-kpi-card {
  display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start;
  background: linear-gradient(180deg, rgba(23,32,58,0.96), rgba(16,24,44,0.98));
  border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; min-height: 110px; box-shadow: var(--shadow);
}
.dashboard-kpi-label { color: var(--muted); font-size: 14px; margin-bottom: 14px; line-height: 1.2; }
.dashboard-kpi-value { font-size: 28px; font-weight: 800; line-height: 1.1; }
.dashboard-section { gap: 10px; margin-bottom: 14px; }
.dashboard-section .three-kpi-grid { margin-bottom: 0; }
.dashboard-section-head {
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(14, 22, 41, 0.96), rgba(11, 18, 33, 0.96));
}
.dashboard-section-title-row { align-items: center; min-height: 18px; }
.dashboard-section-title {
  margin: 0;
  color: #dfe7ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.dashboard-chart-panel { padding: 16px; }
.chart-toolbar { display:flex; justify-content:flex-start; align-items:center; margin-bottom: 14px; }
.chart-tabs { display:flex; gap:8px; }
.chart-wrap { width:100%; min-height: 330px; overflow:hidden; }
.chart-svg { width:100%; height:330px; display:block; }
.chart-grid line, .chart-axis line { stroke: rgba(118,144,211,0.16); stroke-width: 1; }
.chart-line { fill:none; stroke:#6e7cff; stroke-width:3; }
.chart-dot { fill:#6e7cff; }
.chart-x-label { fill: var(--muted); font-size: 12px; }
.compact-meta { gap: 8px; align-items: center; }
.highlight-card { border-style: dashed; }
.span-two { grid-column: span 2; }
.inline-switch { align-self: end; min-height: 40px; }
.triple-switch-row { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; }
.method-group { display:grid; gap: 12px; margin-bottom: 16px; }
.slim-panel { padding: 12px 14px; }
.hint-box { padding:10px 12px; border-radius:10px; border:1px dashed var(--line); background: rgba(255,255,255,0.03); color: var(--muted); font-size:12px; }
.muted-badge { background: rgba(255,255,255,0.04); color: var(--muted); border:1px solid var(--line); }
.danger-badge { background: rgba(255,111,145,.14); color:#ffc4d2; border:1px solid rgba(255,111,145,.22); }
.three-field-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
.nested-panel { padding: 14px; }
.sale-fee-group { margin-top: -2px; }
.sale-fee-form { display: grid; gap: 10px; padding: 14px 16px; }
.sale-fee-head { align-items: flex-start; }
.sale-fee-head .meta-badge { align-self: flex-start; }
.sale-fee-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  align-items: start;
}
.sale-fee-section { display: grid; gap: 8px; padding: 10px 12px; }
.sale-fee-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sale-fee-section-head h3 { margin: 0; font-size: 15px; }
.sale-fee-section-head .btn { width: auto; flex: 0 0 auto; }
.sale-fee-grid-head,
.sale-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr) auto;
  gap: 8px;
  align-items: end;
}
.sale-fee-row {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.sale-fee-grid-head {
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sale-fee-rows { display: grid; gap: 6px; }
.sale-fee-field { gap: 4px; margin: 0; }
.sale-fee-mobile-label { display: none; color: var(--muted); font-size: 11px; }
.sale-fee-field input { min-height: 32px; padding: 6px 8px; }
.sale-fee-row-actions { display: flex; align-items: end; justify-content: flex-end; }
.sale-fee-row-actions .btn,
.sale-fee-save-row .btn { width: auto; white-space: nowrap; }
.sale-fee-save-row { display: flex; justify-content: flex-end; margin-top: 2px; }
.sale-fee-message {
  margin: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line);
  font-size: 12px; line-height: 1.35;
}
.sale-fee-message.is-success { background: rgba(38, 196, 139, 0.12); color: #b5f5dd; border-color: rgba(38, 196, 139, 0.22); }
.sale-fee-message.is-error { background: rgba(255, 111, 145, 0.12); color: #ffc4d2; border-color: rgba(255, 111, 145, 0.22); }
.order-toolbar { margin-bottom: 12px; }
@media (max-width: 1200px) {
  .three-kpi-grid, .detail-grid-wide, .detail-columns, .action-row-inline, .triple-switch-row, .three-field-row { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .sale-fee-stack { grid-template-columns: 1fr; }
  .sale-fee-save-row { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .sale-fee-grid-head { display: none; }
  .sale-fee-row { grid-template-columns: 1fr; }
  .sale-fee-mobile-label { display: block; }
  .sale-fee-row-actions { justify-content: flex-start; }
}
/* hard-fix: freeze dashboard + orders */
.content{min-width:0;}
.three-kpi-grid{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:14px !important;align-items:stretch;}
.dashboard-kpi-card{min-width:0;width:100%;}
.dashboard-chart-panel{overflow:hidden;}
.orders-accordion-wrap .table-wrap{overflow-x:auto;}
.orders-accordion-wrap .data-table{width:100%;min-width:980px;}
.order-detail-row[hidden]{display:none !important;}
.order-toggle-btn{width:auto !important;min-width:88px;white-space:nowrap;}
@media (max-width: 1200px){.three-kpi-grid{grid-template-columns:1fr !important;}}



.provider-assets-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; }
.asset-check {
  display:flex; align-items:center; gap:10px; min-height:42px; padding:10px 12px;
  border-radius:12px; border:1px solid var(--line); background: rgba(255,255,255,0.03);
  color: var(--text);
}
.asset-check input[type='checkbox'] { width:auto; margin:0; }
.asset-check span { color: var(--text); font-size: 13px; font-weight: 600; }
@media (max-width: 1100px) {
  .provider-assets-grid { grid-template-columns: 1fr; }
}

.provider-asset-limits-wrap { display:grid; gap:14px; }
.provider-asset-limits-title { font-weight:700; color: var(--text); margin-top:4px; }
.provider-asset-limit-card { padding:14px; border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,0.03); display:grid; gap:12px; }
.provider-asset-limit-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.provider-asset-symbol { font-weight:700; color: var(--text); }
.compact-hint { margin-top:-4px; }
@media (max-width: 900px) { .provider-asset-limit-head { flex-direction:column; align-items:flex-start; } }

.meta-stack { display: grid; gap: 10px; }
.providers-grid .card-form textarea { min-height: 96px; }


/* requisites cleanup */
.requisites-section-intro { margin-bottom: 14px; }
.requisites-method-grid { align-items: start; }
.requisites-method-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 100%;
}
.requisites-method-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.requisites-method-head h3 { margin: 0 0 6px; font-size: 20px; }
.requisites-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.requisite-create-block,
.requisite-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.requisite-create-block[open],
.requisite-item[open] {
  background: rgba(255,255,255,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.requisite-summary-btn,
.requisite-item-summary {
  list-style: none;
  cursor: pointer;
}
.requisite-summary-btn::-webkit-details-marker,
.requisite-item-summary::-webkit-details-marker {
  display: none;
}
.requisite-summary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.03);
  color: #dce5ff;
  font-size: 13px;
  font-weight: 700;
}
.requisite-create-block[open] .requisite-summary-btn {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.requisites-inline-form,
.requisite-edit-form {
  padding: 14px;
}
.requisites-list {
  display: grid;
  gap: 10px;
}
.requisite-item-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
}
.requisite-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.requisite-item-main strong {
  font-size: 15px;
  line-height: 1.2;
}
.requisite-item-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 42%;
}
.requisite-edit-form {
  border-top: 1px solid var(--line);
  gap: 10px;
}
.requisites-empty {
  background: rgba(255,255,255,0.02);
  border-style: dashed;
}
.compact-switch {
  align-self: end;
  min-height: 40px;
}
@media (max-width: 1200px) {
  .requisite-item-summary {
    flex-direction: column;
  }
  .requisite-item-side {
    justify-content: flex-start;
    max-width: none;
  }
}
@media (max-width: 760px) {
  .requisites-stats-row,
  .requisite-item-side {
    gap: 6px;
  }
}



/* users section */
.users-shell {
  display: grid;
  gap: 14px;
}
.users-toolbar {
  padding: 14px 16px;
}
.users-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(160px, 0.75fr)) 120px;
  gap: 10px;
  align-items: end;
}
.users-search-field input {
  min-width: 0;
}
.users-toolbar-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.users-list-panel,
.users-profile-panel {
  min-height: 640px;
}
.users-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.users-list-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.users-table {
  min-width: 920px;
}
.users-table td strong {
  display: inline-block;
  margin-bottom: 4px;
}
.users-open-cell {
  white-space: nowrap;
}
.users-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}
.users-pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.users-profile-form {
  gap: 12px;
}
.users-profile-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.users-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.users-recent-orders {
  margin-top: 14px;
}
.user-recent-order {
  align-items: center;
}
.users-recent-order-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}
.users-empty-state {
  min-height: 420px;
  display: grid;
  place-items: center;
}
@media (max-width: 1440px) {
  .users-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1180px) {
  .users-toolbar-grid,
  .users-stats-grid {
    grid-template-columns: 1fr;
  }
  .users-profile-panel,
  .users-list-panel {
    min-height: auto;
  }
}

/* providers section v10 */
.providers-shell { display: grid; gap: 14px; }
.providers-note-panel { margin-bottom: 14px; }
.provider-add-panel,
.provider-mini-card { overflow: hidden; }
.provider-summary-row,
.provider-settings-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.provider-summary-row::-webkit-details-marker,
.provider-settings-summary::-webkit-details-marker { display: none; }
.provider-add-panel[open] .provider-summary-row { margin-bottom: 12px; }
.provider-settings-details { display: grid; gap: 10px; margin-top: 12px; }
.provider-settings-summary {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255,255,255,0.02);
}
.provider-settings-details[open] .provider-settings-summary { color: var(--text); }
.providers-list-grid { align-items: start; }
.provider-mini-card { display: grid; gap: 12px; align-content: start; }
.provider-mini-meta { grid-template-columns: repeat(3, max-content); align-items: center; }
.provider-mini-stats {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.panel-subsection { box-shadow: none; }
.provider-linked-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.provider-inline-form { width: auto; }
.provider-inline-form button { width: auto; min-width: 128px; }
.danger-btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,111,145,.28);
  color: #ffd1dc;
  box-shadow: none;
}
.provider-delete-note { font-size: 12px; }
.provider-warning { line-height: 1.4; }
.provider-settings-form { margin-top: 2px; }
@media (max-width: 1100px) {
  .provider-mini-meta { grid-template-columns: repeat(2, max-content); }
}


.orders-toggle-col { width: 42px; }
.order-chevron-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  box-shadow: none;
}
.order-chevron { font-size: 14px; line-height: 1; }
.order-cell-title { font-weight: 700; color: var(--text); }
.order-type-badge { background: rgba(38,196,139,.14); border-color: rgba(38,196,139,.22); color: #b5f5dd; }
.order-type-sell { background: rgba(89,123,255,.16); border-color: rgba(89,123,255,.24); color: #d8e2ff; }
.tx-ok { background: rgba(38,196,139,.14); border-color: rgba(38,196,139,.22); color: #b5f5dd; }
.tx-empty { background: rgba(255,255,255,0.04); border-color: var(--line); color: var(--muted); }
.compact-order-detail { padding: 16px; }
.detail-grid-compact { margin-bottom: 14px; }
.compact-order-columns { align-items: start; }
.compact-order-actions-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.info-block-title { margin: 0 0 6px; color: #dfe7ff; font-size: 13px; font-weight: 700; }
.order-actions-panel .action-row-dynamic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
.order-actions-panel .action-row-dynamic form { display: block; }
.order-actions-panel .action-row-dynamic .btn { width: 100%; }
.slim-hint { padding: 10px 12px; min-height: auto; }
.tx-link-preview { display: grid; gap: 6px; margin-top: 10px; }
.tx-link-anchor { color: #cdd8ff; text-decoration: underline; }
.order-main-row { cursor: pointer; }
.order-main-row td:last-child { cursor: default; }
@media (max-width: 1200px) {
  .compact-order-actions-grid, .compact-order-columns, .detail-grid-compact { grid-template-columns: 1fr; }
}

.order-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.order-row-actions form { margin: 0; }
.inline-delete-btn {
  min-width: 88px;
  white-space: nowrap;
}
.single-action-grid { grid-template-columns: 1fr; }
.full-span-panel { width: 100%; }
.order-action-stack {
  display: grid;
  gap: 10px;
}
.compact-tx-preview {
  margin-top: 10px;
}
@media (max-width: 1200px) {
  .order-row-actions { justify-content: flex-start; }
}

/* dashboard refresh */
.dashboard-rate-grid {
  margin-bottom: 14px;
}
.dashboard-rate-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 14px 16px;
}
.dashboard-rate-card.is-alert {
  border-color: rgba(255, 107, 107, 0.35);
  box-shadow: 0 18px 40px rgba(160, 34, 34, 0.12);
}
.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-panel-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.dashboard-rate-value {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
}
.dashboard-rate-value.is-alert {
  color: #ff7d7d;
}
.meta-badge-danger {
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.28);
  color: #ffd2d2;
}
.dashboard-rate-meta {
  display: grid;
  gap: 8px;
}
.dashboard-rate-meta div,
.dashboard-method-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.dashboard-rate-meta span,
.dashboard-method-row .muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-rate-meta strong,
.dashboard-method-row strong {
  font-size: 14px;
}
.dashboard-toolbar-extended {
  margin-bottom: 12px;
  padding: 14px 16px;
}
.dashboard-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-kpi-card {
  padding: 16px;
  min-height: 146px;
}
.dashboard-kpi-subline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.dashboard-split-grid,
.dashboard-chart-grid,
.dashboard-bottom-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-split-grid,
.dashboard-chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-bottom-grid {
  grid-template-columns: 1.25fr 0.95fr;
}
.dashboard-side-card,
.dashboard-visual-card,
.dashboard-list-card,
.dashboard-status-card {
  padding: 15px;
}
.dashboard-side-card.is-focused {
  border-color: rgba(127, 154, 255, 0.34);
  box-shadow: 0 18px 42px rgba(67, 90, 192, 0.18);
}
.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.dashboard-mini-stat,
.dashboard-status-tile {
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.dashboard-mini-stat span,
.dashboard-status-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.dashboard-mini-stat strong,
.dashboard-status-tile strong {
  font-size: 16px;
  font-weight: 800;
}
.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.legend-dot.buy { background: linear-gradient(180deg, #6e7cff, #5b69ee); }
.legend-dot.sell { background: linear-gradient(180deg, #2ac48b, #1f9467); }
.mini-chart-wrap {
  margin-top: 12px;
}
.mini-chart {
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 10px;
  align-items: end;
}
.mini-chart-col {
  display: grid;
  gap: 8px;
  align-items: end;
}
.mini-chart-bars {
  min-height: 180px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(118, 144, 211, 0.18);
}
.mini-chart-bar {
  width: 14px;
  min-height: 0;
  border-radius: 10px 10px 4px 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.mini-chart-bar.buy { background: linear-gradient(180deg, rgba(110,124,255,0.95), rgba(91,105,238,0.55)); }
.mini-chart-bar.sell { background: linear-gradient(180deg, rgba(42,196,139,0.95), rgba(31,148,103,0.55)); }
.mini-chart-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.dashboard-list-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.dashboard-list-stack.compact {
  gap: 8px;
}
.dashboard-list-row,
.dashboard-method-row {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.dashboard-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.dashboard-list-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.dashboard-list-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 1380px) {
  .dashboard-kpi-grid,
  .dashboard-rate-grid,
  .dashboard-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .dashboard-toolbar-grid,
  .dashboard-split-grid,
  .dashboard-chart-grid,
  .dashboard-bottom-grid,
  .dashboard-rate-grid,
  .dashboard-kpi-grid,
  .dashboard-mini-stats,
  .dashboard-status-grid {
    grid-template-columns: 1fr;
  }
  .mini-chart {
    grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  }
}


/* referrals section */
.referrals-shell { display: grid; gap: 14px; }
.referrals-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.referrals-settings-grid { align-items: start; }
.referrals-info-panel .simple-stack { margin-top: 8px; }
.referrals-chip-row { margin-bottom: 2px; }
.referrals-search { display: flex; gap: 8px; align-items: center; }
.referrals-search input { min-width: 280px; }
.referrals-table { min-width: 980px; }
.referrals-payouts-table { min-width: 1180px; }
.referral-payout-actions-cell { min-width: 260px; }
.referral-inline-form { display: grid; gap: 8px; margin-bottom: 10px; }
.referral-inline-form:last-child { margin-bottom: 0; }
@media (max-width: 1380px) {
  .referrals-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .referrals-kpi-grid { grid-template-columns: 1fr; }
  .referrals-search { flex-direction: column; align-items: stretch; }
  .referrals-search input { min-width: 0; }
}
