/* =========================================================
   VeoVault - Patient Data Donation  |  Demo UI Design System
   ========================================================= */

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

/* ── Design Tokens ────────────────────────────────────── */
:root {
  /* Brand */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-900: #1e3a8a;

  /* Neutrals */
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  /* Semantic */
  --success-light: #dcfce7;
  --success:       #16a34a;
  --success-dark:  #065f46;
  --warning-light: #fef3c7;
  --warning:       #f59e0b;
  --warning-dark:  #92400e;
  --danger-light:  #fee2e2;
  --danger:        #ef4444;
  --danger-dark:   #991b1b;
  --info-light:    #e0f2fe;
  --info:          #0ea5e9;
  --info-dark:     #0c4a6e;

  /* Sidebar */
  --sidebar-bg:    #0B1121;
  --sidebar-width: 260px;

  /* Surfaces */
  --surface:       #ffffff;
  --surface-2:     #F8FAFC;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: #F1F5F9;
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 14px;
  letter-spacing: -0.01em;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

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

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--brand-600);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.sidebar-brand .logo-text {
  font-size: .95rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: .3px;
}
.sidebar-brand .logo-sub {
  font-size: .7rem;
  color: #64748b;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #334155;
  padding: 12px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #e2e8f0; text-decoration: none; }
.nav-link.active { background: rgba(37,99,235,.12); color: #93c5fd; border-left: 2px solid #3b82f6; }
.nav-link .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-icon i, .nav-icon svg { width: 16px; height: 16px; stroke-width: 1.75; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
}
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user-info .name { font-size: .8rem; font-weight: 600; color: #f1f5f9; }
.sidebar-user-info .role { font-size: .7rem; color: #64748b; text-transform: capitalize; }
.btn-logout {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin-top: 8px;
  padding: 8px 12px;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: #64748b;
  font-size: .8rem; cursor: pointer; font-family: var(--font);
  transition: color .15s, background .15s;
}
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,.07); }

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

.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gray-900);
}
.page-header p {
  font-size: .9rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  border: 1px solid #E5E7EB;
  padding: 20px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-header h2 {
  font-size: 0.9375rem; font-weight: 600; color: var(--gray-800);
}
.card + .card { margin-top: 20px; }

/* ── Stat Cards (dashboard) ──────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

/* ── Stat Strip (connected KPI bar - admin pages) ────── */
.stat-strip {
  display: grid;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  overflow: hidden;
}
.stat-strip-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-right: 1px solid #E5E7EB;
}
.stat-strip-item:last-child { border-right: none; }
@media (max-width: 900px) {
  .stat-strip { grid-template-columns: 1fr 1fr !important; }
  .stat-strip-item:nth-child(even) { border-right: none; }
  .stat-strip-item:not(:last-child) { border-bottom: 1px solid #E5E7EB; }
}
@media (max-width: 500px) {
  .stat-strip { grid-template-columns: 1fr !important; }
  .stat-strip-item { border-right: none !important; }
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid #E5E7EB;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-card-link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.stat-card-link:hover {
  border-color: var(--brand-400);
  box-shadow: 0 4px 12px rgba(37,99,235,.10);
  transform: translateY(-2px);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
  background: #F1F5F9; color: #2563EB;
}
.stat-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }

.stat-value { font-size: 1.45rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray-500); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px;
  font-size: .875rem; font-weight: 500; font-family: var(--font);
  border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary   { background: var(--brand-600); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }

.btn-secondary { background: #fff; color: #374151; border: 1px solid #D1D5DB; }
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-ghost     { background: transparent; color: var(--gray-600); border: 1px solid transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); border-color: var(--gray-200); }

.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-icon {
  width: 30px; height: 30px; padding: 0;
  border-radius: 6px;
  background: transparent; border: 1px solid transparent;
  color: #94a3b8; cursor: pointer; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; font-family: var(--font);
}
.btn-icon:hover { background: #F1F5F9; border-color: #E2E8F0; color: #334155; }
.btn-icon.danger:hover { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.btn-icon.success:hover { background: var(--success-light); color: var(--success); border-color: var(--success); }
.btn-icon.warning:hover { background: var(--warning-light); color: var(--warning); border-color: var(--warning); }

/* ── Overflow / Action menu ──────────────────────────── */
.action-menu-wrap { position: relative; display: inline-block; }
.action-menu-btn {
  width: 32px; height: 32px; padding: 0;
  border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent;
  color: #64748b; cursor: pointer; font-size: 1.1rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; font-family: var(--font); line-height: 1;
}
.action-menu-btn:hover { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-800); }
.action-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  background: #fff; border: 1px solid #E5E7EB;
  border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(15,23,42,.1);
  min-width: 160px; padding: 4px 0; display: none;
}
.action-menu.open { display: block; }
.action-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: .8125rem; font-weight: 500;
  color: #374151; cursor: pointer; background: none; border: none;
  width: 100%; text-align: left; font-family: var(--font);
  transition: background .12s;
  text-decoration: none;
}
.action-menu-item:hover { background: #F8FAFC; color: #1e293b; }
.action-menu-item.danger { color: #b91c1c; }
.action-menu-item.danger:hover { background: #fef2f2; }
.action-menu-divider { height: 1px; background: #F3F4F6; margin: 4px 0; }

/* ── Quick-action links (dashboard) ─────────────────── */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.qa-action {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #fff; border: 1px solid #E5E7EB;
  border-radius: var(--radius-sm); text-decoration: none;
  color: #1e293b; font-size: .8125rem; font-weight: 500;
  transition: border-color .15s, background .12s;
}
.qa-action:hover { border-color: #CBD5E1; background: #F8FAFC; text-decoration: none; color: #1e293b; }
.qa-action .qa-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: #F1F5F9; color: #64748b;
  display: flex; align-items: center; justify-content: center;
}
.qa-action .qa-icon svg { width: 16px; height: 16px; stroke-width: 1.75; }
.qa-action .qa-label { font-weight: 600; font-size: .8125rem; color: #1e293b; }
.qa-action .qa-desc  { font-size: .72rem; color: #94a3b8; margin-top: 1px; }

/* ── Flow step (dashboard) ───────────────────────────── */
.flow-step {
  text-align: center; flex: 1; min-width: 110px; padding: 16px 12px;
}
.flow-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: #F1F5F9; color: #2563EB;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.flow-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }
.flow-title { font-size: .8rem; font-weight: 600; color: #1e293b; }
.flow-desc  { font-size: .72rem; color: #64748b; margin-top: 3px; }

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 0.75rem; font-weight: 500; color: #374151;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: .875rem; font-family: var(--font); color: var(--gray-800);
  background: var(--surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 10px center; background-size: 16px; background-repeat: no-repeat; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Tables ──────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: .875rem;
}
thead tr { border-bottom: 1px solid #E2E8F0; }
thead th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
tbody tr { border-bottom: 1px solid #EEF2F7; transition: background .12s; }
tbody tr:hover { background: #F8FAFC; }
tbody td { padding: 14px 16px; font-size: 14px; color: #1e293b; vertical-align: middle; }
tbody td:first-child { color: var(--gray-900); font-weight: 500; }

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

.badge-active   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-pending  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-revoked  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-draft    { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.badge-archived { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.badge-info     { background: var(--info-light);     color: var(--info-dark); }
.badge-role-doctor     { background: #F8FAFC; color: #334155; border: 1px solid #E2E8F0; }
.badge-role-rd_admin   { background: #F8FAFC; color: #334155; border: 1px solid #E2E8F0; }
.badge-role-rd_user    { background: #F8FAFC; color: #334155; border: 1px solid #E2E8F0; }
.badge-role-superadmin { background: #F8FAFC; color: #334155; border: 1px solid #E2E8F0; }

/* ── Modals ──────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 720px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; color: var(--gray-900); }
.modal-close {
  background: var(--gray-100); border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); transition: all .15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 0 24px 22px;
}

/* ── Alerts / Toasts ─────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 16px;
}
.alert-success { background: var(--success-light); color: var(--success-dark); border-left: 4px solid var(--success); }
.alert-danger  { background: var(--danger-light);  color: var(--danger-dark);  border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning-dark); border-left: 4px solid var(--warning); }
.alert-info    { background: var(--info-light);    color: var(--info-dark);    border-left: 4px solid var(--info); }
.alert.hidden  { display: none; }

.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--gray-900); color: #f1f5f9;
  padding: 12px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); font-size: .875rem;
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  animation: toastIn .25s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Filters / Search bar ────────────────────────────── */
.filters-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; align-items: center;
}
.search-box {
  flex: 1; min-width: 220px; position: relative;
}
.search-box .search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: .9rem; pointer-events: none;
}
.search-box .form-control { padding-left: 34px; }

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 2.8rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--gray-600); margin-bottom: 4px; }
.empty-state p  { font-size: .875rem; }

/* ── Loading spinner ─────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin .6s linear infinite; display: inline-block;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; gap: 12px; color: var(--gray-400); font-size: .875rem;
}

/* ── Pagination ──────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; font-size: .8rem; color: var(--gray-500);
}
.pagination-controls { display: flex; gap: 4px; }
.page-btn {
  padding: 5px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300); background: var(--surface);
  color: var(--gray-600); cursor: pointer; transition: all .15s; font-family: var(--font); font-size: .8rem;
}
.page-btn:hover:not(:disabled) { background: var(--gray-100); }
.page-btn.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Step indicator (consent / upload wizard) ────────── */
.steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 28px;
}
.step {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600; color: var(--gray-400);
  background: var(--surface); flex-shrink: 0;
  transition: all .2s;
}
.step.active .step-circle  { border-color: var(--brand-600); color: var(--brand-600); }
.step.done .step-circle    { border-color: var(--success); background: var(--success); color: #fff; }
.step-label { font-size: .8rem; font-weight: 500; color: var(--gray-400); }
.step.active .step-label   { color: var(--brand-600); }
.step.done .step-label     { color: var(--success); }
.step-divider { flex: 1; height: 2px; background: var(--gray-200); min-width: 20px; max-width: 60px; }
.step.done + .step .step-divider,
.step-divider.done          { background: var(--success); }

/* ── Dropzone ────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center; cursor: pointer;
  transition: all .2s; color: var(--gray-400);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand-400);
  background: var(--brand-50);
  color: var(--brand-600);
}
.dropzone .dz-icon { font-size: 2rem; margin-bottom: 10px; }
.dropzone h4 { font-size: .9rem; font-weight: 600; color: var(--gray-600); margin-bottom: 4px; }
.dropzone p  { font-size: .8rem; }

/* ── File list ───────────────────────────────────────── */
.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .8rem;
}
.file-item .file-icon { font-size: 1.2rem; flex-shrink: 0; }
.file-item .file-name { flex: 1; font-weight: 500; color: var(--gray-700); }
.file-item .file-size { color: var(--gray-400); }
.file-item .file-remove { cursor: pointer; color: var(--gray-400); transition: color .15s; }
.file-item .file-remove:hover { color: var(--danger); }

/* ── Consent detail builder ──────────────────────────── */
.consent-detail-row {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.consent-detail-row:last-child { border-bottom: none; }

/* ── Progress bar ────────────────────────────────────── */
.progress-bar-track {
  height: 6px; background: var(--gray-200); border-radius: 100px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--brand-600); border-radius: 100px;
  transition: width .4s ease;
}

/* ── Tabs ────────────────────────────────────────────── */
.tabs {
  display: flex; border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px; gap: 0;
}
.tab-btn {
  padding: 10px 18px;
  font-size: .875rem; font-weight: 500; font-family: var(--font);
  color: var(--gray-500); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: all .15s;
}
.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Auth / Login Page ───────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #0B1121;
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.45);
  border: 1px solid #e2e8f0;
  padding: 44px 40px;
  width: 100%; max-width: 440px;
}
.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.auth-logo .logo-icon {
  width: 44px; height: 44px;
  background: var(--brand-600);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.auth-logo .brand-name { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.auth-logo .brand-sub  { font-size: .72rem; color: var(--gray-400); margin-top: 2px; }
.auth-card h2 { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.auth-card .subtitle { font-size: .9rem; color: var(--gray-500); margin-bottom: 28px; }

/* ── Utility ─────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: .8rem; }
.text-xs { font-size: .72rem; }
.text-muted { color: #64748b; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 30px 22px; }
}
