/* ============================================================
   GAT Exchange – Admin Panel Stylesheet (Light Theme)
   ============================================================ */

:root {
  --bg-primary:   #ffffff;
  --bg-secondary: #f4f5f7;
  --bg-tertiary:  #eef0f3;
  --bg-card:      #ffffff;
  --bg-hover:     #f8f9fb;
  --border:       #e2e5eb;
  --border-light: #eef0f3;

  --text-primary:   #0d1117;
  --text-secondary: #3d4350;
  --text-muted:     #818899;
  --text-inverse:   #ffffff;

  --accent:       #1652f0;
  --accent-hover: #0f43d1;
  --accent-light: #e8edfd;
  --accent-soft:  #f0f4ff;

  --green:        #00b371;
  --green-light:  #e6f9f2;
  --red:          #f03030;
  --red-light:    #fef0f0;
  --yellow:       #f59e0b;
  --yellow-light: #fef9e7;
  --purple:       #7c3aed;
  --purple-light: #f3f0ff;
  --orange:       #ea580c;
  --orange-light: #fff4ee;
  --teal:         #0891b2;
  --teal-light:   #ecfeff;
  --pink:         #ec4899;
  --pink-light:   #fdf2f8;

  --sidebar-w:    240px;
  --header-h:     56px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 32px rgba(0,0,0,.1);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.admin-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s;
}
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-header {
  height: var(--header-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.admin-content {
  flex: 1;
  padding: 24px;
  max-width: 1600px;
  width: 100%;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #5b8af0);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff;
}
.sidebar-logo-text { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.sidebar-logo-text span { color: var(--accent); }
.sidebar-admin-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: .3px;
}

.sidebar-section { padding: 12px 10px 4px; }
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 0 8px;
  margin-bottom: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .15s;
  user-select: none;
  position: relative;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-item.active .sidebar-icon { color: var(--accent); }
.sidebar-icon { width: 18px; text-align: center; font-size: 14px; color: var(--text-muted); flex-shrink: 0; }
.sidebar-item.active .sidebar-icon { color: var(--accent); }
.sidebar-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.sidebar-arrow {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform .2s;
}
.sidebar-item.open .sidebar-arrow { transform: rotate(90deg); }
.sidebar-sub {
  display: none;
  padding: 2px 0 2px 28px;
}
.sidebar-item.open + .sidebar-sub { display: block; }
.sidebar-sub-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: all .15s;
}
.sidebar-sub-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-sub-item.active { color: var(--accent); font-weight: 600; }
.sidebar-sub-item::before { content: '–'; color: var(--border); font-size: 10px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--border-light);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5b8af0);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   HEADER
   ============================================================ */
.header-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.header-breadcrumb strong { color: var(--text-primary); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  width: 220px;
  transition: all .15s;
}
.header-search:focus-within { border-color: var(--accent); background: var(--bg-primary); }
.header-search input { border: none; outline: none; background: transparent; font-size: 13px; color: var(--text-primary); width: 100%; }
.header-search input::placeholder { color: var(--text-muted); }
.header-icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  transition: all .15s;
  position: relative;
}
.header-icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}
.mob-toggle { display: none; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   METRIC CARDS
   ============================================================ */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.metric-card.blue::before { background: var(--accent); }
.metric-card.green::before { background: var(--green); }
.metric-card.red::before { background: var(--red); }
.metric-card.yellow::before { background: var(--yellow); }
.metric-card.purple::before { background: var(--purple); }
.metric-card.orange::before { background: var(--orange); }
.metric-card.teal::before { background: var(--teal); }
.metric-card.pink::before { background: var(--pink); }

.metric-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  margin-bottom: 12px;
}
.metric-icon.blue { background: var(--accent-light); color: var(--accent); }
.metric-icon.green { background: var(--green-light); color: var(--green); }
.metric-icon.red { background: var(--red-light); color: var(--red); }
.metric-icon.yellow { background: var(--yellow-light); color: var(--yellow); }
.metric-icon.purple { background: var(--purple-light); color: var(--purple); }
.metric-icon.orange { background: var(--orange-light); color: var(--orange); }
.metric-icon.teal { background: var(--teal-light); color: var(--teal); }
.metric-icon.pink { background: var(--pink-light); color: var(--pink); }

.metric-lbl { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.metric-val { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.metric-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.metric-sub .up { color: var(--green); }
.metric-sub .dn { color: var(--red); }

/* ============================================================
   CARD
   ============================================================ */
.a-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.a-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.a-card-title { font-size: 14px; font-weight: 700; }
.a-card-body { padding: 18px; }
.a-card-footer { padding: 12px 18px; border-top: 1px solid var(--border-light); background: var(--bg-secondary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(22,82,240,.25); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #009960; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #d42020; }
.btn-yellow { background: var(--yellow); color: #fff; }
.btn-yellow:hover { background: #d97706; }
.btn-ghost { background: var(--bg-secondary); color: var(--text-secondary); border: 1.5px solid transparent; }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(240,48,48,.2); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-md { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: var(--radius-sm); }

/* ============================================================
   TABLES
   ============================================================ */
.a-table-wrap { overflow-x: auto; }
.a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.a-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}
.a-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  vertical-align: middle;
}
.a-table tbody tr:hover td { background: var(--bg-hover); }
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table .col-check { width: 36px; }
.a-table .col-actions { width: 120px; text-align: right; }

/* ============================================================
   CHECKBOX
   ============================================================ */
.a-checkbox {
  width: 15px; height: 15px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-gray { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-pink { background: var(--pink-light); color: var(--pink); }
.badge-dot::before { content: '●'; font-size: 7px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .3px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,82,240,.1);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23818899' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.form-textarea { resize: vertical; min-height: 80px; }
.input-group { display: flex; gap: 0; }
.input-group .form-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-addon {
  display: flex; align-items: center;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.input-addon.left { border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-addon.right { border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-addon.left + .form-input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  min-width: 200px;
  transition: all .15s;
}
.filter-search:focus-within { border-color: var(--accent); background: var(--bg-primary); }
.filter-search input { border: none; outline: none; background: transparent; font-size: 12.5px; color: var(--text-primary); width: 100%; }
.filter-search input::placeholder { color: var(--text-muted); }
.filter-spacer { flex: 1; }

/* ============================================================
   TABS
   ============================================================ */
.a-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.a-tab {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.a-tab:hover { color: var(--text-primary); }
.a-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.a-tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.a-tab-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--bg-primary);
  transition: all .15s;
}
.a-tab-pill:hover { border-color: var(--accent); color: var(--accent); }
.a-tab-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   PAGINATION
   ============================================================ */
.a-pagination { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-top: 1px solid var(--border-light); justify-content: space-between; flex-wrap: wrap; }
.a-pagination-info { font-size: 12.5px; color: var(--text-muted); }
.a-pages { display: flex; gap: 4px; }
.a-page-btn {
  min-width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all .15s;
  padding: 0 6px;
}
.a-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.a-page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.a-page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   MODAL
   ============================================================ */
.a-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,17,23,.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: aFadeIn .2s ease;
}
.a-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--border);
  animation: aScaleIn .2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.a-modal-lg { max-width: 780px; }
.a-modal-xl { max-width: 960px; }
.a-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.a-modal-title { font-size: 15px; font-weight: 700; }
.a-modal-close { cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 2px; transition: color .15s; }
.a-modal-close:hover { color: var(--text-primary); }
.a-modal-body { padding: 20px; }
.a-modal-footer { padding: 14px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }

@keyframes aFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes aScaleIn { from { transform: scale(.95) translateY(-10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* ============================================================
   CHARTS PLACEHOLDER
   ============================================================ */
.chart-placeholder {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

/* ============================================================
   TOAST
   ============================================================ */
.a-toast-container { position: fixed; top: 70px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.a-toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 360px;
  animation: slideInRight .25s ease;
  border-left: 3px solid var(--accent);
}
.a-toast.success { border-left-color: var(--green); }
.a-toast.error { border-left-color: var(--red); }
.a-toast.warning { border-left-color: var(--yellow); }
@keyframes slideInRight { from { transform: translateX(60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 36px; height: 36px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }

/* ============================================================
   STATUS DOTS
   ============================================================ */
.status-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.status-dot.offline::before { background: var(--text-muted); }
.status-dot.warning::before { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-light); }
.status-dot.error::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-light); }

/* ============================================================
   PROGRESS
   ============================================================ */
.a-progress { height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.a-progress-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.a-progress-fill.blue { background: var(--accent); }
.a-progress-fill.green { background: var(--green); }
.a-progress-fill.red { background: var(--red); }
.a-progress-fill.yellow { background: var(--yellow); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-dot {
  position: absolute;
  left: -18px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.timeline-dot.green { background: var(--green); box-shadow: 0 0 0 2px var(--green-light); }
.timeline-dot.red { background: var(--red); box-shadow: 0 0 0 2px var(--red-light); }
.timeline-dot.yellow { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow-light); }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.timeline-text { font-size: 13px; }

/* ============================================================
   SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   TOGGLES / SWITCHES
   ============================================================ */
.a-toggle {
  position: relative; width: 36px; height: 20px; flex-shrink: 0;
}
.a-toggle input { opacity: 0; width: 0; height: 0; }
.a-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 20px; transition: .25s;
}
.a-toggle-slider:before {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: .25s; box-shadow: var(--shadow-sm);
}
.a-toggle input:checked + .a-toggle-slider { background: var(--accent); }
.a-toggle input:checked + .a-toggle-slider:before { transform: translateX(16px); }

/* ============================================================
   RISK LEVEL INDICATORS
   ============================================================ */
.risk-bar { display: flex; gap: 2px; }
.risk-segment {
  height: 8px; flex: 1;
  border-radius: 2px;
  background: var(--bg-tertiary);
}
.risk-segment.filled-low { background: var(--green); }
.risk-segment.filled-med { background: var(--yellow); }
.risk-segment.filled-high { background: var(--orange); }
.risk-segment.filled-crit { background: var(--red); }

/* ============================================================
   QUICK STATS ROW
   ============================================================ */
.quick-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.quick-stat {
  flex: 1;
  padding: 14px 18px;
  border-right: 1px solid var(--border-light);
  background: var(--bg-primary);
  text-align: center;
}
.quick-stat:last-child { border-right: none; }
.quick-stat-val { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.quick-stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

/* ============================================================
   DATA COCKPIT CHART AREAS
   ============================================================ */
.cockpit-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.cockpit-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   KYC STATUS STEPS
   ============================================================ */
.kyc-steps { display: flex; gap: 0; }
.kyc-step {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border-right: none;
  background: var(--bg-secondary);
  color: var(--text-muted);
}
.kyc-step:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.kyc-step:last-child { border-right: 1.5px solid var(--border); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.kyc-step.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.kyc-step.done { background: var(--green-light); border-color: var(--green); color: var(--green); }

/* ============================================================
   SECTION TABS
   ============================================================ */
.section-tab-bar {
  display: flex; gap: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 18px;
}
.section-tab {
  flex: 1;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  color: var(--text-muted);
  transition: all .15s;
}
.section-tab.active { background: var(--bg-primary); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  padding: 6px 0;
  display: none;
  animation: aFadeIn .15s ease;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background .1s;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ============================================================
   MISC
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.g-2 { gap: 8px; }
.g-3 { gap: 12px; }
.g-4 { gap: 16px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 15px; }
.text-xl { font-size: 18px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border-light); margin: 12px 0; }
.relative { position: relative; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .mob-toggle { display: flex; }
  .cockpit-charts, .cockpit-tables { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .admin-content { padding: 14px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .quick-stats { flex-direction: column; }
  .quick-stat { border-right: none; border-bottom: 1px solid var(--border-light); }
}

/* ============================================================
   MISSING / PATCH STYLES
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}
.admin-topbar {
  height: var(--header-h, 52px);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.admin-topbar-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: all .15s;
}
.admin-topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 10px 10px 4px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}
.sidebar-sub {
  display: none;
  padding-left: 8px;
}
.sidebar-item.open + .sidebar-sub { display: block; }
.sidebar-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform .2s;
  color: var(--text-muted);
}
.sidebar-item.open .sidebar-arrow { transform: rotate(90deg); }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.logo-text span { color: var(--accent); }
.mob-close-btn {
  margin-left: auto;
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
@media (max-width: 900px) {
  .mob-close-btn { display: block; }
  .admin-topbar { padding: 0 12px; }
}


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