.support-lookup-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-lookup-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(100, 110, 140, 0.25);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.support-main {
  min-width: 0;
}

.support-check {
  padding-top: 2px;
}

.support-explain-row {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(96, 108, 164, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  line-height: 16px;
  color: #4f5b88;
  background: rgba(124, 140, 255, 0.1);
}

.support-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/*
 * BotCartd desktop admin — светлая премиальная тема (только body.admin-desktop-app).
 */

html:has(body.admin-desktop-app) {
  scroll-padding-top: 0;
  min-height: 100%;
  background-color: #f0f2fa;
  background-image:
    radial-gradient(ellipse 100% 70% at 0% -10%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 5%, rgba(59, 130, 246, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(14, 165, 233, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 40% at 5% 90%, rgba(251, 191, 36, 0.07), transparent 50%),
    linear-gradient(165deg, #fdfdfe 0%, #f3f5fc 38%, #fafbfe 72%, #ffffff 100%);
  background-attachment: fixed;
}

/* Лёгкая зернистость поверх фона */
html:has(body.admin-desktop-app)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.admin-desktop-app)::after {
    opacity: 0;
  }
}

body.admin-desktop-app {
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --bg: #f4f6fb;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --line-glow: rgba(99, 102, 241, 0.35);
  --accent: #4f46e5;
  --accent-2: #2563eb;
  --accent-dim: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --accent-soft-2: rgba(37, 99, 235, 0.08);
  --accent-glow: rgba(79, 70, 229, 0.28);
  --panel: #ffffff;
  --panel-2: #f8f9fd;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.045), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  --shadow-md:
    0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.07), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  --shadow-lg:
    0 4px 8px rgba(15, 23, 42, 0.05), 0 28px 64px rgba(15, 23, 42, 0.11), 0 1px 0 rgba(255, 255, 255, 1) inset;
  --shadow-glow: 0 16px 40px rgba(79, 70, 229, 0.18);
  --radius-card: 18px;
  --radius-pill: 14px;
  --admin-sidebar-tint: linear-gradient(175deg, #ffffff 0%, #fbfbfe 45%, #f4f6fd 100%);

  margin: 0;
  min-height: 100vh;
  background: transparent !important;
  background-image: none !important;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-desktop-app ::selection {
  background: rgba(79, 70, 229, 0.18);
  color: var(--text);
}

body.admin-desktop-app::before {
  display: none !important;
}

/* —— Общие классы из styles.css внутри админки —— */
body.admin-desktop-app .primary-btn {
  border: 1px solid rgba(79, 70, 229, 0.45);
  background: linear-gradient(165deg, #6366f1 0%, #4f46e5 42%, #4338ca 100%);
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, filter 0.2s ease;
}

body.admin-desktop-app .primary-btn:hover {
  border-color: #a5b4fc;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

body.admin-desktop-app .mini-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

body.admin-desktop-app .mini-btn:hover {
  border-color: rgba(79, 70, 229, 0.22);
  background: var(--accent-soft);
}

body.admin-desktop-app .mini-btn.danger-outline {
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.9);
  box-shadow: var(--shadow-sm);
}

body.admin-desktop-app .mini-btn.danger-outline:hover {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.5);
}

body.admin-desktop-app .limit-input,
body.admin-desktop-app select.limit-input,
body.admin-desktop-app textarea.limit-input {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

body.admin-desktop-app .limit-input:focus,
body.admin-desktop-app select.limit-input:focus,
body.admin-desktop-app textarea.limit-input:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.11);
}

body.admin-desktop-app .subtle {
  color: var(--muted);
}

body.admin-desktop-app .list {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.admin-desktop-app .list::before {
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.12), transparent);
  opacity: 1;
}

body.admin-desktop-app .list h2 {
  color: var(--text);
}

body.admin-desktop-app .inline-link {
  color: var(--accent-dim);
}

body.admin-desktop-app .inline-link:hover {
  color: var(--accent-dim);
  background: var(--accent-soft);
  border-bottom-color: rgba(79, 70, 229, 0.35);
}

body.admin-desktop-app .toast {
  background: linear-gradient(180deg, #ffffff, #fafbff);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(79, 70, 229, 0.08);
  bottom: 32px;
  border-radius: 20px;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

body.admin-desktop-app .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

body.admin-desktop-app .inventory-modal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

body.admin-desktop-app .inventory-row {
  background: var(--panel-2);
  border: 1px solid var(--line);
}

body.admin-desktop-app .inventory-row:hover {
  border-color: rgba(79, 70, 229, 0.22);
  background: #ffffff;
}

body.admin-desktop-app .filter-pill {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

body.admin-desktop-app .filter-pill:hover {
  color: var(--text);
  border-color: rgba(79, 70, 229, 0.22);
}

body.admin-desktop-app .filter-pill.active {
  color: var(--accent-dim);
  border-color: rgba(79, 70, 229, 0.32);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(99, 102, 241, 0.06));
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.1);
}

body.admin-desktop-app .admin-list-placeholder {
  background: var(--panel-2);
  border: 1px solid var(--line);
}

body.admin-desktop-app .cards-controls {
  background: var(--panel-2);
  border: 1px solid var(--line);
}

body.admin-desktop-app .admin-segment .mini-btn.active {
  border-color: rgba(79, 70, 229, 0.32);
  background: var(--accent-soft);
  color: var(--accent-dim);
}

body.admin-desktop-app .kv-dots {
  border-bottom-color: rgba(100, 116, 139, 0.35);
}

body.admin-desktop-app .sheet-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

body.admin-desktop-app .admin-subhead {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

body.admin-desktop-app .slim-select {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line);
}

body.admin-desktop-app .ghost-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

body.admin-desktop-app .ghost-btn:hover {
  border-color: rgba(79, 70, 229, 0.22);
  background: var(--accent-soft);
}

body.admin-desktop-app .mini-btn:focus-visible,
body.admin-desktop-app .primary-btn:focus-visible,
body.admin-desktop-app .ghost-btn:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.5);
  outline-offset: 2px;
}

/* —— Оболочка —— */
.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px 24px 20px;
  border-right: 1px solid var(--line);
  background: var(--admin-sidebar-tint);
  box-shadow: 6px 0 40px rgba(15, 23, 42, 0.045);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
}

.admin-sidebar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 35%, #0ea5e9 100%);
  border-radius: 0 4px 4px 0;
  opacity: 0.92;
}

.admin-sidebar-brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.admin-sidebar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.045em;
  color: var(--text);
  background: linear-gradient(125deg, #1e1b4b 0%, #4338ca 42%, #2563eb 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .admin-sidebar-title {
    color: var(--text);
    background: none;
  }
}

.admin-sidebar-badge {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(14, 165, 233, 0.08));
  color: var(--accent-dim);
  border: 1px solid rgba(79, 70, 229, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 11px 14px 11px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-nav-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  color: currentColor;
  opacity: 0.82;
}

.admin-nav-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav-text {
  min-width: 0;
}

.admin-nav-btn:hover {
  background: rgba(79, 70, 229, 0.06);
  color: var(--text);
  transform: translateX(2px);
}

.admin-nav-btn.active {
  padding-left: 22px;
  border-color: rgba(79, 70, 229, 0.14);
  background: linear-gradient(105deg, rgba(79, 70, 229, 0.11), rgba(14, 165, 233, 0.05));
  color: var(--accent-dim);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.admin-nav-btn.active .admin-nav-icon {
  opacity: 1;
}

.admin-nav-btn.active::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 62%;
  max-height: 24px;
  border-radius: 99px;
  background: linear-gradient(180deg, #6366f1, #0ea5e9);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.45);
}

.admin-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-link-out {
  color: var(--accent-dim);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.admin-link-out:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-sync-btn {
  width: 100%;
  justify-content: center;
}

.admin-sidebar-hint {
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  color: var(--muted);
}

.admin-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 34px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 8px 32px rgba(15, 23, 42, 0.04);
}

.admin-page-title {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.15;
}

.admin-status-line {
  margin: 0;
  font-size: 12px;
  max-width: min(760px, 58vw);
  word-break: break-word;
  color: var(--muted);
  line-height: 1.45;
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-quick-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fafbff);
  min-width: min(440px, 48vw);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-quick-search:focus-within {
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08), var(--shadow-sm);
}

.admin-quick-search input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  outline: none;
  font-size: 13px;
}

.admin-quick-search input::placeholder {
  color: rgba(100, 116, 139, 0.75);
}

.admin-quick-search-icon {
  opacity: 0.55;
  font-size: 13px;
}

.admin-main-scroll {
  flex: 1;
  overflow: auto;
  padding: 16px 34px 64px;
  scroll-behavior: smooth;
}

/* Скроллбары (WebKit) */
body.admin-desktop-app *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

body.admin-desktop-app *::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 99px;
}

body.admin-desktop-app *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.45), rgba(71, 85, 105, 0.5));
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

body.admin-desktop-app *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.45), rgba(67, 56, 202, 0.55));
  background-clip: padding-box;
}

.admin-panels .list {
  max-width: none;
  padding: 0;
  margin: 0;
}

.admin-panels .list h2 {
  display: none;
}

.admin-panels .admin-segment {
  display: none;
}

/* Сетка KPI */
.admin-dashboard-pane {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.admin-dashboard-pane > .admin-actions {
  grid-column: 1 / -1;
}

@media (max-width: 1200px) {
  .admin-dashboard-pane {
    grid-template-columns: 1fr;
  }
}

.admin-panels .admin-block {
  margin: 0;
  padding: 22px 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #ffffff 0%, #fcfcff 55%, #fafbff 100%);
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease, box-shadow 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.admin-panels .admin-block::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6 40%, #0ea5e9);
  opacity: 0.85;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.admin-panels .admin-block:hover {
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(79, 70, 229, 0.04);
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .admin-panels .admin-block:hover {
    transform: none;
  }

  .admin-nav-btn:hover {
    transform: none;
  }

  body.admin-desktop-app .primary-btn:hover {
    transform: none;
  }
}

.admin-panels .admin-block > p.subtle:first-child {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  margin-bottom: 16px;
  margin-top: 2px;
  opacity: 0.92;
}

.admin-welcome-card {
  border: 1px solid var(--line);
  background: linear-gradient(125deg, #ffffff 0%, #f8f7ff 45%, #f0f4ff 100%);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin: 10px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.admin-welcome-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a78bfa, #0ea5e9);
  opacity: 0.9;
}

.admin-welcome-card h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.admin-welcome-card p {
  margin: 0;
  color: var(--muted);
}

.admin-welcome-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-search-match {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
  background: var(--accent-soft);
  border-radius: 8px;
}

.admin-search-dim {
  opacity: 0.42;
}

.admin-help-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(420px, calc(100vw - 40px));
  z-index: 20;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.admin-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.admin-help-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.admin-help-body {
  padding: 14px 16px 16px;
  max-height: min(60vh, 480px);
  overflow: auto;
  font-size: 13px;
  color: var(--muted);
}

.admin-help-body ul,
.admin-help-body ol {
  margin: 8px 0 0;
  padding-left: 18px;
}

[data-help] {
  position: relative;
}

[data-help]:hover::after {
  content: attr(data-help);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 10px);
  padding: 10px 12px;
  max-width: 260px;
  width: max-content;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fafbff);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
  pointer-events: none;
  z-index: 40;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(79, 70, 229, 0.06);
}

.admin-panels .client-admin {
  max-width: 1100px;
}

/* Tariffs tab: full-width workspace */
body.admin-desktop-app #adminTariffsPane {
  width: 100%;
  max-width: 100%;
}

body.admin-desktop-app #adminTariffsPane .admin-block,
body.admin-desktop-app #adminTariffsPane .admin-tariff-details {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.admin-desktop-app #adminTariffsPane .kv-list {
  width: 100%;
  max-width: 100% !important;
}

/* Web users + All transactions: full workspace width + table fills remaining viewport height */
body.admin-desktop-app #adminWebUsersPane,
body.admin-desktop-app #adminGlobalTxPane.admin-global-tx-pane {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: calc(100vh - 176px);
}

body.admin-desktop-app #adminWebUsersBody.admin-list-placeholder,
body.admin-desktop-app #adminGlobalTxBody.admin-list-placeholder {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  width: 100%;
  overflow: auto;
}

/* Banners tab: full workspace width + list fills remaining viewport height */
body.admin-desktop-app #adminBannersPane {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: calc(100vh - 176px);
}

body.admin-desktop-app #adminBannersBody.admin-list-placeholder {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  width: 100%;
  overflow: auto;
}

body.admin-desktop-app #adminBannersBody .admin-banner-table .js-banner-link {
  max-width: none !important;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.admin-desktop-app #adminTariffsPane .admin-plan-kv-list .kv-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

body.admin-desktop-app #adminTariffsPane .admin-plan-kv-list .kv-row > .slim-input,
body.admin-desktop-app #adminTariffsPane .admin-plan-kv-list .kv-row > .limit-input,
body.admin-desktop-app #adminTariffsPane .admin-plan-kv-list .kv-row > textarea.limit-input,
body.admin-desktop-app #adminTariffsPane .kv-list .kv-row > .slim-input,
body.admin-desktop-app #adminTariffsPane .kv-list .kv-row > .limit-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.admin-desktop-app #adminTariffsBody.admin-list-placeholder {
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-panels .admin-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  background: var(--panel-2);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .admin-panels .admin-mini-row:hover {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-panels .admin-mini-row {
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .admin-panels .admin-mini-row:hover {
    transform: none;
  }
}

.admin-panels .admin-list-placeholder {
  font-size: 12px;
  line-height: 1.55;
  max-height: 320px;
  overflow: auto;
  padding: 6px 0;
}

.admin-panels #clientCardsList,
.admin-panels #clientTransactionsList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-panels #clientTransactionsList {
  max-height: min(78vh, 920px);
}

.admin-desktop-app .inventory-modal-panel {
  width: min(920px, calc(100vw - 48px));
  max-height: min(86vh, 900px);
}

.admin-desktop-app .inventory-modal-body {
  max-height: calc(86vh - 120px);
  overflow: auto;
}

.admin-desktop-app .admin-mini-table {
  border-collapse: collapse;
  width: 100%;
}

.admin-desktop-app .admin-mini-table th,
.admin-desktop-app .admin-mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.admin-desktop-app .admin-mini-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .admin-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .admin-nav-btn {
    flex: 1 1 120px;
    text-align: center;
  }

  .admin-sidebar-foot {
    width: 100%;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
  }

  .admin-quick-search {
    min-width: 260px;
    flex: 1 1 auto;
  }
}

@media (max-width: 760px) {
  .admin-welcome-card {
    padding: 16px;
  }

  .admin-help-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .admin-toolbar-actions {
    width: 100%;
  }

  .admin-quick-search {
    width: 100%;
    min-width: 0;
  }
}

.admin-auth-only-page #adminShell {
  display: none !important;
}

/* Until /api/v1/admin/auth/me completes: no admin chrome flash for anonymous users */
body.admin-auth-unknown #adminShell {
  display: none !important;
}
body.admin-auth-unknown #adminAuthOverlay {
  display: none !important;
}
body:not(.admin-auth-unknown) .admin-auth-boot {
  display: none !important;
}
.admin-auth-boot {
  position: fixed;
  inset: 0;
  z-index: 1998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 246, 252, 0.92);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.admin-auth-boot-inner {
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* Auth overlay — светлая карточка */
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 246, 252, 0.88);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.admin-auth-overlay::before,
.admin-auth-overlay::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.55;
}

.admin-auth-overlay::before {
  width: min(480px, 90vw);
  height: min(480px, 90vw);
  top: -12%;
  right: -8%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
}

.admin-auth-overlay::after {
  width: min(400px, 80vw);
  height: min(400px, 80vw);
  bottom: -10%;
  left: -6%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28), transparent 70%);
}

.admin-auth-overlay.hidden {
  display: none;
}

#adminAuthOverlay:not(.hidden) ~ #adminShell {
  display: none !important;
}

.admin-auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  padding: 36px 32px;
  border-radius: calc(var(--radius-card) + 2px);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.8) inset, 0 40px 80px rgba(79, 70, 229, 0.1);
}

.admin-auth-title {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  background: linear-gradient(120deg, #1e1b4b, #4338ca 50%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .admin-auth-title {
    color: var(--text);
    background: none;
  }
}

.admin-auth-hint {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 18px;
  color: var(--muted);
}

.admin-auth-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 12px 0 6px;
  color: var(--muted);
}

.admin-auth-step.hidden {
  display: none;
}

.admin-auth-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.admin-auth-qr {
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.admin-auth-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 14px;
  font-weight: 600;
}

.admin-auth-error.hidden {
  display: none;
}

.admin-user-line {
  font-size: 11px;
  margin-bottom: 8px;
  word-break: break-all;
  color: var(--muted);
}

.admin-plan-kv-list .kv-row > .limit-input:not(.kv-val),
.admin-plan-kv-list .kv-row > textarea.limit-input {
  flex: 1 1 0;
  min-width: 0;
}

.admin-plan-kv-list .admin-plan-kv-row--bullets > textarea.limit-input {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 520px) {
  .admin-plan-kv-list .kv-row > .limit-input:not(.kv-val),
  .admin-plan-kv-list .kv-row > textarea.limit-input {
    flex: 1 1 100%;
    width: 100%;
  }
}

.admin-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-audit-table th,
.admin-audit-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-audit-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-decline-reasons {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
  color: var(--muted);
}

/* —— Переходы между вкладками и удобство администрирования —— */
@media (prefers-reduced-motion: reduce) {
  .admin-main-scroll {
    scroll-behavior: auto;
  }
}

.admin-page-title.admin-page-title--pulse {
  animation: adminTitleReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes adminTitleReveal {
  from {
    opacity: 0.25;
    transform: translateY(8px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-page-title.admin-page-title--pulse {
    animation: none;
  }
}

/* Стек панелей: плавное появление вместо мгновенного display:none */
.admin-panels-stage {
  position: relative;
  display: block;
  min-height: min(50vh, 520px);
}

body.admin-desktop-app .admin-panels-stage > .admin-pane.hidden {
  display: block !important;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  max-width: 100%;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.34s;
  z-index: 0;
}

body.admin-desktop-app .admin-panels-stage > .admin-pane:not(.hidden) {
  position: relative;
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  height: auto !important;
  min-height: 0;
  overflow: visible;
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    visibility 0.38s;
}

@media (prefers-reduced-motion: reduce) {
  body.admin-desktop-app .admin-panels-stage > .admin-pane.hidden,
  body.admin-desktop-app .admin-panels-stage > .admin-pane:not(.hidden) {
    transition: none !important;
  }

  body.admin-desktop-app .admin-panels-stage > .admin-pane.hidden {
    transform: none;
  }
}

/* Каскад появления блоков дашборда */
@keyframes adminDashBlockIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > * {
  animation: adminDashBlockIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(1) {
  animation-delay: 0.02s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(2) {
  animation-delay: 0.05s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(3) {
  animation-delay: 0.08s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(4) {
  animation-delay: 0.11s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(5) {
  animation-delay: 0.14s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(6) {
  animation-delay: 0.17s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(7) {
  animation-delay: 0.2s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(8) {
  animation-delay: 0.23s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(9) {
  animation-delay: 0.26s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(10) {
  animation-delay: 0.29s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(11) {
  animation-delay: 0.32s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(12) {
  animation-delay: 0.35s;
}
body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > *:nth-child(n + 13) {
  animation-delay: 0.38s;
}

@media (prefers-reduced-motion: reduce) {
  body.admin-desktop-app .admin-pane:not(.hidden) .admin-dashboard-pane > * {
    animation: none !important;
  }
}

/* Quick start: кнопки-ярлыки */
.admin-welcome-card .filter-pill {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .admin-welcome-card .filter-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
  }

  .admin-welcome-card .filter-pill:active {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-welcome-card .filter-pill {
    transition: none;
  }

  .admin-welcome-card .filter-pill:hover {
    transform: none;
  }
}

/* Модальное окно инвентаря */
body.admin-desktop-app .modal-overlay:not(.hidden) {
  animation: adminModalBackdropIn 0.28s ease both;
}

body.admin-desktop-app .modal-overlay:not(.hidden) .inventory-modal-panel {
  animation: adminModalPanelIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes adminModalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes adminModalPanelIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.admin-desktop-app .modal-overlay:not(.hidden),
  body.admin-desktop-app .modal-overlay:not(.hidden) .inventory-modal-panel {
    animation: none;
  }
}

/* Оверлей входа */
.admin-auth-overlay:not(.hidden) {
  animation: adminAuthBackdropIn 0.35s ease both;
}

.admin-auth-overlay:not(.hidden) .admin-auth-card {
  animation: adminAuthCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

@keyframes adminAuthBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes adminAuthCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-auth-overlay:not(.hidden),
  .admin-auth-overlay:not(.hidden) .admin-auth-card {
    animation: none;
  }
}

/* All transactions: filters (same full-width column as Web users) */
.admin-global-tx-filter-form {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-sizing: border-box;
}

.admin-global-tx-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 16px;
  align-items: end;
}

@media (min-width: 1100px) {
  .admin-global-tx-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-global-tx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-global-tx-field .limit-input,
.admin-global-tx-field select.limit-input {
  width: 100%;
  box-sizing: border-box;
}

.admin-global-tx-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.admin-global-tx-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.admin-global-tx-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
}

.admin-global-tx-table th {
  text-align: left;
  padding: 6px 8px;
  white-space: nowrap;
}

.admin-global-tx-table td {
  padding: 6px 8px;
  vertical-align: top;
}

.admin-global-tx-group-row td {
  padding: 8px 8px 6px;
}

.admin-global-tx-group-cell {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.admin-global-tx-pill {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-global-tx-pill--card_auth {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #0369a1;
}

.admin-global-tx-pill--card_wallet {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.32);
  color: #4338ca;
}

.admin-global-tx-pill--fee {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #b45309;
}

.admin-global-tx-pill--billing {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.32);
  color: #047857;
}

.admin-global-tx-pill--system {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.28);
  color: #475569;
}

.admin-global-tx-status {
  font-weight: 600;
  font-size: 12px;
}

.admin-global-tx-status--approved {
  color: #0f766e;
}

.admin-global-tx-status--declined {
  color: #b91c1c;
}

.admin-global-tx-status--pending {
  color: #64748b;
}

.admin-global-tx-status-fee {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.25;
}

.admin-global-tx-type-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.admin-global-tx-type-wallet {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

/* Dashboard: hover / focus hints (data-hint) — cards must not clip ::after tooltips.
   NOTE: DOM is section.admin-panels > .admin-dashboard-pane > .admin-block (no .admin-panels inside pane). */
.admin-dashboard-pane .admin-block {
  overflow: visible;
}

.admin-dashboard-pane {
  overflow: visible;
}

.admin-dashboard-pane .row-inline {
  position: relative;
}

.admin-dashboard-pane .dash-hint[data-hint] {
  position: relative;
  z-index: 0;
  cursor: help;
  text-decoration: underline dotted rgba(79, 91, 136, 0.4);
  text-underline-offset: 3px;
  border-radius: 2px;
}

/* Following siblings (next .row-inline, etc.) paint later and would cover ::after without a stacking context lift. */
.admin-dashboard-pane .dash-hint[data-hint]:hover,
.admin-dashboard-pane .dash-hint[data-hint]:focus-visible {
  z-index: 400;
}

.admin-dashboard-pane .dash-hint[data-hint]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.admin-dashboard-pane .dash-hint[data-hint]::after {
  content: attr(data-hint);
  position: absolute;
  z-index: 1;
  left: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  max-width: min(340px, calc(100vw - 48px));
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  color: #f1f5f9;
  background-color: #0f172a;
  background-image: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.35),
    0 12px 28px -4px rgba(15, 23, 42, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  .admin-dashboard-pane .dash-hint[data-hint]::after {
    transition: none;
    transform: none;
  }
}

.admin-dashboard-pane .dash-hint[data-hint]:hover::after,
.admin-dashboard-pane .dash-hint[data-hint]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-dashboard-pane .admin-block > p.subtle.dash-hint[data-hint]:first-child::after {
  top: calc(100% + 10px);
  left: 0;
}

.admin-dashboard-pane .row-inline:has(.dash-hint[data-hint]:hover),
.admin-dashboard-pane .row-inline:has(.dash-hint[data-hint]:focus-visible) {
  z-index: 400;
}

/* Finance tab */
.admin-finance-pane .admin-finance-toolbar {
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
  align-items: flex-end;
}

.admin-finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 10px 0 6px;
}

.admin-finance-kpi {
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.88) 100%);
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.admin-finance-kpi-accent {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(160deg, rgba(236, 253, 245, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.admin-finance-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.95);
  margin-bottom: 6px;
}

.admin-finance-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.admin-finance-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-finance-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.admin-finance-chart-card {
  border-radius: 14px;
  padding: 12px 14px 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  min-height: 220px;
}

.admin-finance-chart-card canvas {
  max-height: 220px;
}

.admin-finance-chart-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.admin-finance-table-wrap {
  overflow: auto;
  max-height: min(52vh, 520px);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.65);
}

.admin-finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-finance-table th,
.admin-finance-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-finance-table th {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.98);
  font-weight: 600;
  color: #475569;
  z-index: 1;
}

.admin-finance-label-cell {
  vertical-align: top;
  max-width: min(420px, 36vw);
}

.admin-finance-label-readable {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
  margin-bottom: 4px;
  font-family: var(--font, "Plus Jakarta Sans", system-ui, sans-serif);
}

.admin-finance-label-raw {
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}

.admin-finance-reports {
  padding: 8px 0;
  line-height: 1.5;
}
