/* MSavdogar 4.0 — UI kit for pay.msavdogar.uz, merchant centre and adm.msavdogar.uz
   Dark fintech glass style. Utilities come from Tailwind (CDN); this file holds components. */

:root {
  --bg: #0a0d14;
  --s1: #101522;
  --s2: #151c2c;
  --s3: #1c2438;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  color-scheme: dark;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--brand-600); color: #fff; }

[hidden], .is-hidden { display: none !important; }

.mono, .font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-feature-settings: 'zero' 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* ambient background glow */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 28rem at 8% -6%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(36rem 26rem at 100% 110%, rgba(16, 185, 129, 0.10), transparent 60%);
}

/* --- header ------------------------------------------------------------------------- */
.nav-blur {
  background-color: rgba(10, 13, 20, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo-mark {
  width: 2.15rem; height: 2.15rem; border-radius: 0.8rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
  color: #fff; font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* --- cards -------------------------------------------------------------------------- */
.card {
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
}
.card-2 { background: var(--s2); border: 1px solid var(--line); border-radius: 0.9rem; }
.card-glass {
  background: rgba(16, 21, 34, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
.card-pad { padding: 1rem; }
@media (min-width: 640px) { .card-pad { padding: 1.5rem; } }
.card-interactive { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.card-interactive:hover { border-color: rgba(99, 102, 241, 0.35); box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.55); }

.section-title { font-size: 0.95rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; display: flex; align-items: center; gap: .55rem; }
.section-title > i { color: var(--brand-400); font-size: .85rem; }
.eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.divider { height: 1px; background: var(--line); border: 0; }
.divider-dashed { border: 0; border-top: 1px dashed var(--line-strong); }

/* --- buttons ------------------------------------------------------------------------ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1rem; border-radius: 0.75rem; border: 1px solid transparent;
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 700; white-space: nowrap;
  cursor: pointer; user-select: none; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #6d70f5 0%, #4f46e5 100%); color: #fff;
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 10px 26px -10px rgba(99, 102, 241, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-success {
  background: linear-gradient(180deg, #16c08a 0%, #059669 100%); color: #fff;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 10px 26px -10px rgba(16, 185, 129, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-success:hover:not(:disabled) { filter: brightness(1.07); }
.btn-secondary { background: var(--s2); border-color: var(--line-strong); color: #e2e8f0; }
.btn-secondary:hover:not(:disabled) { background: var(--s3); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.btn-ghost { background: transparent; color: #cbd5e1; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); color: #fff; }
.btn-danger { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.32); color: #fda4af; }
.btn-danger:hover:not(:disabled) { background: #e11d48; border-color: #e11d48; color: #fff; }
.btn-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.32); color: #fcd34d; }
.btn-warning:hover:not(:disabled) { background: #d97706; border-color: #d97706; color: #fff; }
.btn-click { background: linear-gradient(180deg, #13a6e8 0%, #0284c7 100%); color: #fff; border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 10px 26px -10px rgba(14, 165, 233, 0.7); }
.btn-click:hover:not(:disabled) { filter: brightness(1.07); }
.btn-sm { padding: 0.375rem 0.7rem; font-size: 0.75rem; border-radius: 0.6rem; gap: .4rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.7rem; border-radius: 0.5rem; gap: .35rem; }
.btn-lg { padding: 0.875rem 1.25rem; font-size: 0.9375rem; border-radius: 0.95rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 2.25rem; height: 2.25rem; }
.btn-icon.btn-sm { width: 1.9rem; height: 1.9rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 1.05rem; height: 1.05rem; margin: -0.525rem 0 0 -0.525rem;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%;
  animation: kit-spin 0.7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-danger.is-loading::after { border-color: rgba(148, 163, 184, 0.3); border-top-color: #e2e8f0; }

.link { color: var(--brand-400); font-weight: 600; text-decoration: none; }
.link:hover { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }

/* --- forms -------------------------------------------------------------------------- */
.label { display: block; font-size: 0.75rem; font-weight: 700; color: #cbd5e1; margin-bottom: 0.4rem; }
.label .opt { font-weight: 500; color: var(--faint); }
.hint { font-size: 0.72rem; color: var(--faint); margin-top: 0.35rem; line-height: 1.1rem; }
.input, .select, .textarea {
  display: block; width: 100%;
  background: #0b0f19; color: #f1f5f9;
  border: 1px solid var(--line-strong); border-radius: 0.75rem;
  padding: 0.65rem 0.875rem; font-size: 16px; line-height: 1.4;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  -webkit-appearance: none; appearance: none;
}
@media (min-width: 640px) { .input, .select, .textarea { font-size: 0.875rem; } }
.input::placeholder, .textarea::placeholder { color: #55637a; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); background: #0c1120; }
.input[readonly] { background: #0e1322; color: #cbd5e1; }
.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.input.is-invalid, .textarea.is-invalid { border-color: var(--rose-500); box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15); }
.input.is-valid { border-color: rgba(16, 185, 129, 0.6); }
.textarea { min-height: 5.5rem; resize: vertical; }
.select {
  padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center;
}
.select option { background: #101522; color: #e2e8f0; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; min-width: 0; }
.input-affix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: .78rem; font-weight: 700; pointer-events: none; }
.input-affix.right { right: 0.9rem; }
.input-affix.left { left: 0.9rem; }
.input-file { padding: .5rem; font-size: .8rem; color: var(--muted); }
.input-file::file-selector-button {
  margin-right: .75rem; border: 1px solid var(--line-strong); background: var(--s3); color: #e2e8f0;
  padding: .4rem .75rem; border-radius: .55rem; font-weight: 700; font-size: .75rem; cursor: pointer;
}

.check {
  -webkit-appearance: none; appearance: none; flex-shrink: 0;
  width: 1.1rem; height: 1.1rem; margin: 0; cursor: pointer;
  border: 1.5px solid #4b5872; border-radius: 0.35rem; background: #0b0f19;
  display: inline-grid; place-content: center; transition: background-color .12s ease, border-color .12s ease;
}
.check:hover { border-color: var(--brand-400); }
.check:checked { background: var(--brand-500); border-color: var(--brand-500); }
.check:checked::before {
  content: ''; width: 0.6rem; height: 0.6rem; background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="radio"].check { border-radius: 50%; }
input[type="radio"].check:checked::before { clip-path: none; border-radius: 50%; width: .45rem; height: .45rem; }
.check:disabled { opacity: .45; cursor: not-allowed; }
.check:focus-visible, .toggle:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }

.toggle {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; position: relative; margin: 0;
  width: 2.5rem; height: 1.4rem; border-radius: 999px; background: #2b3548; cursor: pointer;
  transition: background-color .18s ease; border: 1px solid rgba(255, 255, 255, 0.06);
}
.toggle::after {
  content: ''; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.02rem; height: 1.02rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform .18s ease;
}
.toggle:checked { background: var(--emerald-500); }
.toggle:checked::after { transform: translateX(1.08rem); }
.toggle:disabled { opacity: 0.45; cursor: not-allowed; }

.check-row { display: flex; align-items: flex-start; gap: 0.7rem; cursor: pointer; }
.check-row .check, .check-row .toggle { margin-top: 0.1rem; }
.check-row .t { font-size: 0.8rem; font-weight: 600; color: #e2e8f0; }
.check-row .d { font-size: 0.72rem; color: var(--faint); margin-top: .1rem; line-height: 1.1rem; }

.form-error { display: none; }
.form-error.is-visible { display: flex; }

/* --- badges / chips ----------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap;
  padding: 0.12rem 0.55rem; border-radius: 999px; border: 1px solid;
  font-size: 0.68rem; font-weight: 700; line-height: 1.15rem;
}
.badge > i { font-size: 0.62rem; }
.badge-green  { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.32); color: #6ee7b7; }
.badge-amber  { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.32); color: #fcd34d; }
.badge-red    { background: rgba(244, 63, 94, 0.12);  border-color: rgba(244, 63, 94, 0.32);  color: #fda4af; }
.badge-indigo { background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.36); color: #a5b4fc; }
.badge-sky    { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.32); color: #7dd3fc; }
.badge-violet { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.36); color: #c4b5fd; }
.badge-pink   { background: rgba(236, 72, 153, 0.12); border-color: rgba(236, 72, 153, 0.32); color: #f9a8d4; }
.badge-slate  { background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.24); color: #cbd5e1; }

.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: 0.5rem 0.75rem; border-radius: 0.75rem; border: 1px solid var(--line-strong);
  background: var(--s2); color: #cbd5e1; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease; white-space: nowrap;
}
.chip:hover { border-color: rgba(99, 102, 241, 0.5); color: #fff; }
.chip.is-active { border-color: var(--brand-500); background: rgba(99, 102, 241, 0.16); color: #fff; box-shadow: inset 0 0 0 1px var(--brand-500); }
.chip-pink.is-active { border-color: #ec4899; background: rgba(236, 72, 153, 0.14); box-shadow: inset 0 0 0 1px #ec4899; }

.dot { width: .5rem; height: .5rem; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.dot-green { background: var(--emerald-400); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.dot-amber { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }
.dot-slate { background: #64748b; }
.dot-pulse { animation: kit-pulse 1.6s ease-in-out infinite; }

/* --- tabs --------------------------------------------------------------------------- */
.tabs {
  display: flex; gap: 0.15rem; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none; border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; flex-shrink: 0;
  padding: 0.75rem 0.85rem; margin-bottom: -1px; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 0.8rem; font-weight: 700; text-decoration: none; cursor: pointer;
  background: none; border-top: 0; border-left: 0; border-right: 0;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: #e2e8f0; }
.tab.is-active { color: #fff; border-bottom-color: var(--brand-500); }
.tab .count { font-size: .65rem; padding: 0 .4rem; border-radius: 999px; background: rgba(244, 63, 94, .9); color: #fff; line-height: 1.05rem; }

.seg { display: grid; gap: 0.5rem; }
.seg-item {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; text-align: left;
  padding: 0.75rem 0.85rem; border-radius: 0.9rem; border: 1px solid var(--line-strong); background: var(--s2);
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; min-width: 0;
}
.seg-item:hover { border-color: rgba(99, 102, 241, 0.45); }
.seg-item.is-active { border-color: var(--brand-500); background: rgba(99, 102, 241, 0.12); box-shadow: inset 0 0 0 1px var(--brand-500); }
.seg-item .seg-ico { width: 2rem; height: 2rem; border-radius: .65rem; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); color: #cbd5e1; font-size: .85rem; }
.seg-item.is-active .seg-ico { background: rgba(99, 102, 241, 0.22); color: #fff; }
.seg-item .seg-t { font-size: 0.8rem; font-weight: 800; color: #fff; line-height: 1.1rem; }
.seg-item .seg-d { font-size: 0.68rem; color: var(--faint); line-height: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seg-item .seg-tick { position: absolute; top: .6rem; right: .6rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1.5px solid #4b5872; }
.seg-item.is-active .seg-tick { border-color: var(--brand-500); background: var(--brand-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/62% no-repeat; }

/* --- tables ------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: 1rem; background: var(--s1);
}
.table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.table th {
  text-align: left; white-space: nowrap; padding: 0.6rem 0.85rem;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint);
  background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid var(--line);
}
.table td { padding: 0.62rem 0.85rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: #cbd5e1; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.table .num { text-align: right; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .74rem; }
.table .nowrap { white-space: nowrap; }
.table .empty { text-align: center; padding: 2rem 1rem; color: var(--faint); }
.table-dense td { padding: 0.45rem 0.7rem; }
.table-dense th { padding: 0.5rem 0.7rem; }

/* --- key/value lists ---------------------------------------------------------------- */
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; font-size: 0.82rem; }
.kv + .kv { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { color: #f1f5f9; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* --- stats -------------------------------------------------------------------------- */
.stat { padding: 1rem; border-radius: 1rem; background: var(--s1); border: 1px solid var(--line); min-width: 0; }
.stat .stat-k { font-size: 0.7rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.stat .stat-v { font-size: 1.2rem; font-weight: 800; color: #fff; margin-top: .35rem; font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat .stat-d { font-size: 0.7rem; color: var(--faint); margin-top: .3rem; line-height: 1.05rem; }

/* --- alerts ------------------------------------------------------------------------- */
.alert { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: 0.9rem; border: 1px solid; font-size: 0.8rem; line-height: 1.3rem; }
.alert > i { margin-top: 0.2rem; flex-shrink: 0; }
.alert b, .alert strong { color: #fff; }
.alert-info    { background: rgba(99, 102, 241, 0.09); border-color: rgba(99, 102, 241, 0.3); color: #c7d2fe; }
.alert-success { background: rgba(16, 185, 129, 0.09); border-color: rgba(16, 185, 129, 0.3); color: #a7f3d0; }
.alert-warning { background: rgba(245, 158, 11, 0.09); border-color: rgba(245, 158, 11, 0.3); color: #fde68a; }
.alert-danger  { background: rgba(244, 63, 94, 0.09);  border-color: rgba(244, 63, 94, 0.3);  color: #fecdd3; }
.alert-slate   { background: rgba(148, 163, 184, 0.06); border-color: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* --- avatar ------------------------------------------------------------------------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  width: 2.5rem; height: 2.5rem; border-radius: 0.85rem; font-weight: 800; color: #c7d2fe; font-size: .95rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.15)); border: 1px solid rgba(129, 140, 248, 0.3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 2rem; height: 2rem; border-radius: .65rem; font-size: .78rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; border-radius: 1.05rem; font-size: 1.25rem; }

/* --- modal -------------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 120; display: none; align-items: flex-end; justify-content: center;
  background: rgba(2, 6, 23, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.modal.is-open { display: flex; animation: kit-fade .15s ease; }
.modal-panel {
  position: relative; width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--s1); border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.8);
  animation: kit-sheet .24s cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 640px) {
  .modal { align-items: center; padding: 1.5rem; }
  .modal-panel { max-width: 34rem; border-radius: 1.25rem; border-bottom: 1px solid var(--line-strong); animation: kit-pop .2s cubic-bezier(.16, 1, .3, 1); }
  .modal-panel.modal-lg { max-width: 46rem; }
  .modal-panel.modal-sm { max-width: 26rem; }
}
.modal-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--s1); border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 0.95rem; font-weight: 800; color: #fff; }
.modal-body { padding: 1.25rem; }
.modal-foot {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap;
  padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom)); background: var(--s1); border-top: 1px solid var(--line);
}
.modal-close {
  width: 2rem; height: 2rem; border-radius: 0.6rem; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer;
}
.modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
body.kit-lock { overflow: hidden; }

/* --- toasts ------------------------------------------------------------------------- */
.toast-stack {
  position: fixed; top: 0.9rem; left: 1rem; right: 1rem; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; pointer-events: none;
}
@media (min-width: 640px) { .toast-stack { left: auto; right: 1.25rem; top: 1.1rem; align-items: flex-end; } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 0.65rem; width: 100%; max-width: 24rem;
  padding: 0.75rem 0.9rem; border-radius: 0.9rem; border: 1px solid; font-size: 0.82rem; font-weight: 600; line-height: 1.25rem;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8); animation: kit-toast .25s cubic-bezier(.16, 1, .3, 1);
}
.toast > i { margin-top: 0.15rem; }
.toast .toast-x { margin-left: auto; color: inherit; opacity: .6; background: none; border: 0; cursor: pointer; padding: 0 0 0 .5rem; }
.toast .toast-x:hover { opacity: 1; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
.toast-success { background: #04261e; border-color: rgba(16, 185, 129, 0.5); color: #a7f3d0; }
.toast-error   { background: #2a0a14; border-color: rgba(244, 63, 94, 0.55); color: #fecdd3; }
.toast-warning { background: #2a1a04; border-color: rgba(245, 158, 11, 0.5); color: #fde68a; }
.toast-info    { background: #141436; border-color: rgba(99, 102, 241, 0.55); color: #c7d2fe; }

/* --- admin sidebar ------------------------------------------------------------------ */
.side-link {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.75rem; border-radius: 0.65rem;
  color: var(--muted); font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: background-color .12s ease, color .12s ease;
}
.side-link i { width: 1rem; text-align: center; color: var(--faint); font-size: .8rem; }
.side-link:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.side-link.is-active { background: rgba(99, 102, 241, 0.14); color: #fff; box-shadow: inset 2px 0 0 var(--brand-500); }
.side-link.is-active i { color: var(--brand-400); }
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.is-open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.7); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: kit-fade .15s ease; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: 17rem; max-width: 86vw; overflow-y: auto; background: var(--s1); border-right: 1px solid var(--line); animation: kit-drawer .22s cubic-bezier(.16, 1, .3, 1); }

/* --- misc --------------------------------------------------------------------------- */
.copy-box {
  display: flex; align-items: center; gap: 0.5rem; min-width: 0;
  padding: 0.45rem 0.45rem 0.45rem 0.8rem; border-radius: 0.75rem; background: #0b0f19; border: 1px solid var(--line-strong);
}
.copy-box .copy-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .78rem; color: #e2e8f0; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.break-any { overflow-wrap: anywhere; word-break: break-word; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: .75rem; background: var(--s2); border: 1px solid var(--line); }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--faint); }
.empty-state > i { font-size: 1.6rem; color: #334155; margin-bottom: .75rem; display: block; }
.empty-state .t { color: #cbd5e1; font-weight: 700; font-size: .9rem; }
.empty-state .d { font-size: .78rem; margin-top: .3rem; }
.stars { color: #fbbf24; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #334155; }
.spinner { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--brand-400); animation: kit-spin .8s linear infinite; display: inline-block; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.pager { display: flex; align-items: center; justify-content: center; gap: .35rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 2rem; height: 2rem; padding: 0 .55rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .6rem; font-size: .78rem; font-weight: 700; border: 1px solid var(--line-strong); background: var(--s2); color: #cbd5e1; text-decoration: none; }
.pager a:hover { border-color: rgba(99, 102, 241, .5); color: #fff; }
.pager .is-active { background: var(--brand-600); border-color: var(--brand-500); color: #fff; }
.pager .is-disabled { opacity: .4; pointer-events: none; }

/* receipt / success */
.success-ring {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #34d399, #059669); color: #fff; font-size: 1.9rem;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12), 0 0 0 16px rgba(16, 185, 129, 0.06), 0 18px 40px -12px rgba(16, 185, 129, 0.7);
  animation: kit-pop .45s cubic-bezier(.34, 1.56, .64, 1);
}
.receipt-edge { height: 12px; background: radial-gradient(circle at 6px -2px, transparent 6px, var(--s1) 6.5px) repeat-x; background-size: 12px 12px; }

/* --- animations --------------------------------------------------------------------- */
@keyframes kit-spin { to { transform: rotate(360deg); } }
@keyframes kit-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kit-sheet { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes kit-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes kit-toast { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes kit-drawer { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes kit-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
