/* 
   PAYVIT ADMIN — css/core.css
   Tokens · Reset · App Shell · Shared components
  */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Syne:wght@600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── TOKENS */
:root {
  --bg:            #0b1220;
  --surface:       #111827;
  --surface-2:     #1a2236;
  --surface-3:     #222d42;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.13);

  --teal:          #2dd4bf;
  --teal-dim:      rgba(45,212,191,0.12);
  --teal-glow:     rgba(45,212,191,0.25);
  --teal-dark:     #0f766e;

  --danger:        #f43f5e;
  --danger-dim:    rgba(244,63,94,0.12);
  --warn:          #f59e0b;
  --warn-dim:      rgba(245,158,11,0.12);
  --success:       #10b981;
  --success-dim:   rgba(16,185,129,0.12);

  --text:          #f0f6ff;
  --text-2:        #94a3b8;
  --text-3:        #4a5a6e;

  --sidebar-w:     240px;
  --nav-h:         64px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(45,212,191,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,212,191,0.022) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════ */
#login-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; padding: 1.5rem;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45,212,191,0.07) 0%, transparent 65%),
    linear-gradient(rgba(45,212,191,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,212,191,0.02) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
}
.login-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 1.2rem;
  box-shadow: 0 0 60px rgba(45,212,191,0.06), 0 24px 48px rgba(0,0,0,0.5);
  position: relative; overflow: hidden;
}
.login-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal) 50%, transparent);
}
.login-logo {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.3rem);
  font-weight: 800; color: var(--teal);
  text-align: center; letter-spacing: -0.03em;
}
.login-logo span {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.61rem; color: var(--text-3);
  font-weight: 400; letter-spacing: 0.2em;
  text-transform: uppercase; margin-top: 5px;
}
.login-input {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  color: var(--text); font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem; width: 100%; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.login-input::placeholder { color: var(--text-3); }
.login-btn {
  background: var(--teal); color: #0b1220;
  border: none; border-radius: var(--radius);
  padding: 1rem; font-family: 'Figtree', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  min-height: 52px; touch-action: manipulation;
}
.login-btn:hover { background: #5eead4; transform: translateY(-1px); box-shadow: 0 8px 20px var(--teal-glow); }
.login-btn:active { transform: translateY(0); background: var(--teal-dark); color: white; }
.login-error {
  color: var(--danger); font-size: 0.78rem;
  text-align: center; display: none;
  font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════ */
#app { display: none; min-height: 100vh; flex-direction: column; }
#app.visible { display: flex; }

/* ── MOBILE TOP HEADER ── */
.top-header {
  background: rgba(17,24,39,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 0 1.25rem; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
.top-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem; font-weight: 800;
  color: var(--teal); letter-spacing: -0.03em;
}
.top-logo span {
  display: block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.52rem; color: var(--text-3);
  letter-spacing: 0.15em; text-transform: uppercase; line-height: 1;
}
.top-right { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all 0.15s; touch-action: manipulation;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.icon-btn:active { background: var(--teal-dim); border-color: var(--teal); }

.refresh-dot-top {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.8); }
}

/* ── MAIN SCROLL ── */
.main-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 1.25rem 1rem;
  padding-bottom: calc(var(--nav-h) + 1.5rem);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.main-scroll::-webkit-scrollbar { width: 4px; }
.main-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; animation: fadeUp 0.2s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem; margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem; min-height: 86px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: transparent; transition: background 0.2s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.stat-card:hover::after { background: var(--teal); }
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.59rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 700; color: var(--text);
  letter-spacing: -0.025em; line-height: 1;
}
.stat-value.accent { color: var(--teal); }
.stat-value.warn   { color: var(--warn); }

/* ═══════════════════════════════════════════════════════════
   FILTERS
   ═══════════════════════════════════════════════════════════ */
.filters {
  display: flex; gap: 0.4rem; margin-bottom: 1rem;
  overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 0.4rem 0.95rem; border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-3);
  font-size: 0.74rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: 'Figtree', sans-serif;
  flex-shrink: 0; transition: all 0.15s; touch-action: manipulation;
}
.filter-btn:hover { color: var(--text); border-color: var(--teal); background: var(--teal-dim); }
.filter-btn.active {
  background: var(--teal); border-color: var(--teal);
  color: #0b1220; font-weight: 700;
}
.refresh-btn {
  padding: 0.4rem 0.9rem; border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-3);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: 'Figtree', sans-serif;
  flex-shrink: 0; margin-left: auto;
  transition: all 0.2s; touch-action: manipulation;
}
.refresh-btn:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-dim); }

/* ═══════════════════════════════════════════════════════════
   TRANSACTION CARDS (mobile)
   ═══════════════════════════════════════════════════════════ */
.cards-list { display: flex; flex-direction: column; gap: 0.6rem; }
.txn-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 0.85rem;
  position: relative; transition: border-color 0.2s;
}
.txn-card::before {
  content: ''; position: absolute;
  left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--border-strong);
  transition: background 0.2s;
}
.txn-card[data-status="en_attente"]::before { background: var(--warn); }
.txn-card[data-status="complété"]::before   { background: var(--success); }
.txn-card[data-status="annulé"]::before     { background: var(--danger); }
.txn-card:active { opacity: 0.9; }
.txn-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem; gap: 0.5rem;
}
.txn-name { font-weight: 700; font-size: 0.91rem; color: var(--text); }
.txn-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem; color: var(--text-3); margin-top: 2px; word-break: break-all;
}
.txn-amount {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: var(--teal); white-space: nowrap;
}
.txn-details {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem; margin-bottom: 0.8rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg); border-radius: 10px; border: 1px solid var(--border);
}
.txn-detail-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.txn-detail-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.txn-detail-value {
  font-size: 0.76rem; color: var(--text-2); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.txn-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap;
  padding-top: 0.7rem; border-top: 1px solid var(--border);
}
.txn-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.27rem 0.72rem; border-radius: 99px;
  font-size: 0.66rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap; letter-spacing: 0.02em;
}
.badge-pending   { background: var(--warn-dim);    color: var(--warn);    border: 1px solid rgba(245,158,11,0.25); }
.badge-done      { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-cancelled { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(244,63,94,0.25); }

/* ═══════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════ */
.action-btn {
  padding: 0.48rem 0.85rem; border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.74rem; font-weight: 700;
  cursor: pointer; font-family: 'Figtree', sans-serif;
  white-space: nowrap; min-height: 35px;
  transition: all 0.15s; touch-action: manipulation;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-complete {
  background: var(--success-dim); color: var(--success);
  border-color: rgba(16,185,129,0.25);
}
.btn-complete:hover:not(:disabled) { background: var(--success); color: #0b1220; box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-cancel {
  background: var(--danger-dim); color: var(--danger);
  border-color: rgba(244,63,94,0.25);
}
.btn-cancel:hover:not(:disabled) { background: var(--danger); color: white; box-shadow: 0 4px 12px rgba(244,63,94,0.3); }
.btn-done-disabled {
  background: var(--surface-2); color: var(--text-3);
  border: 1px solid var(--border); cursor: default;
  min-height: 35px; padding: 0.48rem 0.85rem;
  border-radius: 8px; font-size: 0.74rem; font-weight: 600;
  font-family: 'Figtree', sans-serif;
}
.btn-delete {
  background: transparent; color: var(--text-3);
  border: 1px solid var(--border);
  padding: 0.48rem 0.6rem !important;
  min-width: 34px;
}
.btn-delete:hover {
  background: var(--danger-dim); color: var(--danger);
  border-color: rgba(244,63,94,0.35);
}
.btn-danger {
  flex: 1; background: var(--danger); color: white;
  border: none; border-radius: var(--radius);
  padding: 0.85rem; font-weight: 700; font-size: 0.9rem;
  cursor: pointer; font-family: 'Figtree', sans-serif;
  min-height: 48px; min-width: 120px;
  transition: all 0.2s; touch-action: manipulation;
}
.btn-danger:hover { background: #e11d48; box-shadow: 0 6px 16px rgba(244,63,94,0.35); }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   EMPTY / LOADING
   ═══════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-3); }
.empty-icon { font-size: 2rem; margin-bottom: 0.75rem; opacity: 0.4; }
.empty-text { font-size: 0.82rem; font-family: 'JetBrains Mono', monospace; }
.loading {
  text-align: center; padding: 3.5rem 1rem; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace; font-size: 0.76rem;
}
.spinner {
  width: 26px; height: 26px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--teal);
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   BOTTOM NAV (mobile)
   ═══════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(17,24,39,0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 200; padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 0.5rem 1.5rem;
  border-radius: 10px; border: none; background: none;
  color: var(--text-3); transition: color 0.2s;
  flex: 1; touch-action: manipulation;
}
.bottom-nav-item:active { background: var(--teal-dim); }
.bottom-nav-item.active { color: var(--teal); }
.bnav-icon { font-size: 1.2rem; }
.bnav-label {
  font-size: 0.59rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 1rem);
  left: 1rem; right: 1rem;
  background: var(--surface-3); color: var(--text);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-lg);
  font-size: 0.82rem; font-weight: 600;
  font-family: 'Figtree', sans-serif;
  border-left: 3px solid var(--teal);
  transform: translateY(16px); opacity: 0;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 9999; text-align: center;
  max-width: 480px; margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   CONFIG MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 8000;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border-strong); border-bottom: none;
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column; gap: 1rem;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-strong); border-radius: 4px;
  margin: 0 auto 0.5rem;
}
.modal-title { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; }
.modal-hint {
  font-size: 0.74rem; line-height: 1.7; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1rem;
  font-family: 'JetBrains Mono', monospace;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.form-input {
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 0.85rem 1rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
  color: var(--text); outline: none; width: 100%; min-height: 48px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.form-input::placeholder { color: var(--text-3); }
.modal-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary {
  flex: 1; background: var(--teal); color: #0b1220;
  border: none; border-radius: var(--radius);
  padding: 0.85rem; font-weight: 700; font-size: 0.9rem;
  cursor: pointer; font-family: 'Figtree', sans-serif;
  min-height: 48px; min-width: 120px; transition: all 0.2s; touch-action: manipulation;
}
.btn-primary:hover { background: #5eead4; box-shadow: 0 6px 16px var(--teal-glow); }
.btn-primary:active { background: var(--teal-dark); color: white; }
.btn-secondary {
  flex: 1; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 0.85rem; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; font-family: 'Figtree', sans-serif;
  min-height: 48px; min-width: 120px; transition: all 0.2s; touch-action: manipulation;
}
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   DESKTOP SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar-desktop {
  display: none; background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  flex-direction: column; gap: 0.25rem;
  position: sticky; top: 0; height: 100vh;
  width: var(--sidebar-w); flex-shrink: 0; overflow-y: auto;
}
.sidebar-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 800; color: var(--teal);
  letter-spacing: -0.03em; padding: 0.25rem 0.75rem 2rem;
  border-bottom: 1px solid var(--border); margin-bottom: 0.75rem;
}
.sidebar-logo span {
  display: block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.57rem; color: var(--text-3);
  letter-spacing: 0.15em; text-transform: uppercase; margin-top: 3px;
}
.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; border-radius: var(--radius);
  color: var(--text-3); cursor: pointer; transition: all 0.15s;
  font-size: 0.87rem; font-weight: 600;
  border: none; background: none; width: 100%; text-align: left;
  font-family: 'Figtree', sans-serif;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--teal-dim); color: var(--teal); }
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════
   DESKTOP TABLE
   ═══════════════════════════════════════════════════════════ */
.table-wrapper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.table-wrapper::-webkit-scrollbar { height: 4px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1100px; }
thead tr { background: var(--surface-2); border-bottom: 1px solid var(--border-strong); }
th {
  padding: 0.95rem 1.1rem; text-align: left; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  border-right: 1px solid var(--border);
}
th:last-child { border-right: none; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td {
  padding: 0.9rem 1.1rem; font-size: 0.84rem; color: var(--text-2);
  vertical-align: middle; line-height: 1.5;
  border-right: 1px solid var(--border);
}
td:last-child { border-right: none; }
.td-name { font-weight: 700; color: var(--text); font-size: 0.88rem; }
.td-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.71rem; color: var(--teal);
  background: var(--teal-dim); padding: 0.25rem 0.6rem;
  border-radius: 6px; display: inline-block;
  border: 1px solid rgba(45,212,191,0.18);
  word-break: break-all; max-width: 200px;
}
.td-amount {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem; font-weight: 700; color: var(--success);
  white-space: nowrap; background: var(--success-dim);
  padding: 0.28rem 0.7rem; border-radius: 6px; display: inline-block;
  border: 1px solid rgba(16,185,129,0.2);
}
.td-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--text-3); white-space: nowrap;
}

/* ── DESKTOP PAGE HEADER ── */
.page-header-desktop {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem;
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 700; color: var(--text); letter-spacing: -0.025em;
}
.page-subtitle { color: var(--text-3); font-size: 0.81rem; margin-top: 2px; }
.refresh-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem; color: var(--text-3);
  display: flex; align-items: center; gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 374px) {
  .stats-grid { grid-template-columns: 1fr; }
  .txn-card-header { flex-direction: column; }
  .txn-amount { align-self: flex-start; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn-primary,
  .modal-actions .btn-secondary { width: 100%; }
}
@media (min-width: 481px) and (max-width: 768px) {
  .main-scroll { padding: 1.5rem; padding-bottom: calc(var(--nav-h) + 1.5rem); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  #app.visible { flex-direction: row; }
  .top-header { display: none; }
  .bottom-nav { display: none; }
  .sidebar-desktop { display: flex !important; }
  .cards-list { display: none; }
  .table-wrapper { display: block !important; }
  .main-scroll { padding: 2rem 2.5rem; padding-bottom: 2rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .toast { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 320px; text-align: left; }
  .modal-overlay.open { align-items: center; }
  .modal { border-radius: var(--radius-xl); padding: 2rem; border: 1px solid var(--border-strong); }
  .modal-handle { display: none; }
}
@media (min-width: 1280px) {
  .main-scroll { padding: 2.5rem 3rem; }
}
@media (max-width: 768px) {
  .table-wrapper { display: none; }
  .sidebar-desktop { display: none !important; }
  .page-header-desktop { display: none; }
}
@media (max-width: 768px) and (orientation: landscape) {
  :root { --nav-h: 54px; }
  .top-header { min-height: 52px; }
  .bnav-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .top-header, .bottom-nav, .sidebar-desktop,
  .filters, .action-btn, .icon-btn, .modal-overlay { display: none !important; }
  body { background: white; color: black; }
  .main-scroll { padding: 0; overflow: visible; }
  .page { display: block !important; }
}