/* ==========================================================================
   UBS FINCORP â€” app.css
   Global design tokens + component overrides for user & admin UI
========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
-------------------------------------------------------------------------- */
:root {
  /* Brand */
  --ubs-primary:        #0052ff;
  --ubs-primary-dark:   #003ecc;

  /* Neutrals */
  --ubs-black:          #050506;
  --ubs-ink:            #0a0b0d;
  --ubs-card:           #ffffff;
  --ubs-soft:           #f7f7f7;
  --ubs-strong:         #eef0f3;
  --ubs-line:           #dee1e6;
  --ubs-muted:          #7c828a;
  --ubs-body:           #5b616e;

  /* Semantic */
  --ubs-success:        #05b169;
  --ubs-danger:         #cf202f;
  --ubs-warning:        #f4b000;
  --ubs-info:           #0052ff;

  /* Radius */
  --ubs-radius-sm:      8px;
  --ubs-radius:         12px;
  --ubs-radius-lg:      16px;
  --ubs-radius-xl:      18px;
  --ubs-radius-pill:    100px;
}

/* --------------------------------------------------------------------------
   2. BASE
-------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle transitions only on color-related properties */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, opacity, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

/* Remove tap highlight on mobile */
a, button { -webkit-tap-highlight-color: transparent; }

button:disabled,
.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* --------------------------------------------------------------------------
   3. OTP INPUT
-------------------------------------------------------------------------- */
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 500;
  border: 1.5px solid var(--ubs-line);
  border-radius: var(--ubs-radius);
  background: #fff;
  color: var(--ubs-ink);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
  -webkit-appearance: none;
}
.otp-input:focus {
  border-color: var(--ubs-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}
.dark .otp-input {
  background: #16181c;
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.dark .otp-input:focus {
  border-color: var(--ubs-primary);
}

/* --------------------------------------------------------------------------
   4. PIN DOTS
-------------------------------------------------------------------------- */
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 2px solid var(--ubs-line);
  background: transparent;
  transition: background 200ms, border-color 200ms;
}
.pin-dot.filled {
  background: var(--ubs-ink);
  border-color: var(--ubs-ink);
}
.dark .pin-dot {
  border-color: rgba(255, 255, 255, 0.2);
}
.dark .pin-dot.filled {
  background: #fff;
  border-color: #fff;
}

/* --------------------------------------------------------------------------
   5. NUMPAD
-------------------------------------------------------------------------- */
.numpad-key {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-radius: var(--ubs-radius);
  font-size: 1.25rem;
  font-weight: 500;
  background: var(--ubs-soft);
  color: var(--ubs-ink);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.numpad-key:active { background: var(--ubs-strong); }
.dark .numpad-key { background: #16181c; color: #fff; }
.dark .numpad-key:active { background: #1f2227; }

/* --------------------------------------------------------------------------
   6. BALANCE + AMOUNTS
-------------------------------------------------------------------------- */
.balance-amount {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.txn-amount {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. BADGES
-------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  min-height: 22px;
  border-radius: var(--ubs-radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
/* Colored dot before badge text */
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

/* Light */
.badge-pending    { background: #fff7e0; color: #b07a00; }
.badge-approved   { background: #e6f9f0; color: #027a48; }
.badge-rejected   { background: #fff0f0; color: #cf202f; }
.badge-reverify   { background: #e8eeff; color: #0052ff; }
.badge-banned     { background: #ffeaea; color: #cf202f; }
.badge-completed  { background: #e6f9f0; color: #027a48; }
.badge-failed     { background: #fff0f0; color: #cf202f; }
.badge-processing { background: #e8eeff; color: #0052ff; }
.badge-paid       { background: #e6f9f0; color: #027a48; }
.badge-active     { background: #e6f9f0; color: #027a48; }
.badge-inactive   { background: #f4f5f7; color: #7c828a; }

/* Dark */
.dark .badge-pending    { background: rgba(240, 180, 0, 0.15);  color: #f4b000; }
.dark .badge-approved   { background: rgba(5, 177, 105, 0.15);  color: #05b169; }
.dark .badge-rejected   { background: rgba(207, 32, 47, 0.15);  color: #f87171; }
.dark .badge-reverify   { background: rgba(0, 82, 255, 0.15);   color: #5b8aff; }
.dark .badge-banned     { background: rgba(207, 32, 47, 0.12);  color: #f87171; }
.dark .badge-completed  { background: rgba(5, 177, 105, 0.15);  color: #05b169; }
.dark .badge-failed     { background: rgba(207, 32, 47, 0.15);  color: #f87171; }
.dark .badge-processing { background: rgba(0, 82, 255, 0.15);   color: #5b8aff; }
.dark .badge-paid       { background: rgba(5, 177, 105, 0.15);  color: #05b169; }
.dark .badge-active     { background: rgba(5, 177, 105, 0.15);  color: #05b169; }
.dark .badge-inactive   { background: rgba(255,255,255,.06);     color: #7c828a; }

/* --------------------------------------------------------------------------
   8. DROPZONE (file upload)
-------------------------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--ubs-line);
  border-radius: var(--ubs-radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--ubs-primary);
  background: rgba(0, 82, 255, 0.04);
}
.dark .dropzone { border-color: rgba(255, 255, 255, 0.12); }
.dark .dropzone:hover,
.dark .dropzone.dragover {
  border-color: var(--ubs-primary);
  background: rgba(0, 82, 255, 0.08);
}

/* --------------------------------------------------------------------------
   9. TOAST SYSTEM  (matches app.js showToast)
-------------------------------------------------------------------------- */
#ubs-toast-root {
  position: fixed;
  right: 16px;
  bottom: 80px; /* above mobile bottom nav */
  z-index: 99999;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

@media (min-width: 768px) {
  #ubs-toast-root { bottom: 24px; }
}

.ubs-toast-item {
  background: #0a0b0d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--ubs-radius-lg);
  padding: 12px 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: ubsToastIn 0.18s ease both;
}
.ubs-toast-item.success { background: #043f28; border-color: rgba(5, 177, 105, 0.3); }
.ubs-toast-item.error   { background: #4b0710; border-color: rgba(207, 32, 47, 0.3); }
.ubs-toast-item.warning { background: #4a3400; border-color: rgba(244, 176, 0, 0.3); }
.ubs-toast-item.info    { background: #002080; border-color: rgba(0, 82, 255, 0.3); }

.ubs-toast-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  margin-top: 1px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

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

/* --------------------------------------------------------------------------
   10. LOADER  (matches app.js showLoader)
-------------------------------------------------------------------------- */
.ubs-loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ubs-loader[hidden] { display: none !important; }

.ubs-loader-card {
  background: #fff;
  color: var(--ubs-ink);
  border-radius: var(--ubs-radius-xl);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-size: 14px;
  font-weight: 600;
}
.dark .ubs-loader-card { background: #16181c; color: #fff; }

.ubs-loader-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--ubs-ink);
  animation: ubsSpin 0.75s linear infinite;
  flex-shrink: 0;
}
.dark .ubs-loader-spinner {
  border-color: rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
}

@keyframes ubsSpin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   11. DATA TABLE
-------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.data-table th {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ubs-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ubs-line);
  text-align: left;
  white-space: nowrap;
  background: rgba(247, 247, 247, 0.8);
  position: sticky;
  top: 0;
  z-index: 1;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f4f4f6;
  font-size: 0.875rem;
  vertical-align: middle;
  line-height: 1.4;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0, 82, 255, 0.025); }

.dark .data-table th {
  color: var(--ubs-muted);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}
.dark .data-table td { border-bottom-color: rgba(255, 255, 255, 0.05); }
.dark .data-table tr:hover td { background: rgba(255, 255, 255, 0.03); }

.table-wrap, .overflow-x-auto { -webkit-overflow-scrolling: touch; }

/* --------------------------------------------------------------------------
   12. ADMIN PANEL COMPONENTS
-------------------------------------------------------------------------- */
.ubs-admin-body { -webkit-font-smoothing: antialiased; }

.ubs-admin-sidebar {
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
}
.ubs-admin-brand {
  background: radial-gradient(circle at top left, rgba(255,255,255,.1), transparent 34%), #050506;
}

/* Active nav link */
.ubs-admin-nav-link {
  position: relative;
  min-height: 42px;
}
.ubs-admin-nav-link.active,
.ubs-admin-nav-link[aria-current="page"] {
  background: #ffffff !important;
  color: #050506 !important;
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.1);
}
.ubs-admin-nav-link.active::before,
.ubs-admin-nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: #fff;
}

.ubs-admin-topbar { box-shadow: 0 1px 0 rgba(16, 24, 40, 0.05); }

.ubs-admin-content { animation: ubsFadeUp 0.2s ease both; }
@keyframes ubsFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Admin cards */
.admin-card,
.stats-card {
  border-radius: var(--ubs-radius-xl) !important;
  box-shadow: 0 4px 20px rgba(16, 24, 40, 0.06);
}
.dark .admin-card,
.dark .stats-card {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   13. FORM INPUTS (global)
-------------------------------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
select,
textarea {
  min-height: 42px;
  border-radius: var(--ubs-radius);
  font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ubs-ink) !important;
  box-shadow: 0 0 0 4px rgba(10, 11, 13, 0.08) !important;
}
.dark input:focus,
.dark select:focus,
.dark textarea:focus {
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1) !important;
}

/* --------------------------------------------------------------------------
   14. BUTTONS
-------------------------------------------------------------------------- */
.btn,
button[type="submit"],
a.btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover,
button[type="submit"]:hover { transform: translateY(-1px); }
.btn:active,
button[type="submit"]:active { transform: translateY(0); }

/* --------------------------------------------------------------------------
   15. SCROLLBAR
-------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dee1e6; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }

/* --------------------------------------------------------------------------
   16. SAFE AREA (notched phones)
-------------------------------------------------------------------------- */
.bottom-nav-safe {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

/* --------------------------------------------------------------------------
   17. MOBILE ADMIN RESPONSIVE
-------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .ubs-admin-content { padding: 14px !important; }
  .ubs-admin-topbar  { height: 60px; }
  .data-table { min-width: 560px; }
  .data-table th,
  .data-table td { padding: 10px 12px; }
  #ubs-toast-root { left: 12px; right: 12px; bottom: 80px; max-width: none; }
}

/* --------------------------------------------------------------------------
   18. REDUCED MOTION
-------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* =======================================================================
   UBS Admin Safe Web-App Layer
   Works with the existing Tailwind admin header structure.
======================================================================= */
:root {
  --admin-bg: #f5f7fb;
  --admin-card: rgba(255,255,255,.88);
  --admin-card-solid: #ffffff;
  --admin-text: #071126;
  --admin-muted: rgba(7,17,38,.58);
  --admin-line: rgba(7,17,38,.09);
  --admin-soft: rgba(7,17,38,.045);
  --admin-red: #e50914;
  --admin-red-2: #b20710;
  --admin-radius: 22px;
}
.dark {
  --admin-bg: #08080f;
  --admin-card: rgba(255,255,255,.055);
  --admin-card-solid: #11121a;
  --admin-text: #f8fafc;
  --admin-muted: rgba(248,250,252,.58);
  --admin-line: rgba(255,255,255,.09);
  --admin-soft: rgba(255,255,255,.06);
}
[x-cloak] { display: none !important; }
html { background: var(--admin-bg); }
.ubs-admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(229,9,20,.08), transparent 30rem),
    radial-gradient(circle at bottom left, rgba(0,82,255,.06), transparent 26rem),
    var(--admin-bg);
  color: var(--admin-text);
  overflow-x: hidden;
}
.ubs-admin-body,
.ubs-admin-body * { font-weight: 500; }
.ubs-admin-body b,
.ubs-admin-body strong,
.ubs-admin-body .font-bold,
.ubs-admin-body .font-semibold,
.ubs-admin-body .font-extrabold,
.ubs-admin-body .font-black { font-weight: 560 !important; }
.ubs-admin-shell { min-height: 100vh; }
.ubs-admin-sidebar,
.ubs-admin-mobile-sidebar {
  background: linear-gradient(180deg, #07070c 0%, #10111a 58%, #190407 100%) !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 20px 0 62px rgba(0,0,0,.28);
}
.ubs-admin-brand {
  min-height: 74px;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
.ubs-key-logo {
  font-size: 11px;
  letter-spacing: .05em;
  background: linear-gradient(135deg, var(--admin-red), var(--admin-red-2)) !important;
  box-shadow: 0 14px 32px rgba(229,9,20,.26) !important;
}
.ubs-admin-nav-link {
  position: relative;
  min-height: 44px;
  color: rgba(255,255,255,.64);
}
.ubs-admin-nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.065) !important;
  box-shadow: none !important;
}
.ubs-admin-nav-link.active,
.ubs-admin-nav-link[aria-current="page"],
.ubs-admin-nav-link.bg-primary {
  background: linear-gradient(135deg, var(--admin-red), var(--admin-red-2)) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(229,9,20,.24) !important;
}
.ubs-admin-nav-link.active::before,
.ubs-admin-nav-link[aria-current="page"]::before { display: none !important; }
.ubs-admin-topbar {
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--admin-bg) 90%, transparent) !important;
  border-bottom: 1px solid var(--admin-line) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: none !important;
}
.ubs-admin-content {
  width: 100%;
  max-width: 1360px !important;
  padding: 16px max(14px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
  animation: ubsFadeUp .18s ease both;
}
@media (min-width: 768px) {
  .ubs-admin-content { padding: 24px !important; }
}
@media (min-width: 1200px) {
  .ubs-admin-content { padding: 30px !important; }
}
.ubs-admin-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ubs-dashboard { display: grid; gap: 16px; }
.ubs-admin-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  background: linear-gradient(135deg, #090910 0%, #171821 56%, #5d070b 100%);
  color: #fff;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  display: grid;
  gap: 18px;
}
.ubs-admin-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(229,9,20,.26);
  filter: blur(8px);
}
.ubs-hero-copy,
.ubs-hero-actions { position: relative; z-index: 1; }
.ubs-eyebrow {
  display: inline-flex;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.62);
  margin-bottom: 8px;
}
.ubs-hero-copy h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 560;
}
.ubs-hero-copy p {
  margin: 9px 0 0;
  max-width: 690px;
  color: rgba(255,255,255,.66);
  font-size: 13.5px;
  line-height: 1.55;
}
.ubs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ubs-btn {
  min-height: 42px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: var(--admin-card);
  color: var(--admin-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  font-size: 13px;
  text-decoration: none;
}
.ubs-btn-primary {
  background: linear-gradient(135deg, var(--admin-red), var(--admin-red-2));
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.ubs-btn-soft {
  background: rgba(255,255,255,.10);
  color: #fff;
  border-color: rgba(255,255,255,.13);
}
.ubs-btn:hover { transform: translateY(-1px); }
@media (min-width: 900px) {
  .ubs-admin-hero { grid-template-columns: 1fr auto; align-items: end; padding: 26px; }
}
.ubs-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .ubs-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.ubs-stat-card,
.ubs-metric-strip article,
.ubs-admin-panel {
  background: var(--admin-card);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  box-shadow: 0 14px 42px rgba(15,23,42,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.dark .ubs-stat-card,
.dark .ubs-metric-strip article,
.dark .ubs-admin-panel { box-shadow: 0 18px 52px rgba(0,0,0,.22); }
.ubs-stat-card { padding: 15px; display: grid; gap: 6px; min-height: 126px; align-content: start; }
.ubs-stat-card span,
.ubs-metric-strip span {
  color: var(--admin-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ubs-stat-card strong,
.ubs-metric-strip strong {
  color: var(--admin-text);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(19px, 4.6vw, 26px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.ubs-stat-card small,
.ubs-metric-strip small { color: var(--admin-muted); font-size: 12px; line-height: 1.35; }
.ubs-stat-card.attention strong { color: var(--admin-red); }
.ubs-metric-strip { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ubs-metric-strip article { padding: 16px; display: grid; gap: 7px; }
@media (min-width: 700px) { .ubs-metric-strip { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.ubs-panel-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1040px) { .ubs-panel-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.ubs-admin-panel { overflow: hidden; }
.ubs-admin-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--admin-line);
}
.ubs-admin-panel h3 { margin: 0; color: var(--admin-text); font-size: 15px; letter-spacing: -.015em; font-weight: 560; }
.ubs-admin-panel header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 12px; }
.ubs-admin-panel header a,
.ubs-row-action { color: var(--admin-red); font-size: 12px; text-decoration: none; white-space: nowrap; }
.ubs-list { display: grid; }
.ubs-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--admin-line);
  text-decoration: none;
  color: inherit;
}
.ubs-list-row:last-child { border-bottom: 0; }
.ubs-list-row.clickable:hover { background: var(--admin-soft); }
.ubs-row-avatar,
.ubs-admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
  font-size: 13px;
  flex: 0 0 auto;
}
.ubs-row-avatar.money { background: linear-gradient(135deg, var(--admin-red), var(--admin-red-2)); }
.ubs-row-avatar.small { width: 34px; height: 34px; border-radius: 12px; font-size: 12px; }
.ubs-row-main { min-width: 0; flex: 1; display: grid; gap: 3px; }
.ubs-row-main b,
.ubs-table-user b { color: var(--admin-text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.ubs-row-main small,
.ubs-table-user small { color: var(--admin-muted); font-size: 11.5px; font-family: "JetBrains Mono", monospace; }
.ubs-row-amount { color: var(--admin-text); font-family: "JetBrains Mono", monospace; font-size: 13px; white-space: nowrap; }
.ubs-empty { padding: 24px 18px; color: var(--admin-muted); text-align: center; font-size: 13px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--admin-card-solid) 88%, transparent);
  border-bottom: 1px solid var(--admin-line);
  color: var(--admin-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  text-align: left;
  white-space: nowrap;
  font-weight: 560;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-line);
  color: var(--admin-text);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--admin-soft); }
.data-table tr:last-child td { border-bottom: 0; }
.ubs-table-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ubs-table-user span:last-child { display: grid; gap: 2px; min-width: 0; }
.mono { font-family: "JetBrains Mono", monospace; font-size: 12px !important; }
.badge { font-weight: 560; }
@media (max-width: 520px) {
  .ubs-admin-content { padding-left: 12px !important; padding-right: 12px !important; }
  .ubs-dashboard { gap: 12px; }
  .ubs-admin-hero { border-radius: 22px; padding: 18px; }
  .ubs-stat-grid { gap: 10px; }
  .ubs-stat-card { min-height: 118px; padding: 13px; border-radius: 18px; }
  .ubs-hero-actions .ubs-btn { flex: 1 1 auto; }
  .ubs-admin-panel > header { padding: 14px 15px; }
  .ubs-list-row { padding: 12px 15px; }
}
@media (max-width: 374px) {
  .ubs-stat-grid { grid-template-columns: 1fr; }
}
@media (display-mode: standalone) {
  .ubs-admin-topbar { min-height: calc(64px + env(safe-area-inset-top)); }
}