/* ═══════════════════════════════════════════
   ORDERVAULT — DESIGN SYSTEM
   ═══════════════════════════════════════════ */

:root {
  --bg:        #080810;
  --surface:   #0e0e18;
  --surface2:  #13131f;
  --surface3:  #1a1a2a;
  --border:    #252535;
  --border2:   #2e2e45;

  --accent:    #00e5a0;
  --accent-dim: rgba(0,229,160,0.12);
  --accent2:   #7c6aff;
  --accent2-dim: rgba(124,106,255,0.12);
  --accent3:   #ff6a6a;
  --accent3-dim: rgba(255,106,106,0.12);
  --accent4:   #ffd166;
  --accent4-dim: rgba(255,209,102,0.12);
  --accent5:   #4db8ff;
  --accent5-dim: rgba(77,184,255,0.12);
  --orange:    #ff9f43;

  --text:      #eeeef5;
  --text2:     #8888b8;
  --text3:     #6a6a95;

  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Syne', sans-serif;
  --sidebar-w: 220px;
  --radius: 6px;
  --radius-sm: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ═══════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════ */

.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(124,106,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(0,229,160,0.04) 0%, transparent 70%);
}
.auth-center { width: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box {
  width: 400px;
  padding: 52px 44px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
}
.auth-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), var(--accent), transparent);
}
.auth-box::after {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(124,106,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.auth-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 4px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.auth-label::before { content: ''; display: block; width: 16px; height: 1px; background: var(--accent); }
.auth-title { font-size: 40px; font-weight: 800; line-height: 1.0; margin-bottom: 10px; letter-spacing: -1px; }
.auth-sub { font-family: var(--mono); font-size: 11px; color: var(--text2); margin-bottom: 36px; }
.auth-hint {
  margin-top: 24px; font-family: var(--mono); font-size: 11px;
  color: var(--text2); text-align: center; line-height: 1.7;
}
.warning-box {
  padding: 14px 16px;
  background: var(--accent3-dim);
  border: 1px solid rgba(255,106,106,0.25);
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 11px; color: var(--accent3); line-height: 1.8;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
}
.sidebar::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent2), transparent);
  opacity: 0.3;
  pointer-events: none;
}

.sidebar-logo {
  padding: 28px 22px 22px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.sidebar-logo-text {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo-text::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px; font-weight: 600;
  text-transform: uppercase;
}
.role-badge.admin {
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(0,229,160,0.25);
}
.role-badge.employee {
  background: var(--accent4-dim); color: var(--accent4);
  border: 1px solid rgba(255,209,102,0.25);
}

.nav { padding: 14px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--text2);
  transition: all 0.15s; margin-bottom: 2px;
  border: 1px solid transparent; text-decoration: none;
  position: relative;
}
.nav-item:hover { color: var(--text); background: var(--surface3); }
.nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(0,229,160,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--accent);
}
.nav-icon { font-size: 14px; opacity: 0.8; }
.nav-divider { height: 1px; background: var(--border); margin: 10px 0; }

.sidebar-footer {
  padding: 16px 16px 22px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  font-family: var(--mono); font-size: 11px; color: var(--text2);
  margin-bottom: 10px; letter-spacing: 2px; text-transform: uppercase;
}
.lock-out-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px;
  background: transparent;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  cursor: pointer; text-align: center;
  transition: all 0.15s; text-decoration: none; text-transform: uppercase;
}
.lock-out-btn:hover { border-color: var(--accent3); color: var(--accent3); background: var(--accent3-dim); }

/* ═══════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════ */

.main {
  margin-left: var(--sidebar-w);
  padding: 32px 24px;
  min-height: 100vh;
}

.page-wrap {
  max-width: 1600px;
  margin: 0 auto;
}

/* Accounts table: compact columns */

.page-header { margin-bottom: 36px; }
.page-title {
  font-size: 32px; font-weight: 800; letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--text) 60%, var(--text2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-sub {
  font-family: var(--mono); font-size: 12px; color: var(--text2);
  margin-top: 6px; letter-spacing: 1px;
}
.section-title { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--text2); }
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent2); }

/* ═══════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════ */

.flash-container { margin-bottom: 28px; }
.flash {
  padding: 13px 18px; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.flash::before { font-size: 14px; }
.flash-success { background: var(--accent-dim); border: 1px solid rgba(0,229,160,0.25); color: var(--accent); }
.flash-success::before { content: '✓'; }
.flash-error { background: var(--accent3-dim); border: 1px solid rgba(255,106,106,0.25); color: var(--accent3); }
.flash-error::before { content: '✕'; }
.flash-info { background: var(--accent2-dim); border: 1px solid rgba(124,106,255,0.25); color: var(--accent2); }
.flash-info::before { content: '◎'; }

/* ═══════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════ */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }

.card {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.card:hover { transform: translateY(-2px); }
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  opacity: 0.6;
}
.card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
}
/* Glow orb */
.card-glow {
  position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  opacity: 0.06; pointer-events: none;
}

.card.green::before, .card.green::after { background: var(--accent); }
.card.green .card-glow { background: var(--accent); }
.card.green:hover { border-color: rgba(0,229,160,0.4); }

.card.purple::before, .card.purple::after { background: var(--accent2); }
.card.purple .card-glow { background: var(--accent2); }
.card.purple:hover { border-color: rgba(124,106,255,0.4); }

.card.red::before, .card.red::after { background: var(--accent3); }
.card.red .card-glow { background: var(--accent3); }
.card.red:hover { border-color: rgba(255,106,106,0.4); }

.card.yellow::before, .card.yellow::after { background: var(--accent4); }
.card.yellow .card-glow { background: var(--accent4); }
.card.yellow:hover { border-color: rgba(255,209,102,0.4); }

.card.blue::before, .card.blue::after { background: var(--accent5); }
.card.blue .card-glow { background: var(--accent5); }
.card.blue:hover { border-color: rgba(77,184,255,0.4); }

.card.orange::before, .card.orange::after { background: var(--orange); }
.card.orange .card-glow { background: var(--orange); }
.card.orange:hover { border-color: rgba(255,159,67,0.4); }

.card-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text2); margin-bottom: 12px;
}
.card-value {
  font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1;
  letter-spacing: -0.5px;
}
.card.green .card-value  { color: var(--accent); }
.card.purple .card-value { color: var(--accent2); }
.card.red .card-value    { color: var(--accent3); }
.card.yellow .card-value { color: var(--accent4); }
.card.blue .card-value   { color: var(--accent5); }
.card.orange .card-value { color: var(--orange); }
.card-sub { font-family: var(--mono); font-size: 11px; color: var(--text2); margin-top: 7px; }

/* ═══════════════════════════════════════════
   CHART
   ═══════════════════════════════════════════ */

.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.chart-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text2); margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.chart-title::before { content: ''; display: block; width: 20px; height: 1px; background: var(--accent2); }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  border: none; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; line-height: 1; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 0 20px rgba(0,229,160,0.2);
}
.btn-primary:hover {
  background: #00ffb3;
  box-shadow: 0 0 30px rgba(0,229,160,0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); background: var(--accent2-dim); }
.btn-danger {
  background: transparent; color: var(--accent3);
  border: 1px solid rgba(255,106,106,0.3);
}
.btn-danger:hover { background: var(--accent3-dim); border-color: var(--accent3); }
.btn-sm { padding: 5px 11px; font-size: 10px; letter-spacing: 1px; }

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.table-wrap + .table-wrap { margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
.table-wide { min-width: 1200px; }
thead th {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text2);
  padding: 12px 12px; text-align: left;
  background: var(--surface2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
thead th:first-child { padding-left: 16px; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td {
  padding: 12px 12px;
  font-family: var(--mono); font-size: 12px;
  vertical-align: middle; color: var(--text);
  white-space: nowrap;
}
tbody td.truncate {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
}
.table-compact td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 0;
}
.table-compact td:last-child {
  max-width: none; overflow: visible; white-space: nowrap;
}
tbody td:first-child { padding-left: 16px; }
.flagged-row {
  background: rgba(255,209,102,0.03) !important;
  border-left: 2px solid var(--accent4) !important;
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 600; white-space: nowrap;
}
.badge-ordered  { background: var(--accent2-dim);  color: var(--accent2); border: 1px solid rgba(124,106,255,0.25); }
.badge-reship   { background: var(--accent4-dim);  color: var(--accent4); border: 1px solid rgba(255,209,102,0.25); }
.badge-pickup   { background: rgba(255,209,102,0.2); color: var(--accent4); border: 1px solid rgba(255,209,102,0.4); }
.badge-shipped  { background: rgba(56,152,255,0.1);  color: #3898ff;      border: 1px solid rgba(56,152,255,0.25); }
.badge-payout   { background: rgba(255,168,0,0.12); color: #ffa800;       border: 1px solid rgba(255,168,0,0.3); }
.badge-paid     { background: rgba(0,229,160,0.15); color: var(--accent);  border: 1px solid rgba(0,229,160,0.4); }
.badge-problem  { background: rgba(255,106,106,0.15); color: var(--accent3); border: 1px solid rgba(255,106,106,0.3); }

/* Status inline dropdown */
.status-cell { position: relative; }
.status-badge-click { cursor: pointer; transition: opacity 0.15s; }
.status-badge-click:hover { opacity: 0.75; }
.status-dropdown {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.status-dropdown.open { display: block; }
.status-option {
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}
.status-option:hover { background: var(--surface2); }
.status-option.active { background: var(--surface2); }

/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */

.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.toolbar-right { margin-left: auto; display: flex; gap: 10px; }
.search-input {
  padding: 9px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--mono); font-size: 12px; outline: none; width: 240px;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text2); }
.search-input:focus { border-color: var(--accent2); background: var(--surface2); }
.filter-select {
  padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text2);
  font-family: var(--mono); font-size: 12px; outline: none; cursor: pointer;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--accent2); }
.filter-select option { background: var(--surface2); }

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */

/* Order form two-column layout */
.order-form-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
  max-width: 1200px;
}
.order-form-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.order-form-sidebar { min-width: 0; }

/* Section card */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: visible;
}
.form-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
.form-section-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text2);
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.form-section-title::before {
  content: '';
  display: block; width: 16px; height: 1px;
  background: var(--accent2); flex-shrink: 0;
}

.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-4 { grid-template-columns: 1fr 1fr 120px 100px; }
.form-full  { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text2);
}
.field input, .field select, .field textarea {
  padding: 10px 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono); font-size: 13px;
  outline: none; transition: all 0.15s; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text3); font-size: 12px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent2);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,106,255,0.08);
}
.field textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
.field select option { background: var(--surface2); }

/* Item rows */
.item-row {
  padding: 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.item-row:hover { border-color: var(--border2); }
.item-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 150px 80px 110px 90px;
  gap: 12px; align-items: start;
}

/* Compact fee rows — grid so all inputs align perfectly */
.fees-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.fee-row:hover {
  border-color: var(--border2);
}
.fee-row label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.5px;
  color: var(--text2); white-space: nowrap; text-transform: uppercase;
  flex: 1;
}
.fee-row input {
  width: 80px; min-width: 80px; flex-shrink: 0; padding: 4px 10px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--mono); font-size: 13px; font-weight: 600;
  text-align: right; outline: none; transition: all 0.15s;
}
.fee-row input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(124,106,255,0.1);
  background: var(--surface3);
}

/* Summary box */
.summary-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 20px; margin-top: 16px;
  position: relative; overflow: hidden;
}
.summary-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0.5;
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-family: var(--mono); font-size: 12px; color: var(--text2);
  border-bottom: 1px solid rgba(42,42,58,0.5);
}
.summary-row:last-child { border-bottom: none; }
.summary-total {
  border-top: 1px solid var(--border2) !important;
  border-bottom: none !important;
  margin-top: 8px; padding-top: 14px !important;
  font-size: 15px; color: var(--text); font-weight: 700;
}

/* Flag toggle */
.flag-toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 0 14px; height: 100%;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); white-space: nowrap;
  font-family: var(--mono); font-size: 11px; color: var(--text2);
  transition: all 0.15s; user-select: none;
}
.flag-toggle:hover { border-color: var(--accent4); color: var(--accent4); }
.flag-toggle.flag-on {
  border-color: var(--accent4); color: var(--accent4);
  background: var(--accent4-dim);
  box-shadow: 0 0 12px rgba(255,209,102,0.1);
}

/* ═══════════════════════════════════════════
   DASHBOARD RANGE FILTER
   ═══════════════════════════════════════════ */

.dash-range-bar {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
.dash-range-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.dash-range-btn:hover {
  color: var(--text);
  background: var(--surface2);
}
.dash-range-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,160,0.2);
}

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.pagination-perpage {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-perpage-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-right: 6px;
  white-space: nowrap;
}
.pagination-pp-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
}
.pagination-pp-btn:hover {
  color: var(--text);
  border-color: var(--accent2);
  background: var(--accent2-dim);
}
.pagination-pp-btn.active {
  color: var(--accent);
  border-color: rgba(0,229,160,0.4);
  background: var(--accent-dim);
}
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.pagination-btn:hover:not(.disabled):not(.active) {
  color: var(--text);
  border-color: var(--accent2);
  background: var(--accent2-dim);
}
.pagination-btn.active {
  color: var(--accent);
  border-color: rgba(0,229,160,0.4);
  background: var(--accent-dim);
}
.pagination-btn.disabled {
  color: var(--text3);
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.pagination-dots {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  padding: 0 4px;
  user-select: none;
}

/* ═══════════════════════════════════════════
   PROFIT COLORS
   ═══════════════════════════════════════════ */
.profit-pos  { color: var(--accent); }
.profit-neg  { color: var(--accent3); }
.profit-zero { color: var(--text3); }

/* ═══════════════════════════════════════════
   ORDER DETAIL
   ═══════════════════════════════════════════ */

.detail-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.detail-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
.detail-card-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text2);
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.detail-card-title::before { content: ''; display: block; width: 14px; height: 1px; background: var(--accent2); }
.detail-grid { display: flex; flex-direction: column; }
.detail-row {
  display: flex; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text3); }
.mono-val { font-family: var(--mono); font-size: 12px; }
.mono-val.small { font-size: 11px; }

/* ═══════════════════════════════════════════
   BUYERS
   ═══════════════════════════════════════════ */

.buyers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.buyer-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  position: relative; overflow: hidden;
  transition: all 0.2s;
}
.buyer-card:hover { border-color: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.buyer-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--accent2), var(--accent));
  border-radius: var(--radius) 0 0 var(--radius);
}
.buyer-card::after {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,106,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.buyer-name { font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.buyer-handle { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 14px; }
.buyer-stat { font-family: var(--mono); font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.buyer-stat span { color: var(--text); }
.buyer-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════
   ACCOUNTS TABLE
   ═══════════════════════════════════════════ */

.acc-row-white { }
.acc-row-green td { background: rgba(0,229,160,0.03); }
.acc-row-red td { background: rgba(255,106,106,0.03); color: var(--text3); }
.acc-row-red td .acc-status-dropdown { color: var(--text); }

/* Account status badges */
#accountsTable td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#accountsTable td:last-child {
  overflow: visible;
}
#accountsTable td .cell-display {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; font-weight: 600; white-space: nowrap;
  cursor: pointer; transition: opacity 0.15s;
}
.acc-badge:hover { opacity: 0.75; }
.acc-badge-white { background: rgba(70,70,90,0.3); color: var(--text2); border: 1px solid var(--border); }
.acc-badge-green { background: rgba(0,229,160,0.15); color: var(--accent); border: 1px solid rgba(0,229,160,0.4); }
.acc-badge-red   { background: var(--accent3-dim); color: var(--accent3); border: 1px solid rgba(255,106,106,0.25); }

.acc-status-cell { position: relative; }
.acc-status-dropdown {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 4px;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.acc-status-dropdown.open { display: block; }
.acc-status-option {
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}
.acc-status-option:hover { background: var(--surface2); }
.acc-status-option.active { background: var(--surface2); }

.copyable {
  cursor: pointer; text-decoration: none;
  border-bottom: 1px dashed var(--border2);
  transition: color 0.15s, border-color 0.15s;
  display: inline-block;
}
.copyable:hover { color: var(--accent); border-bottom-color: var(--accent); }

.copy-toast {
  position: fixed; bottom: 28px; right: 28px;
  padding: 10px 20px;
  background: var(--accent); color: var(--bg);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  border-radius: 20px; letter-spacing: 1px;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none; z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,229,160,0.4);
}
.copy-toast.show { opacity: 1; }

/* ═══════════════════════════════════════════
   FLAG BUTTON (in tables)
   ═══════════════════════════════════════════ */

.flag-btn {
  background: none; border: none; cursor: pointer;
  font-size: 15px; color: var(--text3);
  padding: 3px 5px; border-radius: var(--radius-sm);
  transition: color 0.15s; line-height: 1;
}
.flag-btn:hover { color: var(--accent4); }
.flag-btn.flagged { color: var(--accent4); filter: drop-shadow(0 0 4px rgba(255,209,102,0.5)); }

/* ═══════════════════════════════════════════
   PENDING PAGE
   ═══════════════════════════════════════════ */

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot-pending { background: var(--accent4); box-shadow: 0 0 6px var(--accent4); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.empty-state {
  text-align: center; padding: 100px 0;
  font-family: var(--mono); color: var(--text3);
}
.empty-state .big { font-size: 52px; margin-bottom: 20px; opacity: 0.12; display: block; }
.empty-state p { font-size: 13px; margin-bottom: 28px; color: var(--text2); }

/* ═══════════════════════════════════════════
   ACCOUNT PICKER (searchable dropdown)
   ═══════════════════════════════════════════ */

.acc-picker {
  position: relative;
}
.acc-search-input {
  width: 100%;
  padding: 10px 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono); font-size: 13px;
  outline: none; transition: all 0.15s;
}
.acc-search-input::placeholder { color: var(--text3); }
.acc-search-input:focus {
  border-color: var(--accent2);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,106,255,0.08);
}
.acc-search-input.has-value {
  border-color: rgba(0,229,160,0.4);
  color: var(--accent);
}
.acc-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--accent2);
  border-radius: var(--radius-sm);
  max-height: 260px; overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.acc-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  font-family: var(--mono); font-size: 12px;
}
.acc-option:last-of-type { border-bottom: none; }
.acc-option:hover, .acc-option.highlighted {
  background: rgba(124,106,255,0.12);
}
.acc-opt-id   { color: var(--text); font-weight: 600; min-width: 70px; }
.acc-opt-user { color: var(--text2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-opt-batch {
  font-size: 10px; color: var(--accent2);
  background: var(--accent2-dim); border: 1px solid rgba(124,106,255,0.2);
  padding: 1px 6px; border-radius: 10px; white-space: nowrap;
}
.acc-no-results {
  padding: 14px; text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--text3);
}

/* Hide number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
