/* Visa Bot admin console — JINKR-style dark glass theme. */

[v-cloak] {
  display: none;
}

:root {
  color-scheme: dark;

  --jk-cyan: #22d3ee;
  --jk-violet: #a855f7;
  --jk-bg-start: #05070f;
  --jk-bg-end: #0b1020;
  --jk-glow-1: #22d3ee26;
  --jk-glow-2: #a855f71f;
  --jk-grid-line: #22d3ee12;
  --jk-scanline: #ffffff05;
  --jk-panel: #111827b8;
  --jk-panel-border: #22d3ee2e;
  --jk-panel-border-strong: #22d3ee59;
  --jk-panel-shadow: 0 18px 45px #00000059;
  --jk-panel-inset: inset 0 1px 0 #ffffff0f;
  --jk-menu-active-bg: #22d3ee1a;

  --jk-danger: #d946ef;
  --jk-success: #22c55e;
  --jk-warning: #f59e0b;

  --jk-text-primary: #e6f1ff;
  --jk-text-regular: #b6c4d8;
  --jk-text-secondary: #7c8ba1;

  /* Translucent surfaces that adapt to the active theme. */
  --jk-soft: #ffffff0a;
  --jk-soft-strong: #ffffff0f;
  --jk-soft-faint: #ffffff08;
  --jk-input-bg: #0b1220cc;
  --jk-inset-bg: #0b122080;
  --jk-canvas: #05070f;
  --jk-scroll-thumb: #22d3ee33;

  --jk-font: Inter, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --jk-font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
}

/* Day theme: same layout, lighter palette. */
html.light {
  color-scheme: light;

  --jk-cyan: #0891b2;
  --jk-violet: #7c3aed;
  --jk-bg-start: #f6f9ff;
  --jk-bg-end: #e7eefb;
  --jk-glow-1: #0891b226;
  --jk-glow-2: #7c3aed1f;
  --jk-grid-line: #0891b214;
  --jk-scanline: #0b102005;
  --jk-panel: #ffffffcc;
  --jk-panel-border: #0891b233;
  --jk-panel-border-strong: #0891b259;
  --jk-panel-shadow: 0 18px 40px #1e2a431a;
  --jk-panel-inset: inset 0 1px 0 #ffffffcc;
  --jk-menu-active-bg: #0891b21a;

  --jk-danger: #c026d3;
  --jk-success: #16a34a;
  --jk-warning: #d97706;

  --jk-text-primary: #0f1b2e;
  --jk-text-regular: #3c4a60;
  --jk-text-secondary: #6b7c93;

  --jk-soft: #0f1b2e0f;
  --jk-soft-strong: #0f1b2e14;
  --jk-soft-faint: #0f1b2e0a;
  --jk-input-bg: #ffffff;
  --jk-inset-bg: #f2f6fdcc;
  --jk-canvas: #eef2fa;
  --jk-scroll-thumb: #0891b233;
}

html.light .stat-card__value {
  text-shadow: none;
}

html.light .status.paid {
  color: #15803d;
}

html.light .status.pending {
  color: #b45309;
}

html.light .status.expired {
  color: #a21caf;
}

html.light .status.issued {
  color: #15803d;
}

html.light .status.rejected {
  color: #a21caf;
}

html.light .status.active {
  color: #15803d;
}

html.light .status.frozen {
  color: #b45309;
}

html.light .status.deleted {
  color: #a21caf;
}

html.light .amount-credit {
  color: #15803d;
}

html.light .amount-debit {
  color: #a21caf;
}

html.light button.danger {
  color: #a21caf;
}

html.light .login-error {
  color: #a21caf;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  margin: 0;
}

html {
  font-family: var(--jk-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  color: var(--jk-text-primary);
  background:
    radial-gradient(1200px 600px at 12% -10%, var(--jk-glow-1), transparent 60%),
    radial-gradient(1000px 520px at 100% 0%, var(--jk-glow-2), transparent 55%),
    linear-gradient(160deg, var(--jk-bg-start) 0%, var(--jk-bg-end) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--jk-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--jk-grid-line) 1px, transparent 1px),
    repeating-linear-gradient(180deg, var(--jk-scanline) 0px, var(--jk-scanline) 1px, transparent 1px, transparent 3px);
  background-size: 42px 42px, 42px 42px, 100% 3px;
  mask-image: radial-gradient(120% 120% at 50% 0, #000 40%, #00000059 100%);
  -webkit-mask-image: radial-gradient(120% 120% at 50% 0, #000 40%, #00000059 100%);
}

/* ---------------------------------------------------------------- shell */

.glass-panel {
  background: var(--jk-panel);
  border: 1px solid var(--jk-panel-border);
  border-radius: 14px;
  box-shadow: var(--jk-panel-shadow), var(--jk-panel-inset);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  overflow: hidden;
}

.layout__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.layout__main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
}

.layout__main::-webkit-scrollbar {
  width: 8px;
}

.layout__main::-webkit-scrollbar-thumb {
  background: var(--jk-scroll-thumb);
  border-radius: 8px;
}

/* -------------------------------------------------------------- sidebar */

.sidebar {
  flex: 0 0 236px;
  width: 236px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--jk-panel-border);
}

.sidebar__logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 0 18px #22d3ee4d;
}

.login-logo {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 0 12px;
  border-radius: 13px;
  box-shadow: 0 0 24px #22d3ee4d;
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar__brand-text strong {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__brand-text small {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jk-text-secondary);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--jk-text-regular);
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-item:hover {
  background: var(--jk-soft);
  color: var(--jk-text-primary);
}

.nav-item.active {
  color: var(--jk-text-primary);
  background: linear-gradient(90deg, var(--jk-menu-active-bg), #a855f729);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border-strong);
}

.nav-item__label {
  font-size: 13.5px;
  font-weight: 600;
}

.nav-item__desc {
  font-size: 11px;
  color: var(--jk-text-secondary);
}

/* --------------------------------------------------------------- header */

.app-header {
  flex: 0 0 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--jk-text-regular);
  background: var(--jk-soft);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jk-success);
  box-shadow: 0 0 10px var(--jk-success);
  animation: jk-pulse 2s ease-in-out infinite;
}

@keyframes jk-pulse {
  50% {
    opacity: 0.4;
  }
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* -------------------------------------------------------------- controls */

button {
  font-family: inherit;
  border: 0;
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.primary {
  color: #05070f;
  font-weight: 700;
  background: linear-gradient(140deg, var(--jk-cyan), var(--jk-violet));
  box-shadow: 0 8px 22px #22d3ee33;
}

button.primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px #22d3ee52;
}

button.secondary {
  color: var(--jk-text-regular);
  background: var(--jk-soft-strong);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

button.secondary:hover:not(:disabled) {
  color: var(--jk-text-primary);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border-strong);
}

/* Destructive actions stay on the brand's magenta danger tone, never red. */
button.danger {
  color: #f0abfc;
  background: #d946ef1f;
  box-shadow: inset 0 0 0 1px #d946ef47;
}

button.danger:hover:not(:disabled) {
  color: #fae8ff;
  background: #d946ef2e;
  box-shadow: inset 0 0 0 1px #d946ef6b;
}

.lang-switch,
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--jk-soft);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.lang-switch button,
.seg button {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--jk-text-secondary);
  background: transparent;
}

.lang-switch button.active,
.seg button.active {
  color: #05070f;
  font-weight: 600;
  background: linear-gradient(140deg, var(--jk-cyan), var(--jk-violet));
}

/* --------------------------------------------------------- page header */

.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-header__mark {
  flex: 0 0 4px;
  width: 4px;
  height: 34px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--jk-cyan), var(--jk-violet));
  box-shadow: 0 0 14px #22d3ee8c;
}

.page-header__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.page-header__text h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.page-header__text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--jk-text-secondary);
}

.page-header__actions {
  margin-left: auto;
}

/* ------------------------------------------------------------ surfaces */

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.card__subtitle {
  margin: 6px 0 -4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--jk-text-secondary);
  letter-spacing: 0.02em;
}

.hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--jk-text-secondary);
}

/* ---------------------------------------------------------- stat cards */

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

.stat-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--jk-cyan), var(--jk-violet));
}

.stat-card__label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jk-text-secondary);
}

.stat-card__value {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--jk-text-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px #22d3ee47;
}

.stat-card--violet::after {
  background: linear-gradient(90deg, var(--jk-violet), var(--jk-cyan));
}

.stat-card--violet .stat-card__value {
  text-shadow: 0 0 18px #a855f747;
}

.stat-card--success::after {
  background: linear-gradient(90deg, var(--jk-success), var(--jk-cyan));
}

.stat-card--success .stat-card__value {
  text-shadow: 0 0 18px #22c55e47;
}

.stat-card--warning::after {
  background: linear-gradient(90deg, var(--jk-warning), var(--jk-violet));
}

.stat-card--warning .stat-card__value {
  text-shadow: 0 0 18px #f59e0b47;
}

.stat-card--danger::after {
  background: linear-gradient(90deg, var(--jk-danger), var(--jk-violet));
}

.stat-card--danger .stat-card__value {
  text-shadow: 0 0 18px #d946ef47;
}

/* ------------------------------------------------------------ charts */

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

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

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

.chart-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.chart-head p {
  margin: 0;
  font-size: 12px;
  color: var(--jk-text-secondary);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--jk-text-secondary);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.legend-dot.cyan {
  background: var(--jk-cyan);
  box-shadow: 0 0 8px #22d3ee8c;
}

.legend-dot.green {
  background: var(--jk-success);
  box-shadow: 0 0 8px #22c55e8c;
}

.legend-dot.amber {
  background: var(--jk-warning);
  box-shadow: 0 0 8px #f59e0b8c;
}

.chart-svg {
  width: 100%;
  height: 240px;
  display: block;
}

.axis-line {
  stroke: #22d3ee2e;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.cyan {
  stroke: var(--jk-cyan);
}

.chart-line.green {
  stroke: var(--jk-success);
}

.chart-line.amber {
  stroke: var(--jk-warning);
}

.chart-dot {
  stroke: var(--jk-canvas);
  stroke-width: 2;
}

.chart-dot.cyan {
  fill: var(--jk-cyan);
}

.chart-dot.green {
  fill: var(--jk-success);
}

.chart-dot.amber {
  fill: var(--jk-warning);
}

.chart-bar {
  fill: url(#barGrad);
}

.chart-label {
  fill: var(--jk-text-secondary);
  font-size: 11px;
}

.chart-value {
  fill: var(--jk-text-primary);
  font-size: 11px;
}

/* ------------------------------------------------------------ tables */

.table-wrap {
  overflow: auto;
}

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

.table th {
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jk-text-secondary);
  border-bottom: 1px solid var(--jk-panel-border);
}

.table td {
  padding: 12px;
  font-size: 13px;
  color: var(--jk-text-regular);
  border-bottom: 1px solid var(--jk-soft);
}

.table tbody tr:hover td {
  background: var(--jk-soft-faint);
  color: var(--jk-text-primary);
}

.empty {
  margin: 0;
  padding: 22px 0;
  text-align: center;
  color: var(--jk-text-secondary);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--jk-text-regular);
  background: var(--jk-soft-strong);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.status.paid {
  color: #86efac;
  background: #22c55e1f;
  box-shadow: inset 0 0 0 1px #22c55e47;
}

.status.pending {
  color: #fcd34d;
  background: #f59e0b1f;
  box-shadow: inset 0 0 0 1px #f59e0b47;
}

.status.issued {
  color: #86efac;
  background: #22c55e1f;
  box-shadow: inset 0 0 0 1px #22c55e47;
}

.status.rejected {
  color: #f0abfc;
  background: #d946ef1f;
  box-shadow: inset 0 0 0 1px #d946ef47;
}

.status.expired {
  color: #f0abfc;
  background: #d946ef1f;
  box-shadow: inset 0 0 0 1px #d946ef47;
}

.status.active {
  color: #86efac;
  background: #22c55e1f;
  box-shadow: inset 0 0 0 1px #22c55e47;
}

.status.frozen {
  color: #fcd34d;
  background: #f59e0b1f;
  box-shadow: inset 0 0 0 1px #f59e0b47;
}

.status.deleted {
  color: #f0abfc;
  background: #d946ef1f;
  box-shadow: inset 0 0 0 1px #d946ef47;
}

.status.draft {
  color: var(--jk-text-regular);
  background: var(--jk-soft-strong);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.status.sending {
  color: #fcd34d;
  background: #f59e0b1f;
  box-shadow: inset 0 0 0 1px #f59e0b47;
}

.status.sent {
  color: #86efac;
  background: #22c55e1f;
  box-shadow: inset 0 0 0 1px #22c55e47;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.amount-credit {
  color: #86efac;
  font-variant-numeric: tabular-nums;
}

.amount-debit {
  color: #f0abfc;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.row-actions button {
  padding: 6px 11px;
  font-size: 12px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- forms */

.grid {
  display: grid;
  gap: 14px;
}

.grid.one {
  grid-template-columns: 1fr;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label span {
  font-size: 12.5px;
  color: var(--jk-text-secondary);
}

input,
textarea,
select,
code {
  font-family: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--jk-panel-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--jk-text-primary);
  background: var(--jk-input-bg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--jk-cyan);
  box-shadow: 0 0 0 3px #22d3ee26;
}

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

textarea {
  resize: vertical;
  line-height: 1.5;
  font-family: var(--jk-font-mono);
}

input[type="file"] {
  padding: 8px 10px;
  font-size: 12px;
}

/* ------------------------------------------------------------ banners */

.banner-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--jk-inset-bg);
  border: 1px solid var(--jk-panel-border);
}

.banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.banner-head strong {
  font-size: 13px;
}

.banner-head code {
  font-family: var(--jk-font-mono);
  font-size: 11px;
  color: var(--jk-cyan);
}

.banner-preview {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--jk-panel-border);
  background: var(--jk-canvas);
}

/* ---------------------------------------------------------------- ads */

.ad-compose {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.ad-compose > .primary {
  margin-left: auto;
}

.ad-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-preview img,
.ad-preview-img {
  max-width: 240px;
  max-height: 140px;
  border-radius: 10px;
  border: 1px solid var(--jk-panel-border);
  background: var(--jk-canvas);
  object-fit: cover;
}

.ad-thumb {
  width: 64px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--jk-panel-border);
  object-fit: cover;
  vertical-align: middle;
}

.ad-body {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--jk-text-primary);
  background: var(--jk-soft-faint);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

/* Bulk action bar, shown once at least one ad row is ticked. */

.bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--jk-soft-faint);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.bulkbar__count {
  margin-right: auto;
  font-size: 13px;
  color: var(--jk-text-regular);
}

/* Compact list of rows inside a confirmation dialog. */

.modal__list {
  max-height: 200px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border-radius: 10px;
  background: var(--jk-soft-faint);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.modal__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--jk-text-primary);
}

.modal__list li:hover {
  background: var(--jk-soft-strong);
}

.modal__list-id {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--jk-text-secondary);
}

.modal__list-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Recipient picker of the send dialog. It reuses label and input, so both are
   reset back to an inline flow inside a row. */

.audience {
  margin-top: 14px;
}

.audience input[type="checkbox"],
.table__check input[type="checkbox"] {
  flex: none;
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--jk-cyan);
}

.table__check {
  width: 38px;
  text-align: center;
}

.audience__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audience__all,
.audience__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.audience__all span {
  font-size: 13px;
  color: var(--jk-text-regular);
}

.audience__search {
  margin-top: 10px;
}

.audience__search:disabled {
  opacity: 0.5;
}

.audience__list {
  max-height: 220px;
  margin-top: 8px;
  padding: 6px;
  overflow-y: auto;
  border-radius: 10px;
  background: var(--jk-soft-faint);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.audience__item {
  padding: 6px 8px;
  border-radius: 8px;
}

.audience__item:hover {
  background: var(--jk-soft-strong);
}

.audience__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  color: var(--jk-text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audience__id {
  flex: none;
  font-size: 12px;
  color: var(--jk-text-secondary);
  font-variant-numeric: tabular-nums;
}

.audience__count {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--jk-text-secondary);
}

/* -------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #05070fb8;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__panel {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.modal__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal__panel--narrow {
  max-width: 460px;
}

.modal__badge {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0abfc;
  background: #d946ef1f;
  box-shadow: inset 0 0 0 1px #d946ef47;
}

html.light .modal__badge {
  color: #a21caf;
}

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

.modal__facts > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--jk-soft-faint);
  box-shadow: inset 0 0 0 1px var(--jk-panel-border);
}

.modal__facts dt {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--jk-text-secondary);
}

.modal__facts dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--jk-text-primary);
  overflow-wrap: anywhere;
}

.note-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #f0abfc;
  background: #d946ef14;
  box-shadow: inset 0 0 0 1px #d946ef33;
}

html.light .modal__notice {
  color: #a21caf;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* -------------------------------------------------------------- toast */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #05070f;
  font-weight: 600;
  background: linear-gradient(140deg, var(--jk-cyan), var(--jk-violet));
  box-shadow: 0 14px 40px #00000073;
}

.toast.error {
  color: var(--jk-text-primary);
  background: linear-gradient(140deg, var(--jk-danger), var(--jk-violet));
}

/* -------------------------------------------------------------- login */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.login-glow {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.login-glow--a {
  top: -80px;
  left: -60px;
  width: 380px;
  height: 380px;
  background: #22d3ee66;
  animation: jk-float-a 12s ease-in-out infinite;
}

.login-glow--b {
  right: -80px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  background: #a855f766;
  animation: jk-float-b 15s ease-in-out infinite;
}

@keyframes jk-float-a {
  50% {
    transform: translate(60px, 40px) scale(1.08);
  }
}

@keyframes jk-float-b {
  50% {
    transform: translate(-50px, -40px) scale(1.06);
  }
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 16px;
  padding: 30px;
  border-radius: 18px;
}

.login-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.login-switches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.login-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--jk-text-secondary);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: center;
}

.captcha-image {
  width: 132px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--jk-panel-border);
  background: var(--jk-canvas);
  cursor: pointer;
  user-select: none;
}

.login-error {
  margin: 0;
  min-height: 18px;
  font-size: 12.5px;
  color: #f0abfc;
}

.login-submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  letter-spacing: 2px;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .charts-grid,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    flex: none;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
  }

  .sidebar__brand {
    flex: 0 0 auto;
    padding: 0 14px 0 6px;
    border-right: 1px solid var(--jk-panel-border);
    border-bottom: 0;
  }

  .sidebar__nav {
    flex-direction: row;
    gap: 8px;
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
  }

  .nav-item__desc {
    display: none;
  }

  .app-header {
    flex: none;
    height: auto;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .layout__main {
    overflow: visible;
  }
}

/* ---------------------------------------------------------------- splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--jk-bg-start);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash--out {
  opacity: 0;
  visibility: hidden;
}

.splash__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--jk-glow-1), transparent 62%);
  filter: blur(26px);
  animation: splash-pulse 0.8s ease-in-out infinite;
}

.splash__logo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  box-shadow: 0 0 46px #22d3ee66;
  animation: splash-logo 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash__name {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--jk-text-primary);
  animation: splash-name 0.6s ease 0.1s both;
}

.splash__bar {
  position: relative;
  width: 168px;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--jk-soft-strong);
}

.splash__bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--jk-cyan), var(--jk-violet));
  animation: splash-bar 0.85s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes splash-logo {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.82);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes splash-name {
  from {
    opacity: 0;
    letter-spacing: 0.5em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.22em;
  }
}

@keyframes splash-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes splash-pulse {
  0%,
  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.06);
  }
}
