/* ELS MARC21 - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg:           #f0f2f7;
  --surface:      #ffffff;
  --surface2:     #f8f9fc;
  --border:       #e2e6ef;
  --primary:      #6c47ff;
  --primary-dark: #5535e0;
  --primary-light:#ede8ff;
  --secondary:    #1abfa8;
  --accent:       #ff6b35;
  --teal:         #0ea5a0;
  --blue:         #2563eb;
  --text:         #1a1d2e;
  --text2:        #5a6175;
  --text3:        #9ba3b8;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --success:      #10b981;
  --info:         #3b82f6;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow:       0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.14);
  --radius:       14px;
  --radius-sm:    8px;
  --radius-xs:    5px;
  --font:         'Tajawal', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --transition:   0.2s ease;
  --header-h:     64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ─── HEADER ─── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 16px;
  letter-spacing: -0.5px;
}
.brand-text { line-height: 1.1; }
.brand-title { font-weight: 800; font-size: 16px; color: var(--text); }
.brand-sub { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }

.header-nav {
  display: flex; align-items: center; gap: 4px;
}
.nav-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--text2); background: transparent;
  border: none; cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.nav-btn:hover { background: var(--bg); color: var(--primary); }
.nav-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-btn svg { flex-shrink: 0; }

.header-right {
  display: flex; align-items: center; gap: 12px;
}
.lang-switcher {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 4px;
}
.lang-btn {
  padding: 5px 10px; border-radius: 5px; border: none;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--text2); background: transparent;
  transition: all var(--transition);
}
.lang-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.user-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--bg); border-radius: 40px;
  cursor: pointer; transition: background var(--transition);
}
.user-badge:hover { background: var(--border); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info { line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--text3); }

/* ─── MAIN LAYOUT ─── */
.app-main {
  margin-top: var(--header-h);
  padding: 32px 24px;
  max-width: 1440px;
  margin-left: auto; margin-right: auto;
}
.app-main { margin-top: var(--header-h); }

/* ─── PAGE WRAPPER ─── */
.page-wrap {
  max-width: 1440px; margin: 0 auto;
  padding: calc(var(--header-h) + 32px) 24px 48px;
}

/* ─── DASHBOARD ─── */
.dash-hero {
  text-align: center; padding: 48px 0 40px;
}
.dash-hero h1 {
  font-size: 38px; font-weight: 800; color: var(--text);
  margin-bottom: 10px;
}
.dash-hero p { font-size: 17px; color: var(--text2); }

.dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.dash-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative; overflow: hidden;
}
.dash-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(108,71,255,0.03));
  pointer-events: none;
}
.dash-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.card-icon {
  width: 68px; height: 68px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 28px;
}
.card-icon.purple { background: #7c3aed; }
.card-icon.teal   { background: #0d9488; }
.card-icon.blue   { background: #2563eb; }
.card-icon img, .card-icon svg { width: 34px; height: 34px; }
.dash-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.dash-card p  { color: var(--text2); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.card-link {
  font-size: 14px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
}
.card-link:hover { gap: 10px; }

.dash-stats {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 0;
  display: flex;
}
.stat-item {
  flex: 1; text-align: center;
  padding: 8px 20px;
  border-inline-end: 1px solid var(--border);
}
.stat-item:last-child { border-inline-end: none; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text2); margin-top: 6px; }

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text2); margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 10px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success { background: #d1fae5; color: var(--success); }
.btn-success:hover { background: var(--success); color: white; }
.btn-ghost { background: transparent; color: var(--text2); padding: 8px 12px; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 9px; font-size: 12px; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

/* ─── TABLES ─── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: var(--surface2);
  padding: 12px 16px; text-align: start;
  font-weight: 600; color: var(--text2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover td { background: var(--surface2); }
tbody tr:last-child td { border-bottom: none; }

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 24px; }
.card-title { font-size: 16px; font-weight: 700; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 10px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text2); margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--surface); transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--text3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.required-star { color: var(--danger); margin-inline-start: 3px; }

/* ─── MARC EDITOR ─── */
.marc-editor { }
.marc-field-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 2px;
  transition: border-color var(--transition);
}
.marc-field-block:focus-within { border-color: var(--primary); }
.marc-field-header {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: var(--surface2);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  cursor: pointer; user-select: none;
  min-height: 32px;
}
.marc-field-block.collapsed .marc-field-header {
  border-radius: var(--radius-xs);
}
.marc-tag-badge {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  background: var(--primary-light); color: var(--primary);
  padding: 2px 7px; border-radius: 4px; min-width: 40px; text-align: center;
  flex-shrink: 0;
}
.marc-field-name { font-size: 12px; font-weight: 500; color: var(--text2); flex: 1; }
.marc-field-body { padding: 5px 10px 7px; }
.marc-indicators { display: flex; gap: 10px; margin-bottom: 6px; }

/* ─── Indicators toggle ─── */
.indicators-toggle-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; margin-bottom: 4px;
  border: 1px dashed var(--border); border-radius: var(--radius-xs);
  background: transparent; color: var(--text3); font-size: 11px;
  font-family: var(--font-mono); cursor: pointer;
  transition: all var(--transition);
}
.indicators-toggle-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.indicators-wrap { display: none; }
.indicators-wrap.open { display: flex; gap: 8px; margin-bottom: 6px; }

/* ─── Subfield code label ─── */
.subfield-code-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--teal); background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 4px 6px; min-width: 30px; text-align: center;
  flex-shrink: 0;
}

/* ─── Control fields collapsible card ─── */
.card-header-toggle {
  cursor: pointer; user-select: none;
}
.card-header-toggle:hover { background: var(--surface2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.card-collapse-icon {
  font-size: 14px; color: var(--text3); transition: transform var(--transition);
}
.card.collapsed .card-collapse-icon { transform: rotate(-90deg); }
.card.collapsed .card-body-collapsible { display: none; }
.card.collapsed { border-radius: var(--radius); }
.card.collapsed .card-header { border-bottom: none; border-radius: var(--radius); }

/* ─── Dashboard footer ─── */
.dash-footer {
  margin-top: 48px; padding: 20px 24px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text3);
  font-size: 12px; line-height: 1.9;
}
.ind-input {
  width: 52px; padding: 6px 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 14px; text-align: center;
  background: var(--surface2); outline: none;
  transition: border-color var(--transition);
}
.ind-input:focus { border-color: var(--primary); }
.ind-label { font-size: 12px; color: var(--text3); margin-bottom: 3px; }

.subfield-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 2px;
}
.subfield-code-wrap {
  position: relative; display: flex; align-items: center;
}
.subfield-dollar {
  position: absolute; inset-inline-start: 10px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--primary);
}
.subfield-code {
  width: 42px; padding: 5px 5px 5px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 13px; text-align: center;
  background: var(--surface2); outline: none;
  transition: border-color var(--transition);
}
.subfield-code:focus { border-color: var(--primary); }
.subfield-value {
  flex: 1; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-family: var(--font); font-size: 13px; color: var(--text);
  background: var(--surface); outline: none;
  transition: border-color var(--transition);
}
.subfield-value:focus { border-color: var(--primary); }
.btn-del-sub {
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: #fee2e2; color: var(--danger);
  cursor: pointer; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.btn-del-sub:hover { background: var(--danger); color: white; }

.btn-add-sub {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px; padding: 3px 10px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-xs);
  color: var(--primary); background: transparent;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-add-sub:hover { background: var(--primary-light); }

.marc-field-actions {
  display: flex; align-items: center; gap: 4px;
}
.btn-collapse {
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--text3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all var(--transition);
}
.btn-collapse:hover { background: var(--bg); color: var(--text); }
.marc-field-block.collapsed .marc-field-body { display: none; }
.marc-field-block.collapsed .collapse-icon { transform: rotate(-90deg); }

/* ─── SEARCH ─── */
.search-bar {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.search-main {
  display: flex; gap: 10px; align-items: center; margin-bottom: 14px;
}
.search-input-wrap {
  position: relative; flex: 1;
}
.search-icon-pos {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text3);
}
.search-input {
  width: 100%; padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--surface2); outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--primary); background: var(--surface); }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d1fae5; color: var(--success); }
.badge-danger  { background: #fee2e2; color: var(--danger); }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: var(--blue); }
.badge-gray    { background: var(--bg); color: var(--text2); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%; max-width: 640px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform 0.25s ease;
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  flex-shrink: 0;
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: white; }

/* ─── ALERTS ─── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ─── SIDEBAR / TABS ─── */
.settings-layout {
  display: grid; grid-template-columns: 230px 1fr; gap: 24px;
}
.settings-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  height: fit-content; position: sticky; top: calc(var(--header-h) + 20px);
}
.settings-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all var(--transition);
  border: none; background: transparent; width: 100%; text-align: start;
}
.settings-nav-item:hover { background: var(--bg); color: var(--text); }
.settings-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.settings-nav-item svg { flex-shrink: 0; }
.settings-content { }

/* ─── PAGINATION ─── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  justify-content: center; margin-top: 24px;
}
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; color: var(--text2); transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { background: var(--bg); color: var(--text); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* ─── TOAST ─── */
#toast-container {
  position: fixed; bottom: 24px; inset-inline-end: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  min-width: 260px; padding: 14px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.3s ease;
  cursor: pointer;
}
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } }
.toast.success { background: var(--success); color: white; }
.toast.error   { background: var(--danger); color: white; }
.toast.info    { background: var(--blue); color: white; }
.toast.warning { background: var(--warning); color: white; }

/* ─── CONTROL FIELD ─── */
.ctrl-field-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
}
.ctrl-tag { font-family: var(--font-mono); font-weight: 600; color: var(--primary); min-width: 40px; }
.ctrl-name { font-size: 13px; color: var(--text2); min-width: 180px; }
.ctrl-value {
  flex: 1; padding: 7px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 13px; outline: none;
  background: var(--surface); transition: border-color var(--transition);
}
.ctrl-value:focus { border-color: var(--primary); }

/* ─── RECORD VIEW ─── */
.record-view-field {
  margin-bottom: 14px; padding: 14px 16px;
  background: var(--surface2); border-radius: var(--radius-sm);
  border-inline-start: 3px solid var(--primary-light);
}
.record-view-field:hover { border-inline-start-color: var(--primary); }
.rvf-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rvf-tag { font-family: var(--font-mono); font-weight: 700; color: var(--primary); }
.rvf-name { font-size: 13px; font-weight: 600; color: var(--text2); }
.rvf-indicators { font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
.rvf-subfield { display: flex; gap: 10px; margin-bottom: 4px; }
.rvf-code { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--teal); min-width: 24px; }
.rvf-value { font-size: 14px; color: var(--text); }

/* ─── UTILITY ─── */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.gap-2{gap:8px}.gap-3{gap:16px}
.d-flex{display:flex}.align-center{align-items:center}.justify-between{justify-content:space-between}
.text-muted{color:var(--text2)}.text-small{font-size:13px}.text-mono{font-family:var(--font-mono)}
.w-100{width:100%}.text-center{text-align:center}
.divider{border:none;border-top:1px solid var(--border);margin:20px 0}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .dash-cards { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .header-nav { display: none; }
}
@media (max-width: 600px) {
  .page-wrap { padding-inline: 14px; }
  .dash-stats { flex-direction: column; }
  .stat-item { border-inline-end: none; border-bottom: 1px solid var(--border); }
}
