/* ============================================================
   CalibLab ISO 17025 – Design System Principal
   ============================================================ */

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

/* ── Variables CSS ─────────────────────────────────────────── */
:root {
  --primary:         #1E40AF;
  --primary-light:   #3B82F6;
  --primary-lighter: #DBEAFE;
  --primary-dark:    #1E3A8A;
  --accent:          #06B6D4;
  --accent-light:    #CFFAFE;

  --bg:        #F0F9FF;
  --surface:   #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;
  --border:    #E2E8F0;
  --border-2:  #CBD5E1;

  --text:       #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --sidebar-bg:          #0F172A;
  --sidebar-text:        #94A3B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-item-hover:  rgba(255,255,255,0.06);
  --sidebar-item-active: #1E40AF;
  --sidebar-w:           264px;

  --success:       #10B981;
  --success-light: #D1FAE5;
  --success-dark:  #065F46;
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --warning-dark:  #92400E;
  --danger:        #EF4444;
  --danger-light:  #FEE2E2;
  --danger-dark:   #991B1B;
  --info:          #3B82F6;
  --info-light:    #DBEAFE;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --header-h:  64px;
  --transition: 0.18s ease;
  --transition-slow: 0.3s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ── Layout ─────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition-slow);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; }

.sidebar-logo-text .app-name {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}

.sidebar-logo-text .app-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 18px 20px 6px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.nav-item svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.nav-item:hover {
  background: var(--sidebar-item-hover);
  color: #fff;
}

.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  background: var(--sidebar-item-active);
  color: var(--sidebar-text-active);
  box-shadow: 0 4px 12px rgba(30,64,175,0.35);
}

.nav-item.active svg { opacity: 1; stroke: #fff; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-height: 100vh;
  transition: margin var(--transition-slow);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title-block h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-title-block p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

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

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ── KPI Grid ────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 2px 0 0 2px;
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-card.kpi-primary::before  { background: var(--primary); }
.kpi-card.kpi-success::before  { background: var(--success); }
.kpi-card.kpi-warning::before  { background: var(--warning); }
.kpi-card.kpi-danger::before   { background: var(--danger); }

.kpi-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.kpi-icon svg { width: 26px; height: 26px; stroke-width: 1.8; fill: none; }

.kpi-card.kpi-primary .kpi-icon  { background: var(--primary-lighter); }
.kpi-card.kpi-primary .kpi-icon svg { stroke: var(--primary); }
.kpi-card.kpi-success .kpi-icon  { background: var(--success-light); }
.kpi-card.kpi-success .kpi-icon svg { stroke: var(--success); }
.kpi-card.kpi-warning .kpi-icon  { background: var(--warning-light); }
.kpi-card.kpi-warning .kpi-icon svg { stroke: var(--warning); }
.kpi-card.kpi-danger .kpi-icon   { background: var(--danger-light); }
.kpi-card.kpi-danger .kpi-icon svg { stroke: var(--danger); }

.kpi-body { flex: 1; }
.kpi-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-card.kpi-primary .kpi-value  { color: var(--primary); }
.kpi-card.kpi-success .kpi-value  { color: var(--success); }
.kpi-card.kpi-warning .kpi-value  { color: var(--warning); }
.kpi-card.kpi-danger .kpi-value   { color: var(--danger); }

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

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-secondary:hover { background: var(--surface-3); }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239,68,68,0.3); }

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}
.btn-warning:hover { background: #D97706; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-icon {
  padding: 0;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
}

.btn-icon-sm { width: 30px; height: 30px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.td-actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success, .badge-valid, .badge-accepted {
  background: var(--success-light); color: var(--success-dark);
}
.badge-warning, .badge-expiring, .badge-limited {
  background: var(--warning-light); color: var(--warning-dark);
}
.badge-danger, .badge-expired, .badge-rejected {
  background: var(--danger-light); color: var(--danger-dark);
}
.badge-info { background: var(--info-light); color: var(--primary-dark); }
.badge-neutral { background: var(--surface-3); color: var(--text-muted); }

.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control {
  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='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 80px; }

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

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(8px);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
  margin-bottom: 4px;
}

.modal-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.modal-body { padding: 20px 28px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
}

.modal-close {
  width: 32px; height: 32px;
  border: none; background: var(--surface-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: background var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  border-left: 4px solid var(--primary);
  pointer-events: all;
  animation: toastIn 0.3s ease forwards;
}

.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--danger); }
.toast-info    { border-color: var(--primary); }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg  { font-size: 14px; font-weight: 500; flex: 1; }

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

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

.toast.removing { animation: toastOut 0.3s ease forwards; }

/* ── Loading Overlay ─────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(240,249,255,0.8);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--primary-lighter);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.inline-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: middle;
}

/* ── Wizard ──────────────────────────────────────────────── */
.wizard-container {
  max-width: 880px;
  margin: 0 auto;
}

.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
  position: relative;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 19px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: var(--border-2);
  z-index: 0;
}

.wizard-step.completed:not(:last-child)::after { background: var(--success); }
.wizard-step.active:not(:last-child)::after { background: var(--primary-lighter); }

.wizard-step-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative; z-index: 2;
}

.wizard-step.active .wizard-step-num {
  background: var(--primary); border-color: var(--primary);
  color: #fff; box-shadow: 0 0 0 4px rgba(30,64,175,0.15);
}

.wizard-step.completed .wizard-step-num {
  background: var(--success); border-color: var(--success); color: #fff;
}

.wizard-step-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label { color: var(--primary); }
.wizard-step.completed .wizard-step-label { color: var(--success); }

.wizard-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 32px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Section titles ──────────────────────────────────────── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-xl);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

.empty-state-icon svg { width: 36px; height: 36px; stroke: var(--text-light); fill: none; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text); }
.empty-state p  { font-size: 14px; color: var(--text-muted); max-width: 320px; }

/* ── Utility classes ─────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-4   { margin-bottom: 4px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 12px; }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-primary { color: var(--primary); }
.w-full       { width: 100%; }
.hidden       { display: none !important; }

/* ── Mobile menu button ──────────────────────────────────── */
#menu-toggle {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 300;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--sidebar-bg);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 264px; }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  #menu-toggle { display: flex; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-value { font-size: 26px; }

  .page-header { flex-direction: column; align-items: flex-start; }

  .modal { max-width: 100%; }

  .wizard-step-label { display: none; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .main-content { padding: 16px 12px; }
  .wizard-card { padding: 20px 16px; }
}
