/* ================================================================
   DELEGATII DESIGN TOKENS — Shared CSS for all delegatii pages
   Source of truth: delegatii_admin_users.html (gold standard)
   ================================================================ */

/* ========================================
   VARIABLES
======================================== */
:root {
  /* Base palette */
  --bg: #0b1320;
  --ink: #f7f8fb;
  --muted: #a7b1c6;
  --line: #1b2440;
  --card: #111a2c;
  --accent: #2a74ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Surface system (3 levels) */
  --surface-deep: #101b2e;
  --surface-overlay: #162240;
  --surface-sunken: #0d1422;

  /* Border system (3 intensities) */
  --border-default: #2a3a5c;
  --border-subtle: #1e2d4a;
  --border-hover: #3a5080;

  /* Misc surfaces */
  --surface-track: #18233d;
  --placeholder: #4a5a7a;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-16: 64px;

  /* Motion system */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.12s;
  --duration-base: 0.2s;
  --duration-slow: 0.35s;

  /* Elevation system */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
  --shadow-accent-sm: 0 4px 16px rgba(42,116,255,0.12);
  --shadow-accent-lg: 0 8px 24px rgba(42,116,255,0.15);
}

/* ========================================
   RESET & BASE
======================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { touch-action: manipulation; } /* prevents pinch-zoom on mobile — enterprise app behavior */

html, body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  height: 100%;
}

a { color: var(--accent); }

/* ========================================
   TYPOGRAPHY
======================================== */
h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 var(--space-3);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

/* ========================================
   UNIFIED TOP BAR (all pages except SPA home)
======================================== */
.deleg-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.deleg-topbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.deleg-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
  white-space: nowrap;
}

.deleg-topbar__back:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(42, 116, 255, 0.08);
}

.deleg-topbar__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deleg-topbar__home {
  font-size: 18px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background var(--duration-fast);
  line-height: 1;
  flex-shrink: 0;
}

.deleg-topbar__home:hover {
  background: rgba(42, 116, 255, 0.1);
}

/* ========================================
   LEGACY NAV (for pages not yet migrated)
======================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  white-space: nowrap;
}

.spacer { flex: 1; }

/* ========================================
   BADGE
======================================== */
.badge {
  background: linear-gradient(135deg, #1e2a49 0%, #2d3a5e 100%);
  color: #cfe2ff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #2a385e;
  letter-spacing: 0.3px;
}

/* ========================================
   BUTTONS
======================================== */
button, .btn {
  background: var(--surface-deep);
  border: 1px solid var(--border-default);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 36px;
  transition: background var(--duration-fast) var(--ease-in-out),
              border-color var(--duration-fast) var(--ease-in-out),
              transform 0.1s var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
  font-family: inherit;
}

button:hover, .btn:hover {
  background: var(--surface-overlay);
  border-color: var(--accent);
}

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

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(42,116,255,0.15);
}

.btn.primary {
  background: linear-gradient(135deg, #183065, #1e3d80);
  border-color: #2951c7;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #1e3d80, #2648a8);
  border-color: #3a80ff;
}

.btn.success {
  background: #132417;
  border-color: #2d7a2f;
  color: #b8f5ba;
}
.btn.success:hover {
  background: #1a3a22;
  border-color: #34d399;
}

.btn.danger {
  background: #241313;
  border-color: var(--danger);
  color: #ffb3b3;
}
.btn.danger:hover {
  background: #3a1e1e;
  border-color: #ff4a4a;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
  min-height: unset;
}

.btn.secondary {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}
.btn.secondary:hover {
  background: #374151;
  border-color: #4b5563;
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
}
.btn.back:hover {
  color: var(--ink);
}

/* ========================================
   SHELL & LAYOUT
======================================== */
.container.lg, .shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
}

/* ========================================
   CARDS
======================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: border-color var(--duration-fast), box-shadow var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
}

.card.sm { padding: var(--space-4); }
.card.md { padding: var(--space-5); }

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.card-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ========================================
   TABS
======================================== */
.tabs {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tab {
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
  position: relative;
}

.tab:hover {
  color: var(--ink);
  background: rgba(42, 116, 255, 0.1);
}

.tab.active {
  color: var(--accent);
  background: rgba(42, 116, 255, 0.15);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* ========================================
   INPUTS & FORMS
======================================== */
input, select, textarea {
  background: var(--surface-deep);
  border: 1px solid var(--border-default);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px; /* >= 16px prevents iOS auto-zoom on focus */
  width: 100%;
  transition: border-color var(--duration-fast) var(--ease-in-out), box-shadow var(--duration-fast) var(--ease-in-out);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 116, 255, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--placeholder);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

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

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Inline input (compact, for table cells) */
.input.inline {
  width: auto;
  max-width: 120px;
  padding: var(--space-2) var(--space-3);
}

.input.inline.readonly {
  background: var(--border-subtle) !important;
  color: #64748b !important;
  border-color: var(--line) !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.input.inline.readonly:hover {
  background: var(--border-subtle) !important;
  border-color: var(--line) !important;
}

.input.inline.readonly:focus {
  outline: none;
  box-shadow: none;
}

/* ========================================
   TABLES
======================================== */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

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

thead {
  background: linear-gradient(135deg, var(--border-subtle) 0%, var(--border-default) 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}

th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line);
}

tbody tr {
  transition: background var(--duration-fast);
}

tbody tr:nth-child(even) {
  background: rgba(15, 22, 38, 0.3);
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

/* ========================================
   CHIPS
======================================== */
.chip {
  background: #1f2b45;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 2px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}

.chip:hover {
  background: var(--border-subtle);
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, #1e5fff 100%);
  border-color: var(--accent);
}

.chip.ok {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.chip.danger {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.chip.pending {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.chip.expired {
  border-color: #6b21a8;
  background: rgba(107, 33, 168, 0.12);
  color: #c084fc;
}

.chip .remove {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--duration-fast);
  font-weight: 800;
}
.chip .remove:hover {
  opacity: 1;
  color: var(--danger);
}

/* ========================================
   BADGE VARIANTS (shared across pages)
======================================== */
.badge.ok      { border-color: #2d7a2f; background: #132417; color: #b8f5ba; }
.badge.warn    { border-color: #7a6a2f; background: #241f13; color: #f5e6b8; }
.badge.err     { border-color: #7a2f2f; background: #241313; color: #f5b8b8; }
.badge.cancel  { border-color: #7a2f5b; background: #241322; color: #f5b8d2; }
.badge.tardiva { border-color: #b45309; background: #2c1a00; color: #fcd38a; }
.badge.migrated{ border-color: #6366f1; background: #1e1b4b; color: #a5b4fc; }
.badge.info    { border-color: #2d5a7a; background: #132024; color: #b8d5f5; }
.badge.angajat { border-color: #2a4b7a; background: #0f1e36; color: #93c5fd; }
.badge.student { border-color: #065f46; background: #0d2b20; color: #6ee7b7; }
.badge.colaborator { border-color: #5b21b6; background: #1e1040; color: #c4b5fd; }

/* ========================================
   PROGRESS BAR (barx)
======================================== */
.barx {
  height: 8px;
  border-radius: 8px;
  background: var(--surface-track);
  overflow: hidden;
}

.barx .fill {
  height: 100%;
  background: var(--accent);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ========================================
   CHIP TOGGLE BUTTON
======================================== */
.btn-chip-toggle {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-chip-toggle.active {
  background: #1e1b4b;
  border-color: #6366f1;
  color: #a5b4fc;
}

.btn-chip-toggle:hover {
  border-color: #6366f1;
  color: #a5b4fc;
}

/* ========================================
   SEARCH & FILTERS
======================================== */
.filters, .filters-panel {
  background: rgba(17, 26, 44, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--space-4);
  padding: var(--space-4);
  box-shadow: none;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  padding-left: 40px;
}

.search-box::before {
  content: '\1F50D';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* ========================================
   STATS CARDS
======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: linear-gradient(135deg, var(--border-subtle) 0%, var(--border-default) 100%);
  border: 1px solid var(--line);
  border-radius: var(--space-3);
  padding: var(--space-5);
  text-align: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color var(--duration-fast), box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent-sm), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   EMPTY STATES
======================================== */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-5);
  color: var(--muted);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state-hint {
  font-size: 14px;
  opacity: 0.7;
}

/* ========================================
   SPINNER
======================================== */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   TOAST NOTIFICATIONS
======================================== */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--surface-overlay);
  border: 1px solid var(--border-subtle);
  color: var(--ink);
  border-radius: 10px;
  padding: var(--space-3) var(--space-5);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideIn 0.25s ease;
  max-width: 360px;
}
.toast.success { border-color: var(--success); border-left: 3px solid var(--success); }
.toast.error   { border-color: var(--danger);  border-left: 3px solid var(--danger); }
.toast.warning { border-color: var(--warning); border-left: 3px solid var(--warning); }

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

/* ========================================
   MODAL OVERLAY
======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--space-4);
  padding: var(--space-6) var(--space-8);
  max-width: 480px;
  width: 92%;
  box-shadow: var(--shadow-xl);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.modal-box .modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

.modal-box .modal-field {
  margin-bottom: 16px;
}

.modal-box .modal-field label {
  display: block;
  margin-bottom: 6px;
}

.modal-box .modal-field .hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.modal-box .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ========================================
   LAYOUT HELPERS (shared across pages)
======================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 13px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.right {
  margin-left: auto;
}

.kv {
  font-size: 14px;
}
.kv b {
  opacity: 0.9;
}

/* ========================================
   SEMANTIC HOVER SYSTEM
======================================== */

/* Navigation hovers — subtle tint */
.deleg-topbar__back:hover,
.deleg-topbar__home:hover,
.tab:hover {
  background: rgba(42, 116, 255, 0.08);
}

/* Table row hovers — barely visible */
tbody tr:hover {
  background: rgba(42, 116, 255, 0.04);
}

/* Destructive hovers — red glow ring */
.btn.danger:hover {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success hovers — green glow ring */
.btn.success:hover {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Primary hovers — accent glow ring */
.btn.primary:hover {
  box-shadow: 0 0 0 3px rgba(42, 116, 255, 0.12);
}

/* ========================================
   GLOBAL FOCUS-VISIBLE
======================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; /* inputs use box-shadow instead */
}

/* ========================================
   UTILITY CLASSES
======================================== */
.hidden { display: none !important; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-row { display: flex; gap: 12px; align-items: center; }
.justify-between { justify-content: space-between; }

.text-muted { color: var(--muted); font-style: italic; }
.text-right { text-align: right; }
.muted { color: var(--muted); }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }

/* ========================================
   SCROLLBAR
======================================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--border-default) var(--bg); }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .bar, .deleg-topbar__inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .stats-grid { grid-template-columns: 1fr; }
  .shell { padding: 16px 12px; }
  .search-box { min-width: 0; flex-basis: 100%; }
}
