@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ============================================================
   Zehndon Admin — dizayn tokenlari
   ============================================================ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-weak: #eef2ff;
  --accent-text: #3730a3;

  --success: #16a34a;
  --success-weak: #dcfce7;
  --success-text: #166534;
  --warning: #d97706;
  --warning-weak: #fef3c7;
  --warning-text: #92400e;
  --danger: #dc2626;
  --danger-weak: #fee2e2;
  --danger-text: #991b1b;

  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-hover: #1e293b;
  --sidebar-active: #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.10);
  --sidebar-w: 252px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
h1, h2, h3, h4 { color: var(--text); font-weight: 600; line-height: 1.3; }
h2 { font-size: 18px; margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 12px; }
p { color: var(--text-2); }
pre { white-space: pre-wrap; word-break: break-word; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   Layout: sidebar + topbar
   ============================================================ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  z-index: 50;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 22px;
  text-decoration: none;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.brand-text { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; }
.brand-text small { display: block; color: var(--sidebar-text); font-weight: 400; font-size: 12px; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 16px 12px 6px;
}
.nav-group:first-child { padding-top: 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-link.active { background: var(--accent); color: var(--sidebar-active); box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35); }
.nav-logout { margin-top: 12px; border-top: 1px solid #1e293b; border-radius: 0; padding-top: 14px; }
.nav-logout:hover { background: transparent; color: #fca5a5; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 32px;
  background: rgba(245, 246, 248, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; flex: 1; min-width: 0; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-actions .btn { margin: 0; }
.topbar-menu {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
}

.content { padding: 28px 32px 48px; flex: 1; }
.container { max-width: none; margin: 0; padding: 0; }
.sidebar-backdrop { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 45;
  }
  .main { margin-left: 0; }
  .topbar-menu { display: grid; }
  .topbar { padding: 10px 16px; }
  .topbar-title { font-size: 17px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 0 10px; }
  .content { padding: 20px 16px 40px; }
}

/* ============================================================
   Kartalar
   ============================================================ */
.card,
.form-card,
.filter-box,
.chart-card,
.chart-container,
.table-card,
.form-container,
.form-container-settings,
.log-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.form-card { max-width: 860px; }
.form-container { text-align: left; max-width: 640px; }
.form-container-settings { max-width: 560px; text-align: left; }
.form-container h2, .form-card h2, .form-container-settings h2 { margin-bottom: 18px; }

.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-header h2, .card-header h3 { margin: 0; }
.card-link { font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.card-link .icon { width: 15px; height: 15px; }

/* ============================================================
   Tugmalar
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  margin-right: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary, .btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border-strong);
}
.btn-secondary:hover, .btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--faint); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-warning { background: var(--warning-weak); color: var(--warning-text); border-color: #fde68a; }
.btn-warning:hover { background: #fde68a; }

/* Jadval ichidagi kichik tugmalar */
td .btn { height: 30px; padding: 0 10px; font-size: 13px; margin: 2px 4px 2px 0; }

/* ============================================================
   Formalar
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label,
.filter-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
}

input[type="text"], input[type="number"], input[type="password"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="email"], input[type="tel"],
input:not([type]), select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option-input { transition: border-color 0.15s, background 0.15s; }
.correct-answer { background: var(--success-weak) !important; border-color: var(--success) !important; color: var(--success-text); font-weight: 500; }
/* Savollar jadvalidagi "To'g'ri javob" ustuni — butun katakni bo'yamaymiz, faqat matn */
td.correct-answer { background: transparent !important; color: var(--success); font-weight: 600; }

.filter-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { flex: 1; min-width: 180px; }
.filter-row .btn { margin-right: 0; }

.search-box { margin-bottom: 20px; }
.search-box form { display: flex; gap: 10px; }
.search-box input { flex: 1; }
.search-box .btn { margin: 0; }

.hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-actions .btn { margin: 0; }

.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex !important;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 0 !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 400 !important;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }
.choice input { margin-top: 2px; }
.choice b { display: block; color: var(--text); font-weight: 600; }
.choice small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.steps { padding-left: 18px; color: var(--text-2); }
.steps li { margin-bottom: 8px; }
.steps li:last-child { margin-bottom: 0; }

/* ============================================================
   Ogohlantirishlar
   ============================================================ */
.alert-success, .alert-error, .error, .alert-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid;
  font-weight: 500;
}
.alert-success { background: #f0fdf4; color: var(--success-text); border-color: #bbf7d0; }
.alert-error, .error { background: #fef2f2; color: var(--danger-text); border-color: #fecaca; }
.alert-info { background: var(--accent-weak); color: var(--accent-text); border-color: #c7d2fe; }
.error { margin-top: 16px; margin-bottom: 0; justify-content: center; }

/* ============================================================
   Statistik kartalar
   ============================================================ */
.stats-grid, .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card, .stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: left;
}
.stat-number { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); line-height: 1.2; margin-bottom: 4px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-primary { color: var(--accent); }
.stat-success { color: var(--success); }
.stat-warning { color: var(--warning); }
.stat-danger  { color: var(--danger); }

/* Dashboard KPI */
.kpi { display: flex; gap: 14px; align-items: flex-start; }
.kpi-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon.indigo { background: var(--accent-weak); color: var(--accent); }
.kpi-icon.green  { background: var(--success-weak); color: var(--success); }
.kpi-icon.amber  { background: var(--warning-weak); color: var(--warning); }
.kpi-icon.rose   { background: #ffe4e6; color: #e11d48; }
.kpi-body { min-width: 0; }
.kpi-delta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi-delta b { color: var(--success); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-grid > * { margin-bottom: 0; }
.dash-side { display: flex; flex-direction: column; gap: 20px; }
.dash-side > * { margin-bottom: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; opacity: 0.85; transition: opacity 0.15s; }
.bar:hover .bar-fill { opacity: 1; }
.bar-value { font-size: 12px; font-weight: 600; color: var(--text-2); }
.bar-label { font-size: 11px; color: var(--muted); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.quick-action:hover { border-color: #c7d2fe; background: var(--accent-weak); color: var(--accent-text); }
.quick-action .icon { color: var(--accent); }

.comp-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: #fff;
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}
.comp-banner .icon { width: 28px; height: 28px; }
.comp-banner-text { flex: 1; min-width: 200px; }
.comp-banner-text small { display: block; opacity: 0.8; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.comp-banner-text strong { font-size: 17px; }
.comp-banner .btn { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.3); margin: 0; }
.comp-banner .btn:hover { background: rgba(255, 255, 255, 0.28); }

.list { list-style: none; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list-main { min-width: 0; }
.list-title { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: 12px; color: var(--muted); }

/* Eski dashboard menyu kartalari (boshqa joyda ishlatilsa) */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-header { padding: 16px 18px 4px; }
.menu-header h3 { margin: 0; }
.menu-body { padding: 12px; }
.menu-link { display: block; padding: 9px 10px; border-radius: 6px; color: var(--text-2); text-decoration: none; }
.menu-link:hover { background: var(--surface-2); color: var(--accent); }

/* ============================================================
   Jadvallar
   ============================================================ */
.categories-table, .subcategories-table, .questions-table,
.results-table, .stats-table, .users-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin: 0 0 20px;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
tbody tr:last-child td, table tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: #fafbff; }
td { color: var(--text-2); }
.form-card table, .table-card table, .chart-card table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }

.question-text { max-width: 380px; word-wrap: break-word; color: var(--text); }
.options-list { font-size: 12px; color: var(--muted); line-height: 1.7; }
.user-name { font-weight: 600; color: var(--text); }
.user-id { color: var(--faint); font-size: 12px; }
.categories-cell { max-width: 320px; line-height: 1.9; }
.last-test-cell { text-align: center; }
.no-data { text-align: center; padding: 40px 16px; color: var(--faint); }

.category-badge, .badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
  background: var(--accent-weak);
  color: var(--accent-text);
}
.badge-success { background: var(--success-weak); color: var(--success-text); }
.badge-warning { background: var(--warning-weak); color: var(--warning-text); }
.badge-muted { background: #f3f4f6; color: var(--muted); }

/* ============================================================
   Sahifalash
   ============================================================ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .disabled { color: var(--faint); background: var(--surface-2); pointer-events: none; }
.pagination-info { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* ============================================================
   Grafiklar
   ============================================================ */
.charts-grid, .chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.charts-grid > *, .chart-grid > * { margin-bottom: 0; }
.chart-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
#stats-chart, #weekly-chart { max-height: 300px; }
@media (max-width: 900px) { .charts-grid, .chart-grid { grid-template-columns: 1fr; } }

.progress-bar { background: #eef0f4; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-fill { background: linear-gradient(90deg, #6366f1, #8b5cf6); height: 100%; border-radius: 999px; transition: width 0.3s ease; }

/* ============================================================
   Musobaqa bosqichlari
   ============================================================ */
.stage-row {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 10px;
  background: var(--surface-2) !important;
  border: 1px solid var(--border);
  padding: 10px !important;
  border-radius: var(--radius-sm) !important;
}
.stage-num {
  min-width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--accent-weak) !important;
  color: var(--accent-text) !important;
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}
.remove-stage { flex-shrink: 0; }

/* ============================================================
   Loglar
   ============================================================ */
.log-container pre, .content > .container > pre {
  background: #0f172a;
  color: #cbd5e1;
  border-radius: var(--radius);
  padding: 18px;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: 72vh;
  overflow: auto;
}

/* ============================================================
   Login
   ============================================================ */
.login-box {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(219, 39, 119, 0.12), transparent 60%),
    var(--bg);
}
.login-container {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
}
.login-header { text-align: center; margin-bottom: 26px; }
.login-header::before {
  content: "Z";
  display: grid; place-items: center;
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}
.login-header h2 { font-size: 22px; margin-bottom: 6px; }
.login-header p { color: var(--muted); }
.login-btn {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.login-btn:hover { background: var(--accent-hover); }

/* ============================================================
   Mobil
   ============================================================ */
@media (max-width: 640px) {
  .options-grid { grid-template-columns: 1fr; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-group { min-width: 0; }
  .search-box form { flex-direction: column; }
  .stats-grid, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { flex-direction: column; gap: 10px; }
  .kpi-icon { width: 36px; height: 36px; }
  .stat-card, .stat-item { padding: 16px; }
  .stat-number { font-size: 22px; }
  .quick-actions { grid-template-columns: 1fr; }
  .card, .form-card, .filter-box, .chart-card, .chart-container, .table-card, .form-container, .form-container-settings { padding: 18px; }
  th, td { padding: 10px 12px; }
}
