﻿@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #eff8f3;
  --ink: #102a3a;
  --muted: #6c7b80;
  --line: #dce8e2;
  --primary: #14905a;
  --primary-strong: #194f73;
  --brand-mint: #58d08f;
  --brand-navy: #194f73;
  --accent: #58d08f;
  --danger: #b73f3f;
  --warning: #9a650b;
  --success: #1f7a4f;
  --shadow: 0 22px 58px rgba(25, 79, 115, 0.11);
}

.dark {
  --bg: #0d1820;
  --surface: #14242d;
  --surface-soft: #18352b;
  --ink: #eff7f4;
  --muted: #9db0b4;
  --line: #25404a;
  --primary: #58d08f;
  --primary-strong: #58d08f;
  --brand-mint: #58d08f;
  --brand-navy: #194f73;
  --accent: #58d08f;
  --danger: #b73f3f;
  --warning: #9a650b;
  --success: #1f7a4f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.dark .sidebar {
  background: rgba(34, 34, 34, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .filters-panel {
  background: rgba(42, 42, 42, 0.95);
}

.dark .dashboard-hero {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.98), rgba(50, 60, 54, 0.9));
}

.dark label {
  color: var(--muted);
}

.dark .field-shortcut-btn {
  background: #2e3d35;
}

.dark .filter-combobox button[aria-label] {
  background: #2e3d35;
}

.dark .filter-options .filter-action-option:hover {
  background: #2e3d35;
}

.dark .jalali-picker-head button,
.dark .jalali-picker-title select,
.dark .jalali-days button,
.dark .jalali-clear {
  background: #333;
  color: var(--ink);
}

.dark .jalali-picker-title select {
  border-color: #3c4c43;
}

.dark .jalali-days button {
  background: transparent;
  color: var(--ink);
}

.dark .jalali-days button:hover,
.dark .jalali-days button.today {
  background: #2e3d35;
  color: #7dd3a8;
}

.dark .jalali-clear {
  background: #333;
  color: var(--muted);
}

.dark .excel-grid-row > span[contenteditable="true"]:focus {
  background: #2e3d35;
}

.dark .excel-grid-head {
  background: #2a3830;
  color: #7dd3a8;
}

.dark .excel-row-number {
  background: #333;
  color: var(--muted);
}

.dark .stacked-track {
  background:
    repeating-linear-gradient(
      to left,
      #333 0,
      #333 1px,
      transparent 1px,
      transparent 9%
    ),
    #2a2a2a;
}

.dark .bar-row div {
  background: #3a3a3a;
}

.dark .status.success {
  background: rgba(31, 122, 79, 0.2);
  color: #6dd4a0;
}

.dark .status.warning {
  background: rgba(154, 101, 11, 0.25);
  color: #f2c46d;
}

.dark .status.danger {
  background: rgba(183, 63, 63, 0.2);
  color: #f08080;
}

.dark .status.neutral {
  background: #333;
  color: #a0a0a0;
}

.dark .secondary-btn,
.dark .table-btn {
  background: #2e3d35;
  color: #7dd3a8;
}

.dark .danger-inline,
.dark .danger-btn {
  background: rgba(183, 63, 63, 0.2);
  color: #f08080;
}

.dark .modal-close {
  background: #3a3a3a;
  color: var(--ink);
}

.dark .add-game-row-btn {
  background: rgba(23, 136, 79, 0.14);
  color: #4ade80;
  border-color: rgba(23, 136, 79, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, var(--surface) 0, var(--bg) 54%, var(--line) 100%);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.kpi-card[role="button"],
.mini-kpi-row article[role="button"] {
  cursor: pointer;
}

.kpi-card[role="button"]:focus-visible,
.mini-kpi-row article[role="button"]:focus-visible {
  outline: 3px solid rgba(20, 144, 90, 0.28);
  outline-offset: 3px;
}

.kpi-card,
.mini-kpi-row article,
.wallet-snapshot-panel article {
  position: relative;
}

.kpi-card strong,
.mini-kpi-row article strong,
.wallet-snapshot-panel article strong {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: center;
  max-width: 100%;
  color: var(--ink);
  line-height: 1.05;
  text-align: center;
}

.kpi-money-number,
.kpi-money-currency {
  display: block;
  max-width: 100%;
  overflow-wrap: normal;
}

.kpi-money-number {
  white-space: nowrap;
}

.kpi-money-number {
  color: var(--ink);
  font-size: 1em;
  font-weight: 950;
  letter-spacing: 0;
}

.kpi-money-currency {
  color: inherit;
  font-size: 0.78em;
  font-weight: 900;
  line-height: 1.15;
  opacity: 1;
  white-space: normal;
  text-overflow: clip;
}

.has-kpi-exact::after {
  content: attr(data-kpi-exact);
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-start: 16px;
  z-index: 30;
  max-width: min(260px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(16, 42, 58, 0.16);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.has-kpi-exact:hover::after,
.has-kpi-exact:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

/* Unified KPI cards across all finance pages */
.kpi-grid .kpi-card,
.asset-kpi-grid .kpi-card,
.wallet-kpi-grid .kpi-card,
.game-kpi-grid .kpi-card,
.commission-kpi-grid .kpi-card,
.sales-kpi-grid .kpi-card {
  min-width: 0;
  min-height: 150px;
  padding: 18px 20px 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 10px;
  border-radius: 8px;
}

.kpi-grid .kpi-card > span,
.asset-kpi-grid .kpi-card > span,
.wallet-kpi-grid .kpi-card > span,
.game-kpi-grid .kpi-card > span,
.commission-kpi-grid .kpi-card > span,
.sales-kpi-grid .kpi-card > span {
  min-height: 22px;
}

.kpi-grid .kpi-card strong,
.asset-kpi-grid .kpi-card strong,
.wallet-kpi-grid .kpi-card strong,
.game-kpi-grid .kpi-card strong,
.commission-kpi-grid .kpi-card strong,
.sales-kpi-grid .kpi-card strong {
  width: 100%;
  align-self: center;
  justify-items: center;
  margin: 4px 0 0;
  color: #102a3a !important;
  font-size: clamp(24px, 1.55vw, 32px) !important;
  font-weight: 950 !important;
  line-height: 1.08;
  text-align: center;
}

.kpi-grid .kpi-card .kpi-money-number,
.asset-kpi-grid .kpi-card .kpi-money-number,
.wallet-kpi-grid .kpi-card .kpi-money-number,
.game-kpi-grid .kpi-card .kpi-money-number,
.commission-kpi-grid .kpi-card .kpi-money-number,
.sales-kpi-grid .kpi-card .kpi-money-number,
.kpi-grid .kpi-card .kpi-money-currency,
.asset-kpi-grid .kpi-card .kpi-money-currency,
.wallet-kpi-grid .kpi-card .kpi-money-currency,
.game-kpi-grid .kpi-card .kpi-money-currency,
.commission-kpi-grid .kpi-card .kpi-money-currency,
.sales-kpi-grid .kpi-card .kpi-money-currency {
  color: #102a3a !important;
  opacity: 1 !important;
}

.kpi-grid .kpi-card .kpi-money-currency,
.asset-kpi-grid .kpi-card .kpi-money-currency,
.wallet-kpi-grid .kpi-card .kpi-money-currency,
.game-kpi-grid .kpi-card .kpi-money-currency,
.commission-kpi-grid .kpi-card .kpi-money-currency,
.sales-kpi-grid .kpi-card .kpi-money-currency {
  font-size: 0.62em !important;
  line-height: 1.12;
}

.kpi-grid .kpi-card small,
.asset-kpi-grid .kpi-card small,
.wallet-kpi-grid .kpi-card small,
.game-kpi-grid .kpi-card small,
.commission-kpi-grid .kpi-card small,
.sales-kpi-grid .kpi-card small {
  align-self: end;
  margin-top: 0;
  min-height: 18px;
  font-size: 11px;
  color: #7b8a92;
  line-height: 1.6;
}

.kpi-formula-modal {
  display: grid;
  gap: 16px;
  direction: rtl;
}

.kpi-formula-modal h3 {
  margin: 0;
  font-size: 20px;
}

.kpi-formula-result,
.kpi-formula-list div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.kpi-formula-result span,
.kpi-formula-list span {
  color: var(--muted);
  font-size: 13px;
}

.kpi-formula-result strong,
.kpi-formula-list strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.9;
}

.kpi-formula-result strong {
  font-size: 24px;
}

.formula-mismatch-row {
  background: #fff7ed;
  box-shadow: inset 4px 0 0 #f59e0b;
}

.formula-mismatch-row td {
  border-color: #fed7aa;
}

.formula-difference {
  display: block;
  margin-top: 0.35rem;
  color: #b45309;
  font-weight: 800;
  white-space: nowrap;
}

.game-payments-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  direction: ltr;
}

.game-payment-form-panel,
.game-payment-records-panel {
  direction: rtl;
}

.game-payment-form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 14px 36px rgba(25, 79, 115, 0.07);
}

.game-payment-standalone-form {
  gap: 12px;
}

.game-payment-standalone-form .section-head {
  margin-bottom: 2px;
}

.game-payment-history-panel {
  margin-top: 18px;
}

.game-payment-history-panel .section-head {
  margin-bottom: 10px;
}

.game-payment-max-hint {
  justify-self: start;
  display: inline-flex;
  margin-top: -4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.game-payment-records-panel {
  min-width: 0;
}

.unit-price-stack {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.unit-price-stack span:first-child {
  color: var(--muted);
}

.mini-bar-chart {
  display: grid;
  gap: 12px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 96px minmax(120px, 1fr) minmax(140px, auto);
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.mini-bar-row span {
  color: var(--muted);
}

.mini-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.mini-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

@media (max-width: 680px) {
  .mini-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 1100px) {
  .game-payments-workspace {
    grid-template-columns: 1fr;
    direction: rtl;
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, var(--surface) 0, var(--bg) 54%, var(--line) 100%);
}

.login-panel {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-lockup.compact {
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 25px;
}

.brand-lockup p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-form,
.data-form {
  display: grid;
  gap: 14px;
}

.login-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.login-mode-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.login-mode-toggle button.active {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(30, 46, 38, 0.08);
}

.dark .login-mode-toggle button.active {
  color: #7dd3a8;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.otp-fields {
  display: grid;
  gap: 12px;
}

.login-hint {
  color: var(--muted);
  line-height: 1.8;
}

label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out;
}

input,
select {
  min-height: 42px;
}

select[multiple] {
  min-height: 132px;
  padding: 8px;
}

.select-with-shortcut {
  position: relative;
}

.select-with-shortcut input,
.select-with-shortcut select {
  min-width: 0;
  padding-left: 50px;
  width: 100%;
}

.field-shortcut-btn {
  display: grid;
  place-items: center;
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #eef8f2;
  color: var(--primary-strong);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.field-shortcut-btn:hover {
  background: var(--primary);
  color: #fff;
}

code {
  direction: ltr;
  display: inline-block;
  background: var(--surface-soft);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: Consolas, monospace;
  color: var(--ink);
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.8;
}

[data-jalali-filter]::placeholder {
  color: #8a95a5;
}

.filter-add-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
}

.filter-add-btn:hover {
  background: var(--surface-soft);
  color: var(--primary);
}

.filter-combobox--with-add input {
  padding-left: 76px;
}

.filter-combobox--with-add button[aria-label]:not(.filter-add-btn) {
  left: 42px;
}

.filter-combobox--with-add.filter-combobox--no-add input {
  padding-left: 44px;
}

.filter-combobox--with-add.filter-combobox--no-add button[aria-label]:not(.filter-add-btn) {
  left: 10px;
}

.filter-combobox {
  position: relative;
  min-width: 0;
}

.filter-combobox input {
  height: 48px;
  padding: 10px 44px 10px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-combobox button[aria-label] {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #eef5f1;
  color: var(--primary-strong);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.filter-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  width: 100%;
  min-width: 0;
  max-height: 230px;
  overflow: auto;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(29, 36, 51, 0.12);
  scrollbar-width: thin;
}

.filter-options::before {
  content: none;
}

.filter-options button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-options button:hover {
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.filter-options .filter-action-option {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  color: var(--primary-strong);
}

.filter-options .filter-action-option:hover {
  background: #eef8f2;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(23, 107, 91, 0.14);
  border-color: var(--primary);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.table-btn {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 14px;
  font-weight: 800;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button .icon-theme::before {
  content: "☀";
  display: inline-block;
  font-size: 1.15rem;
  line-height: 1;
}

.dark .icon-button .icon-theme::before {
  content: "🌙";
}

.icon-button .icon-reload::before {
  content: "↻";
  display: inline-block;
  font-size: 1.25rem;
  line-height: 1;
}

.icon-button.is-loading .icon-reload::before {
  animation: reloadSpin 0.8s linear infinite;
}

@keyframes reloadSpin {
  to {
    transform: rotate(-360deg);
  }
}

.plan-idea-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.plan-idea-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50% 50% 45% 45%;
}

.plan-idea-icon::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: 3px;
  bottom: -5px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.plan-idea-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  right: 4px;
  top: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.campaign-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 228px;
}

.campaign-create-btn:disabled {
  cursor: wait;
  opacity: 0.82;
}

.campaign-create-btn.is-loading .stage-spinner {
  display: inline-block;
  border-color: rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
}

.campaign-create-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}
}

.secondary-btn,
.table-btn {
  background: #e6f0ee;
  color: var(--primary-strong);
}

.table-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.campaign-desktop-table th:last-child,
.campaign-desktop-table td:last-child {
  min-width: 224px;
}

.stage-creative-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-creative-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-creative-summary small {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
}

.stage-creative-action select[multiple] {
  width: 100%;
  min-height: 156px;
}

.stage-creative-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.stage-creative-filter-input {
  width: 100%;
}

.stage-creative-choice-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-inline-end: 4px;
}

.stage-creative-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.stage-creative-choice:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(32, 180, 132, 0.22);
}

.stage-creative-choice b,
.stage-creative-choice small {
  display: block;
}

.stage-creative-update-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stage-creative-update-toolbar strong,
.stage-creative-update-toolbar small {
  display: block;
}

.stage-update-status {
  min-height: 22px;
  margin: 0;
  font-weight: 800;
}

.stage-update-status[data-tone="success"] {
  color: var(--success);
}

.stage-update-status[data-tone="error"] {
  color: var(--danger);
}

.stage-update-status[data-tone="loading"] {
  color: var(--muted);
}

.inline-select {
  min-height: 38px;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.list-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.list-more span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.danger-inline {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.table-btn.danger-inline:hover,
.danger-inline:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.ghost-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line);
}

.danger-btn {
  background: #f7e7e7;
  color: var(--danger);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.form-status {
  min-height: 20px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  align-self: center;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.jalali-preview {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.jalali-picker {
  position: fixed;
  z-index: 3000;
  width: min(300px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid rgba(226, 235, 232, 0.95);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(13, 36, 48, 0.12);
  padding: 14px 16px 12px;
  direction: rtl;
}

.jalali-picker-modal {
  z-index: 95000 !important;
}

.game-payment-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 96000;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 14px 18px;
  border-radius: 8px;
  background: #123744;
  color: #fff;
  box-shadow: 0 18px 38px rgba(13, 36, 48, 0.22);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  direction: rtl;
}

.game-payment-toast.success {
  background: var(--primary);
}

.game-payment-toast.error {
  background: #d94b4b;
}

.table-btn[data-delete-game-payment]:disabled {
  cursor: wait;
  opacity: 0.72;
}

.jalali-picker-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.jalali-picker-title {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(74px, 0.85fr);
  gap: 6px;
}

.jalali-picker-title select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
  color: #34454f;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-align-last: center;
  padding: 0 8px;
}

.jalali-picker-head button,
.jalali-days button,
.jalali-clear {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #70808a;
  min-height: 30px;
  font-weight: 900;
}

.jalali-picker-head button {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 0;
}

.jalali-picker-head button::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.jalali-picker-head button[data-next-month]::before {
  transform: rotate(135deg);
}

.jalali-picker-head button[data-prev-month]::before {
  transform: rotate(-45deg);
}

.jalali-weekdays,
.jalali-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.jalali-days {
  grid-template-rows: repeat(6, 30px);
}

.jalali-weekdays {
  margin-bottom: 7px;
  color: #7a8991;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.jalali-days button {
  background: transparent;
  color: #3d4b54;
  font-size: 13px;
  min-height: 30px;
  padding: 0;
}

.jalali-days button:hover,
.jalali-days button.today {
  background: #eaf7f1;
  color: var(--primary);
}

.jalali-days button.selected {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(20, 144, 90, 0.22);
}

.empty-day {
  min-height: 30px;
}

.jalali-clear {
  width: 100%;
  margin-top: 12px;
  background: #f8faf9;
  color: #70808a;
  min-height: 32px;
  font-size: 12px;
}

.campaign-date-range-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.campaign-date-range-field > label {
  margin: 0;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
}

.campaign-date-range-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #34454f;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.campaign-date-range-btn:hover,
.campaign-date-range-btn[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 144, 90, 0.14);
}

.campaign-date-range-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
  width: min(640px, calc(100vw - 48px));
  background: var(--surface);
  border: 1px solid rgba(226, 235, 232, 0.95);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(13, 36, 48, 0.12);
}

.campaign-date-range-panel.hidden {
  display: none;
}

.campaign-form label:has(> input[name="startDate"]),
.campaign-form label:has(> input[name="endDate"]),
#campaignEditForm label:has(> input[name="startDate"]),
#campaignEditForm label:has(> input[name="endDate"]) {
  display: none;
}

.campaign-range-footer {
  align-items: center;
  gap: 14px;
}

.campaign-range-footer > span {
  display: none;
}

.campaign-range-datetime-fields {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

.campaign-range-datetime {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.campaign-range-datetime-inputs {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) 86px;
  gap: 6px;
}

.campaign-range-datetime input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.campaign-range-datetime input[readonly] {
  background: var(--surface-soft);
}

.campaign-time-clock {
  position: absolute;
  z-index: 5100;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 224px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(13, 36, 48, 0.18);
}

.campaign-time-clock.hidden {
  display: none;
}

.campaign-time-clock-face {
  position: relative;
  width: 190px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: #f1f3f4;
}

.campaign-time-clock-face i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1aa7ee;
  transform: translate(-50%, -50%);
}

.campaign-time-clock-hand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: #1aa7ee;
  transform-origin: 50% 100%;
}

.campaign-time-clock-face button {
  position: absolute;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #324550;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 30px;
  text-align: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.campaign-time-clock-face button:not(.is-selected):hover {
  background: rgba(26, 167, 238, 0.1);
  color: #0b6d9d;
}

.campaign-time-clock-face button.is-selected {
  background: #1aa7ee;
  color: #fff;
}

.campaign-time-clock-minute-button {
  display: none;
}

.campaign-time-clock.is-minute-mode .campaign-time-clock-hour-button {
  display: none;
}

.campaign-time-clock.is-minute-mode .campaign-time-clock-minute-button {
  display: block;
}

.campaign-range-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: end;
}

.demo-users {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.dashboard-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 18px;
  width: 210px;
  height: calc(100vh - 36px);
  background: rgba(248, 250, 248, 0.94);
  color: var(--ink);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: visible;
  transition: width 0.18s ease, padding 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-screen.sidebar-collapsed .sidebar {
  width: 74px;
  padding: 18px 10px;
  box-shadow: 0 18px 40px rgba(30, 46, 38, 0.08);
}

.dashboard-screen.sidebar-collapsed .sidebar:hover,
.dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  width: 210px;
  padding: 18px 12px;
  box-shadow: 0 20px 50px rgba(30, 46, 38, 0.16);
}

.sidebar .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
}

.sidebar .brand-lockup p {
  color: var(--muted);
}

.dashboard-screen.sidebar-collapsed .sidebar .brand-lockup {
  justify-content: center;
  margin-inline: 0;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-lockup > div,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card span,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card strong,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card .ghost-btn {
  display: none;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-mark {
  width: 38px;
  height: 38px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border-radius: 14px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card::before {
  content: "AP";
  color: #fff;
  font-weight: 900;
}

.nav-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  text-align: right;
  cursor: pointer;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle {
  justify-content: center;
  padding: 10px 8px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-text,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle::after {
  display: none;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group.active.collapsed > .nav-group-toggle {
  justify-content: center;
  background: var(--surface-soft);
  color: var(--primary-strong);
  box-shadow: inset -3px 0 0 var(--primary);
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group.active.collapsed .nav-group-text,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group.active.collapsed > .nav-group-toggle::after {
  display: none;
}

.nav-group-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nav-group-text small {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
  opacity: 0.76;
}

.nav-group-text strong {
  color: inherit;
  font-size: 14px;
  font-weight: 900;
}

.nav-group-toggle::after {
  content: "⌄";
  margin-inline-start: auto;
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.nav-group.active > .nav-group-toggle,
.nav-group-toggle:hover {
  background: rgba(230, 240, 238, 0.68);
  color: var(--primary-strong);
}

.nav-group.collapsed .nav-group-toggle::after {
  transform: rotate(90deg);
}

.nav-group-items {
  display: grid;
  gap: 4px;
  margin: -3px 0 3px;
  padding: 6px 16px 6px 0;
  border-inline-start: 1px solid var(--line);
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-items {
  padding: 6px 0;
  border-inline-start: 0;
}

.nav-group.collapsed .nav-group-items {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: right;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  font-weight: 800;
}

.nav-group-items .nav-item {
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
}

.nav-item::before {
  content: "";
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 11px;
  background: rgba(232, 244, 239, 0.9);
}

.nav-group-items .nav-item::before {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 8px;
  background: rgba(232, 244, 239, 0.64);
}

.nav-item::after {
  content: "";
  position: absolute;
  inset-inline-start: 20px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  background: var(--primary-strong);
  mask: var(--nav-mask) center / contain no-repeat;
  -webkit-mask: var(--nav-mask) center / contain no-repeat;
}

.nav-group-items .nav-item::after {
  inset-inline-start: 17px;
  width: 13px;
  height: 13px;
  opacity: 0.9;
}

.nav-item[data-view="overview"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5 10.5V20h14v-9.5'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.nav-item[data-view="campaigns"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5h6v6H5zM13 5h6v6h-6zM5 13h6v6H5zM13 13h6v6h-6z'/%3E%3C/svg%3E"); }
.nav-item[data-view="assets"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M9 5v14M15 5v14'/%3E%3C/svg%3E"); }
.nav-item[data-view="entry"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.nav-item[data-view="payments"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12'/%3E%3Cpath d='m7 11 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E"); }
.nav-item[data-view="gamePayments"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h14'/%3E%3Cpath d='m13 7 5 5-5 5'/%3E%3C/svg%3E"); }
.nav-item[data-view="wallet"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 21 12 12 21 3 12z'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E"); }
.nav-item[data-view="commission"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 18 12-12'/%3E%3Ccircle cx='7.5' cy='7.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.5'/%3E%3C/svg%3E"); }
.nav-item[data-view="notifications"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v8'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }
.nav-item[data-view="users"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 7h14M5 12h14M5 17h14'/%3E%3C/svg%3E"); }
.nav-item[data-view="plan"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19h4l10-10-4-4L5 15z'/%3E%3C/svg%3E"); }

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after {
  inset-inline-start: 50%;
  transform: translate(50%, -50%);
}

[dir="rtl"] .dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after {
  transform: translate(50%, -50%);
}

.nav-icon {
  position: relative;
}

.nav-icon::after {
  content: "";
  width: 17px;
  height: 17px;
  background: var(--primary-strong);
  mask: var(--group-mask) center / contain no-repeat;
  -webkit-mask: var(--group-mask) center / contain no-repeat;
}

.nav-group[data-nav-group="operation"] { --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5h6v6H5zM13 5h6v6h-6zM5 13h6v6H5zM13 13h6v6h-6z'/%3E%3C/svg%3E"); }
.nav-group[data-nav-group="finance"] { --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M7 7h8.5a3 3 0 0 1 0 6H8.5a3 3 0 0 0 0 6H17'/%3E%3C/svg%3E"); }

.nav-item::before,
.nav-icon {
  box-shadow: none;
}

.nav-item.active::before,
.nav-item:hover::before,
.nav-group-toggle:hover .nav-icon,
.nav-group.active .nav-icon {
  background: var(--surface-soft);
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item {
  justify-content: center;
  min-height: 46px;
  padding: 7px;
  font-size: 0;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-items .nav-item {
  min-height: 36px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::before {
  margin: 0;
}

.nav-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(232, 244, 239, 0.9);
}

.user-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #102d21, #093820);
  color: white;
}

.user-card span {
  color: #cce2d5;
}

.main-content {
  min-width: 0;
  padding: 4px 0 24px;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  margin-bottom: 18px;
}

.topbar-title-block {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.topbar-date-range {
  position: relative;
  z-index: 210;
}

.topbar-date-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #d9e2e5;
  border-radius: 9px;
  background: #fff;
  color: #32424a;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(16, 42, 58, 0.08);
  cursor: pointer;
}

.topbar-date-range-btn:hover,
.topbar-date-range-btn[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 144, 90, 0.14);
}

.topbar-date-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  opacity: 0.72;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: 18px 18px;
  -webkit-mask-size: 18px 18px;
}

.topbar-date-range-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: 154px minmax(560px, 1fr);
  width: min(850px, calc(100vw - 112px));
  overflow: hidden;
  border: 1px solid #e2e8eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 42, 58, 0.18);
  direction: rtl;
}

.topbar-date-range-panel.hidden {
  display: none !important;
}

.topbar-range-presets {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 12px;
  border-inline-start: 1px solid #edf1f3;
}

.topbar-range-presets button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334047;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
}

.topbar-range-presets button.active,
.topbar-range-presets button:hover {
  background: #edf8f2;
  color: var(--primary);
}

.topbar-range-calendar-area {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.topbar-range-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.topbar-range-month h4 {
  margin: 0 0 14px;
  color: #2f3f47;
  font-size: 14px;
  text-align: center;
}

.topbar-range-weekdays,
.topbar-range-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.topbar-range-weekdays {
  margin-bottom: 8px;
  color: #6a7880;
  font-weight: 800;
  font-size: 12px;
}

.topbar-range-days button,
.topbar-range-days span {
  display: grid;
  place-items: center;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3c4850;
  font-weight: 800;
}

.topbar-range-days button {
  cursor: pointer;
}

.topbar-range-days button:hover {
  background: #eaf7f1;
}

.topbar-range-days button.in-range {
  background: #eaf7f1;
}

.topbar-range-days button.range-start,
.topbar-range-days button.range-end {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 144, 90, 0.22);
}

.topbar-range-nav {
  position: absolute;
  top: 19px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b878e;
  cursor: pointer;
}

.topbar-range-nav:hover {
  background: #f2f4f7;
  color: #34434b;
}

.topbar-range-nav::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  margin: auto;
  border-block-start: 2px solid currentColor;
  border-inline-start: 2px solid currentColor;
}

.topbar-range-nav--prev {
  inset-inline-end: 20px;
}

.topbar-range-nav--prev::before {
  transform: rotate(135deg);
}

.topbar-range-nav--next {
  inset-inline-start: 20px;
}

.topbar-range-nav--next::before {
  transform: rotate(-45deg);
}

.topbar-range-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #edf1f3;
  color: #4d5b62;
  font-weight: 800;
}

.topbar-range-footer > div {
  display: inline-flex;
  gap: 8px;
}

.topbar-range-footer .campaign-range-datetime-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.topbar-range-footer .campaign-range-actions {
  display: flex;
}

@media (max-width: 720px) {
  .campaign-range-footer {
    align-items: stretch;
  }

  .topbar-range-footer .campaign-range-datetime-fields,
  .campaign-range-datetime-fields {
    grid-template-columns: 1fr;
  }

  .campaign-range-actions {
    justify-content: flex-end;
  }
}

.topbar h2,
.section-head h3 {
  margin: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  background: rgba(251, 252, 251, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(32, 47, 40, 0.05);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.sales-kpi-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.game-kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.commission-kpi-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.commission-panel {
  margin-bottom: 18px;
}

.game-dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  direction: rtl;
  margin-bottom: 18px;
}

.game-dashboard-chart-grid > .panel {
  min-width: 0;
  margin-bottom: 0;
}

.game-monthly-panel,
.game-performance-panel {
  margin-bottom: 18px;
}

.game-performance-chart {
  display: grid;
  gap: 12px;
}

.game-action-line-chart {
  min-height: 250px;
  width: 100%;
}

.overview-performance-panel .game-action-line-chart {
  display: block;
  height: clamp(300px, 28vw, 390px);
  min-height: 0;
  max-height: 390px;
}

.overview-performance-panel .game-performance-chart {
  gap: 10px;
}

.game-action-line-chart circle {
  stroke: #fff;
  stroke-width: 2.5;
}

.game-action-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.game-action-summary article {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 12px;
  border-inline-start: 1px solid var(--line);
}

.game-action-summary article:first-child {
  border-inline-start: 0;
}

.game-action-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.game-action-summary i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.game-action-summary strong {
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: 950;
}

@media (max-width: 1180px) {
  .game-dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
}

.zaya-panel {
  margin-bottom: 18px;
}

.zaya-stats-body {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.zaya-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.zaya-summary article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.zaya-summary span,
.zaya-summary strong {
  display: block;
}

.zaya-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.zaya-summary strong {
  margin-top: 6px;
  font-size: 22px;
}

.zaya-chart {
  display: grid;
  gap: 10px;
}

.zaya-chart-row {
  display: grid;
  grid-template-columns: minmax(80px, 130px) minmax(160px, 1fr) minmax(60px, 90px);
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.zaya-chart-row span {
  color: var(--muted);
  font-weight: 800;
}

.zaya-chart-row div {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.zaya-chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.zaya-chart-row strong {
  text-align: left;
}

.zaya-link-table table {
  min-width: 420px;
}

.campaign-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.campaign-management-head strong {
  color: var(--ink);
  font-size: 16px;
}

.campaign-zaya-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.campaign-management-creatives {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.campaign-creative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.campaign-creative-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.campaign-creative-preview img,
.campaign-creative-missing {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.campaign-creative-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.campaign-creative-preview div {
  margin-top: 10px;
}

.campaign-creative-preview strong,
.campaign-creative-preview small {
  display: block;
}

.campaign-creative-preview small {
  color: var(--muted);
  margin-top: 3px;
}

.campaign-creative-preview a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.campaign-creative-state-form {
  display: grid;
  gap: 12px;
}

.campaign-management-creative {
  background: var(--surface);
}

.zaya-report-modal {
  width: min(1180px, 100%);
  background: #f8faf9;
}

.zaya-report-shell {
  display: grid;
  gap: 18px;
}

.zaya-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  direction: ltr;
}

.zaya-report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
}

.zaya-range-wrap {
  position: relative;
}

.zaya-outline-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #145cff;
  border-radius: 6px;
  background: #fff;
  color: #145cff;
  font-weight: 900;
}

.zaya-report-url {
  min-width: 0;
  max-width: 560px;
  overflow: hidden;
  color: #111827;
  direction: ltr;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.zaya-range-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 170px minmax(360px, 1fr);
  width: min(720px, calc(100vw - 64px));
  max-width: calc(100vw - 64px);
  overflow: hidden;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.zaya-range-presets {
  display: grid;
  align-content: start;
  border-inline-start: 1px solid #e3e7ed;
}

.zaya-range-presets button {
  min-height: 46px;
  border: 0;
  background: #fff;
  color: #24324a;
  font-weight: 900;
  text-align: right;
  padding: 0 18px;
}

.zaya-range-presets button.active,
.zaya-range-presets button:hover {
  background: #145cff;
  color: #fff;
}

.zaya-range-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 14px;
  padding: 18px;
  direction: rtl;
}

.zaya-range-custom label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.zaya-range-custom input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  direction: ltr;
  font-weight: 800;
  text-align: center;
}

.zaya-range-calendars {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
  padding: 4px 18px 18px;
  direction: rtl;
}

.zaya-calendar-month {
  display: grid;
  gap: 10px;
}

.zaya-calendar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: #333741;
  font-weight: 900;
}

.zaya-calendar-weekdays,
.zaya-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.zaya-calendar-weekdays span {
  color: #333741;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.zaya-calendar-days button,
.zaya-calendar-days .empty-day {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #333741;
  font-weight: 800;
}

.zaya-calendar-days button:hover,
.zaya-calendar-days button.in-range {
  background: #e8efff;
  color: #145cff;
}

.zaya-calendar-days button.selected {
  background: #145cff;
  color: #fff;
}

.zaya-range-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid #e3e7ed;
  color: var(--ink);
  font-weight: 900;
}

.zaya-range-footer .primary-btn {
  width: auto;
  min-height: 42px;
  border-radius: 6px;
  padding: 0 18px;
}

.zaya-report-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 0;
  overflow-x: auto;
  padding: 10px 14px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.zaya-report-tabs button {
  min-height: 48px;
  border: 0;
  border-inline-start: 1px solid #f0f2f4;
  background: transparent;
  color: #5d6066;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.zaya-report-tabs button:last-child {
  border-inline-start: 0;
}

.zaya-report-tabs button.active {
  color: #145cff;
}

.zaya-report-panel {
  display: grid;
  gap: 16px;
}

.zaya-report-panel .zaya-summary {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.zaya-line-card,
.zaya-breakdown-card,
.zaya-link-meta {
  padding: 18px;
  border: 1px solid #eef0f3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.zaya-line-svg {
  display: block;
  width: 100%;
  min-height: 260px;
}

.zaya-grid line {
  stroke: #e4e6ea;
  stroke-width: 1;
}

.zaya-grid text {
  fill: #6b7280;
  font-size: 13px;
  text-anchor: end;
}

.zaya-area {
  fill: url(#zayaAreaFill);
}

.zaya-line {
  fill: none;
  stroke: #6259ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.zaya-dots circle {
  fill: #6259ff;
  stroke: #6259ff;
}

.zaya-axis text {
  fill: #6b7280;
  font-size: 13px;
  text-anchor: middle;
}

.zaya-link-meta table {
  min-width: 620px;
}

.zaya-link-meta th,
.zaya-link-meta td {
  text-align: right;
  vertical-align: top;
}

.zaya-link-meta th {
  width: 180px;
  color: var(--muted);
}

.zaya-link-meta td {
  direction: ltr;
  text-align: left;
  word-break: break-all;
}

.zaya-breakdown-card {
  display: grid;
  gap: 12px;
}

.zaya-breakdown-card h4 {
  margin: 0;
  color: #145cff;
}

.zaya-breakdown-row {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(180px, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 12px;
}

.zaya-breakdown-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zaya-breakdown-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.zaya-breakdown-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6259ff;
}

.zaya-breakdown-row span {
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.zaya-breakdown-row small {
  color: var(--muted);
}

.kpi-card,
.panel,
.modal,
.detail-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.kpi-card {
  padding: 16px;
  box-shadow: 0 10px 30px rgba(30, 46, 38, 0.05);
}

.kpi-card span,
.detail-grid span {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 2vw, 23px);
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(251, 252, 251, 0.98), rgba(231, 245, 237, 0.9));
}

.dashboard-hero h3 {
  margin: 4px 0;
  font-size: 25px;
}

.dashboard-hero span {
  color: var(--muted);
}

.plan-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(251, 252, 251, 0.98), rgba(231, 245, 237, 0.9));
}

.plan-hero h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.plan-stage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.plan-stage-grid article {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(30, 46, 38, 0.04);
}

.plan-stage-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-stage-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.plan-kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
}

.plan-kanban-column {
  min-height: 420px;
  padding: 12px;
  border-radius: 12px;
  background: #f7faf9;
  box-shadow: inset 0 0 0 1px rgba(220, 232, 226, 0.72);
  scroll-snap-align: start;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.plan-kanban-column.is-drop-target {
  background: #edf9f3;
  box-shadow: inset 0 0 0 2px rgba(20, 144, 90, 0.28);
}

.plan-kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.plan-kanban-column header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-kanban-column header span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.plan-kanban-column header strong {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eaf3ef;
  color: var(--primary-strong);
  font-size: 12px;
}

.plan-column-add {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #ecf8f2;
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: 900;
}

.plan-kanban-stack {
  display: grid;
  gap: 12px;
}

.plan-kanban-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 42, 58, 0.08);
  cursor: grab;
}

.plan-kanban-card.dragging {
  opacity: 0.62;
  cursor: grabbing;
}

.plan-kanban-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #eef4f2;
  overflow: hidden;
}

.plan-kanban-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.plan-kanban-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-kanban-card-head strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.plan-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 9px;
  border-radius: 999px;
  background: #5bbcf3;
}

.plan-dot-high {
  background: #ff6370;
}

.plan-dot-normal {
  background: #f6b23f;
}

.plan-dot-low {
  background: #35c77e;
}

.plan-kanban-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.plan-kanban-meta,
.plan-kanban-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-kanban-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4f2;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
}

.plan-kanban-footer {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2f0;
}

.plan-kanban-footer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.plan-kanban-stage {
  min-height: 38px;
  font-size: 12px;
}

.plan-kanban-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 16px;
  border: 1px dashed #dce8e2;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 980px) {
  .plan-kanban-board {
    grid-template-columns: repeat(6, minmax(240px, 78vw));
  }
}

@media (max-width: 640px) {
  .plan-kanban-board {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .plan-kanban-column {
    min-height: auto;
  }
}

.plan-attachments {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 190px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.plan-attachments img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.plan-attachments.large {
  max-width: none;
  min-height: 76px;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.plan-attachments.large img {
  width: 72px;
  height: 72px;
}

.plan-preview-modal {
  display: grid;
  gap: 18px;
  max-width: min(920px, 88vw);
}

.plan-preview-head h3 {
  margin: 4px 0 6px;
  color: var(--text);
}

.plan-preview-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.plan-preview-gallery {
  display: grid;
  gap: 14px;
  max-height: 72vh;
  overflow: auto;
  padding-inline-end: 4px;
}

.plan-preview-gallery figure {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 42, 58, 0.08);
}

.plan-preview-gallery img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-soft);
}

.plan-preview-gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.directory-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.import-panel {
  margin-bottom: 18px;
}

.import-form {
  grid-template-columns: minmax(180px, 240px) auto;
  align-items: end;
  margin-top: 14px;
}

.paste-import-form .full-field {
  grid-column: 1 / -1;
}

.import-sheet-wrap {
  overflow-x: auto;
}

.excel-grid {
  min-width: 1420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.excel-grid-row {
  display: grid;
  grid-template-columns: 44px 190px 90px 120px 120px 230px repeat(4, 150px) 120px 140px 140px;
  min-height: 38px;
}

.excel-grid-row > span {
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-grid-row > span[contenteditable="true"]:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
  background: #f7fbfa;
}

.excel-grid-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eaf3f1;
  color: var(--primary-strong);
  font-weight: 900;
}

.excel-row-number {
  background: #f3f5f7;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.panel {
  padding: 18px;
  min-width: 0;
  box-shadow: 0 10px 30px rgba(30, 46, 38, 0.05);
}

.wide {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  margin-top: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 900;
}

.table-sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  padding: 0;
  cursor: pointer;
}

.table-sort-btn::after {
  content: "";
  display: inline-block;
  min-width: 14px;
  margin-inline-start: 5px;
  color: var(--accent);
  font-size: 11px;
}

.table-sort-btn[data-sort-state="desc"]::after {
  content: "↓";
}

.table-sort-btn[data-sort-state="asc"]::after {
  content: "↑";
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status.success {
  background: #e0f4ea;
  color: var(--success);
}

.status.warning {
  background: #fff1d8;
  color: var(--warning);
}

.status.danger {
  background: #f8e1e1;
  color: var(--danger);
}

.status.neutral {
  background: #e9edf2;
  color: #4b5563;
}

.approval-participant-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.approval-summary {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 112px;
}

.approval-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #e2ece9;
  border-radius: 999px;
  background: #f4f8f7;
  color: #6b7c85;
  font-size: 12px;
  font-weight: 950;
  cursor: help;
}

.approval-summary-chip b {
  font-size: 13px;
  line-height: 1;
}

.approval-summary-chip.success {
  border-color: #c9f0dc;
  background: #e0f4ea;
  color: var(--success);
}

.approval-summary-chip.danger {
  border-color: #f3c8c8;
  background: #f8e1e1;
  color: var(--danger);
}

.approval-summary-chip.warning,
.approval-summary-chip.neutral {
  border-color: #e2ece9;
  background: #eef3f2;
  color: #6b7c85;
}

.approval-tooltip {
  position: fixed;
  z-index: 10000;
  top: var(--approval-tooltip-top, 120px);
  left: var(--approval-tooltip-left, 120px);
  right: auto;
  bottom: auto;
  display: block;
  width: var(--approval-tooltip-width, min(420px, 78vw));
  max-height: min(260px, calc(100vh - 24px));
  overflow: auto;
  padding: 8px;
  border: 1px solid #dce9e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 42, 58, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.approval-summary:hover .approval-tooltip,
.approval-summary:focus-within .approval-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.approval-tooltip::before {
  content: "";
  position: absolute;
  top: var(--approval-tooltip-arrow-top, -7px);
  bottom: auto;
  right: auto;
  left: var(--approval-tooltip-arrow-left, 50%);
  width: 12px;
  height: 12px;
  border-top: 1px solid #dce9e6;
  border-right: 1px solid #dce9e6;
  background: #fff;
  transform: rotate(-45deg);
}

.approval-summary[data-tooltip-placement="top"] .approval-tooltip::before {
  top: auto;
  bottom: -7px;
  border: 0;
  border-left: 1px solid #dce9e6;
  border-bottom: 1px solid #dce9e6;
}

.approval-tooltip-table {
  width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  table-layout: auto !important;
}

.approval-tooltip-table th,
.approval-tooltip-table td {
  padding: 7px 8px !important;
  border-bottom: 1px solid #edf4f2;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.6;
  text-align: right;
  vertical-align: middle;
  white-space: normal;
}

.approval-tooltip-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.approval-tooltip-table tr:last-child td {
  border-bottom: 0;
}

.approval-tooltip-table strong {
  color: var(--ink);
  font-weight: 950;
}

.approval-tooltip-table .status {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
}

.approval-participant-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #edf4f2;
  border-radius: 8px;
  background: #fbfefd;
}

.approval-participant-item .status {
  justify-self: end;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.approval-participant-item strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-participant-item small {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.pending-approval-modal {
  max-width: min(1180px, calc(100vw - 72px));
}

.pending-approval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pending-approval-head h3 {
  margin: 0;
}

.pending-approval-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #eef7f4;
  color: #0f7f74;
  font-size: 13px;
  font-weight: 900;
}

.pending-approval-list {
  display: grid;
  gap: 12px;
}

.pending-approval-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.5fr) minmax(150px, auto);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #dce9e6;
  border-radius: 10px;
  background: #fff;
}

.pending-approval-table-wrap {
  border: 1px solid #dce9e6;
  border-radius: 10px;
  background: #fff;
  overflow: visible;
}

.pending-approval-modal .table-wrap {
  overflow: visible;
}

.pending-approval-table-wrap table {
  margin-top: 0;
}

.pending-approval-table-wrap th,
.pending-approval-table-wrap td {
  position: relative;
  padding: 14px 16px;
  vertical-align: middle;
}

.pending-approval-table-wrap td:hover {
  z-index: 20;
}

.pending-approval-table-wrap tbody tr:hover {
  background: #fbfefd;
}

.pending-approval-table-wrap .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-approval-card-main {
  display: grid;
  align-content: start;
  gap: 12px;
}

.pending-campaign-title {
  display: grid;
  gap: 4px;
}

.pending-campaign-title strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.pending-campaign-title span,
.pending-campaign-meta b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pending-campaign-meta {
  display: grid;
  gap: 8px;
}

.pending-campaign-meta span {
  display: grid;
  gap: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.7;
}

.campaign-sdk-modal {
  max-width: min(1280px, calc(100vw - 48px));
  display: grid;
  gap: 18px;
  color: var(--ink);
}

.modal:has(.campaign-sdk-modal) {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
}

.modal:has(.campaign-sdk-modal) .modal-body {
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.campaign-sdk-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.campaign-sdk-head h3 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}

.campaign-sdk-eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.campaign-sdk-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.campaign-sdk-switch input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.campaign-sdk-section {
  display: grid;
  gap: 12px;
}

.campaign-sdk-context {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.campaign-sdk-context > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.campaign-sdk-context span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.campaign-sdk-context strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.campaign-sdk-context small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  direction: ltr;
  text-align: right;
  overflow-wrap: anywhere;
}

.campaign-sdk-game-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-sdk-game-chips b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(24, 160, 137, 0.18);
  border-radius: 8px;
  background: rgba(24, 160, 137, 0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.campaign-sdk-game-chips b small {
  color: var(--muted);
  font-size: 11px;
}

.campaign-sdk-game-chips em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.campaign-sdk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.campaign-sdk-section-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.campaign-sdk-section-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.campaign-sdk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdk-field-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 34px 8px 12px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.sdk-field-pill.active {
  border-color: rgba(24, 160, 137, 0.35);
  color: var(--primary);
  background: rgba(24, 160, 137, 0.09);
}

.sdk-field-pill::before {
  content: "";
  position: absolute;
  right: 11px;
  width: 14px;
  height: 14px;
  border: 1px solid #b8c8c5;
  border-radius: 4px;
  background: #fff;
}

.sdk-field-pill.active::before {
  border-color: var(--primary);
  background: var(--primary);
}

.sdk-field-pill.active::after {
  content: "";
  position: absolute;
  right: 15px;
  width: 5px;
  height: 9px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sdk-field-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.campaign-sdk-rows-section {
  min-height: 0;
}

.campaign-sdk-rows {
  display: grid;
  gap: 12px;
  max-height: min(52vh, 560px);
  overflow: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}

.sdk-creative-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.sdk-creative-card-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(170px, 220px) auto;
  gap: 12px;
  align-items: end;
}

.sdk-creative-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.sdk-creative-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sdk-creative-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sdk-creative-card input,
.sdk-creative-card select,
.sdk-creative-card textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.sdk-creative-card input:focus,
.sdk-creative-card select:focus,
.sdk-creative-card textarea:focus {
  outline: none;
  border-color: rgba(24, 160, 137, 0.55);
  box-shadow: 0 0 0 3px rgba(24, 160, 137, 0.1);
}

.sdk-wide-field {
  grid-column: span 3;
}

.sdk-config-field {
  grid-column: span 6;
}

.sdk-config-field textarea {
  min-height: 86px;
  resize: vertical;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.55;
}

.campaign-sdk-actions {
  position: sticky;
  bottom: -24px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.campaign-sdk-actions .primary-btn,
.campaign-sdk-actions .ghost-btn,
.campaign-sdk-section-head .secondary-btn {
  min-height: 42px;
  border-radius: 8px;
  padding-inline: 16px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .campaign-sdk-head,
  .sdk-creative-card-head {
    grid-template-columns: 1fr;
  }

  .campaign-sdk-context {
    grid-template-columns: 1fr;
  }

  .campaign-sdk-switch {
    justify-self: start;
  }

  .sdk-creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sdk-wide-field,
  .sdk-config-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .modal:has(.campaign-sdk-modal) {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal:has(.campaign-sdk-modal) .modal-body {
    padding: 18px;
  }

  .campaign-sdk-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-sdk-rows {
    max-height: 56vh;
  }

  .sdk-creative-grid {
    grid-template-columns: 1fr;
  }

  .campaign-sdk-actions {
    bottom: -18px;
    margin: 0 -18px -18px;
    padding: 12px 18px;
  }

  .campaign-sdk-actions > * {
    flex: 1;
  }
}

.dark .sdk-creative-card {
  background: var(--surface-soft);
}

.dark .campaign-sdk-actions {
  background: rgba(16, 24, 32, 0.96);
}

.dark .sdk-field-pill::before {
  background: var(--surface);
}

.dark .sdk-field-pill.active::before {
  background: var(--primary);
}

.pending-approval-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pending-approval-people section {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #edf4f2;
  border-radius: 10px;
  background: #fbfefd;
}

.pending-approval-people h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.pending-approval-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pending-approval-actions .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-approval-actions .table-btn {
  min-height: 36px;
  padding: 8px 12px;
}

@media (max-width: 980px) {
  .pending-approval-modal {
    max-width: calc(100vw - 28px);
  }

  .pending-approval-card {
    grid-template-columns: 1fr;
  }

  .pending-approval-people {
    grid-template-columns: 1fr;
  }

  .pending-approval-actions {
    align-items: stretch;
  }
}

.mini-warning {
  display: inline-block;
  margin-right: 6px;
  color: var(--warning);
  font-size: 11px;
  font-weight: 900;
}

.bar-chart,
.status-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stacked-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stacked-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.stacked-chart {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.stacked-row {
  display: grid;
  grid-template-columns: 130px minmax(160px, 1fr) 150px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.month-label {
  color: var(--ink);
  font-weight: 800;
}

.stacked-track {
  width: 100%;
  height: 24px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      to left,
      #f1f3f6 0,
      #f1f3f6 1px,
      transparent 1px,
      transparent 9%
    ),
    #f7f9fb;
  overflow: hidden;
}

.stacked-fill {
  width: var(--row-width);
  height: 100%;
  display: flex;
  border-radius: inherit;
  overflow: hidden;
}

.stacked-fill span {
  display: block;
  height: 100%;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 150px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.bar-row div {
  height: 12px;
  border-radius: 999px;
  background: #e9edf2;
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.status-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 10px;
  padding-bottom: 12px;
}

.payment-widget {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.payment-widget .status-list {
  gap: 0;
}

.payment-widget progress {
  height: 7px;
}

.status-list strong,
.status-list span {
  display: block;
}

.status-list span {
  color: var(--muted);
  font-size: 12px;
}

progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  accent-color: var(--primary);
}

.data-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}

.campaign-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.campaign-form-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.campaign-collapsible-section {
  display: grid;
  gap: 14px;
}

.campaign-timing-grid {
  display: grid;
  direction: ltr;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "zayaLink artCost"
    "startTime startDate";
  gap: 28px 24px;
}

.campaign-timing-grid label {
  direction: rtl;
}

.campaign-field-art-cost {
  grid-area: artCost;
}

.campaign-field-start-date {
  grid-area: startDate;
}

.campaign-field-zaya {
  grid-area: zayaLink;
}

.campaign-field-start-time {
  grid-area: startTime;
}

.campaign-creative-picker {
  display: grid;
  gap: 14px;
}

.campaign-collapsible-toggle {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  text-align: right;
  font-size: 14px;
  font-weight: 900;
}

.campaign-collapsible-toggle:hover,
.campaign-collapsible-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.campaign-collapsible-toggle strong {
  color: var(--muted);
  font-size: 12px;
}

.campaign-collapsible-toggle i {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.campaign-collapsible-toggle[aria-expanded="true"] i {
  transform: rotate(135deg);
}

.campaign-collapsible-content[hidden] {
  display: none;
}

.campaign-creative-game {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.campaign-creative-game h4 {
  margin: 0;
}

.campaign-creative-group {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.campaign-creative-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.campaign-creative-option {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
  color: var(--ink);
}

.campaign-creative-option img,
.creative-text-only {
  width: 64px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--surface);
}

.creative-text-only {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
}

.campaign-creative-option b,
.campaign-creative-option small {
  display: block;
}

.campaign-panel {
  margin-bottom: 18px;
}

.stage-objects-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.stage-objects-head {
  align-items: flex-start;
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f2;
}

.stage-objects-head .secondary-btn {
  min-height: 42px;
  padding-inline: 16px;
}

.stage-endpoint-strip {
  display: grid;
  padding: 12px;
  border: 1px solid #e4ece8;
  border-radius: 8px;
  background: #fbfdfc;
}

.stage-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 10px 12px;
  border: 1px solid #e4ece8;
  border-radius: 6px;
  background: #f7fbf9;
  color: #50616b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.stage-base-url-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}

.stage-base-url-field input {
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.stage-base-url-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stage-base-url-control .secondary-btn {
  min-height: 44px;
  white-space: nowrap;
}

.stage-spinner {
  display: none;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid #c9d9d2;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: stage-spin 0.75s linear infinite;
}

.stage-spinner.large {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.stage-status.is-loading .stage-spinner,
.stage-result.is-loading::before,
.stage-card-status.is-loading::before {
  display: inline-block;
}

.stage-result.is-loading::before,
.stage-card-status.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  margin-inline-end: 8px;
  border: 2px solid #c9d9d2;
  border-top-color: var(--primary);
  border-radius: 50%;
  vertical-align: -2px;
  animation: stage-spin 0.75s linear infinite;
}

@keyframes stage-spin {
  to {
    transform: rotate(360deg);
  }
}

.stage-loading-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 34px 18px 26px;
  border: 1px dashed #d9e7e1;
  border-radius: 8px;
  background: #fbfdfc;
  color: #50616b;
  text-align: center;
}

.stage-loading-panel strong {
  color: #102a3a;
  font-size: 14px;
  font-weight: 900;
}

.stage-loading-panel small {
  color: #718189;
  font-size: 12px;
  font-weight: 800;
}

.stage-loader-orbit {
  position: relative;
  width: 48px;
  height: 48px;
}

.stage-loader-orbit span {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: stage-spin 0.9s linear infinite;
}

.stage-loader-orbit span:nth-child(2) {
  inset: 7px;
  border-top-color: #57c78a;
  animation-duration: 1.2s;
  animation-direction: reverse;
}

.stage-loader-orbit span:nth-child(3) {
  inset: 15px;
  border-top-color: #9acfb7;
  animation-duration: 0.75s;
}

.stage-skeleton-form,
.stage-skeleton-list {
  display: grid;
  width: min(680px, 100%);
  gap: 10px;
}

.stage-skeleton-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stage-skeleton-form span,
.stage-skeleton-list span {
  min-height: 42px;
  border-radius: 7px;
  background: linear-gradient(90deg, #edf4f1 0%, #f8fbfa 45%, #edf4f1 100%);
  background-size: 220% 100%;
  animation: stage-skeleton 1.15s ease-in-out infinite;
}

.stage-skeleton-list span {
  min-height: 54px;
}

@keyframes stage-skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.stage-status[data-tone="success"],
.stage-result[data-tone="success"] {
  color: #15794d;
}

.stage-status[data-tone="warning"],
.stage-result[data-tone="warning"],
.stage-card-status[data-tone="warning"] {
  color: #a06a00;
}

.stage-status[data-tone="error"],
.stage-result[data-tone="error"],
.stage-card-status[data-tone="error"] {
  color: var(--danger);
}

.stage-object-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid #e4ece8;
  border-radius: 8px;
  background: #f7fbf9;
}

.stage-object-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #50616b;
  font-weight: 900;
  cursor: pointer;
}

.stage-object-tabs button:hover {
  background: #fff;
  color: var(--primary-strong);
}

.stage-object-tabs button.active {
  border-color: var(--primary);
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(15, 118, 73, 0.1);
}

.stage-object-tabs small {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf8f3;
  color: #15794d;
  font-size: 11px;
  line-height: 1;
}

.stage-object-workspace {
  display: grid;
  gap: 14px;
  padding: 14px 0 2px;
}

.stage-current-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.stage-current-head h4 {
  margin: 2px 0 0;
  color: #102a3a;
  font-size: 20px;
}

.stage-record-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dcebe4;
  border-radius: 999px;
  background: #f7fbf9;
  color: #50616b;
  font-size: 12px;
  font-weight: 900;
}

.stage-object-form {
  align-items: end;
  padding: 14px;
  border: 1px solid #e4ece8;
  border-radius: 8px;
  background: #fbfdfc;
}

.stage-object-form label,
.stage-object-form .stage-choice-field {
  min-width: 0;
}

.stage-object-form input,
.stage-object-form select,
.stage-object-form textarea {
  background: #fff;
}

.stage-object-form select[multiple] {
  min-height: 120px;
  padding: 8px;
}

.stage-object-form textarea {
  min-height: 92px;
  resize: vertical;
}

.stage-asset-url-field {
  gap: 8px;
}

.stage-asset-preview {
  display: grid;
  place-items: center;
  width: 96px;
  min-height: 68px;
  padding: 6px;
  border: 1px solid #e4ece8;
  border-radius: 7px;
  background: #fbfdfc;
  color: #718189;
  font-size: 11px;
  font-weight: 900;
}

.stage-asset-preview img {
  display: block;
  max-width: 84px;
  max-height: 56px;
  object-fit: contain;
  border-radius: 4px;
}

.stage-asset-preview[data-tone="loading"] {
  color: #50616b;
}

.stage-asset-preview[data-tone="error"] {
  border-color: #f1c2c2;
  background: #fff8f8;
  color: var(--danger);
}

.creative-page-list {
  margin-top: 16px;
}

.creative-list-card {
  overflow: hidden;
}

.creative-list-card summary {
  flex-wrap: wrap;
}

.creative-summary-update-btn {
  min-height: 32px;
  padding: 0 12px;
}

.creative-card-preview {
  display: grid;
  place-items: center;
  min-height: 142px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.creative-card-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  padding: 10px;
}

.stage-token-field {
  gap: 6px;
}

.stage-token-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stage-token-input .secondary-btn {
  min-height: 40px;
  padding-inline: 12px;
  white-space: nowrap;
}

.stage-choice-field {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
}

.stage-choice-field legend {
  margin-bottom: 6px;
  color: #50616b;
  font-size: 12px;
  font-weight: 900;
}

.stage-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 164px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #e4ece8;
  border-radius: 7px;
  background: #fbfdfc;
}

.stage-choice-grid .checkbox-label {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #edf1f2;
  border-radius: 6px;
  background: #fff;
}

.emami-category-grid .checkbox-label {
  justify-content: flex-end;
  gap: 12px;
  font-weight: 800;
}

.emami-category-grid .checkbox-label span {
  flex: 1;
  text-align: right;
}

.stage-active-field {
  align-self: end;
  min-height: 42px;
  justify-content: space-between;
  border: 1px solid #e4ece8;
  border-radius: 7px;
  background: #fff;
}

.stage-result {
  min-height: 22px;
  font-weight: 800;
}

.stage-created-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.stage-created-list .section-head {
  padding-top: 16px;
  border-top: 1px solid #edf1f2;
}

.stage-created-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.stage-created-card {
  border: 1px solid #e7edf0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.stage-created-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  background: #fbfdfc;
  cursor: pointer;
}

.stage-created-card[open] summary {
  border-bottom: 1px solid #e7edf0;
}

.stage-created-card summary strong {
  min-width: 0;
  color: #102a3a;
  overflow-wrap: anywhere;
}

.stage-created-card summary span {
  color: #718189;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.stage-created-card .table-wrap {
  border-inline: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.stage-created-card th {
  width: 42%;
  color: #50616b;
  font-size: 11px;
  text-align: start;
  vertical-align: top;
}

.stage-created-card td {
  overflow-wrap: anywhere;
}

.stage-created-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 12px;
}

.stage-created-actions .danger-btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
}

.stage-card-status {
  min-height: 18px;
  margin: 0;
  padding: 0 12px 12px;
  font-size: 12px;
  font-weight: 900;
}

.stage-admin-link {
  display: inline-flex;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.campaign-panel .section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.campaign-form .form-actions {
  justify-content: flex-end;
}

.campaign-form input[readonly]:not([data-jalali-filter]),
.action-block input[readonly]:not([data-jalali-filter]),
.game-rows input[readonly]:not([data-jalali-filter]) {
  background-color: var(--surface-soft);
  color: var(--muted);
  cursor: default;
  border-color: var(--line);
}

.campaign-form input[readonly]:not([data-jalali-filter]):focus,
.action-block input[readonly]:not([data-jalali-filter]):focus,
.game-rows input[readonly]:not([data-jalali-filter]):focus {
  outline: none;
  border-color: var(--line);
}

.commission-allocation-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
}

.commission-percent-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.commission-percent-control input {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-weight: 800;
}

.commission-percent-control input:focus {
  outline: none;
}

.sales-share-field {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.sales-share-field {
  margin: 0;
}

.sales-share-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.sales-share-pill {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-height: 98px;
}

.sales-share-pill select,
.sales-share-pill small {
  grid-column: 1 / -1;
}

.sales-share-pill strong {
  color: var(--primary-strong);
}

.sales-share-pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.directory-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.directory-grid section {
  min-height: 300px;
}

.compact-form {
  grid-template-columns: 1fr;
}

.compact-form .sales-share-pills {
  grid-template-columns: 1fr;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-field .table-btn {
  min-height: 38px;
  white-space: nowrap;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 2px;
}

.payment-summary article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.payment-summary span,
.payment-summary strong {
  display: block;
}

.payment-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-summary strong {
  margin-top: 6px;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.notification-grid {
  align-items: start;
  direction: rtl;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.22fr);
  gap: 26px;
}

.notification-grid--composer-open {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.notification-grid--readonly {
  grid-template-columns: minmax(0, 1fr);
}

.notification-grid--readonly .notification-compose-panel {
  display: none;
}

.notification-grid--composer-collapsed .notification-compose-panel {
  min-height: 84px;
  padding: 12px 14px;
}

.notification-side-stack {
  display: grid;
  gap: 12px;
  align-content: start;
  max-width: 260px;
  justify-self: stretch;
}

.notification-grid textarea {
  resize: vertical;
  min-height: 112px;
}

.notification-compose-panel.is-open {
  padding: 16px;
}

.notification-compose-panel.is-open .notification-compose-head {
  margin-bottom: 10px;
}

.notification-compose-panel.is-open #notificationForm {
  gap: 10px;
}

.notification-compose-panel.is-open #notificationForm label {
  gap: 5px;
}

.notification-compose-panel.is-open #notificationForm input,
.notification-compose-panel.is-open #notificationForm select {
  min-height: 38px;
}

.notification-compose-panel.is-open #notificationForm textarea {
  min-height: 108px;
}

.notification-grid table {
  min-width: 900px;
}

.notification-channel-tabs {
  margin: 10px 0 16px;
  padding-inline: 0;
  border-bottom: 1px solid #dce9e8;
  overflow-x: auto;
}

.notification-channel-tabs button {
  white-space: nowrap;
  min-height: 54px;
  padding-inline: 22px;
}

.notification-archive-head {
  align-items: flex-start;
  margin-bottom: 8px;
}

.notification-archive-head > div {
  display: grid;
  gap: 4px;
}

.notification-archive-head h3 {
  margin: 0;
}

.notification-archive-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.notification-archive-head > span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: #eef7f4;
  color: #0f7f74;
}

.notification-table-wrap {
  border: 1px solid #e0ebe8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 42, 58, 0.045);
}

.notification-table-wrap table {
  margin-top: 0;
}

.notification-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafdfc;
}

.notification-table-wrap td,
.notification-table-wrap th {
  padding: 14px 12px;
  vertical-align: middle;
}

.notification-table-wrap tbody tr:hover {
  background: #fbfefd;
}

.notification-message-cell {
  max-width: 560px;
  max-height: 118px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #edf3f2;
  border-radius: 8px;
  background: #f8fbfa;
  line-height: 1.8;
  white-space: pre-wrap;
}

.notification-error-text {
  display: block;
  max-width: 280px;
  margin-top: 6px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
  white-space: normal;
}

.notification-rules-panel {
  display: grid;
  gap: 14px;
}

.notification-rules-panel.is-collapsed {
  min-height: 84px;
  padding: 12px 14px;
  align-content: center;
}

.notification-rules-panel.is-collapsed .notification-compose-head {
  min-height: 58px;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.notification-rules-panel .section-head {
  align-items: start;
}

.notification-rules-panel .notification-compose-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 12px;
}

.notification-rules-panel .section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.notification-rules-body {
  display: grid;
  gap: 16px;
}

.notification-rule-form {
  display: grid;
  gap: 12px;
}

.notification-rule-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #d9e8e5;
  border-radius: 8px;
}

.notification-rule-channels legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.notification-rule-channels label,
.inline-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.notification-rule-channels input,
.inline-check input {
  width: 18px;
  height: 18px;
  accent-color: #159a8c;
}

.inline-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.inline-input-unit span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.notification-rule-list {
  display: grid;
  gap: 10px;
}

.notification-rule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #fbfefd;
}

.notification-rule-item strong,
.notification-rule-item span,
.notification-rule-item small {
  display: block;
}

.notification-rule-item span,
.notification-rule-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-rule-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.empty-mini {
  margin: 0;
  padding: 12px;
  border: 1px dashed #dce9e8;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 980px) {
  .notification-grid,
  .notification-grid--composer-open,
  .notification-grid--composer-collapsed {
    grid-template-columns: 1fr;
  }

  .notification-compose-panel {
    order: -1;
  }

  .notification-side-stack {
    order: -1;
  }

  .notification-compose-panel.is-collapsed .notification-compose-head {
    grid-template-columns: 1fr 54px;
  }
}

.campaign-action-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.campaign-actions-fieldset {
  padding-top: 18px;
}

.campaign-actions-fieldset legend {
  color: var(--primary-strong);
  font-size: 14px;
}

.campaign-free-test-field {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-weight: 900;
}

.campaign-free-test-field:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-soft));
}

.campaign-submit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.campaign-submit-actions .form-error {
  flex-basis: 100%;
}

.campaign-offer-summary {
  display: grid;
  gap: 8px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.campaign-review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: 22px;
  align-items: start;
  direction: rtl;
}

.campaign-review-main,
.campaign-review-offer {
  min-width: 0;
}

.campaign-review-offer {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfefd;
}

.campaign-review-offer-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.campaign-review-offer-head h4 {
  margin: 0;
}

.campaign-review-offer .checkbox-label {
  width: auto;
  margin: 0;
  white-space: normal;
  line-height: 1.7;
}

.campaign-review-offer-head h4 {
  flex: 1 0 100%;
}

.campaign-review-offer-head .checkbox-label {
  padding: 7px 10px;
  border: 1px solid #d7ece8;
  border-radius: 8px;
  background: #fff;
}

.campaign-offer-preview-table {
  max-height: 260px;
}

.dark .campaign-review-main p,
.dark .campaign-review-offer .empty-state h3 {
  color: var(--ink);
}

.dark .campaign-offer-summary,
.dark .campaign-review-offer .empty-state p {
  color: var(--muted);
}

.campaign-offer-preview-table table {
  min-width: 720px;
}

.wallet-summary--danger article:last-child strong {
  color: var(--danger);
}

.wallet-card--danger strong {
  color: var(--danger);
}

.asset-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.asset-layout {
  grid-template-columns: minmax(0, 1fr);
}

.asset-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.asset-form label,
.asset-form select,
.asset-form input,
.asset-form textarea {
  min-width: 0;
}

.asset-form select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-placement-field {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.asset-placement-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-placement-bar label {
  display: block;
  min-width: 0;
}

.asset-placement-bar input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.asset-placement-bar span {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.asset-placement-bar input:checked + span {
  background: var(--primary);
  color: #fff;
}

.asset-game-field {
  display: grid;
  gap: 8px;
}

.asset-game-dropdown {
  position: relative;
}

.asset-game-toggle {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  text-align: right;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-game-toggle::after {
  content: "⌄";
  float: left;
  color: var(--muted);
}

.asset-game-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: min(520px, 100%);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(29, 36, 51, 0.12);
}

.asset-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
}

.asset-game-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.asset-game-option input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.asset-game-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-game-toggle {
  position: relative;
  min-height: 44px;
  padding: 8px 14px 8px 38px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.asset-game-toggle:hover,
.asset-game-toggle:focus-visible,
.asset-game-dropdown:has(.asset-game-menu:not(.hidden)) .asset-game-toggle {
  border-color: var(--primary);
  background: #fbfffd;
  box-shadow: 0 0 0 3px rgba(45, 166, 122, 0.12);
  outline: none;
}

.asset-game-toggle::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  float: none;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(-45deg);
  pointer-events: none;
}

.asset-game-dropdown:has(.asset-game-menu:not(.hidden)) .asset-game-toggle::after {
  transform: translateY(-20%) rotate(135deg);
}

.asset-game-menu {
  width: min(620px, 100%);
  gap: 10px;
  padding: 12px;
  border-color: rgba(45, 166, 122, 0.24);
  box-shadow: 0 20px 42px rgba(29, 36, 51, 0.16);
}

.asset-game-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
}

.asset-game-menu-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.asset-game-menu-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.asset-game-menu-head button:hover,
.asset-game-menu-head button:focus-visible {
  color: var(--danger);
  outline: none;
}

.asset-game-menu input[type="search"] {
  min-height: 40px;
  border-color: rgba(45, 166, 122, 0.3);
  background: #fbfffd;
  font-weight: 800;
}

.asset-game-menu input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 166, 122, 0.12);
}

.asset-game-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: linear-gradient(180deg, #fbfffd, var(--surface-soft));
}

.asset-game-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  min-height: 42px;
  padding: 8px 10px;
  background: var(--surface);
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.asset-game-option:hover {
  border-color: rgba(45, 166, 122, 0.42);
  background: #fbfffd;
}

.asset-game-option.is-selected,
.asset-game-option:has(input:checked) {
  border-color: rgba(45, 166, 122, 0.55);
  background: #eaf7f1;
  box-shadow: inset 3px 0 0 var(--primary);
}

.asset-game-option input {
  appearance: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.asset-game-option input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.asset-game-option input:checked::before {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(45deg);
}

.asset-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.asset-game-menu {
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.asset-game-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.asset-game-option {
  grid-template-columns: 18px minmax(0, 1fr);
  direction: rtl;
}

.asset-game-option span {
  text-align: right;
  direction: rtl;
}

.asset-game-menu {
  padding: 10px;
}

.asset-game-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.asset-game-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  direction: ltr;
}

.asset-game-option input {
  grid-column: 1;
  justify-self: start;
  width: 20px;
  height: 20px;
}

.asset-game-option span {
  grid-column: 2;
  text-align: right;
  direction: rtl;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-game-option.is-selected,
.asset-game-option:has(input:checked) {
  background: #eef9f4;
  border-color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.asset-game-dropdown {
  position: relative;
}

.asset-game-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 100;
  width: min(390px, 100%);
  max-width: 100%;
  max-height: min(430px, calc(100vh - 180px));
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(19, 151, 105, 0.22);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.asset-form > label,
.asset-game-field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.asset-form > label > select,
.asset-campaign-picker,
.asset-game-toggle {
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
}

.asset-form > label > select,
.asset-game-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
  line-height: 44px;
}

.asset-game-toggle {
  text-align: right;
  padding-left: 38px;
}

.asset-campaign-picker select {
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.asset-campaign-picker .field-shortcut-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  align-self: center;
}

.asset-form > label:nth-of-type(1),
.asset-form > label:nth-of-type(2),
.asset-form > .asset-game-field {
  grid-template-rows: 18px 44px;
}

.asset-form > label:nth-of-type(1) > select,
.asset-form > label:nth-of-type(2) .asset-campaign-picker,
.asset-form > .asset-game-field .asset-game-dropdown,
.asset-form > .asset-game-field .asset-game-toggle {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
}

.asset-form > .asset-game-field .asset-game-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
  margin: 0;
}

.asset-game-menu-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
}

.asset-game-menu input[type="search"] {
  width: calc(100% - 24px);
  margin: 12px;
}

.asset-game-grid {
  display: block;
  max-height: min(300px, calc(100vh - 300px));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px 12px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.asset-game-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  min-height: 36px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.asset-game-option + .asset-game-option {
  margin-top: 2px;
}

.asset-game-option:hover {
  background: #f3faf7;
}

.asset-game-option.is-selected,
.asset-game-option:has(input:checked) {
  background: #e8f4ff;
  border-color: transparent;
  box-shadow: none;
}

.asset-game-option input {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.asset-game-option span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
}

.asset-text-grid textarea {
  min-height: 120px;
}

.asset-file-field {
  display: grid;
  gap: 8px;
}

.asset-file-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-file-pill input[type="file"] {
  min-width: 0;
}

.asset-purpose-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.asset-purpose-toggle label {
  min-width: 104px;
  margin: 0;
}

.asset-purpose-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.asset-purpose-toggle span {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.asset-purpose-toggle input:checked + span {
  border-color: color-mix(in srgb, var(--primary) 52%, var(--line));
  background: var(--primary);
  color: #fff;
}

.asset-detail-texts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.asset-detail-texts article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.asset-detail-texts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-detail-texts p {
  margin: 8px 0 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.asset-popup-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.asset-popup-file-grid article {
  min-width: 0;
}

.asset-popup-file-grid article > span {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 950;
}

.asset-popup-file-grid article > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.asset-file-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.asset-file-link-row input {
  min-width: 0;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.asset-short-link-field {
  grid-column: 1 / -1;
}

.asset-short-link-field strong {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.asset-short-link-field input {
  min-width: 0;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.asset-tabs-panel {
  padding: 10px;
}

.asset-page-tabs {
  margin: 0;
  width: min(100%, 620px);
}

.asset-manual-panel {
  align-content: start;
}

.asset-manual-form {
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
}

.asset-manual-form label {
  min-width: 0;
}

.asset-manual-form input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-manual-form .form-actions {
  margin-top: 0;
}

.asset-manual-form .form-error {
  grid-column: 1 / -1;
}

.asset-manual-link {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 260px;
}

.asset-manual-link input {
  min-width: 0;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.asset-manual-row-new {
  background: rgba(20, 144, 90, 0.08);
}

.asset-server-panel {
  display: grid;
  gap: 14px;
}

.asset-server-panel > .section-head {
  direction: rtl;
  align-items: center;
}

.asset-server-panel > .section-head .table-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid #111827;
  color: var(--primary);
  font-weight: 950;
  box-shadow: none;
}

.asset-server-grid,
.asset-server-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
}

.asset-server-grid--summary {
  align-items: stretch;
}

.asset-server-link-grid {
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.asset-server-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef9f4;
}

.asset-server-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-server-card strong {
  color: var(--ink);
  font-size: 23px;
  font-weight: 950;
  line-height: 1.2;
}

.asset-server-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.asset-gauge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

.asset-gauge-card {
  display: grid;
  gap: 6px;
  min-height: 218px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 42, 58, 0.04);
}

.asset-gauge-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.asset-gauge-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.asset-gauge-head strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.asset-gauge {
  width: min(100%, 300px);
  height: 150px;
  justify-self: center;
  margin-top: -4px;
  overflow: visible;
}

.asset-gauge path {
  fill: none;
  stroke-width: 20;
  stroke-linecap: butt;
}

.asset-gauge-needle {
  stroke: #4b5563;
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 2px rgba(16, 42, 58, 0.18));
}

.asset-gauge-center {
  fill: #4b5563;
  stroke: #fff;
  stroke-width: 3;
}

.asset-gauge-scale,
.asset-gauge-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.asset-gauge-scale {
  direction: ltr;
  justify-content: space-between;
  max-width: 282px;
  width: 100%;
  justify-self: center;
  margin-top: -20px;
  unicode-bidi: isolate;
}

.asset-gauge-legend {
  flex-wrap: wrap;
  direction: rtl;
}

.asset-gauge-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.asset-gauge-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.asset-gauge-card small {
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.asset-server-loading {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 720px) {
  .asset-manual-form,
  .asset-manual-link {
    grid-template-columns: 1fr;
  }

  .asset-manual-link {
    min-width: 0;
  }

  .asset-server-link-grid,
  .asset-gauge-grid {
    grid-template-columns: 1fr;
  }
}

.asset-upload-target {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-creative-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  direction: ltr;
}

.asset-live-preview-panel,
.asset-upload-control-panel {
  min-width: 0;
  direction: rtl;
}

.asset-live-preview-panel {
  display: grid;
  gap: 10px;
}

.asset-upload-control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  order: 2;
  grid-column: 2;
}

.asset-live-preview-panel {
  order: 1;
  grid-column: 1;
}

.asset-upload-control-panel label,
.asset-upload-control-panel select,
.asset-upload-control-panel input {
  min-width: 0;
}

.asset-upload-control-panel input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-inline-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.asset-creative-workspace--text {
  grid-template-columns: minmax(260px, 420px);
  justify-content: end;
}

.asset-creative-workspace--text .asset-live-preview-panel {
  display: none;
}

.asset-creative-workspace--text .asset-upload-control-panel {
  grid-column: 1;
}

.asset-upload-target-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: end;
}

.asset-upload-placement-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-upload-placement-bar button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-upload-placement-bar button.active {
  background: var(--primary);
  color: #fff;
}

.asset-placement-select-field {
  display: grid;
  gap: 8px;
}

.asset-placement-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.asset-home-popup-mode-field {
  display: grid;
  gap: 8px;
}

.asset-home-popup-mode-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 58px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.asset-home-popup-mode-bar button {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.asset-home-popup-mode-bar button.active {
  background: var(--primary);
  color: #fff;
}

.asset-placement-trigger {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "group icon"
    "label icon";
  align-items: center;
  gap: 3px 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: right;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.asset-placement-trigger:hover,
.asset-placement-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent);
}

.asset-placement-trigger span {
  grid-area: group;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.asset-placement-trigger strong {
  grid-area: label;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.asset-placement-trigger i,
.asset-placement-group-toggle i {
  grid-area: icon;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.78;
}

.asset-placement-trigger[aria-expanded="true"] i,
.asset-placement-group.is-open .asset-placement-group-toggle i {
  transform: rotate(135deg);
}

.asset-placement-menu {
  position: absolute;
  z-index: 85;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  scrollbar-width: thin;
}

.asset-placement-group + .asset-placement-group {
  margin-top: 5px;
}

.asset-placement-group-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.asset-placement-group-toggle:hover,
.asset-placement-group.is-open .asset-placement-group-toggle {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-soft));
}

.asset-placement-options {
  display: none;
  padding: 5px 8px 8px 0;
}

.asset-placement-group.is-open .asset-placement-options {
  display: grid;
  gap: 3px;
}

.asset-placement-option {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 6px 12px 6px 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.asset-placement-option:hover,
.asset-placement-option.is-selected {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary-strong);
}

.asset-placement-option.is-selected::after {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 950;
}

.asset-upload-limit {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.asset-guideline-hint {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.asset-guideline-hint span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-soft);
}

.asset-resize-tool {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-resize-tool canvas {
  display: none;
}

.asset-resize-head {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.asset-resize-head strong {
  color: var(--ink);
}

.asset-resize-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.asset-resize-controls label {
  display: grid;
  gap: 6px;
}

.asset-placement-preview-shell {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.asset-resize-tool canvas {
  display: block;
  width: min(100%, 620px);
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.asset-placement-preview {
  display: grid;
  place-items: center;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #13241e;
  padding: 16px;
}

.placement-preview-phone {
  position: relative;
  width: 210px;
  min-height: 384px;
  overflow: hidden;
  border: 8px solid #0f172a;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.08), rgba(3, 7, 18, 0.72)),
    repeating-linear-gradient(45deg, #153b2e 0 18px, #1f513c 18px 36px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.placement-preview-topbar {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
}

.placement-preview-topbar span {
  width: 42px;
  height: 12px;
  border-radius: 999px;
  background: #263b64;
}

.placement-preview-game-title {
  margin: 18px auto 10px;
  width: 130px;
  height: 28px;
  border-radius: 999px;
  background: #0f4f36;
  color: #c9ffe2;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.placement-preview-popup {
  position: relative;
  width: 168px;
  margin: 0 auto;
  padding: 22px 12px 14px;
  border: 5px solid #f2762d;
  border-radius: 22px;
  background: #fff1d8;
  box-shadow: 0 14px 0 #a94f28;
}

.placement-preview-close {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e73838;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.placement-preview-window {
  position: absolute;
  top: -17px;
  right: 35px;
  width: 92px;
  height: 22px;
  border-radius: 999px;
  background: #25b7ef;
  border: 3px solid #f2762d;
}

.placement-preview-slot {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 84px;
  overflow: hidden;
  border-radius: 8px;
  background: #0a3524;
}

.placement-preview-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placement-preview-phone--popup .placement-preview-slot img {
  object-fit: cover;
}

.placement-preview-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 10px;
}

.placement-preview-copy span {
  width: 110px;
  height: 10px;
  border-radius: 999px;
  background: #262626;
  opacity: 0.34;
}

.placement-preview-copy button {
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 900;
}

.placement-preview-caption {
  margin-top: 62px;
  color: #e5e7eb;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.asset-resize-tool canvas {
  display: none;
}

.placement-preview-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 72px;
  border: 1px dashed rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.placement-preview-logo-icon .placement-preview-empty {
  min-height: 100%;
  border-radius: 50%;
  font-size: 0;
}

.placement-preview-logo-icon .placement-preview-empty::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
}

.menchbaz-preview {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #071827;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.menchbaz-preview > img {
  display: block;
  width: 100%;
  height: auto;
}

.menchbaz-preview small {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.68);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.menchbaz-logo-slot {
  position: absolute;
  left: 4.6%;
  top: 40.8%;
  width: 15.8%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #facc15;
}

.menchbaz-logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menchbaz-logo-slot span {
  color: rgba(15, 23, 42, 0.55);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.menchbaz-preview--popup {
  width: min(100%, 300px);
}

.menchbaz-popup-banner {
  position: absolute;
  left: 18%;
  top: 33.1%;
  width: 64%;
  height: 20.8%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #facc15;
}

.menchbaz-popup-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menchbaz-popup-banner span {
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  font-weight: 900;
}

.menchbaz-popup-title,
.menchbaz-popup-copy,
.menchbaz-popup-button {
  position: absolute;
  left: 17%;
  width: 66%;
  color: #fff;
  text-align: center;
  direction: rtl;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.menchbaz-popup-title {
  top: 27.2%;
  font-size: 16px;
  font-weight: 900;
}

.menchbaz-popup-copy {
  top: 57.5%;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
}

.menchbaz-popup-button {
  top: 73.2%;
  left: 35%;
  width: 30%;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #22c55e;
  font-size: 12px;
}

.placement-preview-main-menu {
  position: relative;
  display: grid;
  gap: 12px;
  width: 178px;
  margin: 12px auto 0;
  padding-bottom: 62px;
}

.placement-preview-player {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.84);
  padding: 8px;
}

.placement-preview-player span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #fcd34d 0 38%, #b45309 39% 100%);
}

.placement-preview-player strong {
  height: 10px;
  border-radius: 999px;
  background: #9ca3af;
}

.placement-preview-menu-buttons {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.placement-preview-menu-buttons button {
  width: 120px;
  min-height: 30px;
  border: 2px solid #b97849;
  border-radius: 999px;
  background: #30a866;
  color: #ecfdf5;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.placement-preview-menu-buttons button:last-child {
  background: #30343a;
  color: #e5e7eb;
}

.placement-preview-side-icons {
  position: absolute;
  right: -4px;
  top: 86px;
  display: grid;
  gap: 8px;
}

.placement-preview-side-icons span,
.placement-preview-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #c86a2c;
  background: radial-gradient(circle, #f9a13b 0 48%, #bc4f1d 49% 100%);
  box-shadow: 0 4px 0 rgba(72, 35, 22, 0.55);
}

.placement-preview-logo-icon {
  position: absolute;
  left: -3px;
  top: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f97316;
  padding: 3px;
}

.placement-preview-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.placement-preview-bottom-nav {
  position: absolute;
  right: -7px;
  bottom: -52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 192px;
}

.placement-preview-bottom-nav span {
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5c16c 0 32%, #654321 33% 100%);
  border: 2px solid #2b1a10;
}

.asset-thumb {
  display: block;
  width: 92px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  object-fit: contain;
}

.asset-text-only {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 58px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-table table {
  min-width: 940px;
}

.asset-review-preview {
  max-height: min(54vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  margin-bottom: 16px;
}

.asset-review-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

.asset-review-preview--text {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  border-style: dashed;
  color: var(--primary-strong);
  text-align: center;
}

.asset-review-preview--text strong {
  font-size: 16px;
  font-weight: 950;
}

.asset-review-preview--text span {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.campaign-operation-summary-modal {
  display: grid;
  gap: 18px;
}

.campaign-operation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.campaign-operation-head h3 {
  margin: 0;
}

.campaign-operation-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.campaign-operation-kpis {
  margin-bottom: 0;
}

.campaign-operation-games {
  display: grid;
  gap: 16px;
}

.campaign-operation-game {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.campaign-operation-game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.campaign-operation-game-head h4 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 16px;
}

.campaign-operation-game-head span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.campaign-operation-columns {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
}

.campaign-operation-columns h5 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
}

.campaign-operation-columns table {
  min-width: 640px;
}

.campaign-operation-columns td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.campaign-operation-columns td a {
  display: block;
  margin-top: 4px;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.campaign-operation-texts {
  display: grid;
  gap: 4px;
}

.campaign-operation-texts span {
  display: grid;
  gap: 2px;
  color: var(--ink);
  line-height: 1.7;
}

.campaign-operation-texts b {
  color: var(--muted);
  font-size: 11px;
}

.charge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.charge-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.charge-status--success {
  background: #e0f4ea;
  color: var(--success);
}

.charge-status--success i {
  background: var(--success);
}

.charge-status--warning {
  background: #fff1d8;
  color: var(--warning);
}

.charge-status--warning i {
  background: var(--accent);
}

.charge-status--danger {
  background: #f8e1e1;
  color: var(--danger);
}

.charge-status--danger i {
  background: var(--danger);
}

.game-payment-form,
.commission-payment-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.game-payment-form input[type="text"],
.commission-payment-form input[type="text"] {
  min-height: 36px;
  padding: 8px 10px;
}

.game-payment-records {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.game-payment-records span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-full-pay {
  grid-column: 1 / -1;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.game-full-pay input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--primary);
}

.campaign-assets-shortcut {
  margin-bottom: 14px;
}

.wallet-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
}

.wallet-kpi-grid {
  margin-top: 14px;
}

.wallet-brand-picker {
  display: block;
  max-width: 320px;
}

.wallet-brand-picker select {
  margin-top: 8px;
}

.invoice-preview {
  max-height: min(72vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.invoice-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.full-field,
.form-actions {
  grid-column: 1 / -1;
}

.scope-field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  scrollbar-width: thin;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  min-height: unset;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.user-tabs-panel {
  padding-top: 22px;
  overflow: visible;
}

.hover-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.hover-tabs button {
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hover-tabs button.active {
  background: var(--surface-soft);
  color: var(--primary-strong);
  transform: translateY(1px);
}

.hover-tabs button.active {
  box-shadow: inset 0 1px 0 var(--line), inset 1px 0 0 var(--line), inset -1px 0 0 var(--line);
}

.hover-tab-content {
  padding: 24px 14px 8px;
  background: var(--surface);
  border-radius: 0 0 8px 8px;
}

.user-tab-pane {
  display: none;
}

.user-tab-pane.active {
  display: block;
}

.nested-panel {
  box-shadow: none;
}

.backend-dashboard-page {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 138px);
}

.backend-dashboard-head {
  margin-bottom: 0;
}

.backend-dashboard-frame-shell {
  position: relative;
  min-height: calc(100vh - 210px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.backend-dashboard-fallback {
  position: absolute;
  inset: 18px;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.backend-dashboard-fallback strong {
  color: var(--ink);
}

.backend-dashboard-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 210px);
  min-height: 680px;
  border: 0;
  background: #fff;
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.audit-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-filters input,
.audit-filters select {
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
}

.audit-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.overview-modal-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.overview-modal-section:first-of-type {
  margin-top: 0;
}

.overview-modal-section .section-head {
  margin-bottom: 0;
}

.users-access-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.users-access-table {
  min-width: 760px;
  margin-top: 0;
}

.users-access-table th,
.users-access-table td {
  padding: 16px 14px;
}

.users-access-table tbody tr:hover {
  background: rgba(235, 247, 242, 0.48);
}

.users-access-table th:last-child,
.users-access-table td:last-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 164px;
  min-width: 164px;
  background: inherit;
  box-shadow: 1px 0 0 var(--line);
}

.users-access-table th:last-child {
  z-index: 2;
  background: var(--surface);
}

.users-access-table .table-actions {
  display: flex;
  justify-content: flex-start;
}

.users-access-table .table-btn {
  min-width: 66px;
}

.user-identity-cell {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.user-identity-cell strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.user-identity-cell small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.user-role-badge,
.user-scope-badge,
.user-scope-empty {
  display: inline-flex;
  align-items: center;
  max-width: min(260px, 34vw);
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.55;
}

.user-role-badge {
  background: #edf5f3;
  color: var(--primary-strong);
}

.user-scope-badge {
  background: #f6faf8;
  color: var(--ink);
  border: 1px solid rgba(214, 228, 222, 0.82);
  white-space: normal;
}

.user-scope-empty {
  color: var(--muted);
  background: transparent;
}

.entity-profile-name {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.entity-profile-name strong,
.entity-profile-name small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.entity-profile-name small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.entity-logo {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.entity-logo--empty {
  display: inline-grid;
  place-items: center;
  color: var(--primary-strong);
  font-weight: 900;
}

.entity-logo-preview {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}

.entity-logo-preview img {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
}

.entity-profile-form {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.entity-profile-form > label,
.entity-profile-form fieldset {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-soft));
}

.entity-profile-form fieldset:not(.game-profile-metrics) {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.entity-profile-form .entity-logo-preview {
  min-height: 76px;
}

.entity-profile-form .entity-logo-preview img {
  width: 68px;
  height: 68px;
}

.entity-logo-field {
  align-content: start;
}

.entity-logo-input-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.entity-logo-inline-preview {
  display: grid;
  place-items: center;
  width: 72px;
  height: 58px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.entity-logo-inline-preview img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}

.studio-name-pill {
  min-height: 0;
}

.entity-combobox {
  position: relative;
  display: block;
  min-width: 0;
}

.entity-combobox input {
  width: 100%;
  padding-left: 48px;
}

.entity-combobox--with-add input {
  padding-left: 84px;
}

.entity-combobox-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: #eef5f1;
  color: var(--primary-strong);
  cursor: pointer;
}

.entity-combobox--with-add .entity-combobox-toggle {
  left: 46px;
}

.entity-combobox-toggle::before {
  content: "";
  position: absolute;
  inset: 10px 8px;
  background: currentColor;
  clip-path: polygon(50% 70%, 12% 30%, 88% 30%);
}

.entity-combobox.open .entity-combobox-toggle::before {
  clip-path: polygon(50% 30%, 12% 70%, 88% 70%);
}

.entity-combobox-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: none;
  max-height: 190px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(16, 42, 58, 0.14);
}

.entity-combobox.open .entity-combobox-menu {
  display: grid;
  gap: 4px;
}

.entity-combobox-option-row {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 4px;
}

.entity-combobox-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
}

.entity-combobox-menu .entity-combobox-delete {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  color: var(--danger);
}

.entity-combobox-menu .entity-combobox-delete::before,
.entity-combobox-menu .entity-combobox-delete::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.entity-combobox-menu .entity-combobox-delete::before {
  transform: rotate(45deg);
}

.entity-combobox-menu .entity-combobox-delete::after {
  transform: rotate(-45deg);
}

.entity-combobox-menu button:hover,
.entity-combobox-menu button:focus {
  outline: none;
  background: var(--surface-soft);
}

.entity-combobox-menu strong {
  font-size: 12px;
  font-weight: 900;
}

.entity-combobox-menu small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.entity-combobox-menu .hidden {
  display: none;
}

.game-profile-metrics {
  display: grid;
  gap: 12px;
}

.game-metrics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.game-metrics-head label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.game-metrics-head select {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.game-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.game-metric-pill {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.game-metric-pill span {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 950;
}

.game-metric-pill small,
.game-metric-pill em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.game-metric-pill input {
  min-height: 36px;
}

.campaign-running-field {
  align-self: end;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.campaign-running-inline {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--warning);
  font-size: 12px;
  font-weight: 900;
}

.campaign-running-inline input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--accent);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

legend {
  padding: 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.action-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 0;
  background: var(--surface);
}

.add-action-top-btn {
  margin-bottom: 14px;
}

#breakdownRows {
  display: grid;
  gap: 14px;
}

.action-block.duplicate-type {
  border-color: var(--danger);
}

.action-block.duplicate-type [name="actionType"],
.action-block.duplicate-type .action-type-trigger {
  border-color: var(--danger);
  outline: 2px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.action-row-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.action-head {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(110px, 1fr) minmax(130px, 1fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.action-head select,
.action-head input {
  width: 100%;
}

.action-type-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.action-type-trigger {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "group icon"
    "label icon";
  align-items: center;
  gap: 2px 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: right;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.action-type-trigger:hover,
.action-type-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-soft));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.action-type-trigger span {
  grid-area: group;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-type-trigger strong {
  grid-area: label;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-type-trigger i,
.action-type-group-toggle i {
  grid-area: icon;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.75;
}

.action-type-trigger[aria-expanded="true"] i,
.action-type-group.is-open .action-type-group-toggle i {
  transform: rotate(135deg);
}

.action-type-menu {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  z-index: 80;
  width: min(340px, calc(100vw - 32px));
  min-width: min(280px, calc(100vw - 32px));
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.action-type-menu::-webkit-scrollbar {
  width: 8px;
}

.action-type-menu::-webkit-scrollbar-track {
  background: transparent;
}

.action-type-menu::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 999px;
}

.action-type-group + .action-type-group {
  margin-top: 4px;
}

.action-type-group-toggle {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  text-align: right;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.action-type-group-toggle:hover,
.action-type-group.is-open .action-type-group-toggle {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-soft));
}

.action-type-options {
  display: none;
  padding: 4px 8px 8px 0;
}

.action-type-group.is-open .action-type-options {
  display: grid;
  gap: 2px;
}

.action-type-option {
  position: relative;
  width: 100%;
  min-height: 30px;
  padding: 5px 14px 5px 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
  transition: background 0.14s ease, color 0.14s ease;
}

.action-type-option:hover,
.action-type-option.is-selected {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary-strong);
}

.action-type-option.is-selected::after {
  content: "✓";
  position: absolute;
  left: 10px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 900;
}

.add-game-row-btn {
  flex-shrink: 0;
  background: var(--surface-soft);
  border: 1px solid rgba(23, 136, 79, 0.5);
  color: var(--primary-strong);
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
}

.add-game-row-btn:hover {
  background: #cdeedd;
  border-color: var(--primary);
}

.guaranteed-action-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  width: 100%;
  overflow-x: auto;
}

.guaranteed-action-row label {
  min-width: 180px;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guaranteed-action-row label input,
.guaranteed-action-row label select {
  width: 100%;
}

.guaranteed-action-row .remove-guaranteed-action {
  width: 34px;
  height: 34px;
  min-width: unset;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
  border-radius: 999px;
  font-size: 18px;
}

.game-rows {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.game-row-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-row {
  flex: 1;
  display: grid;
  grid-template-columns:
    minmax(220px, 1.4fr)
    minmax(110px, 0.6fr)
    minmax(150px, 0.75fr)
    minmax(120px, 0.65fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

#campaignEditForm .game-row {
  grid-template-columns:
    minmax(220px, 1.4fr)
    minmax(110px, 0.6fr)
    minmax(150px, 0.75fr)
    minmax(120px, 0.65fr);
}

.game-row select,
.game-row input {
  width: 100%;
}

.create-game-creative-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(23, 136, 79, 0.55);
  border-radius: 8px;
  background: rgba(23, 136, 79, 0.12);
  color: var(--primary-strong);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.create-game-creative-btn:hover {
  background: var(--primary);
  color: #fff;
}

.game-creative-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
}

#campaignEditForm .game-creative-pill {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.game-row input[readonly] {
  background: var(--surface-soft);
  cursor: not-allowed;
}

.game-creative-status {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-creative-status.is-ready {
  border-color: rgba(23, 136, 79, 0.35);
  background: rgba(23, 136, 79, 0.1);
  color: var(--primary-strong);
}

.game-creative-draft-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.game-creative-draft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.game-creative-draft strong,
.game-creative-draft small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-creative-draft small {
  color: var(--muted);
  font-size: 0.78rem;
}

.game-creative-draft-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.update-creative-draft,
.remove-creative-draft {
  padding: 5px 10px;
}

.remove-game-row,
.remove-action-block {
  flex-shrink: 0;
  align-self: center;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 120px 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.add-game-profile-btn {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.inline-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(48, 196, 125, 0.12);
  color: var(--primary-strong);
  font-weight: 800;
  white-space: nowrap;
}

.empty-state,
.empty-cell {
  text-align: center;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  z-index: 10;
}

.modal {
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal:has(.table-wrap) {
  width: min(1320px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: clamp(16px, 1.5vw, 24px);
}

.modal:has(.table-wrap) .modal-body {
  display: grid;
  min-height: 0;
}

.modal:has(.table-wrap) .table-wrap {
  max-width: 100%;
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal:has(.topbar-notifications-popup) {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 18px;
  align-self: start;
  margin-top: 24px;
}

.modal:has(.topbar-notifications-popup) .modal-body {
  width: 100%;
}

.modal:has(.table-wrap) table {
  margin-top: 0;
  min-width: 100%;
  table-layout: fixed;
}

.modal:has(.table-wrap) th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

.modal:has(.table-wrap) td,
.modal:has(.table-wrap) th {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.modal:has(.table-wrap) td small {
  overflow-wrap: anywhere;
}

.modal:has(.table-wrap) .table-note-preview {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 100%;
  max-height: 3.6em;
  cursor: help;
  overflow: visible;
}

.modal:has(.table-wrap) .table-note-preview strong,
.modal:has(.table-wrap) .table-note-preview small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.modal:has(.table-wrap) .table-note-preview strong {
  -webkit-line-clamp: 2;
}

.modal:has(.table-wrap) .table-note-preview small {
  -webkit-line-clamp: 2;
}

.modal:has(.table-wrap) .table-note-preview:hover::after {
  content: attr(data-full-note);
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(520px, 70vw);
  max-height: 320px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  white-space: pre-wrap;
  text-align: start;
  line-height: 1.8;
}

.modal-close {
  float: left;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #eef1f4;
  font-size: 24px;
}

.modal h3,
.modal h4 {
  margin: 0 0 14px;
}

.campaign-edit-modal {
  width: min(1180px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}

.campaign-edit-modal .modal-close {
  position: sticky;
  top: 16px;
  left: 16px;
  float: none;
  margin: 16px 16px 16px auto;
  z-index: 3;
}

.campaign-edit-modal .modal-body {
  max-height: 90vh;
  overflow: auto;
  padding: 18px 22px 0;
}

.stage-creative-update-modal .modal-body {
  padding-bottom: 18px;
}

.creative-edit-modal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -22px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.stage-creative-update-modal .creative-edit-modal-head h3 {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.creative-edit-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.stage-creative-update-modal .stage-object-form .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 16px -22px 0;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.campaign-edit-modal h3 {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -18px -22px 18px;
  padding: 22px 64px 18px 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

#campaignEditForm {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
  padding-bottom: 0;
}

#campaignEditForm .full-field,
#campaignEditForm fieldset,
#campaignEditForm .form-actions,
#campaignEditForm .form-error {
  grid-column: 1 / -1;
}

#campaignEditForm label {
  gap: 8px;
}

#campaignEditForm > label,
#campaignEditForm fieldset {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-soft));
}

#campaignEditForm > label input,
#campaignEditForm > label select {
  background: var(--surface);
}

#campaignEditForm .payment-summary {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin: 0;
}

#campaignEditForm .payment-summary article {
  min-height: 92px;
  background: var(--surface-soft);
}

#campaignEditForm fieldset {
  padding: 18px;
}

#campaignEditForm legend {
  font-size: 1rem;
  color: var(--ink);
}

#editBreakdownRows {
  display: grid;
  gap: 14px;
}

#campaignEditForm .action-block {
  background: var(--surface);
  border-radius: 8px;
  padding: 14px;
}

#campaignEditForm .action-row-wrap,
#campaignEditForm .game-row-wrap {
  align-items: stretch;
}

#campaignEditForm .action-head {
  grid-template-columns: minmax(120px, 0.9fr) repeat(4, minmax(130px, 1fr)) auto;
}

#campaignEditForm .game-row {
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, 1fr));
}

#campaignEditForm .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  margin: 8px -22px 0;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.detail-grid article {
  padding: 14px;
}

.detail-grid strong {
  display: block;
  margin-top: 6px;
}

@media (max-width: 1180px) {
  .dashboard-screen.sidebar-collapsed,
  .dashboard-screen {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }

  .user-card {
    margin-top: 16px;
  }

  .filters-panel,
  .kpi-grid,
  .content-grid,
  .asset-kpi-grid,
  .plan-stage-grid,
  .asset-resize-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main-content,
  .sidebar {
    padding: 16px;
  }

  .dashboard-screen {
    gap: 12px;
  }

  .topbar,
  .section-head,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filters-panel,
  .kpi-grid,
  .asset-kpi-grid,
  .plan-stage-grid,
  .asset-form,
  .asset-text-grid,
  .asset-detail-texts,
  .asset-popup-file-grid,
  .asset-file-pill,
  .campaign-operation-columns,
  .asset-upload-target-controls,
  .asset-placement-preview-shell,
  .asset-resize-controls,
  .content-grid,
  .data-form,
  .campaign-form,
  .campaign-form-subgrid,
  .campaign-timing-grid,
  .breakdown-row,
  .payment-summary,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .campaign-timing-grid {
    grid-template-areas:
      "artCost"
      "startDate"
      "zayaLink"
      "startTime";
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .zaya-summary,
  .zaya-chart-row,
  .zaya-report-toolbar,
  .zaya-breakdown-row {
    grid-template-columns: 1fr;
  }

  .zaya-report-toolbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .zaya-report-actions {
    flex-direction: column;
  }

  .zaya-outline-btn,
  .zaya-report-url {
    width: 100%;
  }

  .zaya-range-menu {
    position: static;
    grid-template-columns: 1fr;
    min-width: 0;
    margin-top: 10px;
  }

  .zaya-range-presets {
    border-inline-start: 0;
  }

  .zaya-range-custom,
  .zaya-range-calendars,
  .zaya-range-footer {
    grid-template-columns: 1fr;
  }

  .zaya-range-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .zaya-report-tabs {
    grid-template-columns: repeat(7, minmax(145px, 1fr));
  }

  .stacked-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .action-head,
  .game-row,
  .sales-share-pills {
    grid-template-columns: 1fr;
  }

  .action-row-wrap,
  .game-row-wrap {
    flex-wrap: wrap;
  }

  .remove-game-row,
  .remove-action-block {
    align-self: flex-start;
  }
}

@media (max-width: 1320px) {
  .dashboard-screen {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .filters-panel {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .kpi-grid,
  .sales-kpi-grid,
  .game-kpi-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .commission-kpi-grid,
  .asset-kpi-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .content-grid,
  .wallet-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .action-head {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .game-row {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 980px) {
  body {
    background: var(--bg);
  }

  .dashboard-screen.sidebar-collapsed,
  .dashboard-screen {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .dashboard-screen.sidebar-collapsed .sidebar {
    padding: 14px;
  }

  .dashboard-screen.sidebar-collapsed .sidebar .brand-lockup > div,
  .dashboard-screen.sidebar-collapsed .user-card span,
  .dashboard-screen.sidebar-collapsed .user-card strong,
  .dashboard-screen.sidebar-collapsed .user-card .ghost-btn {
    display: block;
  }

  .dashboard-screen.sidebar-collapsed .nav-group-text {
    display: grid;
  }

  .dashboard-screen.sidebar-collapsed .nav-group-toggle::after {
    display: inline;
  }

  .dashboard-screen.sidebar-collapsed .user-card {
    width: auto;
    height: auto;
    min-height: auto;
    padding: 14px;
    place-items: stretch;
  }

  .dashboard-screen.sidebar-collapsed .user-card::before {
    content: none;
  }

  .dashboard-screen.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 12px;
    font-size: inherit;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .sidebar .brand-lockup {
    margin-bottom: 14px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-group {
    flex: 0 0 220px;
  }

  .nav-group-toggle {
    min-height: 44px;
  }

  .nav-group-items {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 130px;
    text-align: right;
    box-shadow: none;
  }

  .nav-item.active,
  .nav-item:hover {
    box-shadow: inset 0 -3px 0 var(--primary);
  }

  .user-card {
    margin-top: 12px;
  }

  .main-content {
    padding-bottom: 18px;
  }

  .topbar,
  .section-head,
  .dashboard-hero {
    flex-wrap: wrap;
  }

  .filters-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .kpi-grid,
  .sales-kpi-grid,
  .game-kpi-grid,
  .commission-kpi-grid,
  .asset-kpi-grid,
  .plan-stage-grid,
  .data-form,
  .campaign-form,
  .campaign-form-subgrid,
  .asset-form,
  .sales-share-pills,
  .detail-grid,
  .payment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap {
    margin-inline: -6px;
    padding-inline: 6px;
  }

  table {
    min-width: 760px;
  }

  .users-access-table {
    min-width: 700px;
  }

  .users-access-table th:last-child,
  .users-access-table td:last-child {
    width: 132px;
    min-width: 132px;
  }

  .users-access-table .table-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .modal-backdrop {
    align-items: start;
    padding: 14px;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 28px);
  }

  .campaign-edit-modal {
    width: 100%;
  }

  #campaignEditForm,
  #campaignEditForm .payment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #campaignEditForm .action-row-wrap,
  #campaignEditForm .game-row-wrap {
    flex-direction: column;
  }

  #campaignEditForm .action-head,
  #campaignEditForm .game-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #campaignEditForm .add-game-row-btn,
  #campaignEditForm .remove-game-row,
  #campaignEditForm .remove-action-block {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .dashboard-screen {
    padding: 8px;
  }

  .main-content,
  .sidebar,
  .panel,
  .modal,
  .dashboard-hero,
  .filters-panel {
    padding: 12px;
  }

  .sidebar,
  .panel,
  .kpi-card,
  .dashboard-hero,
  .filters-panel,
  .modal,
  .detail-grid article,
  .payment-summary article {
    border-radius: 8px;
  }

  .campaign-edit-modal .modal-body {
    padding: 12px 12px 0;
  }

  .campaign-edit-modal h3 {
    margin: -12px -12px 12px;
    padding: 18px 56px 14px 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-lockup h1,
  .topbar h2 {
    font-size: 22px;
  }

  .topbar,
  .section-head,
  .dashboard-hero,
  .plan-hero,
  .form-actions,
  .campaign-panel .section-head,
  .action-row-wrap,
  .game-row-wrap,
  .guaranteed-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .zaya-report-actions {
    width: 100%;
  }

  .topbar-actions > *,
  .form-actions > *,
  .campaign-panel .section-head > *,
  .zaya-report-actions > *,
  .add-action-top-btn,
  .add-game-row-btn,
  .remove-game-row,
  .remove-action-block {
    width: 100%;
  }

  .filters-panel,
  .kpi-grid,
  .sales-kpi-grid,
  .game-kpi-grid,
  .commission-kpi-grid,
  .asset-kpi-grid,
  .plan-stage-grid,
  .data-form,
  .campaign-form,
  .campaign-form-subgrid,
  .asset-form,
  .asset-text-grid,
  .asset-detail-texts,
  .asset-popup-file-grid,
  .asset-file-pill,
  .campaign-operation-columns,
  .asset-upload-target-controls,
  .asset-placement-preview-shell,
  .asset-resize-controls,
  .content-grid,
  .wallet-grid,
  .directory-grid,
  .payment-summary,
  .detail-grid,
  .breakdown-row,
  .action-head,
  .game-row,
  .game-payment-form,
  .sales-share-pills,
  .commission-allocation-inputs,
  .audit-filters,
  .zaya-summary,
  .zaya-chart-row,
  .zaya-breakdown-row,
  .stacked-row,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .stage-object-tabs {
    grid-template-columns: 1fr;
  }

  .stage-base-url-control,
  .stage-token-input {
    grid-template-columns: 1fr;
  }

  .stage-object-form {
    padding: 12px;
  }

  .stage-choice-grid,
  .stage-created-grid {
    grid-template-columns: 1fr;
  }

  .stage-created-card th {
    width: 38%;
  }

  #campaignEditForm,
  #campaignEditForm .payment-summary,
  #campaignEditForm .action-head,
  #campaignEditForm .game-row {
    grid-template-columns: 1fr;
  }

  #campaignEditForm > label,
  #campaignEditForm fieldset {
    padding: 12px;
  }

  #campaignEditForm .form-actions {
    margin-inline: -12px;
    padding: 12px;
  }

  .filter-combobox {
    min-width: 0;
  }

  .user-tabs-panel {
    padding: 12px;
  }

  .hover-tabs {
    padding: 0;
  }

  .hover-tabs button {
    min-height: 48px;
    padding: 0 16px;
    font-size: 13px;
  }

  .hover-tab-content {
    padding: 16px 0 0;
  }

  .filter-combobox input,
  input,
  select,
  textarea {
    width: 100%;
    min-width: 0;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-group-toggle {
    padding: 10px 8px;
  }

  .nav-item {
    min-width: 0;
    padding: 10px 8px;
    white-space: normal;
  }

  .dashboard-hero h3 {
    font-size: 21px;
  }

  .kpi-card strong,
  .zaya-summary strong {
    font-size: 19px;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }

  .table-wrap {
    width: calc(100% + 16px);
    margin-inline: -8px;
    padding-inline: 8px;
  }

  table {
    min-width: 700px;
  }

  th,
  td {
    padding: 10px 8px;
  }

  .stacked-track,
  .bar-row div,
  .zaya-chart-row div {
    min-height: 12px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal {
    max-height: calc(100vh - 16px);
  }

  .modal-close {
    float: none;
    margin-bottom: 10px;
  }
}

@media (max-width: 420px) {
  .dashboard-screen {
    padding: 6px;
  }

  .main-content,
  .sidebar,
  .panel,
  .modal,
  .dashboard-hero,
  .filters-panel {
    padding: 10px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .topbar-actions > button,
  .secondary-btn,
  .primary-btn,
  .danger-btn,
  .table-btn {
    width: 100%;
    justify-content: center;
  }

  table {
    min-width: 640px;
  }
}

/* Finebank-inspired AdPlay skin */
body {
  background:
    radial-gradient(circle at 14% -8%, rgba(88, 208, 143, 0.18), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #eef4f1 100%);
  color: var(--ink);
}

body.dark {
  background:
    radial-gradient(circle at 10% -10%, rgba(88, 208, 143, 0.13), transparent 32%),
    linear-gradient(180deg, #0d1820 0%, #10202a 54%, #0c171f 100%);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 8px;
  background: #fbfefd;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(88, 208, 143, 0.2);
  border-color: var(--brand-mint);
  box-shadow: 0 0 0 1px rgba(20, 144, 90, 0.08);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.table-btn,
.field-shortcut-btn,
.jalali-picker-head button,
.jalali-picker-title select,
.jalali-days button,
.jalali-clear {
  border-radius: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--brand-mint));
  color: #fff;
  box-shadow: 0 12px 24px rgba(20, 144, 90, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #0f7f4e, #46c883);
  transform: translateY(-1px);
}

.secondary-btn,
.table-btn {
  background: #edf8f3;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(20, 144, 90, 0.05);
}

.secondary-btn:hover,
.table-btn:hover {
  background: #dff5ea;
  color: var(--brand-navy);
}

.ghost-btn {
  background: #fff;
  color: var(--brand-navy);
  border: 1px solid var(--line);
}

.danger-inline,
.danger-btn {
  background: #fff0f1;
  border-color: #fecaca;
  color: #b91c1c;
}

.dashboard-screen {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.sidebar {
  width: 224px;
  padding: 18px 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 232, 226, 0.82);
  box-shadow: 0 24px 54px rgba(25, 79, 115, 0.11);
  backdrop-filter: blur(18px);
}

.dashboard-screen.sidebar-collapsed .sidebar {
  width: 78px;
  box-shadow: 0 18px 42px rgba(25, 79, 115, 0.1);
}

.dashboard-screen.sidebar-collapsed .sidebar:hover,
.dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  width: 224px;
  box-shadow: 0 26px 64px rgba(25, 79, 115, 0.16);
}

.sidebar .brand-mark,
.brand-mark {
  background: linear-gradient(135deg, var(--brand-mint), var(--primary));
  color: #fff;
  box-shadow: 0 10px 20px rgba(20, 144, 90, 0.2);
}

.brand-lockup h1 {
  color: var(--brand-navy);
  letter-spacing: 0;
}

.nav-list {
  gap: 7px;
}

.nav-group {
  gap: 5px;
}

.nav-group-toggle,
.nav-item {
  border-radius: 18px;
  color: #6b7f82;
}

.nav-group-toggle {
  min-height: 44px;
  padding: 8px 10px;
}

.nav-item {
  min-height: 48px;
  padding: 8px 10px;
}

.nav-group-items {
  margin: -1px 0 5px;
  padding: 5px 16px 5px 0;
  border-inline-start: 1px solid rgba(20, 144, 90, 0.14);
}

.nav-group-items .nav-item {
  min-height: 36px;
  border-radius: 12px;
  color: #748589;
  font-size: 12px;
}

.nav-item::before,
.nav-icon {
  background: #f0faf5;
  border: 1px solid rgba(88, 208, 143, 0.14);
  box-shadow: inset 0 -1px 0 rgba(25, 79, 115, 0.04);
}

.nav-item::after,
.nav-icon::after {
  background: var(--primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(88, 208, 143, 0.22), rgba(255, 255, 255, 0.9));
  color: var(--brand-navy);
  box-shadow: inset -3px 0 0 var(--primary), 0 12px 26px rgba(25, 79, 115, 0.08);
}

.nav-item.active::before,
.nav-item:hover::before,
.nav-group-toggle:hover .nav-icon,
.nav-group.active .nav-icon {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
}

.nav-item.active::after,
.nav-item:hover::after,
.nav-group-toggle:hover .nav-icon::after,
.nav-group.active .nav-icon::after {
  background: #fff;
}

.nav-group.active > .nav-group-toggle,
.nav-group-toggle:hover {
  background: rgba(88, 208, 143, 0.13);
  color: var(--brand-navy);
}

.nav-group-text small {
  color: var(--primary);
  opacity: 1;
}

.user-card {
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(25, 79, 115, 0.92), rgba(11, 54, 44, 0.98)),
    var(--brand-navy);
  box-shadow: 0 18px 34px rgba(25, 79, 115, 0.22);
}

.user-card .ghost-btn {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
  color: #e8fff4;
}

.main-content {
  padding: 0 0 28px;
}

.topbar {
  min-height: 66px;
  margin-bottom: 16px;
  padding: 4px 2px;
}

.topbar h2,
.section-head h3 {
  color: var(--brand-navy);
  font-weight: 950;
}

.eyebrow {
  color: #789096;
  font-weight: 800;
}

.filters-panel,
.kpi-card,
.panel,
.modal,
.detail-grid article,
.plan-stage-grid article,
.zaya-summary article,
.status-list article {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(25, 79, 115, 0.07);
}

.filters-panel {
  align-items: end;
  padding: 16px;
  border-color: rgba(220, 232, 226, 0.92);
  box-shadow: 0 18px 42px rgba(25, 79, 115, 0.06);
}

.filters-panel label,
label {
  color: var(--brand-navy);
  font-weight: 900;
}

.filter-combobox input {
  height: 46px;
}

.filter-combobox button[aria-label],
.filter-add-btn {
  background: #effaf5;
  color: var(--primary);
}

.filter-options {
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(25, 79, 115, 0.14);
}

.kpi-grid {
  gap: 16px;
}

.kpi-card {
  position: relative;
  min-height: 134px;
  padding: 18px;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-mint), var(--primary));
  opacity: 0.8;
}

.kpi-card span,
.detail-grid span,
.zaya-summary span,
.status-list span {
  color: #74868a;
  font-weight: 800;
}

.kpi-card strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.45;
}

.kpi-card small {
  color: #7e9094;
  font-weight: 700;
}

.dashboard-hero,
.plan-hero {
  border-radius: 8px;
  border: 1px solid rgba(220, 232, 226, 0.92);
  background:
    linear-gradient(135deg, rgba(25, 79, 115, 0.96), rgba(20, 144, 90, 0.9)),
    var(--brand-navy);
  color: #fff;
  box-shadow: 0 22px 52px rgba(25, 79, 115, 0.14);
}

.dashboard-hero h3,
.dashboard-hero span,
.dashboard-hero p,
.plan-hero h3,
.plan-hero span,
.plan-hero p {
  color: #fff;
}

.dashboard-hero .eyebrow,
.plan-hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.panel {
  padding: 20px;
}

.panel h3,
.panel h4,
.modal h3,
.modal h4 {
  color: var(--brand-navy);
}

table {
  border-spacing: 0;
}

th {
  color: #73858a;
  background: #f8fbfa;
  font-size: 12px;
}

td {
  color: var(--ink);
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: #f8fcfa;
}

.status {
  border-radius: 999px;
}

.status.success {
  background: #def8ea;
  color: #10784b;
}

.status.warning {
  background: #fff1cf;
  color: #946000;
}

.status.danger {
  background: #ffe7e7;
  color: #ad3030;
}

.status.neutral {
  background: #edf2f4;
  color: #51666c;
}

.stacked-track,
.bar-row div,
.zaya-chart-row div,
.zaya-breakdown-row div {
  background:
    repeating-linear-gradient(to left, rgba(25, 79, 115, 0.055) 0, rgba(25, 79, 115, 0.055) 1px, transparent 1px, transparent 9%),
    #f3f7f6;
}

.bar-row i,
.zaya-chart-row i {
  background: var(--primary);
}

progress {
  accent-color: var(--primary);
}

.modal-backdrop {
  background: rgba(8, 23, 32, 0.48);
  z-index: 200;
}

.modal {
  border-radius: 12px;
}

.modal-close {
  background: #eff6f3;
  color: var(--brand-navy);
}

.campaign-edit-modal h3,
#campaignEditForm .form-actions {
  background: rgba(255, 255, 255, 0.9);
}

#campaignEditForm > label,
#campaignEditForm fieldset,
#campaignEditForm .action-block {
  border-radius: 8px;
  background: #fbfefd;
}

.dark input,
.dark select,
.dark textarea,
.dark .filters-panel,
.dark .kpi-card,
.dark .panel,
.dark .modal,
.dark .detail-grid article,
.dark .plan-stage-grid article,
.dark .status-list article {
  background: rgba(20, 36, 45, 0.94);
  border-color: var(--line);
  color: var(--ink);
}

.dark .sidebar {
  background: rgba(17, 31, 39, 0.92);
  border-color: rgba(88, 208, 143, 0.12);
}

.dark .brand-lockup h1,
.dark .topbar h2,
.dark .section-head h3,
.dark .panel h3,
.dark .panel h4,
.dark .modal h3,
.dark .modal h4,
.dark label {
  color: var(--ink);
}

.dark .secondary-btn,
.dark .table-btn,
.dark .filter-combobox button[aria-label],
.dark .filter-add-btn {
  background: rgba(88, 208, 143, 0.12);
  color: var(--brand-mint);
}

.dark .nav-item.active {
  background: rgba(88, 208, 143, 0.16);
  color: #eff7f4;
}

.dark .nav-item::before,
.dark .nav-icon {
  background: rgba(88, 208, 143, 0.1);
  border-color: rgba(88, 208, 143, 0.14);
}

.dark th {
  background: rgba(88, 208, 143, 0.07);
}

.dark tbody tr:hover {
  background: rgba(88, 208, 143, 0.06);
}

@media (max-width: 1320px) {
  .dashboard-screen {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .dashboard-screen,
  .dashboard-screen.sidebar-collapsed {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar:hover,
  .dashboard-screen.sidebar-collapsed .sidebar:focus-within {
    width: auto;
    height: auto;
    position: static;
    border-radius: 18px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .nav-group-items {
    border-inline-start: 0;
    padding: 4px 0;
  }
}

@media (max-width: 640px) {
  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .secondary-btn:not(.icon-button) {
    width: 100%;
  }

  .kpi-card {
    min-height: 118px;
  }
}

/* Figma Finebank node 123:7763 adaptation */
:root {
  --finebank-bg: #f4f5f7;
  --finebank-sidebar: #191a1a;
  --finebank-sidebar-soft: #242525;
  --finebank-teal: #2fa39a;
  --finebank-teal-strong: #168f85;
  --finebank-text: #51545a;
}

body {
  background: var(--finebank-bg);
}

body.dark {
  background: #101416;
}

.dashboard-screen {
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 18px;
  background: var(--finebank-bg);
}

.sidebar {
  width: 224px;
  padding: 34px 20px 22px;
  border: 0;
  border-radius: 0;
  background: var(--finebank-sidebar);
  box-shadow: none;
  color: #fff;
}

.dashboard-screen.sidebar-collapsed .sidebar {
  width: 80px;
  padding-inline: 14px;
  background: var(--finebank-sidebar);
  box-shadow: none;
}

.dashboard-screen.sidebar-collapsed .sidebar:hover,
.dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  width: 224px;
  padding-inline: 20px;
  box-shadow: 14px 0 40px rgba(18, 24, 28, 0.12);
}

.sidebar .brand-lockup {
  min-height: 44px;
  margin-bottom: 34px;
}

.sidebar .brand-mark,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--finebank-teal);
  box-shadow: none;
}

.sidebar .brand-lockup h1 {
  color: #fff;
  font-size: 21px;
  font-weight: 950;
}

.sidebar .brand-lockup p {
  color: rgba(255, 255, 255, 0.54);
}

.nav-list {
  gap: 10px;
}

.nav-group-toggle,
.nav-item {
  min-height: 44px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 750;
}

.nav-item {
  padding: 10px 13px;
}

.nav-group-toggle {
  padding: 10px 13px;
}

.nav-group-items {
  margin: 0;
  padding: 4px 0 4px 0;
  border: 0;
}

.nav-group-items .nav-item {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.nav-item::before,
.nav-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-group-items .nav-item::before {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  background: transparent;
}

.nav-item::after {
  inset-inline-start: 15px;
  width: 18px;
  height: 18px;
  background: currentColor;
}

.nav-group-items .nav-item::after {
  inset-inline-start: 15px;
  width: 16px;
  height: 16px;
}

.nav-icon::after {
  width: 18px;
  height: 18px;
  background: currentColor;
}

.nav-item.active,
.nav-item:hover,
.nav-group.active > .nav-group-toggle,
.nav-group-toggle:hover {
  background: var(--finebank-teal);
  color: #fff;
  box-shadow: none;
}

.nav-item.active::before,
.nav-item:hover::before,
.nav-group-toggle:hover .nav-icon,
.nav-group.active .nav-icon {
  background: transparent;
  border: 0;
}

.nav-item.active::after,
.nav-item:hover::after,
.nav-group-toggle:hover .nav-icon::after,
.nav-group.active .nav-icon::after {
  background: currentColor;
}

.nav-group-text small {
  color: var(--finebank-teal);
  font-size: 10px;
}

.nav-group.active > .nav-group-toggle .nav-group-text small,
.nav-group-toggle:hover .nav-group-text small {
  color: rgba(255, 255, 255, 0.72);
}

.nav-group-text strong {
  font-size: 13px;
}

.nav-group-toggle::after {
  color: currentColor;
}

.nav-item[data-view="overview"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Crect x='14' y='14' width='6' height='6'/%3E%3C/svg%3E"); }
.nav-item[data-view="campaigns"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h10'/%3E%3Cpath d='M16 16l2 2 3-4'/%3E%3C/svg%3E"); }
.nav-item[data-view="assets"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='16' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E"); }
.nav-item[data-view="entry"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.nav-item[data-view="payments"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12v10H6z'/%3E%3Cpath d='M9 11h6M9 14h3'/%3E%3C/svg%3E"); }
.nav-item[data-view="gamePayments"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12h10M13 8l4 4-4 4'/%3E%3Cpath d='M5 5h14v14H5z'/%3E%3C/svg%3E"); }
.nav-item[data-view="wallet"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M5 7h14v10H5z'/%3E%3Cpath d='M15 12h4'/%3E%3Cpath d='M8 7V5h8v2'/%3E%3C/svg%3E"); }
.nav-item[data-view="commission"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Ccircle cx='7.5' cy='7.5' r='2.2'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.2'/%3E%3C/svg%3E"); }
.nav-item[data-view="notifications"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 18h8M10 20h4'/%3E%3Cpath d='M18 14a6 6 0 1 0-12 0l-2 3h16z'/%3E%3C/svg%3E"); }
.nav-item[data-view="users"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M4 19a5 5 0 0 1 10 0'/%3E%3Cpath d='M16 11a3 3 0 0 1 0 6'/%3E%3C/svg%3E"); }
.nav-item[data-view="plan"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19h14'/%3E%3Cpath d='M7 16l9-9 3 3-9 9H7z'/%3E%3C/svg%3E"); }
.nav-group[data-nav-group="operation"] { --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Crect x='14' y='14' width='6' height='6'/%3E%3C/svg%3E"); }
.nav-group[data-nav-group="finance"] { --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16'/%3E%3Cpath d='M8 8h7a3 3 0 0 1 0 6h-6a3 3 0 0 0 0 6h7'/%3E%3C/svg%3E"); }

.user-card {
  padding: 13px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.user-card span {
  color: #fff;
}

.user-card strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.user-card .ghost-btn {
  justify-content: flex-start;
  border: 0;
  border-radius: 4px;
  background: var(--finebank-sidebar-soft);
  color: rgba(255, 255, 255, 0.76);
}

.main-content {
  padding: 0 18px 32px 0;
}

.topbar {
  min-height: 62px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e8eaee;
}

.topbar h2,
.section-head h3,
.panel h3,
.panel h4,
.modal h3,
.modal h4 {
  color: #3f4248;
}

.topbar-actions {
  align-items: center;
}

.topbar-search {
  display: block;
  min-width: min(280px, 32vw);
  color: transparent;
}

.topbar-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 0;
  border-radius: 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2344474d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") left 14px center / 18px 18px no-repeat,
    #fff;
  color: #3f4248;
  direction: ltr;
  text-align: left;
  box-shadow: none;
}

.filters-panel,
.kpi-card,
.panel,
.modal,
.detail-grid article,
.plan-stage-grid article,
.zaya-summary article,
.status-list article {
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(27, 35, 46, 0.06);
}

.filters-panel {
  box-shadow: none;
}

.kpi-card::before {
  background: var(--finebank-teal);
}

.kpi-card strong {
  color: #35383e;
}

.dashboard-hero,
.plan-hero {
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #3f4248;
  box-shadow: 0 16px 36px rgba(27, 35, 46, 0.06);
}

.dashboard-hero h3,
.dashboard-hero span,
.dashboard-hero p,
.plan-hero h3,
.plan-hero span,
.plan-hero p {
  color: #3f4248;
}

.dashboard-hero .eyebrow,
.plan-hero .eyebrow {
  color: #9a9da3;
}

.primary-btn {
  background: var(--finebank-teal);
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--finebank-teal-strong);
}

.secondary-btn,
.table-btn {
  background: #eef7f6;
  color: var(--finebank-teal-strong);
  box-shadow: none;
}

.secondary-btn:hover,
.table-btn:hover {
  background: #dff0ee;
  color: var(--finebank-teal-strong);
}

th {
  background: transparent;
  color: #8f9399;
}

tbody tr:hover {
  background: #f8fafb;
}

.dark .dashboard-screen {
  background: #101416;
}

.dark .sidebar {
  background: #151717;
}

.dark .dashboard-hero,
.dark .plan-hero,
.dark .filters-panel,
.dark .kpi-card,
.dark .panel,
.dark .modal,
.dark .detail-grid article,
.dark .plan-stage-grid article,
.dark .status-list article {
  background: #1a2024;
  box-shadow: none;
}

.dark .topbar {
  border-bottom-color: #273137;
}

.dark .topbar-search input {
  background-color: #1a2024;
  color: var(--ink);
}

/* Finebank dashboard body polish */
.main-content {
  display: grid;
  align-content: start;
  gap: 18px;
}

.topbar {
  border-bottom: 0;
  padding: 0;
}

.topbar > div:first-child {
  display: grid;
  gap: 4px;
}

.topbar h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.filters-panel {
  position: relative;
  grid-template-columns: 1.15fr 1.15fr 1.15fr 1.15fr 1.15fr 1fr;
  gap: 16px;
  padding: 22px;
  border-radius: 14px;
}

.filters-panel::before {
  content: "";
  position: absolute;
  inset-inline-start: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M7 12h10M10 18h4'/%3E%3C/svg%3E") center / 18px 18px no-repeat,
    var(--finebank-teal);
  opacity: 0.95;
}

.filters-panel label {
  gap: 8px;
  color: #44474d;
  font-size: 12px;
}

.filters-panel input,
.filters-panel select,
.filter-combobox input {
  height: 50px;
  border: 1px solid #e3e8eb;
  border-radius: 8px;
  background: #fbfcfd;
  color: #44474d;
  box-shadow: none;
}

.filters-panel .ghost-btn {
  min-height: 50px;
  border: 1px solid #e3e8eb;
  background: #fff;
  color: #44474d;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
}

.kpi-card {
  min-height: 148px;
  padding: 20px 20px 18px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #fff, #fff),
    #fff;
  box-shadow: 0 18px 42px rgba(28, 35, 44, 0.07);
}

.kpi-card::before {
  inset: 18px auto auto 18px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--kpi-bg, #eef7f6);
  opacity: 1;
}

.kpi-card::after {
  content: var(--kpi-icon, "₪");
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--kpi-color, var(--finebank-teal));
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.kpi-tone-1 { --kpi-icon: "↗"; --kpi-bg: #e7f8f5; --kpi-color: #168f85; }
.kpi-tone-2 { --kpi-icon: "◆"; --kpi-bg: #edf5ff; --kpi-color: #194f73; }
.kpi-tone-3 { --kpi-icon: "↓"; --kpi-bg: #eef7f6; --kpi-color: #2fa39a; }
.kpi-tone-4 { --kpi-icon: "◇"; --kpi-bg: #fff6df; --kpi-color: #d89232; }
.kpi-tone-5 { --kpi-icon: "AP"; --kpi-bg: #eef1ff; --kpi-color: #8764b8; }
.kpi-tone-6 { --kpi-icon: "▦"; --kpi-bg: #eaf8fb; --kpi-color: #4aa3df; }
.kpi-tone-7 { --kpi-icon: "%"; --kpi-bg: #ecf8ef; --kpi-color: #55a868; }
.kpi-tone-8 { --kpi-icon: "✎"; --kpi-bg: #fff0ec; --kpi-color: #f47c5c; }

.kpi-card span {
  display: block;
  padding-left: 56px;
  min-height: 42px;
  color: #8a8f96;
  font-size: 12px;
  font-weight: 850;
}

.kpi-card strong {
  margin-top: 14px;
  color: #272b31;
  font-size: clamp(24px, 2.35vw, 34px);
  font-weight: 950;
}

.kpi-card small {
  margin-top: 8px;
  color: #9ca1a8;
  font-size: 12px;
}

.content-grid.dashboard-main-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  border-radius: 14px;
  padding: 24px;
}

.section-head {
  min-height: 34px;
  margin-bottom: 16px;
}

.section-head h3 {
  position: relative;
  padding-inline-start: 14px;
  color: #30343a;
  font-size: 21px;
}

.section-head h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: var(--finebank-teal);
  transform: translateY(-50%);
}

.stacked-legend {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafb;
  color: #747980;
}

.stacked-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.stacked-chart {
  gap: 16px;
  padding-top: 6px;
}

.stacked-row {
  grid-template-columns: 122px minmax(220px, 1fr) 148px;
  min-height: 34px;
}

.stacked-track {
  height: 28px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(to left, #e8edf0 0, #e8edf0 1px, transparent 1px, transparent 9%),
    #f2f5f6;
}

.stacked-fill {
  border-radius: 8px;
}

.status-list {
  gap: 10px;
}

.status-list article {
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #edf0f1;
  border-radius: 10px;
  box-shadow: none;
}

.status-list strong {
  color: #30343a;
  font-size: 15px;
}

.status-list progress {
  height: 6px;
}

table {
  overflow: hidden;
  border: 1px solid #edf0f1;
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 12px;
}

th {
  background: #f8fafb;
  color: #8a8f96;
  font-size: 12px;
}

td {
  background: #fff;
}

tbody tr:hover td {
  background: #f9fbfb;
}

.status {
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 8px;
}

.nav-item::after,
.nav-icon::after {
  opacity: 1;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after {
  width: 20px;
  height: 20px;
}

.nav-item:not(.active):not(:hover)::after,
.nav-group-toggle:not(:hover) .nav-icon::after {
  color: rgba(255, 255, 255, 0.7);
  background: currentColor;
}

.dark .kpi-card,
.dark .panel,
.dark .status-list article,
.dark td {
  background: #1a2024;
}

.dark .filters-panel input,
.dark .filters-panel select,
.dark .filter-combobox input,
.dark .stacked-legend,
.dark th {
  background: #151b1f;
}

.dark .kpi-card strong,
.dark .section-head h3,
.dark .status-list strong,
.dark td {
  color: var(--ink);
}

@media (max-width: 1320px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .content-grid.dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .filters-panel,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card span {
    padding-left: 52px;
  }
}

@media (max-width: 980px) {
  .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar:hover,
  .dashboard-screen.sidebar-collapsed .sidebar:focus-within {
    border-radius: 14px;
  }

  .main-content {
    padding: 0;
  }

  .topbar-search {
    min-width: 100%;
  }
}

/* AdPlay preview target: light finance dashboard */
:root {
  --preview-bg: #f6f8f8;
  --preview-card: #ffffff;
  --preview-soft: #eefaf4;
  --preview-green: #35c77e;
  --preview-green-dark: #11905b;
  --preview-navy: #194f73;
  --preview-ink: #243447;
  --preview-muted: #798894;
  --preview-line: #e3ece8;
}

body {
  background:
    radial-gradient(circle at 55% -12%, rgba(53, 199, 126, 0.12), transparent 34%),
    var(--preview-bg);
}

.dashboard-screen {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 18px;
  background: transparent;
}

.sidebar,
.dashboard-screen.sidebar-collapsed .sidebar,
.dashboard-screen.sidebar-collapsed .sidebar:hover,
.dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  width: 220px;
  padding: 20px 12px;
  border: 1px solid var(--preview-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--preview-ink);
  box-shadow: 0 18px 44px rgba(25, 79, 115, 0.08);
}

.dashboard-screen.sidebar-collapsed .sidebar {
  width: 86px;
  padding-inline: 12px;
}

.sidebar .brand-lockup {
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.sidebar .brand-mark,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--preview-green), var(--preview-green-dark));
  color: #fff;
}

.sidebar .brand-lockup h1 {
  color: var(--preview-navy);
  font-size: 28px;
  line-height: 1;
}

.sidebar .brand-lockup p {
  color: var(--preview-muted);
}

.nav-list {
  gap: 9px;
}

.nav-group-toggle,
.nav-item,
.nav-group-items .nav-item {
  min-height: 44px;
  border-radius: 12px;
  color: #6f7f84;
  font-weight: 850;
}

.nav-item,
.nav-group-toggle {
  padding: 9px 12px;
}

.nav-group-items {
  padding: 4px 8px 4px 0;
  border-inline-start: 1px solid #dceae4;
}

.nav-item::before,
.nav-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 1px solid #dcefe7;
  border-radius: 10px;
  background: #f2fbf6;
}

.nav-group-items .nav-item::before {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
}

.nav-item::after {
  inset-inline-start: 21px;
  width: 17px;
  height: 17px;
  background: var(--preview-green-dark);
}

.nav-group-items .nav-item::after {
  inset-inline-start: 19px;
  width: 14px;
  height: 14px;
}

.nav-icon::after {
  width: 17px;
  height: 17px;
  background: var(--preview-green-dark);
}

.nav-item.active,
.nav-item:hover,
.nav-group.active > .nav-group-toggle,
.nav-group-toggle:hover {
  background: linear-gradient(90deg, rgba(53, 199, 126, 0.18), rgba(53, 199, 126, 0.08));
  color: var(--preview-navy);
  box-shadow: inset -3px 0 0 var(--preview-green);
}

.nav-item.active::before,
.nav-item:hover::before,
.nav-group-toggle:hover .nav-icon,
.nav-group.active .nav-icon {
  background: var(--preview-navy);
  border-color: var(--preview-navy);
}

.nav-item.active::after,
.nav-item:hover::after,
.nav-group-toggle:hover .nav-icon::after,
.nav-group.active .nav-icon::after {
  background: #fff;
}

.nav-item:not(.active):not(:hover)::after,
.nav-group-toggle:not(:hover) .nav-icon::after {
  color: var(--preview-green-dark);
  background: currentColor;
}

.nav-group-text small {
  color: var(--preview-green-dark);
}

.nav-group.active > .nav-group-toggle .nav-group-text small,
.nav-group-toggle:hover .nav-group-text small {
  color: var(--preview-green-dark);
}

.user-card {
  padding: 14px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b3d2d, #07341f);
  color: #fff;
  box-shadow: 0 16px 30px rgba(5, 49, 30, 0.18);
}

.user-card strong {
  color: #fff;
  font-size: 14px;
}

.user-card span {
  color: #d8f2e4;
}

.user-card .ghost-btn {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: transparent;
  color: #d8f2e4;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand-lockup > div,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card span,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card strong,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .user-card .ghost-btn,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-text,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle::after {
  display: none;
}

.main-content {
  gap: 16px;
  padding: 0;
}

.topbar {
  min-height: 54px;
  margin: 0;
}

.topbar h2 {
  color: var(--preview-navy);
}

.topbar-search input {
  border: 1px solid var(--preview-line);
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23798894' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") left 14px center / 17px 17px no-repeat,
    #fff;
}

.filters-panel,
.kpi-card,
.panel,
.detail-grid article,
.plan-stage-grid article,
.zaya-summary article,
.status-list article {
  border: 1px solid var(--preview-line);
  border-radius: 12px;
  background: var(--preview-card);
  box-shadow: 0 12px 34px rgba(25, 79, 115, 0.06);
}

.filters-panel {
  grid-template-columns: 1.05fr 1.05fr 1.15fr 1.15fr 1.2fr 1fr;
  padding: 16px;
}

.filters-panel::before {
  content: none;
}

.filters-panel input,
.filter-combobox input {
  height: 44px;
  border-color: var(--preview-line);
  background: #fff;
}

.filters-panel .ghost-btn {
  min-height: 44px;
  background: var(--preview-soft);
  color: var(--preview-green-dark);
  border-color: #d9eee4;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(155px, 1fr));
  gap: 14px;
}

.kpi-card {
  min-height: 126px;
  padding: 18px 18px 16px;
}

.kpi-card::before {
  left: auto;
  right: 18px;
  top: 24px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.kpi-card::after {
  left: auto;
  right: 18px;
  top: 24px;
  width: 42px;
  height: 42px;
}

.kpi-card span {
  padding-left: 0;
  padding-right: 58px;
  color: var(--preview-muted);
  font-size: 12px;
}

.kpi-card strong {
  color: var(--preview-ink);
  font-size: clamp(20px, 1.7vw, 26px);
}

.content-grid.dashboard-main-grid {
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.25fr);
}

.panel {
  padding: 20px;
}

.section-head h3 {
  color: var(--preview-ink);
  font-size: 18px;
}

.section-head h3::before {
  background: var(--preview-green);
}

.payment-widget table,
.payment-widget .table-wrap table {
  min-width: 620px;
}

.stacked-legend {
  background: transparent;
  justify-content: center;
}

.stacked-track {
  background:
    repeating-linear-gradient(to left, #ebf0f2 0, #ebf0f2 1px, transparent 1px, transparent 9%),
    #f7faf9;
}

th {
  background: #fbfcfc;
}

td {
  background: #fff;
}

.status {
  background: var(--preview-soft);
}

@media (max-width: 1320px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .content-grid.dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .dashboard-screen,
  .dashboard-screen.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar,
  .dashboard-screen.sidebar-collapsed .sidebar:hover,
  .dashboard-screen.sidebar-collapsed .sidebar:focus-within {
    width: auto;
  }
}

/* KPI preview match: compact finance cards with pastel icon badges */
.overview-kpi-grid {
  grid-template-columns: repeat(6, minmax(168px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.overview-kpi-grid .kpi-card {
  position: relative;
  min-height: 132px;
  padding: 18px 58px 14px 16px;
  border: 1px solid #edf1f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 42, 58, 0.055);
  overflow: hidden;
}

.overview-kpi-grid .kpi-card::before {
  content: "";
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--kpi-bg, #e9f8f1);
  box-shadow: none;
}

.overview-kpi-grid .kpi-card::after {
  content: "";
  position: absolute;
  inset-block-start: 28px;
  inset-inline-end: 26px;
  width: 18px;
  height: 18px;
  background: var(--kpi-color, #14905a);
  mask: var(--kpi-mask) center / contain no-repeat;
  -webkit-mask: var(--kpi-mask) center / contain no-repeat;
}

.overview-kpi-grid .kpi-card span {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  color: #8b9aa4;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
}

.overview-kpi-grid .kpi-card strong {
  display: block;
  color: #102a3a;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 900;
  line-height: 1.75;
  letter-spacing: 0;
  text-align: right;
}

.overview-kpi-grid .kpi-card small {
  position: absolute;
  inset-inline-start: 16px;
  inset-block-end: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7f8e97;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.overview-kpi-grid .kpi-card small b {
  font-size: 10px;
  font-weight: 900;
}

.overview-kpi-grid .trend-up {
  color: #14905a;
}

.overview-kpi-grid .trend-down {
  color: #ef5c5c;
}

.overview-kpi-grid .kpi-tone-1 {
  --kpi-bg: #edf5ff;
  --kpi-color: #3f8ce8;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8'/%3E%3Cpath d='M8 17h5'/%3E%3C/svg%3E");
}

.overview-kpi-grid .kpi-tone-2 {
  --kpi-bg: #e9f8f1;
  --kpi-color: #14905a;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 17 6-6 4 4 8-8'/%3E%3Cpath d='M14 7h7v7'/%3E%3C/svg%3E");
}

.overview-kpi-grid .kpi-tone-3 {
  --kpi-bg: #f2ebff;
  --kpi-color: #8a5cf6;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='7' cy='7' r='2.5'/%3E%3Ccircle cx='17' cy='17' r='2.5'/%3E%3C/svg%3E");
}

.overview-kpi-grid .kpi-tone-4 {
  --kpi-bg: #fff4e8;
  --kpi-color: #f59e25;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a9 9 0 1 0-9-9 4 4 0 0 0 4 4h1.2a1.8 1.8 0 0 1 1.8 1.8v.4A2.8 2.8 0 0 0 12.8 22z'/%3E%3Ccircle cx='7.5' cy='10.5' r='.8'/%3E%3Ccircle cx='10.5' cy='7.5' r='.8'/%3E%3Ccircle cx='14.5' cy='7.5' r='.8'/%3E%3Ccircle cx='16.5' cy='11' r='.8'/%3E%3C/svg%3E");
}

.overview-kpi-grid .kpi-tone-5 {
  --kpi-bg: #e7f7f8;
  --kpi-color: #1a8f95;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-8 0v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.overview-kpi-grid .kpi-tone-6 {
  --kpi-bg: #e8f8f1;
  --kpi-color: #14905a;
  --kpi-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12h4l2-3 3 6 2-3h1'/%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3C/svg%3E");
}

@media (max-width: 1320px) {
  .overview-kpi-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .overview-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* KPI polish: closer to the selected preview proportions */
.overview-kpi-grid {
  gap: 12px;
}

.overview-kpi-grid .kpi-card {
  min-height: 126px;
  padding: 18px 18px 16px 64px;
  border-color: #e8eef0;
  box-shadow: 0 10px 24px rgba(16, 42, 58, 0.045);
}

.overview-kpi-grid .kpi-card::before {
  inset-block-start: 24px;
  inset-inline-start: 18px;
  inset-inline-end: auto;
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.72), transparent 45%),
    var(--kpi-bg, #e9f8f1);
}

.overview-kpi-grid .kpi-card::after {
  inset-block-start: 33px;
  inset-inline-start: 27px;
  inset-inline-end: auto;
  width: 20px;
  height: 20px;
}

.overview-kpi-grid .kpi-card span {
  margin: 0 0 12px;
  color: #7b8c96;
  font-size: 12px;
  text-align: right;
}

.overview-kpi-grid .kpi-card strong {
  max-width: 100%;
  margin-top: 2px;
  color: #102a3a;
  font-size: clamp(19px, 1.28vw, 23px);
  line-height: 1.55;
  text-wrap: balance;
}

.overview-kpi-grid .kpi-card strong::first-line {
  font-size: 1em;
}

.overview-kpi-grid .kpi-card small {
  inset-inline-start: auto;
  inset-inline-end: 18px;
  inset-block-end: 14px;
  max-width: calc(100% - 36px);
  justify-content: flex-start;
  color: #7b8c96;
  font-size: 10.5px;
  line-height: 1.4;
}

.overview-kpi-grid .kpi-card small b {
  min-width: 34px;
  text-align: left;
}

.overview-kpi-grid .kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 208, 143, 0.34);
  box-shadow: 0 16px 34px rgba(16, 42, 58, 0.075);
}

@media (min-width: 1321px) {
  .overview-kpi-grid .kpi-card strong {
    font-size: clamp(18px, 1.18vw, 21px);
  }
}

/* KPI repair: non-overlapping two-column structure */
.overview-kpi-grid .kpi-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 14px;
  align-items: start;
  min-height: 118px;
  padding: 18px 18px 14px;
}

.overview-kpi-grid .kpi-card::before {
  position: static;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  align-self: start;
  justify-self: start;
}

.overview-kpi-grid .kpi-card::after {
  inset: auto;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 19px;
  height: 19px;
  margin: 9.5px;
  align-self: start;
  justify-self: start;
}

.overview-kpi-grid .kpi-card span {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0 0 8px;
  overflow: hidden;
  color: #7d8c96;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-kpi-grid .kpi-card strong {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 1.12vw, 21px);
  line-height: 1.55;
}

.overview-kpi-grid .kpi-card small {
  position: static;
  grid-column: 1 / -1;
  grid-row: 3;
  max-width: none;
  margin-top: 12px;
  justify-self: start;
  white-space: nowrap;
}

.overview-kpi-grid .kpi-card small b {
  min-width: auto;
}

/* Sidebar icons: clean outline set matching the selected reference */
.nav-item[data-view="overview"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='6' height='6' rx='1'/%3E%3Crect x='13' y='5' width='6' height='6' rx='1'/%3E%3Crect x='5' y='13' width='6' height='6' rx='1'/%3E%3Crect x='13' y='13' width='6' height='6' rx='1'/%3E%3C/svg%3E");
}

.nav-item[data-view="campaigns"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h14M5 12h14M5 17h14'/%3E%3C/svg%3E");
}

.nav-item[data-view="assets"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='16' rx='2'/%3E%3Cpath d='M9 4v16M15 4v16'/%3E%3C/svg%3E");
}

.nav-item[data-view="entry"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.nav-item[data-view="payments"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m8 11 4 4 4-4'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
}

.nav-item[data-view="gamePayments"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='2'/%3E%3Cpath d='M9 12h7'/%3E%3Cpath d='m13 9 3 3-3 3'/%3E%3C/svg%3E");
}

.nav-item[data-view="wallet"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14v10H5z'/%3E%3Cpath d='M8 8V6h8v2'/%3E%3Cpath d='M15 13h4'/%3E%3C/svg%3E");
}

.nav-item[data-view="commission"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Ccircle cx='7.5' cy='7.5' r='2.1'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.1'/%3E%3C/svg%3E");
}

.nav-item[data-view="notifications"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15a6 6 0 1 0-12 0l-2 3h16z'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}

.nav-item[data-view="users"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M4 19a5 5 0 0 1 10 0'/%3E%3Ccircle cx='17' cy='10' r='2'/%3E%3Cpath d='M15 18a4 4 0 0 1 5 0'/%3E%3C/svg%3E");
}

.nav-item[data-view="plan"] {
  --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19h14'/%3E%3Cpath d='M7 16l9-9 3 3-9 9H7z'/%3E%3C/svg%3E");
}

.nav-group[data-nav-group="operation"] {
  --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='6' height='6' rx='1'/%3E%3Crect x='13' y='5' width='6' height='6' rx='1'/%3E%3Crect x='5' y='13' width='6' height='6' rx='1'/%3E%3Crect x='13' y='13' width='6' height='6' rx='1'/%3E%3C/svg%3E");
}

.nav-group[data-nav-group="finance"] {
  --group-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16'/%3E%3Cpath d='M8 8h7a3 3 0 0 1 0 6h-6a3 3 0 0 0 0 6h7'/%3E%3C/svg%3E");
}

.nav-icon::after,
.nav-item::after {
  width: 17px;
  height: 17px;
}

/* Sidebar icon polish: outline icons, no heavy inactive boxes */
.nav-item::before,
.nav-group-toggle .nav-icon {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.nav-item::after,
.nav-group-toggle .nav-icon::after {
  width: 17px;
  height: 17px;
  background: #718189;
}

.nav-item:not(.active):hover::before,
.nav-group-toggle:hover .nav-icon {
  background: #f2fbf6;
  border: 1px solid #d9efe4;
}

.nav-item:not(.active):hover::after,
.nav-group-toggle:hover .nav-icon::after {
  background: #14905a;
}

.nav-item.active::before {
  background: #194f73;
  border: 0;
  box-shadow: 0 10px 18px rgba(25, 79, 115, 0.18);
}

.nav-item.active::after {
  background: #fff;
}

.nav-group.active > .nav-group-toggle .nav-icon {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nav-group.active > .nav-group-toggle .nav-icon::after {
  background: #14905a;
}

.nav-group-items {
  display: grid;
}

.nav-group:not(.collapsed) .nav-group-items {
  display: grid;
}

/* Dashboard view: light analytics layout matching the selected reference */
body {
  background: #f4f7f9;
}

.main-content {
  background: #f4f7f9;
  gap: 16px;
  padding: 0 18px 22px;
}

.topbar {
  min-height: 58px;
  padding: 8px 4px;
  border-bottom: 1px solid #e7edf0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  overflow: visible;
}

.main-content {
  position: relative;
}

.filters-panel {
  margin-top: 2px;
  padding: 12px;
  border: 1px solid #e7edf0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 42, 58, 0.035);
}

.topbar-filter-popover {
  position: absolute;
  inset-block-start: 68px;
  inset-inline-start: 18px;
  z-index: 180;
  width: min(1040px, calc(100vw - 132px));
}

.topbar-filters-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(136px, 1fr)) minmax(132px, 0.65fr);
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(16, 42, 58, 0.13);
}

.topbar-filters-panel::before {
  display: none;
}

.topbar-filters-panel .ghost-btn {
  min-height: 40px;
  margin: 0;
}

.filters-panel label {
  gap: 6px;
  color: #50616b;
  font-size: 11px;
}

.filters-panel input,
.filter-combobox input {
  height: 40px;
  border-color: #e0e8eb;
  border-radius: 8px;
}

.overview-dashboard {
  display: grid;
  gap: 16px;
}

.overview-kpi-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 8px;
}

.overview-kpi-grid .kpi-card {
  min-height: 128px;
  border: 1px solid #e8eef0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 58, 0.035);
}

.overview-kpi-grid .kpi-card::before {
  background: var(--kpi-bg, #e9f8f1);
  border-radius: 50%;
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(460px, 1.7fr) minmax(250px, 0.82fr);
  gap: 16px;
  align-items: stretch;
}

.panel {
  border: 1px solid #e7edf0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 42, 58, 0.035);
}

.dashboard-analytics-grid .panel {
  min-height: 300px;
  padding: 16px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h3 {
  color: #102a3a;
  font-size: 15px;
  font-weight: 900;
}

.section-head h3::before {
  content: none;
}

.mini-btn {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #536570;
  font-size: 11px;
}

.donut-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
}

.donut-chart {
  position: relative;
  width: 150px;
  height: 150px;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart div {
  position: absolute;
  inset: 38px;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-chart strong {
  color: #102a3a;
  font-size: 26px;
  font-weight: 900;
}

.donut-chart span {
  color: #6c7c85;
  font-size: 11px;
}

.donut-legend {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.donut-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: #536570;
  font-size: 12px;
}

.donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.donut-legend strong {
  color: #102a3a;
  font-weight: 900;
}

.panel-action {
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  border-radius: 8px;
  color: #14905a;
}

.running-campaigns-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fbfa;
  box-shadow: inset 0 0 0 1px #eef4f1;
}

.running-campaigns-title,
.running-campaigns-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.running-campaigns-title span {
  color: #102a3a;
  font-size: 13px;
  font-weight: 900;
}

.running-campaigns-title strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #14905a;
  font-size: 12px;
  font-weight: 900;
}

.running-campaigns-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.running-campaigns-card li {
  padding-top: 8px;
  border-top: 1px solid #edf3f0;
}

.running-campaigns-card li span {
  color: #102a3a;
  font-size: 12px;
  font-weight: 900;
}

.running-campaigns-card li small,
.running-campaigns-card p {
  margin: 0;
  color: #7b8a92;
  font-size: 11px;
  font-weight: 700;
}

.line-chart-wrap {
  display: grid;
  gap: 10px;
}

.line-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  color: #536570;
  font-size: 11px;
}

.line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.line-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.line-chart {
  width: 100%;
  min-height: 230px;
}

.line-chart line {
  stroke: #e8eef0;
  stroke-width: 1;
}

.line-chart polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart text {
  fill: #718189;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
}

.line-net {
  stroke: #25bd73;
}

.line-adplay {
  stroke: #5dbdf5;
}

.line-game {
  stroke: #194f73;
}

.chart-period-select {
  min-height: 28px;
  padding: 4px 22px 4px 10px;
  border: 1px solid #dfe8eb;
  border-radius: 8px;
  background: #fff;
  color: #536570;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.line-hit-area {
  cursor: crosshair;
}

.line-hit-area > line {
  stroke: transparent;
  stroke-width: 34;
}

.line-hit-area circle {
  opacity: 1;
  stroke: #fff;
  stroke-width: 2.5;
  transition: opacity 0.16s ease, r 0.16s ease;
}

.line-hit-area:hover circle {
  r: 6;
}

.line-hit-area:hover .dot-net,
.dot-net {
  fill: #25bd73;
}

.line-hit-area:hover .dot-adplay,
.dot-adplay {
  fill: #5dbdf5;
}

.line-hit-area:hover .dot-game,
.dot-game {
  fill: #194f73;
}

.line-scale-label {
  fill: #8a98a1;
  font-size: 10.5px;
  font-weight: 700;
  text-anchor: end;
}

.game-action-scale-right {
  text-anchor: start;
}

.line-axis-title {
  fill: #536570;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
}

.game-action-axis-left {
  fill: #4aa3df;
}

.game-action-axis-right {
  fill: #19577d;
}

.game-action-hit-area > line {
  stroke: transparent;
  stroke-width: 34;
  pointer-events: stroke;
}

.game-action-hit-area:hover circle {
  r: 6;
}

.running-campaign-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: max-content;
}

.campaign-report-action {
  background: #e8f1ff;
  color: #1d4ed8;
  font-weight: 900;
}

.icon-table-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
  color: #168f85;
  background: #eef8f7;
}

.running-done-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 78px;
  white-space: nowrap;
  color: #168f85;
  font-size: 12px;
  font-weight: 900;
}

.running-done-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #168f85;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.line-hit-area:hover .chart-tooltip {
  opacity: 1;
}

.chart-tooltip div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #e2e9ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 26px rgba(16, 42, 58, 0.12);
  color: #102a3a;
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 9.5px;
  direction: rtl;
}

.chart-tooltip strong {
  margin-bottom: 2px;
  font-size: 10.5px;
}

.chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.chart-tooltip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dashboard-screen[data-current-view="overview"] .line-chart text:not(.line-scale-label) {
  font-size: 10px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
.dashboard-screen[data-current-view="overview"] .panel,
.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel article,
.dashboard-screen[data-current-view="overview"] .mini-kpi-row,
.dashboard-screen[data-current-view="overview"] .mini-kpi-row article,
.dashboard-screen[data-current-view="overview"] .dashboard-table-panel .table-wrap {
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(16, 42, 58, 0.055);
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
.dashboard-screen[data-current-view="overview"] .panel {
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel th,
.dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  border-color: rgba(220, 232, 226, 0.55);
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel tr:last-child td {
  border-bottom-color: transparent;
}

.dashboard-screen[data-current-view="overview"] .chart-period-select {
  width: auto;
  min-width: 76px;
  min-height: 26px;
  padding: 3px 20px 3px 9px;
  border-color: transparent;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(16, 42, 58, 0.05);
  font-size: 10.5px;
}

.dashboard-screen[data-current-view="overview"] .line-chart text:not(.line-scale-label) {
  font-size: 9px;
}

.topbar-profile #openPlanIdeaBtn.hidden {
  display: grid;
}

/* Coolicons-inspired dashboard icon system */
:root {
  --cool-icon-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='5' height='5' rx='1'/%3E%3Crect x='14' y='5' width='5' height='5' rx='1'/%3E%3Crect x='5' y='14' width='5' height='5' rx='1'/%3E%3Crect x='14' y='14' width='5' height='5' rx='1'/%3E%3C/svg%3E");
  --cool-icon-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5 12 5l8 6.5'/%3E%3Cpath d='M6.5 10.5V20h15V10.5' transform='translate(-2)'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E");
  --cool-icon-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M7 7h12M7 12h12M7 17h12'/%3E%3Ccircle cx='4' cy='7' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='12' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='17' r='1' fill='black' stroke='none'/%3E%3C/svg%3E");
  --cool-icon-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v6h5'/%3E%3Cpath d='M10 13h6M10 17h4'/%3E%3C/svg%3E");
  --cool-icon-media: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='16' rx='2'/%3E%3Cpath d='M9 4v16M15 4v16'/%3E%3C/svg%3E");
  --cool-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --cool-icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v10'/%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
  --cool-icon-login: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 8l4 4-4 4'/%3E%3Cpath d='M4 12h14'/%3E%3Cpath d='M5 5h6M5 19h6'/%3E%3C/svg%3E");
  --cool-icon-wallet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h15v12H5z'/%3E%3Cpath d='M16 12h4v4h-4z'/%3E%3Cpath d='M7 7V5h11v2'/%3E%3C/svg%3E");
  --cool-icon-percent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3Ccircle cx='16' cy='16' r='2'/%3E%3C/svg%3E");
  --cool-icon-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 16v-5a6 6 0 0 0-12 0v5l-2 3h16z'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
  --cool-icon-message: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14v10H8l-4 4V6z'/%3E%3Cpath d='M8 10h8M8 13h5'/%3E%3C/svg%3E");
  --cool-icon-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M4 19a5 5 0 0 1 10 0'/%3E%3Ccircle cx='17' cy='10' r='2'/%3E%3Cpath d='M15 18a4 4 0 0 1 5 0'/%3E%3C/svg%3E");
  --cool-icon-idea: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M8 14a7 7 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4z'/%3E%3C/svg%3E");
  --cool-icon-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 0 1-14.5 4.7'/%3E%3Cpath d='M4 12A8 8 0 0 1 18.5 7.3'/%3E%3Cpath d='M18 3v4h-4'/%3E%3Cpath d='M6 21v-4h4'/%3E%3C/svg%3E");
  --cool-icon-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --cool-icon-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15.5A8 8 0 1 1 8.5 4a6.5 6.5 0 0 0 11.5 11.5z'/%3E%3C/svg%3E");
  --cool-icon-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17l5-5 3 3 6-7'/%3E%3Cpath d='M15 8h4v4'/%3E%3C/svg%3E");
  --cool-icon-palette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 1 9-9 4 4 0 0 1-4 4h-1.5a1.5 1.5 0 0 0-1.5 1.5V18a3 3 0 0 1-3 3z'/%3E%3Ccircle cx='7.5' cy='10' r='.8'/%3E%3Ccircle cx='10.5' cy='7.5' r='.8'/%3E%3Ccircle cx='14.5' cy='7.5' r='.8'/%3E%3Ccircle cx='16.5' cy='11' r='.8'/%3E%3C/svg%3E");
  --cool-icon-game: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15H5a3 3 0 0 1-3-3v-1a5 5 0 0 1 5-5h10a5 5 0 0 1 5 5v1a3 3 0 0 1-3 3h-2l-2-3H9z'/%3E%3Cpath d='M7 10h4M9 8v4M16 9h.01M18 12h.01'/%3E%3C/svg%3E");
  --cool-icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21a7 7 0 0 1 14 0'/%3E%3C/svg%3E");
  --cool-icon-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06A1.7 1.7 0 0 0 15 19.4a1.7 1.7 0 0 0-1 1.55V21a2 2 0 1 1-4 0v-.08A1.7 1.7 0 0 0 9 19.4a1.7 1.7 0 0 0-1.88.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-1.55-1H3a2 2 0 1 1 0-4h.08A1.7 1.7 0 0 0 4.6 9a1.7 1.7 0 0 0-.34-1.88l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-1.55V3a2 2 0 1 1 4 0v.08A1.7 1.7 0 0 0 15 4.6a1.7 1.7 0 0 0 1.88-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.7 1.7 0 0 0 19.4 9c.25.62.84 1 1.55 1H21a2 2 0 1 1 0 4h-.08A1.7 1.7 0 0 0 19.4 15z'/%3E%3C/svg%3E");
  --cool-icon-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5H5v14h5'/%3E%3Cpath d='M14 8l4 4-4 4'/%3E%3Cpath d='M8 12h10'/%3E%3C/svg%3E");
  --cool-icon-database: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='6' rx='7' ry='3'/%3E%3Cpath d='M5 6v6c0 1.7 3.1 3 7 3s7-1.3 7-3V6'/%3E%3Cpath d='M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/svg%3E");
  --cool-icon-hr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M4 19a5 5 0 0 1 10 0'/%3E%3Cpath d='m16 12 2 2 4-5'/%3E%3C/svg%3E");
  --cool-icon-audit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h12v16H6z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3Cpath d='M4 7h2M4 12h2M4 17h2'/%3E%3C/svg%3E");
}

.nav-item[data-view="overview"],
.nav-group[data-nav-group="operation"] { --nav-mask: var(--cool-icon-home); --group-mask: var(--cool-icon-grid); }
.nav-item[data-view="campaigns"] { --nav-mask: var(--cool-icon-list); }
.nav-item[data-view="assets"] { --nav-mask: var(--cool-icon-media); }
.nav-item[data-view="entry"] { --nav-mask: var(--cool-icon-plus); }
.nav-item[data-view="payments"] { --nav-mask: var(--cool-icon-download); }
.nav-item[data-view="gamePayments"] { --nav-mask: var(--cool-icon-login); }
.nav-item[data-view="wallet"] { --nav-mask: var(--cool-icon-wallet); }
.nav-item[data-view="commission"] { --nav-mask: var(--cool-icon-percent); }
.nav-item[data-view="notifications"] { --nav-mask: var(--cool-icon-bell); }
.nav-item[data-view="sms"] { --nav-mask: var(--cool-icon-message); }
.nav-item[data-view="users"] { --nav-mask: var(--cool-icon-users); }
.nav-item[data-view="audit"] { --nav-mask: var(--cool-icon-audit); }
.nav-item[data-view="plan"] { --nav-mask: var(--cool-icon-idea); }
.nav-item[data-view="database"] { --nav-mask: var(--cool-icon-database); }
.nav-item[data-view="telegramManager"] { --nav-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4 3 11l7 2 2 7z'/%3E%3Cpath d='m10 13 4 4'/%3E%3C/svg%3E"); }

.telegram-manager-page {
  display: grid;
  gap: 18px;
  width: min(100%, 1480px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.telegram-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 10px 30px rgba(15, 55, 58, 0.08);
  backdrop-filter: blur(8px);
}

.telegram-manager-hero,
.telegram-group-detail-head,
.telegram-action-row,
.telegram-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.telegram-manager-hero p,
.telegram-group-detail p,
.telegram-rule-card p,
.telegram-delivery-row p,
.telegram-message-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.telegram-sync-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.telegram-manager-actions,
.telegram-group-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.telegram-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.telegram-setup-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.telegram-status-card {
  display: grid;
  gap: 6px;
  margin: 0;
}

.telegram-status-card span,
.telegram-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.telegram-status-card strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
}

.telegram-flow-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.telegram-flow-panel > div {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-flow-panel strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.telegram-flow-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
}

.telegram-webhook-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.telegram-webhook-panel p,
.telegram-webhook-panel small {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.telegram-webhook-panel h3 {
  margin: 4px 0 8px;
}

.telegram-webhook-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.telegram-webhook-result {
  grid-column: 1 / -1;
  min-height: 20px;
  font-size: 12px;
  font-weight: 850;
}

.telegram-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.telegram-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.telegram-tabs button.active {
  border-color: rgba(25, 160, 148, 0.24);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 160, 148, 0.18);
}

.telegram-manager-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.telegram-group-list,
.telegram-message-list,
.telegram-draft-list,
.telegram-rule-list,
.telegram-delivery-list {
  display: grid;
  gap: 10px;
}

.telegram-group-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

.telegram-group-btn.active,
.telegram-group-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(20, 144, 90, 0.12);
}

.telegram-group-btn strong,
.telegram-rule-card strong,
.telegram-delivery-row strong,
.telegram-message-row strong {
  overflow-wrap: anywhere;
}

.telegram-group-btn small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.7;
}

.telegram-main-panel {
  min-width: 0;
}

.telegram-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.telegram-recommendation {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-recommendation span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.telegram-speaking-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #fff;
}

.telegram-speaking-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.telegram-speaking-bars > div {
  display: grid;
  gap: 6px;
}

.telegram-speaking-bars span,
.telegram-sender-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.telegram-speaking-bars strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.telegram-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef5f4;
}

.telegram-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.telegram-meter.muted i {
  background: #7b8d97;
}

.telegram-sender-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.telegram-sender-form label {
  margin: 0;
}

.telegram-sender-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.telegram-sender-list button {
  display: grid;
  gap: 2px;
  min-width: 136px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}

.telegram-sender-list button.active {
  border-color: var(--primary);
  background: #eaf8f5;
  box-shadow: 0 8px 18px rgba(25, 160, 148, 0.12);
}

.telegram-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.telegram-rules-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.telegram-rules-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.telegram-rule-form {
  position: sticky;
  top: 90px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-rule-form.data-form {
  grid-template-columns: 1fr;
}

.telegram-rule-form label {
  min-width: 0;
}

.telegram-rule-form input,
.telegram-rule-form select,
.telegram-rule-form textarea,
.telegram-history-import-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.telegram-rule-form input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
}

.telegram-rule-form .form-grid.two-col {
  grid-template-columns: 1fr;
  gap: 12px;
}

.telegram-rule-form .full-field,
.telegram-rule-form .checkbox-row {
  margin-top: 10px;
}

.telegram-rule-form .checkbox-row {
  display: flex;
  grid-column: auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0;
}

.telegram-rule-form .form-actions {
  grid-column: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.telegram-delivery-panel,
.telegram-rules-panel,
.telegram-group-detail,
.telegram-group-panel {
  min-width: 0;
}

.section-head.compact {
  margin-bottom: 10px;
}

.telegram-message-row,
.telegram-draft-card,
.telegram-rule-card,
.telegram-delivery-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.telegram-message-row.outgoing {
  background: #f5faf7;
}

.telegram-message-row > div,
.telegram-draft-card > div,
.telegram-delivery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.telegram-message-row small,
.telegram-draft-card small,
.telegram-rule-card small,
.telegram-delivery-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.telegram-draft-card textarea,
.telegram-manual-reply textarea,
.telegram-rule-form textarea {
  resize: vertical;
}

.telegram-manual-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #cfe2df;
  border-radius: 8px;
  background: #fbfefd;
}

.telegram-manual-reply label {
  margin: 0;
}

.telegram-manual-reply textarea {
  min-height: 92px;
}

.telegram-manual-reply .primary-btn {
  width: auto;
  min-width: 126px;
  min-height: 42px;
  padding: 0 16px;
}

.telegram-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.telegram-kpi-grid article {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-kpi-grid span,
.telegram-kpi-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.telegram-kpi-grid strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
}

.telegram-vip-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.telegram-table-panel,
.telegram-form-panel {
  min-width: 0;
}

.telegram-form-panel {
  width: 100%;
  max-width: 380px;
  justify-self: end;
}

.telegram-group-list.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  justify-content: start;
}

.telegram-groups-table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.telegram-groups-table {
  width: 100%;
  min-width: 1160px;
  margin: 0;
  table-layout: fixed;
}

.telegram-groups-table th:nth-child(1),
.telegram-groups-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}

.telegram-groups-table th:nth-child(2),
.telegram-groups-table td:nth-child(2) {
  width: 26%;
}

.telegram-groups-table th:nth-child(9),
.telegram-groups-table td:nth-child(9) {
  width: 300px;
}

.telegram-groups-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

.telegram-groups-table td,
.telegram-groups-table th {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.telegram-groups-table td strong,
.telegram-groups-table td small,
.telegram-groups-table td span {
  display: block;
}

.telegram-groups-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.telegram-groups-table .table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.telegram-groups-table .table-actions .table-btn {
  min-width: 64px;
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}

.telegram-groups-table .telegram-ai-action {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #edf7f5;
  color: var(--brand);
  font-weight: 900;
}

.telegram-groups-table .active-row td {
  background: #f4fbf8;
}

.telegram-group-edit-modal {
  width: min(860px, calc(100vw - 32px));
}

.telegram-group-edit-modal .telegram-rule-form {
  max-width: none;
}

.telegram-brand-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: end;
}

.telegram-brand-select-row .icon-button {
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.telegram-adplay-members {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-adplay-members .section-head.compact {
  margin: 0;
  padding: 0;
  border: 0;
}

.telegram-adplay-dropdown {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-adplay-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  color: var(--ink);
}

.telegram-adplay-dropdown summary::-webkit-details-marker {
  display: none;
}

.telegram-adplay-dropdown summary::before {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 18px;
  transition: transform 0.18s ease;
}

.telegram-adplay-dropdown[open] summary::before {
  transform: rotate(180deg);
}

.telegram-adplay-dropdown summary strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.telegram-adplay-dropdown .telegram-member-check-list {
  padding: 0 12px 12px;
}

.telegram-member-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.telegram-member-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.telegram-member-check input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.telegram-member-check span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.telegram-member-check small {
  color: var(--muted);
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

.telegram-group-edit-modal .telegram-history-import-panel {
  margin-top: 14px;
  margin-bottom: 0;
}

.telegram-brand-profile-modal {
  width: min(980px, calc(100vw - 32px));
}

.telegram-brand-form {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.telegram-brand-form .full-field,
.telegram-brand-form .form-actions,
.telegram-brand-form .form-error {
  grid-column: 1 / -1;
}

.telegram-archive-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.telegram-history-import-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-history-import-panel p,
.telegram-history-import-panel small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.8;
}

.telegram-history-import-panel strong {
  display: block;
  margin-bottom: 4px;
}

.telegram-history-import-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  width: min(100%, 620px);
  max-width: 620px;
  justify-self: end;
}

.telegram-history-import-form label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.telegram-history-import-form input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e5e3;
  border-radius: 8px;
  background: #fff;
}

.telegram-archive-note {
  flex: 1 1 320px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.8;
}

.telegram-message-list.archive {
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-inline-end: 4px;
}

.telegram-open-loop-grid,
.telegram-template-grid,
.telegram-copilot-grid {
  display: grid;
  gap: 12px;
}

.telegram-open-loop-grid,
.telegram-template-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.telegram-copilot-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: start;
}

.telegram-copilot-grid > .panel:last-child {
  grid-column: 1 / -1;
}

.telegram-open-loop-card,
.telegram-outbound-card,
.telegram-template-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.telegram-open-loop-card > div,
.telegram-outbound-card > div,
.telegram-template-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.telegram-open-loop-card p,
.telegram-outbound-card p,
.telegram-template-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.telegram-open-loop-card small,
.telegram-outbound-card small,
.telegram-template-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.telegram-outbound-card textarea {
  min-height: 112px;
  resize: vertical;
}

.telegram-guide-panel {
  display: grid;
  gap: 14px;
}

.telegram-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.telegram-guide-grid article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #f8fcfb;
}

.telegram-guide-grid strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.telegram-guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.9;
}

@media (max-width: 1100px) {
  .telegram-topbar,
  .telegram-status-grid,
  .telegram-flow-panel,
  .telegram-webhook-panel,
  .telegram-history-import-panel,
  .telegram-manager-layout,
  .telegram-split,
  .telegram-rules-tab,
  .telegram-rules-workspace,
  .telegram-vip-grid,
  .telegram-copilot-grid,
  .telegram-kpi-grid {
    grid-template-columns: 1fr;
  }

  .telegram-rule-form {
    position: static;
  }

  .telegram-speaking-bars,
  .telegram-sender-form,
  .telegram-history-import-form {
    grid-template-columns: 1fr;
  }

  .telegram-history-import-form {
    min-width: 0;
  }

  .telegram-form-panel {
    max-width: none;
    justify-self: stretch;
  }

  .telegram-topbar {
    position: static;
  }
}

@media (max-width: 700px) {
  .telegram-manager-hero,
  .telegram-group-detail-head,
  .telegram-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-manager-actions,
  .telegram-action-row button {
    width: 100%;
  }

  .telegram-manager-actions,
  .telegram-manual-reply .primary-btn {
    width: 100%;
  }

  .telegram-manual-reply {
    grid-template-columns: 1fr;
  }

  .telegram-rule-form .form-grid.two-col {
    grid-template-columns: 1fr;
  }

  .telegram-tabs button {
    min-width: max-content;
  }
}
.nav-group[data-nav-group="finance"] { --group-mask: var(--cool-icon-percent); }
.nav-group[data-nav-group="messaging"] { --group-mask: var(--cool-icon-message); }
.nav-group[data-nav-group="dashboard-management"] { --group-mask: var(--cool-icon-settings); }
.nav-group[data-nav-group="human-resources"] { --group-mask: var(--cool-icon-hr); }

.overview-kpi-grid .kpi-tone-1 { --kpi-mask: var(--cool-icon-doc); }
.overview-kpi-grid .kpi-tone-2 { --kpi-mask: var(--cool-icon-chart); }
.overview-kpi-grid .kpi-tone-3 { --kpi-mask: var(--cool-icon-percent); }
.overview-kpi-grid .kpi-tone-4 { --kpi-mask: var(--cool-icon-palette); }
.overview-kpi-grid .kpi-tone-5 { --kpi-mask: var(--cool-icon-user); }
.overview-kpi-grid .kpi-tone-6 { --kpi-mask: var(--cool-icon-game); }

.icon-button .icon-theme,
.icon-button .icon-reload,
.plan-idea-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  mask: var(--cool-icon-sun) center / contain no-repeat;
  -webkit-mask: var(--cool-icon-sun) center / contain no-repeat;
}

.dark .icon-button .icon-theme {
  mask-image: var(--cool-icon-moon);
  -webkit-mask-image: var(--cool-icon-moon);
}

.icon-button .icon-reload {
  mask-image: var(--cool-icon-refresh);
  -webkit-mask-image: var(--cool-icon-refresh);
}

.plan-idea-icon {
  mask-image: var(--cool-icon-idea);
  -webkit-mask-image: var(--cool-icon-idea);
}

.icon-button .icon-theme::before,
.icon-button .icon-reload::before,
.plan-idea-icon::before,
.plan-idea-icon::after {
  content: none;
}

/* Final dark-theme normalization. Keep this late so it wins over preview skins. */
body.dark {
  --bg: #0d1419;
  --surface: #161f25;
  --surface-soft: #111a20;
  --ink: #eef7f4;
  --muted: #9badb3;
  --line: #2a3a42;
  --primary: #58d08f;
  --primary-strong: #79ddb0;
  --brand-navy: #dcecf0;
  --preview-bg: #0d1419;
  --preview-card: #161f25;
  --preview-soft: #10251e;
  --preview-ink: #eef7f4;
  --preview-muted: #9badb3;
  --preview-line: #2a3a42;
  background: #0d1419;
  color: var(--ink);
}

.dark .dashboard-screen {
  background: #0d1419;
}

.dark .main-content,
.dark .topbar {
  color: var(--ink);
}

.dark .sidebar,
.dark .dashboard-screen.sidebar-collapsed .sidebar,
.dark .dashboard-screen.sidebar-collapsed .sidebar:hover,
.dark .dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  border-color: #263740;
  background: #10171c;
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.dark .sidebar .brand-lockup h1,
.dark .topbar h2,
.dark .section-head h3,
.dark .panel h3,
.dark .panel h4,
.dark .modal h3,
.dark .modal h4,
.dark .status-list strong,
.dark .mini-kpi-row strong,
.dark .wallet-snapshot-panel strong,
.dark .kpi-card strong,
.dark label {
  color: var(--ink);
}

.dark .sidebar .brand-lockup p,
.dark .eyebrow,
.dark .section-head span,
.dark .kpi-card span,
.dark .kpi-card small,
.dark .detail-grid span,
.dark .zaya-summary span,
.dark .status-list span,
.dark .mini-kpi-row span,
.dark .mini-kpi-row small,
.dark .wallet-snapshot-panel span,
.dark .wallet-snapshot-panel small,
.dark .empty-cell,
.dark th {
  color: var(--muted);
}

.dark .filters-panel,
.dark .kpi-card,
.dark .overview-kpi-grid .kpi-card,
.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
.dark .dashboard-screen[data-current-view="overview"] .panel,
.dark .panel,
.dark .modal,
.dark .detail-grid article,
.dark .plan-stage-grid article,
.dark .zaya-summary article,
.dark .status-list article,
.dark .mini-kpi-row,
.dark .mini-kpi-row article,
.dark .wallet-snapshot-panel article,
.dark .dashboard-table-panel .table-wrap,
.dark .table-wrap,
.dark .nested-panel,
.dark .user-tabs-panel,
.dark .stage-created-card,
.dark .stage-loading-panel {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
  color: var(--ink);
}

.dark input,
.dark select,
.dark textarea,
.dark .filters-panel input,
.dark .filters-panel select,
.dark .filter-combobox input,
.dark .filter-options,
.dark .filter-combobox button[aria-label],
.dark .filter-add-btn,
.dark .field-shortcut-btn,
.dark .chart-period-select,
.dark .stage-choice-grid,
.dark .stage-asset-preview,
.dark .campaign-review-offer,
.dark .campaign-review-offer-head .checkbox-label,
.dark .campaign-offer-preview-table,
.dark #campaignEditForm > label,
.dark #campaignEditForm fieldset,
.dark #campaignEditForm .action-block {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #73878e;
}

.dark .secondary-btn,
.dark .table-btn,
.dark .ghost-btn {
  border-color: var(--line);
  background: #132a23;
  color: #9ee8bd;
}

.dark .secondary-btn:hover,
.dark .table-btn:hover,
.dark .ghost-btn:hover {
  background: #18352b;
  color: #c9f7dc;
}

.dark .primary-btn {
  background: #229b65;
  color: #fff;
}

.dark .nav-group-toggle,
.dark .nav-item,
.dark .nav-group-items .nav-item {
  color: #a9bcc2;
}

.dark .nav-item.active,
.dark .nav-item:hover,
.dark .nav-group.active > .nav-group-toggle,
.dark .nav-group-toggle:hover {
  background: rgba(88, 208, 143, 0.16);
  color: #f3fbf8;
  box-shadow: inset -3px 0 0 var(--primary);
}

.dark .nav-item::before,
.dark .nav-icon {
  border-color: rgba(88, 208, 143, 0.16);
  background: rgba(88, 208, 143, 0.08);
}

.dark .nav-item:not(.active):not(:hover)::after,
.dark .nav-group-toggle:not(:hover) .nav-icon::after {
  color: #8fdcaf;
}

.dark table {
  border-color: var(--line);
}

.dark th,
.dark td {
  border-color: var(--line);
}

.dark th {
  background: #111a20;
}

.dark td,
.dark tbody tr,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  background: var(--surface);
  color: var(--ink);
}

.dark tbody tr:hover td,
.dark tbody tr:hover,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel tr:hover td {
  background: #1b2931;
}

.dark .stacked-legend,
.dark .stacked-track,
.dark .bar-row div,
.dark .zaya-chart-row div,
.dark .zaya-breakdown-row div {
  background:
    repeating-linear-gradient(to left, rgba(88, 208, 143, 0.12) 0, rgba(88, 208, 143, 0.12) 1px, transparent 1px, transparent 9%),
    #111a20;
}

.dark .dashboard-hero,
.dark .plan-hero {
  border-color: var(--line);
  background: linear-gradient(135deg, #15252d, #12261f);
  color: var(--ink);
}

.dark .dashboard-hero h3,
.dark .dashboard-hero span,
.dark .dashboard-hero p,
.dark .plan-hero h3,
.dark .plan-hero span,
.dark .plan-hero p {
  color: var(--ink);
}

.dark .modal-backdrop {
  background: rgba(3, 8, 11, 0.72);
}

.dark .campaign-edit-modal h3,
.dark #campaignEditForm .form-actions {
  background: rgba(22, 31, 37, 0.96);
}

.dark .chart-tooltip div {
  border-color: var(--line);
  background: rgba(17, 26, 32, 0.98);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.mini-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #e8eef0;
  border-radius: 8px;
  overflow: hidden;
}

.mini-kpi-row article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-left: 1px solid #e8eef0;
}

.mini-kpi-row article:last-child {
  border-left: 0;
}

.mini-kpi-row span,
.wallet-snapshot-panel span {
  color: #718189;
  font-size: 11px;
  font-weight: 700;
}

.mini-kpi-row strong,
.wallet-snapshot-panel strong {
  color: #102a3a;
  font-size: 17px;
  font-weight: 900;
}

.mini-kpi-row small,
.wallet-snapshot-panel small {
  color: #718189;
  font-size: 10px;
}

.wallet-snapshot-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.wallet-snapshot-panel article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e8eef0;
  border-radius: 8px;
  background: #fff;
}

.wallet-charge-btn {
  min-height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, #14905a, #20b973);
  box-shadow: 0 14px 24px rgba(20, 144, 90, 0.22);
}

.dashboard-table-panel {
  padding: 18px;
}

.dashboard-table-panel .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.dashboard-table-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table-panel th {
  background: #fbfcfd;
  color: #718189;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-table-panel td {
  border-bottom: 1px solid #edf1f2;
  color: #102a3a;
  font-size: 12px;
}

@media (max-width: 1400px) {
  .dashboard-analytics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .wallet-snapshot-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
  }
}

@media (max-width: 980px) {
  .overview-kpi-grid,
  .dashboard-analytics-grid,
  .wallet-snapshot-panel,
  .mini-kpi-row {
    grid-template-columns: 1fr;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}


/* Dashboard exact-match pass: closer to uploaded reference */
.dashboard-screen[data-current-view="overview"] .filters-panel {
  display: none;
}

.dashboard-screen[data-current-view="overview"] .main-content {
  padding: 0 18px 18px;
  gap: 18px;
}

.dashboard-screen[data-current-view="overview"] .topbar {
  min-height: 64px;
  margin: 0 -18px;
  padding: 8px 22px;
  border-radius: 0;
  border-bottom: 1px solid #e6ecef;
  background: #fff;
  box-shadow: 0 2px 10px rgba(16, 42, 58, 0.035);
}

.dashboard-screen[data-current-view="overview"] .topbar h2 {
  font-size: 24px;
  line-height: 1.15;
}

.dashboard-screen[data-current-view="overview"] .overview-dashboard {
  gap: 16px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
  grid-template-columns: repeat(6, minmax(148px, 1fr));
  gap: 8px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
  min-height: 118px;
  padding: 16px 16px 12px;
  border-color: #e7edf0;
  box-shadow: 0 8px 20px rgba(16, 42, 58, 0.04);
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card::before {
  width: 34px;
  height: 34px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card::after {
  width: 17px;
  height: 17px;
  margin: 8.5px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card span {
  margin-bottom: 6px;
  font-size: 11px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card strong {
  font-size: clamp(16px, 1.06vw, 20px);
  line-height: 1.55;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card small {
  margin-top: 8px;
  font-size: 9.5px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
  grid-template-columns: minmax(250px, 0.88fr) minmax(520px, 1.75fr) minmax(270px, 0.9fr);
  gap: 14px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid .panel {
  min-height: 310px;
  padding: 16px;
}

.dashboard-screen[data-current-view="overview"] .section-head {
  min-height: 34px;
  margin-bottom: 12px;
}

.dashboard-screen[data-current-view="overview"] .section-head h3 {
  font-size: 16px;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel article {
  padding: 18px 16px;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel strong {
  font-size: 20px;
}

.dashboard-screen[data-current-view="overview"] .wallet-charge-btn {
  margin-top: 2px;
}

.dashboard-screen[data-current-view="overview"] .line-chart {
  min-height: 210px;
  max-height: 230px;
}

.dashboard-screen[data-current-view="overview"] .mini-kpi-row article {
  padding: 10px 12px;
}

.dashboard-screen[data-current-view="overview"] .mini-kpi-row strong {
  font-size: 15px;
}

.dashboard-screen[data-current-view="overview"] .donut-layout {
  grid-template-columns: 142px 1fr;
  gap: 14px;
}

.dashboard-screen[data-current-view="overview"] .donut-chart {
  width: 142px;
  height: 142px;
}

.dashboard-screen[data-current-view="overview"] .donut-legend {
  gap: 10px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel {
  padding: 16px 18px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel td,
.dashboard-screen[data-current-view="overview"] .dashboard-table-panel th {
  padding: 10px 12px;
}

@media (max-width: 1400px) {
  .dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel {
    grid-template-columns: 1fr;
  }
}

/* Dashboard spacing/background refinement */
.dashboard-screen[data-current-view="overview"] {
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .main-content {
  background: #fff;
  padding: 0 20px 20px;
  gap: 14px;
}

.dashboard-screen[data-current-view="overview"] .topbar {
  margin: 0 -20px 4px;
  background: #fff;
  box-shadow: none;
}

.dashboard-screen[data-current-view="overview"] .overview-dashboard {
  gap: 12px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
  gap: 10px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
.dashboard-screen[data-current-view="overview"] .panel,
.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel article,
.dashboard-screen[data-current-view="overview"] .mini-kpi-row,
.dashboard-screen[data-current-view="overview"] .dashboard-table-panel .table-wrap {
  border-color: #edf1f3;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 58, 0.035);
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
  min-height: 112px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
  gap: 12px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid .panel {
  min-height: 292px;
  padding: 14px;
}

.dashboard-screen[data-current-view="overview"] .section-head {
  margin-bottom: 10px;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel {
  gap: 12px;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel article {
  padding: 16px;
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .line-chart {
  min-height: 198px;
}

.dashboard-screen[data-current-view="overview"] .mini-kpi-row {
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .mini-kpi-row article {
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel {
  padding: 14px 16px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel .table-wrap {
  background: #fff;
}

.dashboard-screen[data-current-view="overview"] .dashboard-table-panel th {
  background: #fafbfc;
}

/* Topbar compact actions */
.topbar-actions {
  gap: 8px;
}

.topbar-search {
  min-width: 0;
}

.topbar-search input {
  width: 132px;
  max-width: 132px;
  height: 42px;
  padding-inline-start: 42px;
  padding-inline-end: 14px;
  transition: width 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.topbar-search input:focus {
  width: 156px;
  max-width: 156px;
}

.plan-idea-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
}

.plan-idea-btn > span:not(.plan-idea-icon) {
  display: none;
}

.plan-idea-btn .plan-idea-icon {
  width: 18px;
  height: 18px;
}

.plan-idea-btn.hidden {
  display: none;
}

@media (max-width: 900px) {
  .topbar-search input {
    width: 118px;
    max-width: 118px;
  }

  .topbar-search input:focus {
    width: 140px;
    max-width: 140px;
  }
}

/* Sidebar and dashboard rhythm polish */
.sidebar {
  padding: 18px 12px;
}

.sidebar .brand-lockup {
  margin-bottom: 18px;
}

.sidebar .brand-lockup h1 {
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0;
}

.sidebar .brand-lockup p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
}

.sidebar nav {
  gap: 4px;
}

.nav-group {
  gap: 4px;
  margin: 2px 0 6px;
}

.nav-group-toggle,
.nav-item {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  gap: 10px;
  color: #718189;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.nav-group-text {
  gap: 2px;
  min-width: 0;
}

.nav-group-text small {
  color: #14905a;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.nav-group-text strong {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.nav-group-items {
  margin: 2px 0 2px;
  padding-inline-start: 12px;
  gap: 2px;
  border-inline-start: 1px solid #e5efea;
}

.nav-group-items .nav-item {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 10px;
}

.nav-item::before,
.nav-group-toggle .nav-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 10px;
}

.nav-group-items .nav-item::before {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 8px;
}

.nav-item::after,
.nav-group-toggle .nav-icon::after {
  width: 15px;
  height: 15px;
}

.nav-group-items .nav-item::after {
  width: 13px;
  height: 13px;
}

.nav-item.active {
  color: #194f73;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(20, 144, 90, 0.09);
}

.nav-group.active > .nav-group-toggle {
  color: #718189;
  background: transparent;
  box-shadow: none;
}

.nav-group.active > .nav-group-toggle .nav-group-text strong {
  color: #718189;
}

.nav-group-toggle::after {
  color: #718189;
  font-size: 12px;
}

.user-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 16px;
}

.user-card span {
  font-size: 13px;
  line-height: 1.4;
}

.user-card strong {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.user-card .ghost-btn {
  min-height: 42px;
  margin-top: 12px;
  border-radius: 999px;
  font-size: 13px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) {
  padding-inline: 10px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle {
  justify-content: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  margin-inline: auto;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::before,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle .nav-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-items {
  padding: 0;
  border: 0;
}

.dashboard-screen[data-current-view="overview"] .main-content {
  padding: 0 22px 22px;
  gap: 18px;
}

.dashboard-screen[data-current-view="overview"] .overview-dashboard {
  gap: 18px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
  gap: 14px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
  min-height: 126px;
  padding: 18px 18px 16px;
  border-radius: 8px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card strong {
  margin-top: 8px;
  font-size: clamp(18px, 1.18vw, 22px);
  line-height: 1.5;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card small {
  margin-top: 10px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
  gap: 16px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid .panel {
  padding: 18px;
  border-radius: 8px;
}

/* Header profile cluster */
.topbar-actions {
  align-items: center;
  direction: ltr;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline-end: 8px;
  margin-inline-end: 8px;
  border-inline-end: 1px solid #e6ecef;
  direction: ltr;
}

.topbar-avatar,
.profile-avatar-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #58d08f, #14905a);
  color: #fff;
  font-weight: 900;
}

.topbar-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  box-shadow: 0 8px 18px rgba(20, 144, 90, 0.16);
}

.topbar-avatar img,
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user-copy {
  display: grid;
  min-width: 64px;
  max-width: 116px;
  gap: 2px;
  direction: rtl;
  text-align: left;
}

.topbar-user-copy strong {
  color: #718189;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-copy span {
  color: #718189;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #718189;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.topbar-icon-btn:hover {
  background: #edf8f2;
  color: #14905a;
  transform: translateY(-1px);
}

.topbar-bell-icon,
.topbar-settings-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--cool-icon-bell) center / contain no-repeat;
  -webkit-mask: var(--cool-icon-bell) center / contain no-repeat;
}

.topbar-settings-icon {
  mask-image: var(--cool-icon-settings);
  -webkit-mask-image: var(--cool-icon-settings);
}

.topbar-notification-badge {
  position: absolute;
  top: -9px;
  inset-inline-end: -4px;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.topbar-notification-badge-count {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(16, 42, 58, 0.14);
}

.topbar-notification-badge-count + .topbar-notification-badge-count {
  margin-top: -4px;
}

.topbar-notification-badge-count.is-pending {
  background: #facc15;
  color: #3f3000;
}

.topbar-notification-badge-count.is-unread {
  background: #f04438;
  color: #fff;
}

.topbar-notification-badge.has-multiple {
  inset-inline-end: -4px;
}

.topbar-notification-badge.hidden {
  display: none;
}

.topbar-search {
  display: none;
}

.topbar-profile .plan-idea-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  color: #718189;
  background: transparent;
  box-shadow: none;
}

.topbar-profile .plan-idea-btn:hover {
  background: #edf8f2;
  color: #14905a;
}

.topbar-profile .plan-idea-btn.hidden {
  display: none;
}

.topbar-notifications-popup {
  width: 100%;
  max-width: 100%;
  max-height: 76vh;
  display: grid;
  gap: 14px;
  direction: rtl;
  text-align: right;
}

.topbar-notifications-popup.is-minimized {
  max-height: 188px;
}

.topbar-notifications-popup.is-minimized .topbar-notification-content {
  display: none;
}

.topbar-notification-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 0 12px;
  border-bottom: 1px solid #e5eef0;
}

.topbar-notification-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.topbar-notification-head h3 {
  margin: 0;
  color: #2f3f46;
  font-size: 20px;
  line-height: 1.5;
}

.topbar-notification-head div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.topbar-notification-head span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: #eef7f4;
  color: #0f7f74;
  font-size: 12px;
  font-weight: 900;
}

.notification-window-toggle {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid #d8e8e5;
  border-radius: 9px;
  background: #f3faf8;
  color: #0f7f74;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.notification-window-toggle:hover {
  border-color: #9fcfc8;
  background: #e7f6f2;
}

.topbar-notification-content {
  display: grid;
  gap: 12px;
}

.topbar-notification-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 2px 2px 4px;
  width: 100%;
  justify-items: stretch;
}

.topbar-notification-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #dce9e8;
  border-radius: 10px;
  background: #fbfefd;
}

.topbar-notification-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #415961;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
}

.topbar-notification-tabs button.active,
.topbar-notification-tabs button:hover {
  background: #eef7f4;
  color: #0f7f74;
}

.topbar-notification-tabs span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #edf2f3;
  color: #60747b;
  font-size: 10px;
}

.topbar-notification-reaction-tabs button.has-pending-count span {
  background: #facc15;
  color: #3f3000;
}

.topbar-notification-reaction-tabs button.has-unread-count span {
  background: #f04438;
  color: #fff;
}

.topbar-notification-item {
  display: grid;
  gap: 10px;
  width: 100%;
  justify-self: stretch;
  padding: 14px;
  border: 1px solid #dce9e8;
  border-radius: 8px;
  background: #fbfefd;
  direction: rtl;
  text-align: right;
  box-shadow: 0 12px 28px rgba(16, 42, 58, 0.045);
}

.topbar-notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  direction: rtl;
}

.topbar-notification-item.is-collapsed {
  gap: 8px;
  padding: 12px 14px;
}

.topbar-notification-item h4,
.topbar-notification-item p {
  margin: 0;
}

.topbar-notification-item h4 {
  color: #253843;
  font-size: 17px;
  line-height: 1.55;
  text-align: right;
}

.topbar-notification-item.is-collapsed h4 {
  font-size: 15px;
  line-height: 1.5;
}

.topbar-notification-item-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.notification-card-toggle {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 1px solid #d8e8e5;
  border-radius: 8px;
  background: #f3faf8;
  color: #0f7f74;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.notification-card-toggle:hover {
  border-color: #9fcfc8;
  background: #e7f6f2;
}

.topbar-notification-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #71858b;
  font-size: 12px;
  font-weight: 800;
}

.topbar-notification-summary strong {
  color: #243c46;
}

.topbar-notification-item p {
  color: #587078;
  line-height: 1.8;
  white-space: pre-wrap;
}

.topbar-notification-message {
  max-height: 78px;
  overflow: auto;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f7faf9;
  border: 1px solid #edf3f2;
}

.topbar-notification-item small {
  color: #7a8a90;
  font-weight: 700;
}

.topbar-notification-party {
  display: block;
  text-align: right;
  direction: rtl;
  color: #74858a;
  font-size: 13px;
}

.topbar-notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #73848a;
  font-size: 12px;
  font-weight: 900;
  direction: rtl;
  text-align: right;
}

.topbar-notification-meta > * {
  unicode-bidi: plaintext;
}

.topbar-notification-unread {
  color: #d92d20;
}

.notification-response-detail {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef7f4;
  color: #315c57;
}

.notification-response-detail p {
  margin: 0;
}

.notification-response-detail button {
  justify-self: start;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #b9dbd6;
  border-radius: 8px;
  background: #fff;
  color: #0f6f67;
  font-weight: 900;
  cursor: pointer;
}

.notification-response-actions {
  display: grid;
  gap: 8px;
  direction: rtl;
}

.notification-response-actions textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  direction: rtl;
  text-align: right;
  padding: 10px 12px;
  font-size: 13px;
}

.notification-response-actions div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.notification-response-actions button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cfe2df;
  border-radius: 8px;
  background: #fff;
  color: #0f6f67;
  font-weight: 900;
  cursor: pointer;
}

.notification-compose-head {
  align-items: center;
}

.notification-compose-panel {
  align-self: start;
}

.notification-compose-panel.is-collapsed {
  display: grid;
  align-content: center;
}

.notification-compose-panel.is-collapsed .notification-compose-head {
  min-height: 58px;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.notification-compose-panel.is-collapsed h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.notification-compose-head .icon-table-btn {
  width: 46px;
  height: 46px;
  font-size: 24px;
}

.notification-compose-panel.is-collapsed .icon-table-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #eef8f4;
  color: #0f8b7f;
  font-size: 26px;
}

.notification-compose-panel.is-open {
  position: static;
}

.notification-preview-btn {
  width: 38px;
  height: 38px;
  margin-inline: auto;
}

.notification-reaction-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.notification-reaction-actions button,
.notification-mini-btn {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cfe2df;
  border-radius: 8px;
  background: #fff;
  color: #0f6f67;
  font-weight: 900;
  cursor: pointer;
}

.notification-icon-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  direction: ltr;
}

.notification-action-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid #cfe2df;
  background: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.notification-action-btn.accept {
  border-color: #bde8d3;
  background: #e8f7ef;
  color: #0f8b5f;
}

.notification-action-btn.reject {
  border-color: #ffd0d0;
  background: #fff0f0;
  color: #d93636;
}

.notification-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 83, 76, 0.12);
}

[data-notification-response].is-pending {
  opacity: 0.72;
  pointer-events: none;
  transform: scale(0.96);
}

.notification-reply-box textarea {
  width: 160px;
  min-height: 42px;
  resize: vertical;
  border-radius: 10px;
}

.notification-reply-text {
  max-width: 220px;
  white-space: pre-wrap;
  color: #315c57;
  font-weight: 800;
}

.notification-preview-modal {
  display: grid;
  gap: 14px;
}

.notification-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #73848a;
  font-weight: 800;
}

.notification-preview-modal pre {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid #dce9e6;
  border-radius: 10px;
  background: #f8fbfa;
  color: #173247;
  font-family: inherit;
  line-height: 1.9;
}

.campaign-offer-card-preview {
  display: grid;
  gap: 16px;
  padding: 14px;
  direction: rtl;
  text-align: right;
  border: 1px solid #e1ece9;
  border-radius: 8px;
  background: #fff;
}

.campaign-offer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  direction: rtl;
  text-align: right;
}

.campaign-offer-card-head h3 {
  margin: 0;
}

.campaign-offer-card-meta {
  display: grid;
  gap: 10px;
  direction: rtl;
  justify-items: start;
  justify-content: start;
  text-align: right;
  color: #73848a;
  font-weight: 900;
}

.campaign-offer-card-meta span {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

.campaign-offer-card-meta strong {
  color: #173247;
}

.campaign-offer-preview-table {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e4efec;
}

.campaign-offer-preview-table table {
  min-width: 720px;
}

.campaign-offer-preview-table th,
.campaign-offer-preview-table td {
  text-align: center;
}

.campaign-offer-final-warning {
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
  text-align: right;
}

.topbar-notification-item .campaign-offer-final-warning,
.notification-preview-modal .campaign-offer-final-warning {
  color: #dc2626;
}

.topbar-campaign-offer-preview {
  padding: 14px;
}

.topbar-campaign-offer-preview .table-wrap {
  max-height: none;
}

.campaign-offer-mobile-records {
  display: none;
}

@media (max-width: 640px) {
  .modal:has(.notification-preview-modal) {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 10px;
  }

  .modal:has(.notification-preview-modal) .modal-close {
    float: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0 0 10px auto;
    border-radius: 8px;
  }

  .notification-preview-modal {
    display: grid;
    gap: 12px;
  }

  .notification-preview-modal .campaign-offer-card-preview {
    padding: 12px;
    gap: 12px;
  }

  .notification-preview-modal .campaign-offer-card-head {
    justify-content: flex-start;
  }

  .notification-preview-modal .campaign-offer-card-head h3 {
    font-size: 19px;
    line-height: 1.55;
    text-align: right;
  }

  .notification-preview-modal .campaign-offer-card-meta {
    gap: 7px;
    justify-items: stretch;
    width: 100%;
  }

  .notification-preview-modal .campaign-offer-card-meta span {
    display: block;
    font-size: 13px;
    line-height: 1.8;
  }

  .notification-preview-modal .campaign-offer-card-meta strong {
    display: inline;
    font-size: 15px;
  }

  .notification-preview-modal .campaign-offer-preview-table {
    display: none;
  }

  .modal:has(.topbar-notifications-popup) {
    width: calc(100vw - 20px);
    padding: 12px;
  }

  .topbar-notification-item {
    padding: 12px;
  }

  .topbar-campaign-offer-preview {
    padding: 10px;
  }

  .topbar-campaign-offer-preview .campaign-offer-preview-table {
    display: none;
  }

  .campaign-offer-mobile-records {
    display: grid;
    gap: 10px;
  }

  .campaign-offer-mobile-record {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid #dce9e8;
    border-radius: 8px;
    background: #fff;
  }

  .notification-preview-modal .campaign-offer-mobile-record {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .notification-preview-modal .campaign-offer-mobile-record div {
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e4efec;
  }

  .notification-preview-modal .campaign-offer-mobile-record div:last-child {
    border-bottom: 0;
  }

  .campaign-offer-mobile-record div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .campaign-offer-mobile-record span {
    color: #87969b;
    font-size: 11px;
    font-weight: 900;
  }

  .campaign-offer-mobile-record strong {
    color: #173247;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
}

.csv-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.csv-export-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--cool-icon-download) center / contain no-repeat;
  -webkit-mask: var(--cool-icon-download) center / contain no-repeat;
}

.profile-settings-form {
  display: grid;
  gap: 14px;
}

.profile-settings-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6ecef;
  border-radius: 10px;
  background: #fbfcfd;
}

.profile-avatar-preview {
  width: 64px;
  height: 64px;
  min-width: 64px;
  font-size: 18px;
}

.profile-avatar-upload {
  flex: 1;
}

.profile-avatar-upload input {
  margin-top: 8px;
}

.sidebar .user-card {
  display: none;
}

.nav-group-text small {
  display: none;
}

.topbar-logout-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--cool-icon-logout) center / contain no-repeat;
  -webkit-mask: var(--cool-icon-logout) center / contain no-repeat;
}

.topbar-logout-btn:hover {
  background: #fff1f1;
  color: #c73535;
}

/* Unified Coolicons topbar action style */
.topbar-actions .secondary-btn,
.topbar-actions .icon-button,
.topbar-actions .topbar-icon-btn,
.topbar-actions .csv-export-btn {
  border: 0;
  background: transparent;
  color: #718189;
  box-shadow: none;
}

.topbar-actions .icon-button,
.topbar-actions .topbar-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.topbar-actions .icon-button:hover,
.topbar-actions .topbar-icon-btn:hover,
.topbar-actions .csv-export-btn:hover {
  background: #edf8f2;
  color: #14905a;
  transform: translateY(-1px);
}

.topbar-actions .csv-export-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: #718189;
  font-size: 13px;
  font-weight: 900;
}

.topbar-actions .icon-button .icon-theme,
.topbar-actions .icon-button .icon-reload,
.topbar-actions .icon-button .topbar-filter-icon,
.topbar-actions .csv-export-icon,
.topbar-actions .topbar-bell-icon,
.topbar-actions .topbar-settings-icon,
.topbar-actions .topbar-logout-icon,
.topbar-actions .plan-idea-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
}

.topbar-actions .topbar-bell-icon {
  width: 19px;
  height: 19px;
}

.topbar-filter-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M7 12h10'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M7 12h10'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: 18px 18px;
  -webkit-mask-size: 18px 18px;
}

#topbarFiltersBtn[aria-expanded="true"] {
  background: #edf8f2;
  color: #14905a;
}

.topbar-actions .topbar-notification-badge {
  display: none;
}

.topbar-actions .topbar-notification-badge:not(.hidden) {
  display: block;
}

.sms-page-shell {
  display: grid;
  gap: 18px;
}

.sms-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 128px;
  background:
    radial-gradient(circle at 10% 20%, rgba(88, 208, 143, 0.14), transparent 28%),
    #ffffff;
}

.sms-hero-panel h3 {
  margin: 6px 0;
  color: #102a3a;
  font-size: 28px;
}

.sms-hero-panel p {
  margin: 0;
  color: #718189;
  font-weight: 800;
}

.sms-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #e9f9f0;
  position: relative;
}

.sms-hero-icon::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: #194f73;
  mask: var(--cool-icon-message) center / contain no-repeat;
  -webkit-mask: var(--cool-icon-message) center / contain no-repeat;
}

.sms-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  align-items: start;
}

.sms-send-form .form-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sms-send-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #f4fbf7;
  color: #102a3a;
}

.sms-send-result strong,
.sms-send-result small {
  display: block;
}

.sms-send-result small {
  margin-top: 4px;
  color: #718189;
}

.sms-send-result pre {
  direction: ltr;
  text-align: left;
  max-height: 220px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  color: #194f73;
  font-size: 12px;
}

.sms-config-list {
  display: grid;
  gap: 10px;
}

.sms-config-list p {
  margin: 0;
  color: #718189;
  font-weight: 800;
  line-height: 1.8;
}

.sms-config-list code {
  direction: ltr;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8f7;
  color: #194f73;
  font-weight: 800;
}

@media (max-width: 900px) {
  .sms-grid,
  .sms-send-form .form-grid.two-col {
    grid-template-columns: 1fr;
  }
}

.topbar-actions .topbar-logout-btn:hover {
  background: #fff1f1;
  color: #c73535;
}

/* Keep account identity visible beside avatar */
.topbar-profile .topbar-user-copy {
  display: flex !important;
  flex: 0 0 132px;
  min-width: 132px;
  max-width: 160px;
  flex-direction: column;
  justify-content: center;
  margin-inline-start: 4px;
  margin-inline-end: 8px;
  direction: rtl;
  text-align: left;
  opacity: 1 !important;
  visibility: visible !important;
}

.topbar-profile .topbar-user-copy strong {
  display: block;
  color: #718189;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.topbar-profile .topbar-user-copy span {
  display: block;
  color: #9aa6ac;
  font-size: 10px;
  font-weight: 700;
}

/* Unified Coolicons sidebar icon style */
.sidebar .nav-item::before,
.sidebar .nav-group-toggle .nav-icon {
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.sidebar .nav-item::after,
.sidebar .nav-group-toggle .nav-icon::after {
  width: 19px;
  height: 19px;
  background: #194f73;
}

.sidebar .nav-item.active::before,
.sidebar .nav-item:hover::before,
.sidebar .nav-group-toggle:hover .nav-icon,
.sidebar .nav-group.active > .nav-group-toggle .nav-icon {
  border-color: #d9efe4;
  background: #edf8f2;
  box-shadow: none;
}

.sidebar .nav-item.active::after,
.sidebar .nav-item:hover::after,
.sidebar .nav-group-toggle:hover .nav-icon::after,
.sidebar .nav-group.active > .nav-group-toggle .nav-icon::after {
  background: #194f73;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item.active::before {
  border-color: #d9efe4;
  background: #edf8f2;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item.active::after {
  background: #194f73;
}

.nav-item[data-view="entryCampaign"] {
  --nav-mask: var(--cool-icon-plus);
}

.nav-item[data-view="entryStage"] {
  --nav-mask: var(--cool-icon-grid);
}

.nav-group[data-nav-group="entry"] {
  --group-mask: var(--cool-icon-plus);
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle .nav-icon::after {
  width: 20px;
  height: 20px;
}

/* White app background */
body,
.dashboard-screen,
.main-content,
.dashboard-screen[data-current-view="overview"],
.dashboard-screen[data-current-view="overview"] .main-content {
  background: #fff;
}

/* AdPlay image logo in sidebar */
.sidebar .sidebar-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-bottom: 18px;
  padding: 0;
}

.sidebar-logo-lockup {
  display: block;
  width: min(156px, 86%);
  max-height: 46px;
  object-fit: contain;
}

.sidebar-logo-only {
  display: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.sidebar .sidebar-brand-lockup .brand-mark,
.sidebar .sidebar-brand-lockup h1,
.sidebar .sidebar-brand-lockup p,
.sidebar .sidebar-brand-lockup > div {
  display: none;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-brand-lockup {
  min-height: 44px;
  margin-bottom: 18px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-logo-lockup {
  display: none;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .sidebar-logo-only {
  display: block;
}

@media (max-width: 1100px) {
  .topbar-user-copy {
    display: grid;
    min-width: 54px;
    max-width: 96px;
  }

  .topbar-profile {
    gap: 6px;
    padding-inline-end: 8px;
  }
}

/* Topbar filter popover */
.main-content {
  position: relative;
}

.topbar {
  overflow: visible;
}

.topbar-filter-popover {
  position: absolute;
  inset-block-start: 72px;
  inset-inline-start: 22px;
  z-index: 180;
  width: min(1040px, calc(100vw - 132px));
}

.topbar-filter-popover.hidden {
  display: none !important;
}

.topbar-filters-panel.filters-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(156px, 1fr)) minmax(132px, 0.65fr);
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 42, 58, 0.13);
}

.dashboard-screen[data-current-view="overview"] .topbar-filters-panel.filters-panel {
  display: grid;
}

.topbar-filters-panel.filters-panel::before {
  display: none;
}

.topbar-filters-panel.filters-panel label {
  min-width: 0;
}

.topbar-filters-panel.filters-panel .ghost-btn {
  min-height: 40px;
  margin: 0;
  white-space: nowrap;
}

.topbar-actions .icon-button .topbar-filter-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M7 12h10'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16'/%3E%3Cpath d='M7 12h10'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: 18px 18px;
  -webkit-mask-size: 18px 18px;
}

#topbarFiltersBtn[aria-expanded="true"] {
  background: #edf8f2;
  color: #14905a;
}

@media (max-width: 1180px) {
  .topbar-date-range-panel {
    grid-template-columns: 132px minmax(0, 1fr);
    width: min(720px, calc(100vw - 112px));
  }

  .topbar-range-months {
    gap: 14px;
  }

  .topbar-filter-popover {
    width: min(720px, calc(100vw - 112px));
  }

  .topbar-filters-panel.filters-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-title-block {
    justify-items: stretch;
    width: 100%;
  }

  .topbar-date-range-panel {
    position: fixed;
    inset-block-start: 72px;
    inset-inline: 12px;
    grid-template-columns: 1fr;
    width: auto;
    max-height: calc(100vh - 96px);
    overflow: auto;
  }

  .topbar-range-presets {
    display: flex;
    overflow-x: auto;
    border-inline-start: 0;
    border-bottom: 1px solid #edf1f3;
  }

  .topbar-range-presets button {
    min-width: max-content;
    padding: 0 12px;
  }

  .topbar-range-months {
    grid-template-columns: 1fr;
  }

  .topbar-range-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-range-footer > div {
    justify-content: stretch;
  }

  .topbar-range-footer button {
    flex: 1;
  }

  .topbar-filter-popover {
    position: fixed;
    inset-block-start: 72px;
    inset-inline: 12px;
    width: auto;
  }

  .topbar-filters-panel.filters-panel {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 96px);
    overflow: auto;
  }
}

/* Final sidebar icon color pass */
.sidebar .nav-item::after,
.sidebar .nav-group-toggle .nav-icon::after,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle .nav-icon::after,
.sidebar .nav-item.active::after,
.sidebar .nav-item:hover::after,
.sidebar .nav-group-toggle:hover .nav-icon::after,
.sidebar .nav-group.active > .nav-group-toggle .nav-icon::after {
  background: #194f73 !important;
}

.sidebar .nav-item::after,
.sidebar .nav-group-toggle .nav-icon::after {
  width: 19px !important;
  height: 19px !important;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle .nav-icon::after {
  width: 20px !important;
  height: 20px !important;
}

/* Final sidebar icon geometry pass */
.sidebar .nav-item {
  isolation: isolate;
}

.sidebar .nav-item::before,
.sidebar .nav-group-toggle .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  min-width: 34px;
}

.sidebar .nav-item::after {
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
}

[dir="rtl"] .sidebar .nav-item::after {
  transform: translateY(-50%);
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::before,
.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-toggle .nav-icon {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  min-width: 42px;
  border-radius: 12px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-items .nav-item::before {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  min-width: 34px;
}

.dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after {
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

[dir="rtl"] .dashboard-screen.sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-item::after {
  transform: translate(50%, -50%);
}

/* Super admin database tools */
.database-page {
  display: grid;
  gap: 18px;
}

.database-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 118px;
}

.database-hero h3 {
  margin: 4px 0 8px;
  color: #102a3a;
  font-size: 1.35rem;
}

.database-hero p,
.database-card p {
  margin: 0;
  color: #6f8188;
  line-height: 1.9;
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.database-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.database-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.database-export-actions .primary-btn,
.database-export-actions .secondary-btn {
  flex: 1 1 180px;
}

.database-download-link-wrap {
  min-height: 0;
}

.database-download-pill {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #e8f8f1;
  color: #194f73;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(88, 208, 143, 0.28);
}

.database-download-pill:hover {
  background: #dff5ec;
}

.database-download-pill span {
  color: #14905a;
  font-size: 0.82rem;
  font-weight: 800;
}

.database-download-pill strong {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-download-pill small {
  color: #6f8188;
  font-size: 0.76rem;
  font-weight: 700;
}

.database-import-card .warning-copy {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7e8;
  color: #9a5b00;
}

.database-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.database-status-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #f7faf9;
  box-shadow: inset 0 0 0 1px rgba(220, 232, 226, 0.72);
}

.database-status-item span {
  color: #74868d;
  font-weight: 800;
}

.database-status-item strong {
  color: #194f73;
  font-size: 1.15rem;
}

.form-hint {
  min-height: 20px;
  color: #14905a;
  font-weight: 800;
}

@media (max-width: 980px) {
  .database-grid,
  .database-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .database-hero,
  .database-grid,
  .database-status-grid {
    grid-template-columns: 1fr;
  }

  .database-hero {
    align-items: stretch;
  }
}

/* End-of-file dark sweep: keep late page-specific skins from leaking light UI. */
html.dark,
body.dark,
body.dark .app-shell,
body.dark .dashboard-screen,
body.dark .main-content,
body.dark .dashboard-screen[data-current-view="overview"],
body.dark .dashboard-screen[data-current-view="overview"] .main-content {
  background: #0d1419;
  color: #eef7f4;
}

.dark .topbar,
.dark .dashboard-screen[data-current-view="overview"] .topbar {
  border-color: #2a3a42;
  background: #0f171c;
  box-shadow: none;
}

.dark .sidebar,
.dark .dashboard-screen.sidebar-collapsed .sidebar,
.dark .dashboard-screen.sidebar-collapsed .sidebar:hover,
.dark .dashboard-screen.sidebar-collapsed .sidebar:focus-within {
  border-color: #263740;
  background: #10171c;
}

.dark .filters-panel,
.dark .kpi-card,
.dark .overview-kpi-grid .kpi-card,
.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
.dark .dashboard-screen[data-current-view="overview"] .panel,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel .table-wrap,
.dark .panel,
.dark .modal,
.dark .detail-grid article,
.dark .plan-stage-grid article,
.dark .zaya-summary article,
.dark .status-list article,
.dark .mini-kpi-row,
.dark .mini-kpi-row article,
.dark .wallet-snapshot-panel article,
.dark .table-wrap,
.dark .nested-panel,
.dark .user-tabs-panel,
.dark .stage-created-card,
.dark .stage-loading-panel,
.dark .database-hero,
.dark .database-card,
.dark .database-status-item {
  border-color: #2a3a42;
  background: #161f25;
  box-shadow: none;
  color: #eef7f4;
}

.dark input,
.dark select,
.dark textarea,
.dark .filters-panel input,
.dark .filters-panel select,
.dark .filter-combobox input,
.dark .filter-options,
.dark .filter-combobox button[aria-label],
.dark .filter-add-btn,
.dark .field-shortcut-btn,
.dark .chart-period-select,
.dark .stage-choice-grid,
.dark .stage-asset-preview,
.dark .campaign-review-offer,
.dark .campaign-review-offer-head .checkbox-label,
.dark .campaign-offer-preview-table,
.dark #campaignEditForm > label,
.dark #campaignEditForm fieldset,
.dark #campaignEditForm .action-block {
  border-color: #2a3a42;
  background: #111a20;
  color: #eef7f4;
}

.dark input[type="checkbox"],
.dark input[type="radio"] {
  background-color: #111a20;
  accent-color: #58d08f;
}

.dark .stage-object-form input,
.dark .stage-object-form select,
.dark .stage-object-form textarea,
.dark .stage-base-url-field input,
.dark .stage-token-input input,
.dark .stage-choice-grid .checkbox-label {
  border-color: #2a3a42;
  background: #111a20;
  color: #eef7f4;
}

.dark .stage-object-tabs button:hover,
.dark .stage-object-tabs button.active {
  background: #132a23;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #73878e;
}

.dark .topbar h2,
.dark .section-head h3,
.dark .panel h3,
.dark .panel h4,
.dark .modal h3,
.dark .modal h4,
.dark .kpi-card strong,
.dark .mini-kpi-row strong,
.dark .wallet-snapshot-panel strong,
.dark .status-list strong,
.dark .database-hero h3,
.dark .database-card h3,
.dark .database-status-item strong,
.dark label,
.dark td,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  color: #eef7f4;
}

.dark .eyebrow,
.dark .section-head span,
.dark .kpi-card span,
.dark .kpi-card small,
.dark .detail-grid span,
.dark .zaya-summary span,
.dark .status-list span,
.dark .mini-kpi-row span,
.dark .mini-kpi-row small,
.dark .wallet-snapshot-panel span,
.dark .wallet-snapshot-panel small,
.dark .database-hero p,
.dark .database-card p,
.dark .database-status-item span,
.dark .empty-cell,
.dark th,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th {
  color: #9badb3;
}

.dark table,
.dark th,
.dark td,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  border-color: #2a3a42;
}

.dark th,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th {
  background: #111a20;
}

.dark td,
.dark tbody tr,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  background: #161f25;
}

.dark tbody tr:hover,
.dark tbody tr:hover td,
.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel tr:hover td {
  background: #1b2931;
}

.dark .secondary-btn,
.dark .table-btn,
.dark .ghost-btn {
  border-color: #2a3a42;
  background: #132a23;
  color: #9ee8bd;
}

.dark .secondary-btn:hover,
.dark .table-btn:hover,
.dark .ghost-btn:hover {
  background: #18352b;
  color: #c9f7dc;
}

.dark .nav-group-toggle,
.dark .nav-item,
.dark .nav-group-items .nav-item {
  color: #a9bcc2;
}

.dark .nav-item.active,
.dark .nav-item:hover,
.dark .nav-group.active > .nav-group-toggle,
.dark .nav-group-toggle:hover {
  background: rgba(88, 208, 143, 0.16);
  color: #f3fbf8;
}

.dark .nav-item::before,
.dark .nav-icon {
  border-color: rgba(88, 208, 143, 0.16);
  background: rgba(88, 208, 143, 0.08);
}

.dark .dashboard-hero,
.dark .plan-hero {
  border-color: #2a3a42;
  background: linear-gradient(135deg, #15252d, #12261f);
}

.dark .dashboard-hero h3,
.dark .dashboard-hero span,
.dark .dashboard-hero p,
.dark .plan-hero h3,
.dark .plan-hero span,
.dark .plan-hero p {
  color: #eef7f4;
}

.dark .stacked-legend,
.dark .stacked-track,
.dark .bar-row div,
.dark .zaya-chart-row div,
.dark .zaya-breakdown-row div {
  background:
    repeating-linear-gradient(to left, rgba(88, 208, 143, 0.12) 0, rgba(88, 208, 143, 0.12) 1px, transparent 1px, transparent 9%),
    #111a20;
}

.dark .chart-tooltip div {
  border-color: #2a3a42;
  background: rgba(17, 26, 32, 0.98);
  color: #eef7f4;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.dark .database-import-card .warning-copy {
  background: rgba(154, 101, 11, 0.22);
  color: #f2c46d;
}

body.dark .dashboard-screen[data-current-view="overview"],
body.dark .dashboard-screen[data-current-view="overview"] .main-content,
body.dark .dashboard-screen[data-current-view="overview"] .overview-dashboard {
  background: #0d1419;
  color: #eef7f4;
}

body.dark .dashboard-screen[data-current-view="overview"] .topbar {
  border-bottom-color: #2a3a42;
  background: #0f171c;
  box-shadow: none;
}

body.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid .panel,
body.dark .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel article,
body.dark .dashboard-screen[data-current-view="overview"] .mini-kpi-row,
body.dark .dashboard-screen[data-current-view="overview"] .mini-kpi-row article,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel .table-wrap {
  border-color: #2a3a42;
  background: #161f25;
  box-shadow: none;
  color: #eef7f4;
}

body.dark .dashboard-screen[data-current-view="overview"] .topbar h2,
body.dark .dashboard-screen[data-current-view="overview"] .section-head h3,
body.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card strong,
body.dark .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel strong,
body.dark .dashboard-screen[data-current-view="overview"] .mini-kpi-row strong,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  color: #eef7f4;
}

body.dark .dashboard-screen[data-current-view="overview"] .eyebrow,
body.dark .dashboard-screen[data-current-view="overview"] .section-head span,
body.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card span,
body.dark .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card small,
body.dark .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel span,
body.dark .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel small,
body.dark .dashboard-screen[data-current-view="overview"] .mini-kpi-row span,
body.dark .dashboard-screen[data-current-view="overview"] .mini-kpi-row small,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th,
body.dark .dashboard-screen[data-current-view="overview"] .empty-cell {
  color: #9badb3;
}

body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel table,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th,
body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  border-color: #2a3a42;
}

body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel th {
  background: #111a20;
}

body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel td {
  background: #161f25;
}

body.dark .dashboard-screen[data-current-view="overview"] .dashboard-table-panel tr:hover td {
  background: #1b2931;
}

body.dark .dashboard-screen[data-current-view="overview"] .chart-period-select {
  border-color: #2a3a42;
  background: #111a20;
  color: #eef7f4;
}

body.dark .stage-status {
  border-color: #2a3a42;
  background: #111a20;
  color: #c4d3d7;
}

body.dark .stage-objects-head {
  border-bottom-color: #2a3a42;
}

body.dark .stage-endpoint-strip,
body.dark .stage-object-form {
  border-color: #2a3a42;
  background: #131d23;
}

body.dark .stage-current-head h4 {
  color: #eef7f4;
}

body.dark .stage-record-count {
  border-color: #2a3a42;
  background: #111a20;
  color: #c4d3d7;
}

body.dark .stage-status[data-tone="success"] {
  color: #9ee8bd;
}

body.dark .stage-status[data-tone="error"] {
  color: #ff9b9b;
}

body.dark .stage-spinner,
body.dark .stage-result.is-loading::before,
body.dark .stage-card-status.is-loading::before {
  border-color: #2f4650;
  border-top-color: #58d08f;
}

body.dark .stage-loading-panel {
  border-color: #2a3a42;
  background: #131d23;
  color: #9badb3;
}

body.dark .stage-loading-panel strong {
  color: #eef7f4;
}

body.dark .stage-loading-panel small {
  color: #9badb3;
}

body.dark .stage-skeleton-form span,
body.dark .stage-skeleton-list span {
  background: linear-gradient(90deg, #111a20 0%, #20323a 45%, #111a20 100%);
  background-size: 220% 100%;
}

body.dark .stage-object-tabs button {
  border-color: transparent;
  background: transparent;
  color: #c4d3d7;
}

body.dark .stage-object-tabs {
  border-color: #2a3a42;
  background: #111a20;
}

body.dark .stage-object-tabs button.active {
  border-color: #58d08f;
  background: #132a23;
  color: #9ee8bd;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
}

body.dark .stage-object-tabs button:hover {
  background: #18352b;
  color: #c9f7dc;
}

body.dark .stage-object-tabs small {
  background: #18352b;
  color: #9ee8bd;
}

body.dark .stage-choice-grid .checkbox-label,
body.dark .stage-token-input .secondary-btn,
body.dark .stage-active-field {
  border-color: #2a3a42;
  background: #111a20;
  color: #eef7f4;
}

html.dark .stage-status,
.dark .stage-status,
body.dark .stage-status {
  border-color: #2a3a42;
  background: #111a20;
  color: #c4d3d7;
}

html.dark .stage-status[data-tone="success"],
.dark .stage-status[data-tone="success"],
body.dark .stage-status[data-tone="success"] {
  color: #9ee8bd;
}

html.dark .stage-object-tabs button,
.dark .stage-object-tabs button,
body.dark .stage-object-tabs button {
  border-color: transparent;
  background: transparent;
  color: #c4d3d7;
}

html.dark .stage-object-tabs,
.dark .stage-object-tabs,
body.dark .stage-object-tabs {
  border-color: #2a3a42;
  background: #111a20;
}

html.dark .stage-object-tabs button.active,
.dark .stage-object-tabs button.active,
body.dark .stage-object-tabs button.active {
  border-color: #58d08f;
  background: #132a23;
  color: #9ee8bd;
}

html.dark .stage-object-tabs small,
.dark .stage-object-tabs small,
body.dark .stage-object-tabs small {
  background: #18352b;
  color: #9ee8bd;
}

html.dark .stage-endpoint-strip,
.dark .stage-endpoint-strip,
body.dark .stage-endpoint-strip,
html.dark .stage-object-form,
.dark .stage-object-form,
body.dark .stage-object-form {
  border-color: #2a3a42;
  background: #131d23;
}

html.dark .stage-current-head h4,
.dark .stage-current-head h4,
body.dark .stage-current-head h4 {
  color: #eef7f4;
}

html.dark .stage-record-count,
.dark .stage-record-count,
body.dark .stage-record-count {
  border-color: #2a3a42;
  background: #111a20;
  color: #c4d3d7;
}

html.dark .stage-choice-grid,
.dark .stage-choice-grid,
body.dark .stage-choice-grid,
html.dark .stage-choice-grid .checkbox-label,
.dark .stage-choice-grid .checkbox-label,
body.dark .stage-choice-grid .checkbox-label {
  border-color: #2a3a42;
  background: #111a20;
  color: #eef7f4;
}

html.dark .stage-choice-grid .checkbox-label input[type="checkbox"],
.dark .stage-choice-grid .checkbox-label input[type="checkbox"],
body.dark .stage-choice-grid .checkbox-label input[type="checkbox"] {
  background-color: #111a20;
  accent-color: #58d08f;
}

html.dark .stage-created-list .section-head,
.dark .stage-created-list .section-head,
body.dark .stage-created-list .section-head {
  border-top-color: #2a3a42;
}

html.dark .stage-created-card,
.dark .stage-created-card,
body.dark .stage-created-card {
  border-color: #2a3a42;
  background: #111a20;
}

html.dark .stage-created-card summary,
.dark .stage-created-card summary,
body.dark .stage-created-card summary {
  background: #131d23;
}

html.dark .stage-created-card summary strong,
.dark .stage-created-card summary strong,
body.dark .stage-created-card summary strong {
  color: #eef7f4;
}

html.dark .stage-created-card summary span,
.dark .stage-created-card summary span,
body.dark .stage-created-card summary span {
  color: #b8c9ce;
}

html.dark .stage-created-card[open] summary,
.dark .stage-created-card[open] summary,
body.dark .stage-created-card[open] summary {
  border-bottom: 1px solid #2a3a42;
}

html.dark .stage-created-card .table-wrap,
.dark .stage-created-card .table-wrap,
body.dark .stage-created-card .table-wrap {
  background: #111a20;
}

html.dark .stage-created-card table,
.dark .stage-created-card table,
body.dark .stage-created-card table,
html.dark .stage-created-card th,
.dark .stage-created-card th,
body.dark .stage-created-card th,
html.dark .stage-created-card td,
.dark .stage-created-card td,
body.dark .stage-created-card td {
  border-color: #2a3a42;
}

html.dark .stage-created-card th,
.dark .stage-created-card th,
body.dark .stage-created-card th {
  background: #0f171c;
  color: #b8c9ce;
}

html.dark .stage-created-card td,
.dark .stage-created-card td,
body.dark .stage-created-card td {
  background: #111a20;
  color: #eef7f4;
}

html.dark .stage-created-actions,
.dark .stage-created-actions,
body.dark .stage-created-actions {
  background: #111a20;
}

html.dark .stage-admin-link,
.dark .stage-admin-link,
body.dark .stage-admin-link {
  color: #9ee8bd;
}

html.dark .stage-card-status,
.dark .stage-card-status,
body.dark .stage-card-status {
  color: #b8c9ce;
}
/* Overview responsive rhythm: remove orphan KPI rows and tighten empty space */
.dashboard-screen[data-current-view="overview"] .main-content {
  padding: 0 clamp(14px, 1.25vw, 24px) clamp(16px, 1.4vw, 26px);
  gap: 14px;
}

.dashboard-screen[data-current-view="overview"] .topbar {
  margin-inline: calc(clamp(14px, 1.25vw, 24px) * -1);
  min-height: 58px;
  padding-inline: clamp(16px, 1.6vw, 28px);
}

.dashboard-screen[data-current-view="overview"] .overview-dashboard {
  gap: clamp(12px, 1.05vw, 18px);
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(136px, 1fr));
  gap: clamp(12px, 1vw, 18px);
  align-items: stretch;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
  min-width: 0;
  min-height: 150px;
  padding: 18px 20px 16px;
  align-content: stretch;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card strong {
  width: 100%;
  align-self: center;
  overflow: visible;
  overflow-wrap: normal;
  color: #102a3a !important;
  font-size: clamp(18px, 1.22vw, 25px) !important;
  font-weight: 950 !important;
  line-height: 1.08;
  margin: 4px 0 0;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card .kpi-money-number {
  color: #102a3a !important;
  font-size: 1em !important;
  font-weight: 950 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-money-currency {
  color: #102a3a !important;
  font-size: 0.62em !important;
  font-weight: 950 !important;
  line-height: 1.1;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card small {
  align-self: end;
  margin-top: 0;
  min-height: 18px;
  font-size: 11px;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
  grid-template-columns: minmax(270px, 0.9fr) minmax(520px, 1.8fr) minmax(290px, 0.95fr);
  gap: clamp(12px, 1vw, 18px);
  align-items: stretch;
}

.dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid .panel {
  min-height: 0;
  padding: clamp(14px, 1.1vw, 18px);
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .section-head,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .section-head,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .section-head,
.dashboard-screen[data-current-view="overview"] .campaign-status-panel .section-head {
  margin-bottom: 8px;
}

.dashboard-screen[data-current-view="overview"] .line-chart {
  min-height: clamp(200px, 16vw, 270px);
  max-height: none;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel:not(.unused-credit-panel) {
  gap: 12px;
}

.dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel:not(.unused-credit-panel) article {
  min-height: 110px;
}

.dashboard-screen[data-current-view="overview"] .campaign-status-panel {
  overflow: hidden;
}

.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel {
  overflow: hidden;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel {
  display: block;
  overflow: hidden;
  align-content: start;
  gap: 10px;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .invoice-donut-layout,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .invoice-donut-layout,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .empty-games-donut-layout,
.dashboard-screen[data-current-view="overview"] .campaign-status-panel .donut-layout {
  margin-bottom: 10px;
  min-height: 178px;
  align-items: center;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .donut-chart svg,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .donut-chart svg,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .donut-chart svg,
.dashboard-screen[data-current-view="overview"] .campaign-status-panel .donut-chart svg {
  width: 142px;
  height: 142px;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .dashboard-summary-list,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .dashboard-summary-list,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .dashboard-summary-list,
.dashboard-screen[data-current-view="overview"] .campaign-status-panel .dashboard-summary-list {
  margin-top: 0;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .invoice-donut-layout {
  margin-top: 0;
}

.dashboard-screen[data-current-view="overview"] .empty-games-panel .empty-games-donut-layout {
  margin-bottom: 14px;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .donut-chart svg,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .donut-chart svg,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .donut-chart svg {
  filter: drop-shadow(0 10px 18px rgba(25, 79, 115, 0.08));
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .invoice-donut-legend,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .invoice-donut-legend,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .empty-games-legend {
  max-height: 190px;
  overflow: auto;
  padding-inline-end: 4px;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .invoice-donut-legend li,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .invoice-donut-legend li,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .empty-games-legend li {
  min-width: 0;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .invoice-donut-legend span,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .invoice-donut-legend span,
.dashboard-screen[data-current-view="overview"] .empty-games-panel .empty-games-legend span {
  display: block;
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .dashboard-summary-list {
  margin-top: 0;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .running-campaigns-title span {
  color: #102a3a;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .running-campaigns-title strong,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .running-campaigns-title strong {
  background: #edf8f8;
  color: #1f6f8b;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .running-campaigns-title strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  width: auto;
  height: 24px;
  padding-inline: 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .dashboard-summary-list li span {
  max-width: 58%;
  color: #102a3a;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .dashboard-summary-list small,
.dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel .dashboard-summary-list small {
  color: #6f7f87;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-screen[data-current-view="overview"] .unused-credit-panel .dashboard-summary-list li {
  min-height: 0;
  padding: 8px 0 0;
  background: transparent;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.dashboard-screen[data-current-view="overview"] .donut-segment-action,
.dashboard-screen[data-current-view="overview"] .donut-legend [data-campaign-status-filter],
.dashboard-screen[data-current-view="overview"] .dashboard-summary-list[data-campaign-status-more],
.dashboard-screen[data-current-view="overview"] .dashboard-summary-more {
  cursor: pointer;
}

.wallet-debt-game {
  display: inline-block;
  margin-inline: 2px;
  color: #194f73;
  font-weight: 800;
  cursor: help;
}

.wallet-debt-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.wallet-debt-summary-row article {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #d9e6e3;
  border-radius: 8px;
  background: #edf8f3;
}

.wallet-debt-summary-row span {
  color: #61747c;
  font-size: 12px;
  font-weight: 800;
}

.wallet-debt-summary-row strong {
  color: #102a3a;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 900;
}

.wallet-debt-modal .table-wrap {
  max-height: min(62vh, 680px);
  overflow: auto;
}

.wallet-debt-modal thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 0 1px 0 #dbe7e4;
}

.no-bank-invoices-modal .table-wrap,
.running-campaign-modal .table-wrap {
  max-height: min(62vh, 680px);
  overflow: auto;
  padding-left: 34px;
  scrollbar-gutter: stable both-edges;
}

.no-bank-invoices-modal thead th,
.running-campaign-modal thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 0 1px 0 #dbe7e4;
}

.no-bank-invoices-modal table,
.running-campaign-modal table {
  min-width: 1180px;
}

.running-campaign-modal table {
  min-width: 1240px;
  table-layout: auto;
}

.running-campaign-modal th:last-child,
.running-campaign-modal td:last-child {
  position: sticky;
  left: 30px;
  z-index: 2;
  width: 292px;
  min-width: 292px;
  background: #fff;
  box-shadow: -1px 0 0 #dbe7e4;
}

.running-campaign-modal thead th:last-child {
  z-index: 4;
}

.running-campaign-modal .icon-table-btn,
.running-campaign-modal .table-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
}

.no-bank-invoices-modal td,
.no-bank-invoices-modal th,
.running-campaign-modal td,
.running-campaign-modal th {
  white-space: normal;
}

.pending-approval-modal .table-wrap {
  max-height: none !important;
  overflow: visible !important;
}

.pending-approval-modal thead th {
  position: static;
  box-shadow: none;
}

.pending-approval-modal table {
  min-width: 1040px;
}

.pending-approval-modal th:last-child,
.pending-approval-modal td:last-child {
  position: static;
  width: auto;
  min-width: 220px;
  background: transparent;
  box-shadow: none;
}

.pending-approval-modal .table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.pending-approval-modal .table-btn {
  width: auto;
  min-width: max-content;
  height: 36px;
  padding: 0 12px;
}

.pending-approval-modal .approval-tooltip {
  max-height: min(260px, calc(100vh - 32px));
  padding: 8px;
  border-radius: 10px;
}

.modal:has(.wallet-debt-modal) .table-note-preview:hover::after {
  content: none;
  display: none;
}

.wallet-debt-tooltip {
  position: fixed;
  z-index: 10000;
  min-width: 180px;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid #d9e6e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 42, 58, 0.14);
  color: #102a3a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  text-align: right;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.wallet-debt-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1281px) {
  .dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel {
    grid-column: 4;
    grid-row: 1;
  }

  .dashboard-screen[data-current-view="overview"] .revenue-line-panel {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  .dashboard-screen[data-current-view="overview"] .overview-performance-panel {
    grid-column: 3 / span 2;
    grid-row: 2;
  }

  .dashboard-screen[data-current-view="overview"] .account-manager-overview-analytics .overview-performance-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dashboard-screen[data-current-view="overview"] .game-overview-analytics .revenue-line-panel {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  .dashboard-screen[data-current-view="overview"] .game-overview-analytics .overview-performance-panel {
    grid-column: 3 / span 2;
    grid-row: 1;
  }

  .dashboard-screen[data-current-view="overview"] .campaign-status-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-screen[data-current-view="overview"] .empty-games-panel {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-screen[data-current-view="overview"] .no-bank-invoices-panel {
    grid-column: 3;
    grid-row: 1;
  }
}

.dashboard-screen[data-current-view="overview"] .dashboard-list-panel {
  overflow: hidden;
}

.dashboard-screen[data-current-view="overview"] .dashboard-summary-list {
  margin-top: 0;
}

@media (max-width: 1280px) {
  .dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
  }

  .dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  }

  .dashboard-screen[data-current-view="overview"] .revenue-line-panel {
    grid-column: 1 / -1;
    order: initial;
  }

  .dashboard-screen[data-current-view="overview"] .overview-performance-panel {
    grid-column: 1 / -1;
  }

  .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-screen[data-current-view="overview"] .wallet-charge-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-screen[data-current-view="overview"] .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-screen[data-current-view="overview"] .main-content {
    padding-inline: 12px;
  }

  .dashboard-screen[data-current-view="overview"] .topbar {
    margin-inline: -12px;
  }

  .dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
    min-height: 120px;
    padding: 14px;
  }

  .dashboard-screen[data-current-view="overview"] .wallet-snapshot-panel,
  .dashboard-screen[data-current-view="overview"] .mini-kpi-row {
    grid-template-columns: 1fr;
  }

  .dashboard-screen[data-current-view="overview"] .mini-kpi-row article {
    border-left: 0;
    border-bottom: 1px solid #e8eef0;
  }

  .dashboard-screen[data-current-view="overview"] .mini-kpi-row article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 480px) {
  .dashboard-screen[data-current-view="overview"] .overview-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Final unified KPI typography pass */
.dashboard-screen .kpi-grid .kpi-card strong,
.dashboard-screen .asset-kpi-grid .kpi-card strong,
.dashboard-screen .wallet-kpi-grid .kpi-card strong,
.dashboard-screen .game-kpi-grid .kpi-card strong,
.dashboard-screen .commission-kpi-grid .kpi-card strong,
.dashboard-screen .sales-kpi-grid .kpi-card strong {
  width: 100%;
  align-self: center;
  justify-items: center;
  margin: 4px 0 0;
  color: #102a3a !important;
  font-size: clamp(18px, 1.22vw, 25px) !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  text-align: center;
}

.dashboard-screen .kpi-grid .kpi-card .kpi-money-number,
.dashboard-screen .asset-kpi-grid .kpi-card .kpi-money-number,
.dashboard-screen .wallet-kpi-grid .kpi-card .kpi-money-number,
.dashboard-screen .game-kpi-grid .kpi-card .kpi-money-number,
.dashboard-screen .commission-kpi-grid .kpi-card .kpi-money-number,
.dashboard-screen .sales-kpi-grid .kpi-card .kpi-money-number {
  color: #102a3a !important;
  font-size: 1em !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
}

.dashboard-screen .kpi-grid .kpi-card .kpi-money-currency,
.dashboard-screen .asset-kpi-grid .kpi-card .kpi-money-currency,
.dashboard-screen .wallet-kpi-grid .kpi-card .kpi-money-currency,
.dashboard-screen .game-kpi-grid .kpi-card .kpi-money-currency,
.dashboard-screen .commission-kpi-grid .kpi-card .kpi-money-currency,
.dashboard-screen .sales-kpi-grid .kpi-card .kpi-money-currency {
  color: #102a3a !important;
  font-size: 0.62em !important;
  font-weight: 950 !important;
  line-height: 1.12 !important;
  opacity: 1 !important;
}

/* Final KPI badge icon polish */
.dashboard-screen .kpi-card::before {
  content: "" !important;
  position: absolute !important;
  top: 22px !important;
  right: 22px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--kpi-bg, #eef7f6) 88%, #fff 12%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.dashboard-screen .kpi-card::after {
  content: "" !important;
  position: absolute !important;
  top: 35px !important;
  right: 35px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: 18px !important;
  height: 18px !important;
  background: var(--kpi-color, var(--finebank-teal)) !important;
  color: transparent !important;
  font-size: 0 !important;
  mask: var(--kpi-mask, var(--cool-icon-wallet)) center / contain no-repeat !important;
  -webkit-mask: var(--kpi-mask, var(--cool-icon-wallet)) center / contain no-repeat !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card {
  display: grid !important;
  grid-template-rows: 34px 1fr auto !important;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  min-height: 168px !important;
  padding: 18px 18px 16px !important;
  overflow: hidden;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card::before {
  top: 22px !important;
  right: auto !important;
  left: 22px !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card::after {
  top: 35px !important;
  right: auto !important;
  left: 35px !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card span {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  display: block !important;
  width: 100%;
  min-height: 0;
  max-width: none !important;
  padding-left: 58px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  line-height: 1.35 !important;
  text-align: right !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card strong {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: 100%;
  padding: 0 !important;
  margin: 8px 0 0 !important;
  overflow: visible !important;
  text-align: center !important;
}

.dashboard-screen[data-current-view="overview"] .overview-kpi-grid .kpi-card small {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  position: static !important;
  justify-content: center !important;
  width: 100% !important;
}

.dashboard-screen .kpi-card .trend-down,
.dashboard-screen .overview-kpi-grid .trend-down {
  color: #dc2626 !important;
}

.dashboard-screen .kpi-card .trend-up,
.dashboard-screen .overview-kpi-grid .trend-up {
  color: #14905a !important;
}

.dashboard-screen .kpi-tone-1 { --kpi-mask: var(--cool-icon-chart); --kpi-bg: #e7f8f5; --kpi-color: #168f85; }
.dashboard-screen .kpi-tone-2 { --kpi-mask: var(--cool-icon-wallet); --kpi-bg: #edf5ff; --kpi-color: #194f73; }
.dashboard-screen .kpi-tone-3 { --kpi-mask: var(--cool-icon-download); --kpi-bg: #eef7f6; --kpi-color: #2fa39a; }
.dashboard-screen .kpi-tone-4 { --kpi-mask: var(--cool-icon-doc); --kpi-bg: #fff6df; --kpi-color: #d89232; }
.dashboard-screen .kpi-tone-5 { --kpi-mask: var(--cool-icon-percent); --kpi-bg: #eef1ff; --kpi-color: #8764b8; }
.dashboard-screen .kpi-tone-6 { --kpi-mask: var(--cool-icon-grid); --kpi-bg: #eaf8fb; --kpi-color: #4aa3df; }
.dashboard-screen .kpi-tone-7 { --kpi-mask: var(--cool-icon-percent); --kpi-bg: #ecf8ef; --kpi-color: #55a868; }
.dashboard-screen .kpi-tone-8 { --kpi-mask: var(--cool-icon-settings); --kpi-bg: #fff0ec; --kpi-color: #f47c5c; }

.campaign-report-panel {
  display: grid;
  gap: 16px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.campaign-report-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.campaign-report-controls label,
.campaign-report-options label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.campaign-report-controls select {
  width: 100%;
}

.campaign-report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.campaign-report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-report-options label {
  grid-auto-flow: column;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
}

.campaign-report-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.campaign-report-summary article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.campaign-report-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.campaign-report-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.campaign-report-table td {
  vertical-align: top;
  white-space: nowrap;
}

.campaign-report-detail-modal {
  display: grid;
  gap: 14px;
  min-width: min(1120px, 92vw);
}

.campaign-report-real-modal {
  background: #101a20;
}

.campaign-report-real-modal .modal-body {
  display: grid;
  gap: 14px;
}

.campaign-report-detail-modal .section-head {
  align-items: center;
  padding-bottom: 4px;
}

.campaign-report-detail-modal .section-head h3 {
  color: #f4faf8;
}

.campaign-report-detail-modal .section-head span {
  color: #9eb2ba;
  font-weight: 800;
}

.campaign-report-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  background: rgba(14, 116, 144, 0.16);
  color: #a5f3fc;
  font-size: 0.86rem;
  font-weight: 800;
}

.campaign-report-detail-toolbar {
  display: flex;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(6, 15, 19, 0.38);
}

.campaign-report-detail-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: 0.85rem;
}

.campaign-report-line-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.18);
  color: #111827;
  direction: ltr;
  text-align: left;
}

.campaign-report-line-head {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
}

.campaign-report-line-head h4 {
  margin: 0;
  color: #123047;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: left;
}

.campaign-report-line-head label {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  color: #123047;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.campaign-report-line-head select {
  min-width: 128px;
  border-color: #d2d6dc;
  background: #f8fafc;
  color: #111827;
}

.campaign-report-line-wrap {
  min-height: 250px;
  overflow-x: auto;
}

.campaign-report-line-wrap svg {
  display: block;
  width: 100%;
  min-width: 820px;
  height: auto;
}

.campaign-report-grid-line {
  stroke: #e8edf4;
  stroke-dasharray: 2 5;
  stroke-width: 1;
}

.campaign-report-axis {
  stroke: #d7dce3;
  stroke-width: 1;
}

.campaign-report-x-label,
.campaign-report-y-label {
  fill: #5c6470;
  font-size: 12px;
  direction: ltr;
}

.campaign-report-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campaign-report-line-clicks {
  stroke: #e5252a;
}

.campaign-report-line-cost {
  stroke: #1ed760;
  stroke-dasharray: 7 8;
}

.campaign-report-line-avg {
  stroke: #8a2be2;
}

.campaign-report-dot-clicks {
  fill: #e5252a;
}

.campaign-report-dot-cost {
  fill: #1ed760;
}

.campaign-report-dot-avgCost {
  fill: #8a2be2;
}

.campaign-report-hover-point {
  cursor: crosshair;
}

.campaign-report-hover-hit {
  fill: transparent;
  pointer-events: all;
}

.campaign-report-hover-guide,
.campaign-report-hover-ring,
.campaign-report-tooltip {
  opacity: 0;
  transition: opacity 120ms ease;
}

.campaign-report-hover-guide {
  stroke: rgba(11, 47, 134, 0.18);
  stroke-dasharray: 4 6;
  stroke-width: 1;
}

.campaign-report-hover-ring {
  fill: #fff;
  stroke-width: 3;
}

.campaign-report-hover-ring-clicks {
  stroke: #e5252a;
}

.campaign-report-hover-ring-cost {
  stroke: #1ed760;
}

.campaign-report-hover-ring-avg {
  stroke: #8a2be2;
}

.campaign-report-tooltip {
  pointer-events: none;
}

.campaign-report-tooltip rect:first-child {
  fill: #fff;
  stroke: #dbe4f0;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.16));
}

.campaign-report-tooltip path {
  fill: #fff;
  stroke: #dbe4f0;
  stroke-width: 1;
}

.campaign-report-tooltip text {
  fill: #4b5563;
  font-size: 12px;
  direction: ltr;
  text-anchor: start;
}

.campaign-report-tooltip .campaign-report-tooltip-date {
  fill: #111827;
  font-weight: 800;
}

.campaign-report-tooltip-swatch.swatch-clicks {
  fill: #e5252a;
}

.campaign-report-tooltip-swatch.swatch-cost {
  fill: #1ed760;
}

.campaign-report-tooltip-swatch.swatch-avg {
  fill: #8a2be2;
}

.campaign-report-hover-point:hover .campaign-report-hover-guide,
.campaign-report-hover-point:hover .campaign-report-hover-ring,
.campaign-report-hover-point:hover .campaign-report-tooltip {
  opacity: 1;
}

.campaign-report-line-legend {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  gap: 22px;
  color: #666;
  font-size: 0.86rem;
}

.campaign-report-line-legend span {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 7px;
}

.campaign-report-line-legend i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.campaign-report-line-legend .legend-clicks {
  background: #e5252a;
}

.campaign-report-line-legend .legend-cost {
  background: #1ed760;
}

.campaign-report-line-legend .legend-avg {
  background: #8a2be2;
}

.campaign-report-detail-chart {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(6, 15, 19, 0.38);
}

.campaign-report-detail-bar {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 3fr) minmax(110px, auto) minmax(44px, auto);
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}

.campaign-report-detail-bar span {
  overflow: hidden;
  color: #e6f3f0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-report-detail-bar div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.campaign-report-detail-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.campaign-report-detail-bar strong {
  color: #e6f3f0;
  white-space: nowrap;
}

.campaign-report-detail-bar small {
  color: #9eb2ba;
  text-align: end;
}

.campaign-report-real-modal .campaign-report-detail-table {
  max-height: min(38vh, 420px);
}

.campaign-report-detail-table table {
  min-width: 980px;
}

.campaign-report-detail-table th {
  color: #9cc7ff;
  text-transform: uppercase;
  letter-spacing: 0;
}

.campaign-report-detail-table td {
  white-space: nowrap;
}

.campaign-report-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(10, 24, 31, 0.72);
  color: #9eb2ba;
  font-size: 0.82rem;
  font-weight: 800;
}

.campaign-report-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.campaign-report-pagination strong {
  color: #e6f3f0;
  min-width: 72px;
  text-align: center;
}

.campaign-report-pagination .table-btn {
  min-width: 88px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .campaign-report-controls,
  .campaign-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-screen[data-user-role="game"] .nav-list {
  display: grid;
  gap: 8px;
}

.dashboard-screen[data-user-role="game"] .nav-group {
  display: contents;
}

.dashboard-screen[data-user-role="game"] .nav-group-toggle {
  display: none !important;
}

.dashboard-screen[data-user-role="game"] .nav-group-items {
  display: contents;
  padding: 0;
  border: 0;
}

@media (max-width: 640px) {
  .dashboard-screen[data-user-role="game"],
  .dashboard-screen[data-user-role="game"].sidebar-collapsed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    padding-bottom: 76px;
  }

  .dashboard-screen[data-user-role="game"] .sidebar,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .sidebar,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .sidebar:hover,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .sidebar:focus-within {
    position: fixed;
    inset-inline: 14px;
    inset-block: auto 12px;
    z-index: 9;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 8px;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(16, 42, 58, 0.16);
  }

  .dashboard-screen[data-user-role="game"] .sidebar .sidebar-brand-lockup,
  .dashboard-screen[data-user-role="game"] .sidebar .brand-lockup {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .sidebar .sidebar-logo-lockup {
    width: 42px;
    height: 42px;
  }

  .dashboard-screen[data-user-role="game"] .nav-list {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 0;
  }

  .dashboard-screen[data-user-role="game"] .nav-group {
    min-width: 0;
    flex: initial;
    display: contents;
  }

  .dashboard-screen[data-user-role="game"] .nav-item,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .nav-item {
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    font-size: 0;
  }

  .dashboard-screen[data-user-role="game"] .nav-group-toggle {
    display: none !important;
  }

  .dashboard-screen[data-user-role="game"] .nav-group-text,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .nav-group-text,
  .dashboard-screen[data-user-role="game"] .nav-group-toggle::after {
    display: none !important;
  }

  .dashboard-screen[data-user-role="game"] .nav-group-items {
    display: contents;
  }

  .dashboard-screen[data-user-role="game"] .nav-item::before,
  .dashboard-screen[data-user-role="game"] .nav-group-toggle .nav-icon {
    margin: 0;
  }

  .dashboard-screen[data-user-role="game"] .user-card,
  .dashboard-screen[data-user-role="game"].sidebar-collapsed .user-card {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .main-content {
    padding: 0;
  }

  .dashboard-screen[data-user-role="game"] .topbar {
    display: grid;
    grid-template-columns: minmax(112px, 150px) minmax(0, 1fr) 44px 44px;
    gap: 8px;
    padding: 12px 14px 10px;
    align-items: center;
    position: relative;
    min-height: 64px;
    width: 100%;
    direction: ltr;
  }

  .dashboard-screen[data-user-role="game"] .topbar::after {
    content: "";
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 118px;
    height: 38px;
    background: url("../assets/adplay-logo-lockup.png") left center / contain no-repeat;
    pointer-events: none;
  }

  .dashboard-screen[data-user-role="game"] .topbar > div:first-child {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .topbar h2 {
    font-size: 24px;
    line-height: 1.25;
  }

  .dashboard-screen[data-user-role="game"] .topbar-profile {
    display: contents !important;
  }

  .dashboard-screen[data-user-role="game"] .topbar-actions {
    display: contents;
  }

  .dashboard-screen[data-user-role="game"] .topbar-actions > *,
  .dashboard-screen[data-user-role="game"] .topbar-actions > button,
  .dashboard-screen[data-user-role="game"] .topbar-actions .secondary-btn,
  .dashboard-screen[data-user-role="game"] .topbar-actions .icon-button,
  .dashboard-screen[data-user-role="game"] .topbar-actions .topbar-icon-btn,
  .dashboard-screen[data-user-role="game"] .topbar-actions .csv-export-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    font-size: 0;
  }

  .dashboard-screen[data-user-role="game"] .topbar-actions > *:not(.topbar-profile):not(#topbarFiltersBtn) {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .topbar-profile > *:not(.topbar-user-copy):not(#topbarNotificationsBtn) {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .topbar-profile .topbar-user-copy {
    grid-column: 2;
    grid-row: 1;
    display: grid !important;
    text-align: left;
    justify-items: start;
    line-height: 1.25;
    align-self: center;
    min-width: 0;
    direction: ltr;
  }

  .dashboard-screen[data-user-role="game"] .topbar-profile .topbar-user-copy strong,
  .dashboard-screen[data-user-role="game"] .topbar-profile .topbar-user-copy span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-screen[data-user-role="game"] #topbarNotificationsBtn {
    display: grid !important;
    place-items: center;
    position: relative;
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    transform: none;
    z-index: 12;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 42, 58, 0.12);
  }

  .dashboard-screen[data-user-role="game"] #topbarNotificationsBtn .topbar-notification-badge {
    top: -6px;
    right: -6px;
    left: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    border-color: #fff;
  }

  .dashboard-screen[data-user-role="game"] #topbarFiltersBtn {
    display: grid !important;
    place-items: center;
    position: static;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    transform: none;
    z-index: 12;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 42, 58, 0.12);
  }

  .dashboard-screen[data-user-role="game"] .topbar-actions .csv-export-btn span:not(.csv-export-icon) {
    display: none;
  }

  .dashboard-screen[data-user-role="game"] .overview-kpi-grid,
  .dashboard-screen[data-user-role="game"] .kpi-grid,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-kpi-grid {
    position: relative;
    min-height: 132px;
    overflow: hidden;
    touch-action: pan-y;
  }

  .dashboard-screen[data-user-role="game"] .kpi-card,
  .dashboard-screen[data-user-role="game"] .overview-kpi-grid .kpi-card,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid .kpi-card {
    min-height: 118px;
    padding: 16px 16px 14px;
    border-radius: 8px;
  }

  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-kpi-grid .kpi-card {
    display: none !important;
    min-height: 132px;
    margin: 0;
  }

  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-kpi-grid:not(:has(.is-mobile-active)) .kpi-card:first-child,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-kpi-grid .kpi-card.is-mobile-active {
    display: grid !important;
    animation: gameKpiSlideIn 180ms ease-out;
  }

  .dashboard-screen[data-user-role="game"] .kpi-card::before,
  .dashboard-screen[data-user-role="game"] .overview-kpi-grid .kpi-card::before,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid .kpi-card::before {
    inset-block-start: 30px;
    inset-inline-start: 18px;
    width: 42px;
    height: 42px;
  }

  .dashboard-screen[data-user-role="game"] .kpi-card span,
  .dashboard-screen[data-user-role="game"] .overview-kpi-grid .kpi-card span,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid .kpi-card span {
    font-size: 12px;
  }

  .dashboard-screen[data-user-role="game"] .kpi-card strong,
  .dashboard-screen[data-user-role="game"] .overview-kpi-grid .kpi-card strong,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid .kpi-card strong {
    font-size: 22px;
    line-height: 1.35;
  }

  .dashboard-screen[data-user-role="game"] .kpi-card small,
  .dashboard-screen[data-user-role="game"] .overview-kpi-grid .kpi-card small,
  .dashboard-screen[data-user-role="game"] .game-kpi-grid .kpi-card small {
    font-size: 11px;
    line-height: 1.6;
  }
}

@keyframes gameKpiSlideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.campaign-mobile-list {
  display: none;
}

.game-payment-mobile-list,
.notification-mobile-list {
  display: none;
}

@media (max-width: 700px) {
  .dashboard-screen[data-current-view="campaigns"] .panel {
    padding: 14px;
    border-radius: 8px;
    overflow: hidden;
  }

  .dashboard-screen[data-current-view="campaigns"] .section-head {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-inline: 2px;
  }

  .dashboard-screen[data-current-view="campaigns"] .section-head h3 {
    font-size: 20px;
    line-height: 1.5;
  }

  .dashboard-screen[data-current-view="campaigns"] .section-head span {
    font-size: 16px;
    color: var(--text);
  }

  .dashboard-screen[data-current-view="campaigns"] .campaign-desktop-table {
    display: none;
  }

  .dashboard-screen[data-current-view="campaigns"] .campaign-mobile-list {
    display: grid;
    gap: 12px;
  }

  .campaign-mobile-card {
    display: grid;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
    box-shadow: 0 8px 20px rgba(16, 42, 58, 0.045);
  }

  .campaign-mobile-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
    direction: rtl;
  }

  .campaign-mobile-card-head > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
    justify-items: start;
  }

  .campaign-mobile-card-head strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .campaign-mobile-card-head small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
  }

  .campaign-mobile-card .table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    min-width: max-content;
  }

  .campaign-mobile-card .icon-table-btn,
  .campaign-mobile-card .table-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 13px;
  }

  .campaign-mobile-card .campaign-mobile-detail-btn {
    width: auto;
    min-width: 78px;
    height: 34px;
    padding: 0 14px;
    border-color: #d7ece8;
    background: #eff9f7;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
  }

  .campaign-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .campaign-mobile-running {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-strong);
    background: #f7fbfa;
    font-size: 12px;
    font-weight: 900;
  }

  .campaign-mobile-running input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
  }

  .campaign-mobile-fields {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  .campaign-mobile-fields div {
    display: grid;
    grid-template-columns: minmax(82px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
  }

  .campaign-mobile-fields div:last-child {
    border-bottom: 0;
  }

  .campaign-mobile-fields span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.6;
  }

  .campaign-mobile-fields strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .dashboard-screen[data-current-view="campaigns"] .list-more {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }

  .dashboard-screen[data-current-view="campaigns"] .list-more .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .campaign-report-controls,
  .campaign-report-summary {
    grid-template-columns: 1fr;
  }

  .campaign-report-detail-bar {
    grid-template-columns: 1fr;
  }

  .campaign-report-line-head {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-report-line-head label {
    justify-content: space-between;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payments-panel,
  .dashboard-screen[data-current-view="notifications"] .panel {
    padding: 14px;
    border-radius: 8px;
    overflow: hidden;
  }

  .dashboard-screen[data-current-view="gamePayments"] .section-head,
  .dashboard-screen[data-current-view="notifications"] .section-head {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .section-head h3,
  .dashboard-screen[data-current-view="notifications"] .section-head h3 {
    font-size: 19px;
    line-height: 1.5;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-kpi-grid .kpi-card {
    min-height: 108px;
    padding: 14px;
    border-radius: 8px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payments-workspace,
  .dashboard-screen[data-current-view="notifications"] .notification-grid,
  .dashboard-screen[data-current-view="notifications"] .notification-grid--composer-open,
  .dashboard-screen[data-current-view="notifications"] .notification-grid--composer-collapsed,
  .dashboard-screen[data-current-view="notifications"] .notification-grid--readonly {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payment-form-panel,
  .dashboard-screen[data-current-view="gamePayments"] .game-payment-records-panel,
  .dashboard-screen[data-current-view="notifications"] .notification-side-stack {
    min-width: 0;
    width: 100%;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payment-standalone-form,
  .dashboard-screen[data-current-view="notifications"] .notification-rule-form,
  .dashboard-screen[data-current-view="notifications"] #notificationForm {
    grid-template-columns: 1fr;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payment-desktop-table,
  .dashboard-screen[data-current-view="notifications"] .notification-table-wrap {
    display: none;
  }

  .dashboard-screen[data-current-view="gamePayments"] .game-payment-mobile-list,
  .dashboard-screen[data-current-view="notifications"] .notification-mobile-list {
    display: grid;
    gap: 12px;
  }

  .game-payment-mobile-card,
  .notification-mobile-card {
    display: grid;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
    box-shadow: 0 8px 20px rgba(16, 42, 58, 0.045);
    min-width: 0;
  }

  .game-payment-mobile-head,
  .notification-mobile-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: flex-start;
    direction: rtl;
  }

  .game-payment-mobile-head > div,
  .notification-mobile-card-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .game-payment-mobile-head strong,
  .notification-mobile-card-head strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .game-payment-mobile-head small,
  .notification-mobile-card-head small,
  .game-payment-mobile-head > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.6;
  }

  .game-payment-mobile-fields,
  .notification-mobile-meta {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  .game-payment-mobile-fields div,
  .notification-mobile-meta div {
    display: grid;
    grid-template-columns: minmax(86px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 11px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
  }

  .game-payment-mobile-fields div:last-child,
  .notification-mobile-meta div:last-child {
    border-bottom: 0;
  }

  .game-payment-mobile-fields span,
  .notification-mobile-meta span,
  .notification-mobile-reply > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.6;
  }

  .game-payment-mobile-fields strong,
  .notification-mobile-meta strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .game-payment-mobile-fields strong small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
  }

  .game-payment-history-mobile-list .table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .game-payment-history-mobile-list .table-btn {
    min-height: 34px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .list-more {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .dashboard-screen[data-current-view="gamePayments"] .list-more .secondary-btn {
    width: 100%;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-archive-head {
    display: flex;
    align-items: flex-start;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-channel-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 8px;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-channel-tabs::-webkit-scrollbar {
    display: none;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-channel-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
  }

  .notification-mobile-card .status {
    white-space: nowrap;
  }

  .notification-mobile-meta .notification-reaction-actions {
    justify-content: flex-start;
  }

  .notification-mobile-reply {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
  }

  .notification-mobile-reply textarea {
    min-height: 78px;
    border-radius: 8px;
  }

  .notification-mobile-actions {
    display: flex;
    justify-content: flex-start;
  }

  .notification-mobile-actions .notification-preview-btn {
    width: auto;
    min-width: 96px;
    height: 34px;
    padding: 0 14px;
    border-color: #d7ece8;
    background: #eff9f7;
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-compose-panel.is-collapsed,
  .dashboard-screen[data-current-view="notifications"] .notification-rules-panel.is-collapsed {
    min-height: 72px;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-rule-channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.dashboard-screen[data-current-view="notifications"] .notification-side-stack {
  display: grid;
  align-content: start;
  gap: 12px;
  isolation: isolate;
}

.dashboard-screen[data-current-view="notifications"] .notification-compose-panel,
.dashboard-screen[data-current-view="notifications"] .notification-rules-panel {
  position: static;
  z-index: auto;
  min-width: 0;
}

.dashboard-screen[data-current-view="notifications"] .notification-compose-panel.is-open {
  position: static;
}

.dashboard-screen[data-current-view="notifications"] .notification-compose-panel.is-open + .notification-rules-panel {
  margin-top: 0;
}

@media (min-width: 701px) {
  .dashboard-screen[data-current-view="notifications"] .notification-grid,
  .dashboard-screen[data-current-view="notifications"] .notification-grid--composer-open,
  .dashboard-screen[data-current-view="notifications"] .notification-grid--composer-collapsed {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
  }

  .dashboard-screen[data-current-view="notifications"] .notification-side-stack {
    width: 260px;
    max-width: 260px;
    min-width: 260px;
    justify-self: stretch;
  }
}

.campaign-detail-mobile-list {
  display: none;
}

@media (max-width: 700px) {
  .modal-backdrop {
    padding: 8px;
    align-items: start;
  }

  .modal:has(.campaign-detail-modal) {
    width: min(100%, 560px);
    max-height: calc(100vh - 16px);
    padding: 14px;
    border-radius: 10px;
  }

  .modal:has(.campaign-detail-modal) .modal-close {
    float: none;
    position: sticky;
    top: 0;
    inset-inline-start: 0;
    width: 40px;
    height: 40px;
    margin: 0 0 8px auto;
    border-radius: 8px;
    background: #eef8f6;
    color: var(--primary-strong);
    z-index: 2;
  }

  .campaign-detail-modal {
    display: grid;
    gap: 14px;
    direction: rtl;
  }

  .campaign-detail-head {
    display: grid;
    justify-items: end;
    padding-inline: 2px;
  }

  .campaign-detail-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    line-height: 1.45;
    text-align: right;
  }

  .campaign-detail-summary {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .campaign-detail-summary article {
    min-height: 108px;
    padding: 18px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
    box-shadow: 0 12px 28px rgba(16, 42, 58, 0.055);
  }

  .campaign-detail-summary span {
    font-size: 13px;
    color: var(--muted);
  }

  .campaign-detail-summary strong {
    font-size: 20px;
    line-height: 1.7;
  }

  .campaign-detail-modal h4 {
    margin: 4px 0 -2px;
    color: #4b5563;
    font-size: 19px;
    line-height: 1.55;
    text-align: right;
  }

  .modal:has(.campaign-detail-modal) .campaign-detail-table {
    display: none;
  }

  .campaign-detail-mobile-list {
    display: grid;
    gap: 10px;
  }

  .campaign-detail-mobile-card {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 42, 58, 0.04);
  }

  .campaign-detail-mobile-card div {
    display: grid;
    grid-template-columns: minmax(86px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .campaign-detail-mobile-card div:last-child {
    border-bottom: 0;
  }

  .campaign-detail-mobile-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.7;
  }

  .campaign-detail-mobile-card strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 700px) {
  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .overview-performance-panel,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-performance-panel {
    padding: 14px;
    overflow: hidden;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .overview-performance-panel .section-head,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .overview-performance-panel .section-head {
    margin-bottom: 10px;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-performance-chart,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-performance-chart {
    gap: 10px;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-performance-chart .line-legend,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-performance-chart .line-legend {
    justify-content: flex-start;
    gap: 10px 14px;
    padding-inline: 2px;
    font-size: 12px;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-performance-chart .line-legend span,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-performance-chart .line-legend span {
    padding: 6px 8px;
    border: 1px solid #e5efec;
    border-radius: 999px;
    background: #fbfdfc;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-line-chart,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-line-chart {
    height: 220px;
    min-height: 190px;
    max-height: 230px;
    margin-block: 2px 4px;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-line-chart .line-axis-title,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-line-chart .line-axis-title {
    display: none;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-summary,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-summary {
    grid-template-columns: 1fr;
    gap: 8px;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-summary article,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-summary article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 42, 58, 0.04);
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-summary article:first-child,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-summary article:first-child {
    border-inline-start: 1px solid var(--line);
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-summary span,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-summary span {
    justify-self: start;
    font-size: 12px;
  }

  .dashboard-screen[data-user-role="accountManager"][data-current-view="overview"] .game-action-summary strong,
  .dashboard-screen[data-user-role="game"][data-current-view="overview"] .game-action-summary strong {
    justify-self: end;
    font-size: 20px;
    line-height: 1.2;
  }
}

/* Final header override: no title text, picker above dashboard content. */
#pageTitle {
  display: none !important;
}

.main-content {
  position: relative;
  z-index: 1000;
}

.sidebar {
  z-index: 40000 !important;
}

.modal-backdrop {
  z-index: 90000 !important;
}

.topbar {
  position: relative;
  z-index: 5000;
}

.topbar-title-block {
  gap: 0;
}

.topbar-date-range {
  z-index: 7000;
}

.topbar-date-range-panel {
  position: fixed !important;
  top: 58px !important;
  right: 22px !important;
  left: auto !important;
  z-index: 30000;
  grid-template-columns: 118px minmax(0, 1fr);
  width: min(640px, calc(100vw - 44px));
  max-height: calc(100vh - 78px);
  overflow: auto;
}

.topbar-date-range-btn {
  min-height: 30px;
  padding: 4px 10px;
  gap: 7px;
  color: #6f7f87;
  font-size: 13px;
  font-weight: 800;
}

.topbar-date-range-btn:hover,
.topbar-date-range-btn[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 144, 90, 0.14);
}

.topbar-date-icon {
  width: 16px;
  height: 16px;
  color: #6f7f87;
  opacity: 1;
}

.topbar-range-presets button.active,
.topbar-range-presets button:hover {
  background: #edf8f2;
  color: var(--primary);
}

.topbar-range-days button:hover,
.topbar-range-days button.in-range {
  background: #eaf7f1;
}

.topbar-range-days button.range-start,
.topbar-range-days button.range-end {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 144, 90, 0.22);
}

.topbar-date-range-panel .topbar-range-presets {
  gap: 2px;
  padding: 12px 8px;
}

.topbar-date-range-panel .topbar-range-presets button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.topbar-date-range-panel .topbar-range-calendar-area {
  gap: 10px;
  padding: 12px;
}

.topbar-date-range-panel .topbar-range-months {
  gap: 12px;
}

.topbar-date-range-panel .topbar-range-month h4 {
  margin-bottom: 8px;
  font-size: 12px;
}

.topbar-date-range-panel .topbar-range-weekdays {
  margin-bottom: 5px;
  font-size: 10.5px;
}

.topbar-date-range-panel .topbar-range-weekdays,
.topbar-date-range-panel .topbar-range-days {
  gap: 4px;
}

.topbar-date-range-panel .topbar-range-days button,
.topbar-date-range-panel .topbar-range-days span {
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
}

.topbar-date-range-panel .topbar-range-nav {
  top: 12px;
  width: 24px;
  height: 24px;
}

.topbar-date-range-panel .topbar-range-footer {
  padding-top: 10px;
  font-size: 12px;
}

.topbar-date-range-panel .topbar-range-footer button {
  min-height: 34px;
  padding: 0 14px;
}

@media (max-width: 900px) {
  .topbar-date-range-panel {
    top: 58px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto;
    grid-template-columns: 1fr;
  }
}
