/* ═══════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════ */
:root {
  --bg:        #090A0D;
  --bg-2:      #0C0D11;
  --bg-3:      #0F1016;
  --sidebar:   #0A0B0F;
  --surface:   #131419;
  --card:      #17181F;
  --card-2:    #1C1D26;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(78,205,196,0.22);
  --teal:      #4ECDC4;
  --teal-d:    rgba(78,205,196,0.10);
  --teal-d2:   rgba(78,205,196,0.06);
  --gold:      #C9A84C;
  --gold-d:    rgba(201,168,76,0.10);
  --red:       #D95555;
  --red-d:     rgba(217,85,85,0.10);
  --amber:     #D4A017;
  --amber-d:   rgba(212,160,23,0.10);
  --blue:      #5B8DEF;
  --blue-d:    rgba(91,141,239,0.10);
  --text:      #ECEEF2;
  --text-2:    #8B8E9D;
  --text-3:    #454858;
  --r:         10px;
  --r-lg:      14px;
  --r-xl:      20px;
  --font:      'Outfit', sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --sidebar-w: 224px;
  --header-h:  56px;
}

/* ═══════════════════════════════════════════════
   LIGHT THEME OVERRIDES
═══════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:        #F8FAFC;
  --bg-2:      #F1F5F9;
  --bg-3:      #E8EDF5;
  --sidebar:   #FFFFFF;
  --surface:   #F1F5F9;
  --card:      #FFFFFF;
  --card-2:    #F8FAFC;
  --border:    rgba(15,23,42,0.09);
  --border-hi: rgba(8,145,178,0.40);
  --teal:      #0891B2;
  --teal-d:    rgba(8,145,178,0.10);
  --teal-d2:   rgba(8,145,178,0.06);
  --gold:      #B45309;
  --gold-d:    rgba(180,83,9,0.10);
  --red:       #DC2626;
  --red-d:     rgba(220,38,38,0.10);
  --amber:     #B45309;
  --amber-d:   rgba(180,83,9,0.10);
  --blue:      #1D4ED8;
  --blue-d:    rgba(29,78,216,0.10);
  --text:      #0F172A;
  --text-2:    #475569;
  --text-3:    #94A3B8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb            { background: rgba(0,0,0,0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover      { background: rgba(0,0,0,0.20); }

/* Fix skeleton shimmer for light */
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--card-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
}

/* Fix sidebar nav active highlight for light */
[data-theme="light"] .nav-item.active,
[data-theme="light"] .nav-item:hover {
  background: var(--teal-d);
}

/* Adjust table row hover */
[data-theme="light"] tbody tr:hover td {
  background: var(--bg-2);
}

/* ═══════════════════════════════════════════════
   THEME TOGGLE BUTTON
═══════════════════════════════════════════════ */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px 0 11px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: color 0.2s, border-color 0.2s, background 0.2s,
              box-shadow 0.2s, transform 0.16s cubic-bezier(0.16,1,0.3,1);
}

/* Shine sweep on hover */
.theme-toggle::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    transparent 30%, rgba(255,255,255,0.07) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
  transition: transform 0.45s ease;
}
.theme-toggle:hover::before { transform: translateX(160%); }

.theme-toggle:hover {
  border-color: var(--border-hi);
  background: var(--card-2);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--teal-d2), 0 4px 18px rgba(0,0,0,0.22);
}

.theme-toggle:active { transform: scale(0.95); }

.theme-toggle-icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
  transition: transform 0.42s cubic-bezier(0.16,1,0.3,1), opacity 0.2s;
  display: block;
}

.theme-toggle-icon.icon-sun  { color: var(--gold); }
.theme-toggle-icon.icon-moon { color: var(--teal); }

.theme-toggle.is-spinning .theme-toggle-icon {
  animation: theme-spin 0.42s cubic-bezier(0.16,1,0.3,1);
}

@keyframes theme-spin {
  0%   { transform: rotate(0deg)   scale(0.55) opacity(0); }
  60%  { transform: rotate(220deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  height: 100%;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

button { font-family: var(--font); cursor: pointer; }

input, select, textarea { font-family: var(--font); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ═══════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════ */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(78,205,196,0.15) 40%, transparent);
  pointer-events: none;
}

.sidebar-brand {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-logo-mark {
  width: 30px; height: 30px;
  background: var(--teal);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: var(--bg); letter-spacing: -0.03em;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  font-size: 10px; color: var(--text-3);
  font-weight: 400; margin-top: -2px;
}

.sidebar-section {
  padding: 8px 12px 4px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-nav {
  flex: 1;
  padding: 8px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.nav-item.active {
  background: var(--teal-d);
  color: var(--teal);
  border: 1px solid var(--border-hi);
}

.nav-item.active::before {
  content: '';
  position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  opacity: 0.7;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 12.5px; font-weight: 600;
  color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.user-role {
  font-size: 10.5px; color: var(--text-3);
  text-transform: capitalize;
}

.logout-btn {
  width: 26px; height: 26px;
  background: none; border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.logout-btn:hover { color: var(--red); background: var(--red-d); }

/* ── Main content ── */
.main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.page-header {
  height: var(--header-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
}

.page-title {
  font-size: 16px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}

.page-subtitle { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 14px;
  height: 34px;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: scale(0.97); }

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { background: var(--teal); color: var(--bg); }
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--border-hi); color: var(--text); }

.btn-danger {
  background: var(--red-d);
  border: 1px solid rgba(217,85,85,0.2);
  color: var(--red);
}
.btn-danger:hover { background: rgba(217,85,85,0.18); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

.btn-icon {
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-3);
  transition: all 0.15s ease;
}
.btn-icon:hover { border-color: var(--border-hi); color: var(--text); }
.btn-icon svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px; font-weight: 600; color: var(--text);
}

/* ── Stat cards ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.stat-card:hover::before { opacity: 1; }

.stat-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 26px; font-weight: 800;
  color: var(--text); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-family: var(--font);
  line-height: 1;
}

.stat-value.teal { color: var(--teal); }
.stat-value.gold { color: var(--gold); }

.stat-sub {
  font-size: 11px; color: var(--text-3);
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════ */
.table-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.filter-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-3);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}

.filter-select, .filter-input {
  height: 32px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--border-hi);
}

.filter-input { width: 130px; }
.filter-select { min-width: 130px; }

.filter-sep { flex: 1; }

.filter-actions { display: flex; gap: 6px; align-items: flex-end; }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  user-select: none;
}

thead th.sortable { cursor: pointer; }
thead th.sortable:hover { color: var(--text-2); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }

tbody td {
  padding: 11px 14px;
  color: var(--text-2);
  vertical-align: middle;
}

td.mono { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
td.amount { font-family: var(--mono); font-weight: 600; color: var(--text); }
td.team-cell { color: var(--text); font-weight: 500; }
td.time-cell { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* Inline edit */
.editable-cell {
  cursor: pointer;
  border-radius: 6px;
  padding: 3px 5px;
  margin: -3px -5px;
  transition: background 0.15s ease;
}
.editable-cell:hover { background: rgba(78,205,196,0.08); color: var(--text); }

.cell-input {
  width: 100%; max-width: 120px;
  padding: 3px 7px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  color: var(--text); font-family: var(--font); font-size: 13px;
  outline: none;
}

.cell-select {
  padding: 3px 7px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  color: var(--text); font-family: var(--font); font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── Check status badges (cs) ───────────────────────────────── */
.badge-cs-confirmed {
  background: var(--teal-d); color: var(--teal);
  border: 1px solid rgba(78,205,196,0.22);
}
.badge-cs-rejected {
  background: var(--red-d); color: var(--red);
  border: 1px solid rgba(217,85,85,0.22);
}
.badge-cs-working {
  background: var(--blue-d); color: var(--blue);
  border: 1px solid rgba(91,141,239,0.22);
}
.badge-cs-frozen {
  background: rgba(255,255,255,0.05); color: var(--text-3);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Payout status badges (ps) ──────────────────────────────── */
.badge-ps-unpaid {
  background: var(--amber-d); color: var(--amber);
  border: 1px solid rgba(212,160,23,0.22);
}
.badge-ps-processing {
  background: var(--blue-d); color: var(--blue);
  border: 1px solid rgba(91,141,239,0.22);
}
.badge-ps-paid {
  background: var(--gold-d); color: var(--gold);
  border: 1px solid rgba(201,168,76,0.22);
}

/* Legacy status badges (kept so old data renders) */
.badge-approved  { background: var(--teal-d);  color: var(--teal);  border: 1px solid rgba(78,205,196,0.22); }
.badge-pending   { background: var(--amber-d); color: var(--amber); border: 1px solid rgba(212,160,23,0.22); }
.badge-rejected  { background: var(--red-d);   color: var(--red);   border: 1px solid rgba(217,85,85,0.22); }

.badge-role-admin    { background: var(--teal-d);  color: var(--teal);  border: 1px solid rgba(78,205,196,0.2); }
.badge-role-operator { background: var(--gold-d);  color: var(--gold);  border: 1px solid rgba(201,168,76,0.2); }
.badge-role-partner  { background: var(--blue-d);  color: var(--blue);  border: 1px solid rgba(91,141,239,0.2); }

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.pagination-info {
  font-size: 12px; color: var(--text-3);
  flex: 1;
}

.page-btn {
  width: 30px; height: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}
.page-btn:hover { border-color: var(--border-hi); color: var(--text); }
.page-btn.active { background: var(--teal); border-color: var(--teal); color: var(--bg); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ─ Loading skeleton ─ */
.loading-row td {
  padding: 13px 14px;
}

.skeleton {
  height: 14px; border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--card-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  width: 40px; height: 40px;
  color: var(--text-3);
  margin-bottom: 14px;
}

.empty-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-sub   { font-size: 12.5px; color: var(--text-3); }

/* ═══════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-2); letter-spacing: 0.03em;
}

.form-label span { color: var(--red); margin-left: 2px; }

.form-input, .form-select {
  height: 38px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font); font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-select:focus { border-color: var(--border-hi); }
.form-input::placeholder { color: var(--text-3); }

.form-select { cursor: pointer; }

.form-error {
  font-size: 11.5px; color: var(--red);
  display: none;
}

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.open { display: flex; animation: fade-in 0.18s ease; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%; max-width: 460px;
  animation: pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }

.modal-close {
  width: 28px; height: 28px;
  background: none; border: none;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; cursor: pointer;
  transition: all 0.15s ease;
}
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-close svg { width: 15px; height: 15px; }

.modal-body {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}

.modal-footer {
  padding: 14px 22px 18px;
  display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
  max-width: 320px;
}

.toast.hide {
  animation: toast-out 0.22s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  to   { opacity: 0; transform: translateX(20px); }
}

.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast-success svg { color: var(--teal); }
.toast-error svg   { color: var(--red); }
.toast-info svg    { color: var(--blue); }

/* ═══════════════════════════════════════════════
   DASHBOARD SPECIFIC
═══════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.recent-list { display: flex; flex-direction: column; gap: 0; }

.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; }

.recent-team  { flex: 1; font-size: 12.5px; font-weight: 500; }
.recent-amount {
  font-size: 13px; font-weight: 700;
  font-family: var(--mono); color: var(--teal);
}
.recent-time  { font-size: 11px; color: var(--text-3); min-width: 80px; text-align: right; }

/* Teams grid */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.15s ease;
  display: block;
}

.team-card:hover {
  border-color: var(--border-hi);
  background: var(--card-2);
}

.team-name {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}

.team-meta {
  display: flex; justify-content: space-between;
  align-items: center;
}

.team-turnover {
  font-size: 20px; font-weight: 800;
  color: var(--teal); font-family: var(--mono);
  letter-spacing: -0.03em;
}

.team-date { font-size: 11px; color: var(--text-3); }
.team-checks { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
.login-page {
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.login-left {
  width: 42%;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-left-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(78,205,196,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.04) 0%, transparent 60%);
}

.login-brand {
  position: absolute; top: 48px; left: 48px;
  display: flex; align-items: center; gap: 12px;
}

.login-brand-mark {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  color: var(--bg); letter-spacing: -0.04em;
}

.login-brand-name {
  font-size: 16px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}

.login-tagline {
  position: relative; z-index: 1;
}

.login-tagline h1 {
  font-size: 36px; font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 14px;
}

.login-tagline h1 span { color: var(--teal); }

.login-tagline p {
  font-size: 14px; color: var(--text-3); line-height: 1.65;
  max-width: 280px;
}

.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--bg);
}

.login-form-wrap {
  width: 100%; max-width: 360px;
}

.login-form-title {
  font-size: 22px; font-weight: 800;
  color: var(--text); letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-form-sub {
  font-size: 13px; color: var(--text-3);
  margin-bottom: 32px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-input {
  width: 100%; height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font); font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.login-input:focus { border-color: var(--border-hi); }
.login-input::placeholder { color: var(--text-3); }

.login-submit {
  width: 100%; height: 44px;
  background: var(--teal);
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 14.5px; font-weight: 700;
  color: var(--bg); cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  margin-top: 4px;
}
.login-submit:hover { opacity: 0.88; }
.login-submit:active { transform: scale(0.98); }

.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-3);
  cursor: pointer;
}

.login-error {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  background: var(--red-d);
  border: 1px solid rgba(217,85,85,0.22);
  border-radius: var(--r);
  font-size: 13px; color: var(--red);
}

.login-error svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   USERS PAGE
═══════════════════════════════════════════════ */
.users-table tr td:first-child { color: var(--text-3); font-family: var(--mono); font-size: 12px; }

/* ═══════════════════════════════════════════════
   PARTNER DASHBOARD
═══════════════════════════════════════════════ */
.partner-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.partner-hero-text h2 {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 4px;
}
.partner-hero-text p { font-size: 13px; color: var(--text-3); }

.partner-hero-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--teal-d);
  border: 1px solid var(--border-hi);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--teal);
}

/* ═══════════════════════════════════════════════
   BIND MODAL
═══════════════════════════════════════════════ */
.bind-waiting {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.bind-pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0; margin-top: 2px;
  animation: bind-pulse 1.5s ease-in-out infinite;
}

@keyframes bind-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(78,205,196,0.5); }
  50%       { opacity: 0.75; transform: scale(1.2); box-shadow: 0 0 0 8px rgba(78,205,196,0); }
}

.bind-instruction-title {
  font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 5px;
}

.bind-instruction-sub {
  font-size: 12px; color: var(--text-3); line-height: 1.6;
}

.bind-found-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--teal-d2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  margin-bottom: 16px;
  animation: pop 0.22s cubic-bezier(0.16,1,0.3,1);
}

.bind-found-icon {
  width: 38px; height: 38px;
  background: var(--teal-d);
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); flex-shrink: 0;
}

.bind-found-title {
  font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px;
}

.bind-found-id {
  font-size: 11px; font-family: var(--mono); color: var(--text-3); margin-bottom: 2px;
}

.bind-found-by {
  font-size: 11px; color: var(--text-3);
}

/* Multiple pending list */
.bind-pending-list {
  display: flex; flex-direction: column; gap: 8px;
}

.bind-list-item {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s ease;
}

.bind-list-item:hover {
  border-color: var(--border-hi);
  background: var(--card-2);
}

.bind-list-title {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px;
}

.bind-list-meta {
  font-size: 11px; color: var(--text-3);
}

/* ═══════════════════════════════════════════════
   GEO BADGE
═══════════════════════════════════════════════ */
.geo-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--blue-d);
  border: 1px solid rgba(91,141,239,0.22);
  color: var(--blue);
  font-family: var(--mono);
}

/* ═══════════════════════════════════════════════
   BTN-CHART
═══════════════════════════════════════════════ */
.btn-chart {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  font-size: 12.5px; font-weight: 600;
  border-radius: var(--r);
  border: 1px solid rgba(78,205,196,0.28);
  background: rgba(78,205,196,0.08);
  color: var(--teal);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-chart:hover {
  background: rgba(78,205,196,0.16);
  border-color: var(--teal);
}
.btn-chart:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════════
   CHART MODAL
═══════════════════════════════════════════════ */
.modal-chart {
  max-width: 860px;
  width: 100%;
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.chart-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  transition: border-color 0.15s;
}
.chart-stat:hover { border-color: var(--border-hi); }

.chart-stat-label {
  font-size: 10.5px; font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 5px;
}

.chart-stat-value {
  font-size: 18px; font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
  letter-spacing: -0.02em;
}
.chart-stat-value.teal { color: var(--teal); }
.chart-stat-value.gold { color: var(--gold); font-size: 13px; font-weight: 700; }

.chart-wrap {
  position: relative;
  height: 320px;
  padding: 4px 0;
}

.chart-loading { padding: 8px 0 4px; }

/* ═══════════════════════════════════════════════
   ERROR PAGE
═══════════════════════════════════════════════ */
.error-page {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; text-align: center;
}
.error-code {
  font-size: 72px; font-weight: 800;
  color: var(--teal); letter-spacing: -0.04em; line-height: 1;
}
.error-msg { font-size: 16px; color: var(--text-2); }
.error-back { margin-top: 8px; }

/* ═══════════════════════════════════════════════
   RESPONSIVE (sidebar collapse on small)
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  body { overflow: auto; }
  .layout { flex-direction: column; height: auto; }
  .sidebar { width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav { flex-direction: row; padding: 8px; overflow-x: auto; }
  .sidebar-footer { display: none; }
  .main { overflow: auto; height: auto; }
  .page-body { overflow: auto; height: auto; }
  .login-left { display: none; }
  .login-right { padding: 32px 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
