/* ============================================================
   DESIGN TOKENS — SINGLE SOURCE OF TRUTH
   ============================================================ */
:root {
  /* ── PRIMARY COLORS ──────────────────────────────────────── */
  --primary:        #007bff;
  --primary-dark:   #0056b3;
  --primary-light:  #e3f2fd;

  /* ── BACKGROUND COLORS ───────────────────────────────────── */
  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --bg-hover:       #f0f4f8;
  --card:           #ffffff;           /* Alias for bg-card */
  --input-bg:       #ffffff;           /* Form input background */

  /* ── BORDER COLORS ───────────────────────────────────────── */
  --border:         #e2e8f0;
  --border-light:   #ecf0f5;

  /* ── TEXT COLORS ─────────────────────────────────────────── */
  --text:           #1e293b;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --muted:          #64748b;           /* Alias for text-muted */
  --placeholder:    #94a3b8;           /* Alias for text-light */

  /* ── STATUS COLORS ───────────────────────────────────────── */
  --success:        #10b981;
  --success-light:  #d1fae5;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;

  /* ── LEGACY ALIASES (for compatibility) ──────────────────── */
  --blue:           #007bff;
  --blue-dark:      #0056b3;
  --blue-hover:     #0056b3;
  --blue-100:       #e3f2fd;
  --blue-200:       #bbdefb;
  --blue-light:     #e3f2fd;
  --green:          #10b981;
  --green-light:    #d1fae5;
  --red:            #ef4444;
  --red-light:      #fee2e2;
  --amber:          #f59e0b;
  --amber-light:    #fef3c7;

  /* ── LAYOUT ──────────────────────────────────────────────── */
  --sidebar-w:      260px;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:           'SF Mono', 'Monaco', 'Monaco', monospace;

  /* ── RADIUS SCALE ────────────────────────────────────────── */
  --radius-sm:      4px;
  --radius-md:      6px;
  --radius-lg:      8px;
  --radius-xl:      12px;

  /* ── SPACING SCALE ───────────────────────────────────────── */
  --space-1:        4px;
  --space-2:        8px;
  --space-3:        12px;
  --space-4:        16px;
  --space-5:        20px;
  --space-6:        24px;
  --space-8:        32px;
}

/* ============================================================
   STANDARDIZED METRIC COMPONENT
   ============================================================ */
.metric-card {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--bg);
}

.metric-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* ============================================================
   UNIVERSAL STAT CARD COMPONENT
   ============================================================ */
.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.stat-card .stat-icon-primary {
  background: var(--blue-100);
  color: var(--primary);
}

.stat-card .stat-icon-success {
  background: var(--success-light);
  color: var(--success);
}

.stat-card .stat-icon-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-card .stat-icon-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.stat-card .stat-content {
  flex: 1;
}

.stat-card .stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

/* Stat Value Color Variants */
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }
.stat-value.primary { color: var(--primary); }

/* Inline stat-card (without icon) */
.stat-card-inline {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  text-align: center;
}

.stat-card-inline .stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-card-inline .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

/* ============================================================
   STANDARDIZED BUTTON STYLES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

/* ============================================================
   STANDARDIZED CARD
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   STANDARDIZED FORM INPUT
   ============================================================ */
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  outline: none;
}

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

/* ============================================================
   STANDARDIZED SECTION
   ============================================================ */
.section {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  background: var(--bg-card);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: block;
}

.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 16px;
}

/* ============================================================
   STANDARDIZED CHIP/TOGGLE
   ============================================================ */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.chip {
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card);
}

.chip:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.chip.selected {
  background: var(--primary-light);
  border-color: var(--primary);
}

.chip-indicator {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s;
}

.chip.selected .chip-indicator {
  border-color: var(--primary);
  background: var(--primary);
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Card Actions */
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 16px;
}

.card-actions button {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--text);
}

.card-actions button:hover {
  text-decoration: underline;
}

.card-actions .delete-btn {
  color: var(--danger);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--text-light);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* ============================================================
   STANDARDIZED PAGE LAYOUT COMPONENTS
   (Single source for all pages)
   ============================================================ */

/* Page Header */
.page-header {
  margin-bottom: 30px;
}
.page-header h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.page-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Page Toolbar */
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 320px;
  color: var(--text-muted);
}
.search-box i {
  color: var(--text-light);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  flex: 1;
}
.search-box input::placeholder {
  color: var(--text-light);
}

/* Data Table */
.data-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.data-table-header {
  display: grid;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.data-table-row {
  display: grid;
  gap: 16px;
  padding: 16px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.data-table-row:last-child {
  border-bottom: none;
}
.data-table-row:hover {
  background: var(--bg-hover);
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: 8px;
}
.table-btn {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
}
.table-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* Badge Variants */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Standard Badge Colors */
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--blue-100); color: var(--primary); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* Page Shell */
.page-shell {
  padding: 36px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================
   MODAL SYSTEM - UNIFIED CENTERING
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}
.modal-overlay.open {
  display: flex;
}
.modal-container,
.modal-overlay > .modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  line-height: 1;
}
.modal-close-btn:hover { color: var(--text); }
.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: var(--bg);
  flex-shrink: 0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: var(--font); font-size: 14px; outline: none; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-muted { color: var(--muted); }
.ml-auto { margin-left: auto; }
.mb-0 { margin-bottom: 0; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.gap-12 { gap: 12px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.w-180 { width: 180px; }
.max-w-600px { max-width: 600px; }
.empty-state-lg { padding: 60px 20px; }
.empty-state-lg .empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state-lg .empty-title { font-size: 16px; font-weight: 600; }
.p-22 { padding: 22px; }
.text-sm { font-size: 13px; }
.lh-16 { line-height: 1.6; }
.max-w-32rem { max-width: 32rem; }
.w-full { width: 100%; }
.resize-none { resize: none; }
.hidden { display: none !important; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; }
.dpia-toggle-group { display: flex; flex-direction: column; gap: 12px; }
.dpia-toggle-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
.dpia-toggle-item span { font-size: 12px; font-weight: 700; color: var(--text); }
.dpia-trigger-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.dpia-trigger-tags span {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}
.stat-value-lg { font-size: 18px; }
.stat-value-md { font-size: 16px; }
.stat-value-sm { font-size: 14px; }

/* ============================================================
   SCREENS
   ============================================================ */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; min-height: 100vh; }
.screen.app-layout.active { display: flex; flex-direction: row; min-height: 100vh; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp    { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes popIn     { from { transform:scale(0.5); opacity:0; } to { transform:scale(1); opacity:1; } }
@keyframes spin      { to { transform:rotate(360deg); } }
@keyframes slideInL  { from { opacity:0; transform:translateX(-16px); } to { opacity:1; transform:translateX(0); } }

.anim-fadein  { animation: fadeIn  0.4s ease both; }
.anim-fadeup  { animation: fadeUp  0.45s ease both; }
.anim-slidein { animation: slideInL 0.35s ease both; }

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

/* Logo */
.logo { display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; color:var(--text); letter-spacing:-0.3px; }
.logo-icon {
  width:38px; height:38px; background:var(--blue); border-radius:6px;
  display:flex; align-items:center; justify-content:center;
  color:white; font-weight:800; font-size:16px; letter-spacing:-0.5px;
  flex-shrink:0;
}
.logo-icon.logo-mark {
  display:block;
  background:#000;
  padding:0;
  overflow:hidden;
}
.sidebar-logo-mark {
  width:2rem;
  height:2rem;
  border-radius:0.5rem;
  flex-shrink:0;
  display:block;
  overflow:hidden;
}
.logo-name { font-size:19px; font-weight:700; }

/* ──────────────────────────────────────────────────────
   UNIFIED BUTTON SYSTEM
   ────────────────────────────────────────────────────── */

/* Primary — solid blue */
.btn,
.btn-primary,
.btn-save,
.btn-submit,
.btn-print {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--primary); color:white;
  border:none; border-radius:var(--radius-lg);
  font-family:var(--font); font-weight:600; font-size:14px;
  cursor:pointer; transition:all .2s;
  padding:12px 20px; line-height:1;
  white-space:nowrap;
}
.btn:hover, .btn-primary:hover, .btn-save:hover, .btn-submit:hover, .btn-print:hover { 
  background:var(--primary-dark); 
}
.btn-full { width:100%; }
.btn-lg   { padding:14px 24px; font-size:15px; }
.btn-sm   { padding:8px 14px; font-size:13px; }

/* Secondary — outlined, neutral */
.btn-outline,
.btn-cancel,
.btn-sso,
.btn-ghost {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--bg-card); color:var(--text);
  border:1px solid var(--border); border-radius:var(--radius-lg);
  font-family:var(--font); font-weight:600; font-size:14px;
  cursor:pointer; transition:all .2s;
  padding:12px 20px; line-height:1;
  white-space:nowrap;
}
.btn-outline:hover, .btn-cancel:hover, .btn-sso:hover, .btn-ghost:hover { 
  border-color:var(--text-light); background:var(--bg-hover); 
}
  cursor:pointer; transition:border-color .15s, background .15s;
  padding:9px 18px; line-height:1;
  white-space:nowrap;
}
.btn-outline:hover, .btn-cancel:hover, .btn-sso:hover, .btn-ghost:hover { border-color:var(--muted); background:var(--bg); }

/* Inline table action buttons */
.btn-edit {
  display:inline-flex; align-items:center; gap:4px;
  background:none; border:1px solid var(--border);
  color:var(--muted); font-size:12px; font-weight:500;
  cursor:pointer; padding:4px 10px; border-radius:var(--radius-sm);
  font-family:var(--font); transition:all .15s;
}
.btn-edit:hover { border-color:var(--blue); color:var(--blue); background:var(--blue-100); }

.btn-delete {
  display:inline-flex; align-items:center; justify-content:center;
  background:none; border:1px solid var(--border);
  color:var(--placeholder); font-size:12px;
  cursor:pointer; padding:4px 8px; border-radius:var(--radius-sm);
  transition:all .15s;
}
.btn-delete:hover { border-color:var(--red); color:var(--red); background:var(--red-light); }

/* Submit loading state */
.btn-submit { width:100%; font-size:15px; padding:12px; position:relative; overflow:hidden; }
.btn-submit.loading { pointer-events:none; opacity:0.8; }
.btn-submit .btn-text { transition:opacity .2s; }
.btn-submit .btn-spinner { position:absolute; inset:0; display:none; align-items:center; justify-content:center; }
.btn-submit.loading .btn-text { opacity:0; }
.btn-submit.loading .btn-spinner { display:flex; }

/* Form */
.form-group { margin-bottom:18px; }
.form-group label { display:block; font-size:13px; font-weight:600; color:var(--text); margin-bottom:7px; }

.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  margin-top: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.info-card {
  background: var(--bg);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.info-value {
  font-weight: 600;
  color: var(--text);
}

.input-wrap { position:relative; }
.input-wrap .icon { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--placeholder); pointer-events:none; display:flex; }
.form-input {
  width:100%; background:var(--input-bg); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:10px 14px;
  font-family:var(--font); font-size:14px; color:var(--text);
  transition:border-color .18s, background .18s; appearance:none;
}
.form-input.no-icon { padding-left:14px; }
.form-input::placeholder { color:var(--placeholder); }
.form-input:focus { border-color:var(--blue); background:#fff; }
.form-input.error-field { border-color:var(--red); }
.error-msg { font-size:12px; color:var(--red); margin-top:5px; display:none; align-items:center; gap:5px; }
.error-msg.visible { display:flex; }

/* File Upload */
.file-upload { position:relative; }
.file-upload input[type="file"] {
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
    z-index:2;
}
.file-upload-label {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:32px 20px;
    border:2px dashed var(--border);
    border-radius:12px;
    background:var(--bg);
    color:var(--placeholder);
    transition:all .2s;
}
.file-upload:hover .file-upload-label {
    border-color:var(--blue);
    background:rgba(59,111,240,0.04);
}
.file-upload input[type="file"]:focus + .file-upload-label {
    border-color:var(--blue);
}

/* Password toggle */
.pw-toggle { position:absolute; right:13px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; color:var(--placeholder); display:flex; padding:2px; transition:color .15s; }
.pw-toggle:hover { color:var(--muted); }

/* Spinner */
.spin-ring { width:20px; height:20px; border-radius:50%; border:2.5px solid rgba(255,255,255,0.35); border-top-color:white; animation:spin .7s linear infinite; }

/* Toggle switch */
.toggle-wrap { position:relative; width:44px; height:24px; flex-shrink:0; }
.toggle-wrap input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--placeholder); border-radius:999px; cursor:pointer; transition:background .2s; }
.toggle-slider:before { content:''; position:absolute; width:18px; height:18px; background:white; border-radius:50%; left:3px; top:3px; transition:transform .2s; box-shadow:0 1px 3px rgba(0,0,0,0.2); }
.toggle-wrap input:checked + .toggle-slider { background:var(--blue); }
.toggle-wrap input:checked + .toggle-slider:before { transform:translateX(20px); }

/* Badges */
.badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:var(--radius-sm); font-size:12px; font-weight:600; }
.badge-green { background:var(--green-light); color:var(--green); }
.badge-red   { background:var(--red-light);   color:var(--red); }
.badge-amber { background:var(--amber-light);  color:var(--amber); }
.badge-blue  { background:var(--blue-100);     color:var(--blue); }

/* Alert Badge in Navigation */
.alert-badge {
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
}

/* Card */
.card { background:var(--card); border-radius:var(--radius-lg); border:1px solid var(--border); }

/* Divider */
.divider { 
  display:flex; 
  align-items:center; 
  gap:12px; 
  margin:20px 0; 
  color:var(--text-muted); 
  font-size:12px;
  font-weight: 500;
}
.divider::before, .divider::after { 
  content:''; 
  flex:1; 
  height:1px; 
  background:var(--border); 
}

/* Demo note */
.demo-note { 
  margin-top:16px; 
  text-align:center; 
  font-size:12px; 
  color:var(--text-muted); 
}

/* Auth Screens */
.auth-bg {
  min-height:100vh; 
  display:flex; 
  align-items:center; 
  justify-content:center;
  padding:24px; 
  flex-direction:column;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,123,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,123,255,0.05) 0%, transparent 60%);
}

.auth-logo { margin-bottom:28px; animation:fadeUp .4s ease both; }

.auth-card {
  background:var(--bg-card); 
  border-radius:var(--radius-xl); 
  padding:40px 38px 36px;
  width:100%; 
  max-width:440px;
  border:1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  animation:fadeUp .45s .05s ease both;
}

.auth-title { 
  font-size:24px; 
  font-weight:700; 
  text-align:center; 
  margin-bottom:6px; 
  color: var(--text);
  letter-spacing: -0.4px;
}

.auth-sub { 
  font-size:14px; 
  color:var(--text-muted); 
  text-align:center; 
  margin-bottom:28px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-footer { 
  text-align:center; 
  margin-top:20px; 
  font-size:14px; 
  color:var(--text-muted);
}

.auth-footer a { 
  color:var(--primary); 
  font-weight:600;
}

.auth-footer a:hover { 
  text-decoration:underline; 
}

/* Demo Section */
.demo-section {
  margin-top:24px;
  padding-top:24px;
  border-top:1px solid var(--border-light);
}

.demo-divider {
  display:flex;
  align-items:center;
  margin-bottom:16px;
}

.demo-divider::before,
.demo-divider::after {
  content:'';
  flex:1;
  height:1px;
  background:var(--border-light);
}

.demo-divider span {
  padding:0 16px;
  font-size:11px;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:0.05em;
}

.btn-demo {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 20px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  font-size:14px;
  font-weight:600;
  color:var(--text);
  cursor:pointer;
  transition:all .2s;
}

.btn-demo:hover {
  background:var(--primary-light);
  border-color:var(--primary);
  color:var(--primary);
}

.demo-credentials {
  margin-top:16px;
  padding:16px;
  background:var(--bg);
  border-radius:var(--radius-lg);
  border:1px solid var(--border-light);
}

.demo-label {
  display:block;
  font-size:10px;
  font-weight:700;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:0.1em;
  margin-bottom:12px;
}

.demo-cred-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  color:var(--text-muted);
  margin-bottom:6px;
}

.demo-cred-row:last-child { margin-bottom:0; }

.demo-cred-row code {
  font-family:var(--mono);
  font-size:11px;
  background:var(--bg-card);
  padding:2px 8px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  color:var(--text);
}

/* Form Groups in Auth */
.auth-card .form-group {
  margin-bottom:20px;
}

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

/* ============================================================
   LANDING PAGE
   ============================================================ */
#screen-landing {
  background: #fff;
  color: #050505;
}
.landing-nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:94px;
  padding:0 64px;
  background:#fff;
  border-bottom:1px solid #e9e9e9;
  position:sticky;
  top:0;
  z-index:20;
}
.landing-logo-mark {
  width:24px;
  height:24px;
  color:#050505;
  display:block;
  flex-shrink:0;
}
.landing-nav .logo {
  gap:16px;
}
.landing-nav .logo-name {
  color:#050505;
  font-size:22px;
  font-weight:800;
  letter-spacing:0;
}
.nav-links { display:flex; align-items:center; gap:20px; }
.landing-link-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  color:#111;
  font:600 14px/1 var(--font);
  padding:12px 0;
  cursor:pointer;
  text-decoration:none;
}
.landing-link-btn:hover { color:#555; }
.landing-primary-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 24px;
  border:0;
  border-radius:5px;
  background:#050505;
  color:#fff;
  font:700 16px/1 var(--font);
  cursor:pointer;
  text-decoration:none;
  transition:background .18s ease, transform .18s ease;
}
.landing-primary-btn:hover {
  background:#242424;
  transform:translateY(-1px);
}
.landing-main {
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.landing-hero {
  width:100%;
  min-height:714px;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:104px 24px 82px;
}
.hero-bolt {
  width:48px;
  height:48px;
  color:#050505;
  margin-bottom:48px;
}
.hero-bolt-img {
  width:320px;
  max-width:90%;
  margin-bottom:40px;
  display:block;
}
.hero-h1 {
  font-size:64px;
  font-weight:900;
  line-height:1.08;
  color:#050505;
  max-width:760px;
  margin:0 0 28px;
  letter-spacing:0;
  animation:fadeUp .5s .07s ease both;
}
.hero-kicker {
  color:#2f2f2f;
  font-size:24px;
  font-weight:800;
  line-height:1.35;
  margin:0 0 30px;
}
.hero-p {
  font-size:20px;
  color:#5d5d5d;
  max-width:660px;
  line-height:1.55;
  margin:0 0 50px;
  animation:fadeUp .5s .14s ease both;
}
.landing-signup {
  display:grid;
  grid-template-columns:250px 250px 118px;
  gap:10px;
  justify-content:center;
  width:100%;
  animation:fadeUp .5s .2s ease both;
}
.landing-signup input {
  width:100%;
  height:52px;
  border:1px solid #dfdfdf;
  border-radius:4px;
  background:#fff;
  color:#111;
  font:500 16px/1 var(--font);
  padding:0 20px;
  outline:none;
}
.landing-signup input::placeholder {
  color:#777;
}
.landing-signup input:focus {
  border-color:#111;
  box-shadow:0 0 0 3px rgba(0,0,0,.08);
}
.landing-signup-btn {
  min-height:52px;
  border-radius:4px;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.landing-orbital {
  width:100%;
  max-width:900px;
  padding:3rem 2rem 0;
  margin:0 auto;
}
@keyframes flowLine {
  0%   { stroke-dashoffset:20; opacity:0.25; }
  50%  { opacity:0.75; }
  100% { stroke-dashoffset:0;  opacity:0.25; }
}
@keyframes flowTrunk {
  0%   { stroke-dashoffset:20; opacity:0.4; }
  50%  { opacity:1; }
  100% { stroke-dashoffset:0;  opacity:0.4; }
}
.nl  { stroke-dasharray:3 5; animation: flowLine  2.8s ease-in-out infinite; }
.trunk { stroke-dasharray:3 5; animation: flowTrunk 2.8s ease-in-out infinite; }
.nl1{animation-delay:0s;}   .nl2{animation-delay:0.18s;}
.nl3{animation-delay:0.36s;}.nl4{animation-delay:0.54s;}
.nl5{animation-delay:0.72s;}.nl6{animation-delay:0.90s;}
.nl7{animation-delay:1.08s;}.nl8{animation-delay:1.26s;}
.nl9{animation-delay:1.44s;}.nl10{animation-delay:1.62s;}
.nl11{animation-delay:1.80s;}.nl12{animation-delay:1.98s;}
.landing-features {
  width:100%;
  background:#fff;
  border-top:1px solid #f2f2f2;
  padding:86px 24px 82px;
}
.feature-eyebrow {
  color:#707070;
  font-size:14px;
  font-weight:800;
  letter-spacing:.16em;
  line-height:1.4;
  margin:0 0 48px;
  text-transform:uppercase;
}
.feature-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:28px;
  max-width:1100px;
  width:100%;
  margin:0 auto;
  animation:fadeUp .5s .28s ease both;
}
.feature-card {
  background:white;
  border-radius:10px;
  padding:24px;
  text-align:left;
  border:0.5px solid #e3e3e3;
}
.feature-icon-box {
  width:36px;
  height:36px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
  flex-shrink:0;
}
.feature-icon-box i {
  font-size:20px;
  line-height:1;
}
.feature-card h3 {
  font-size:14px;
  font-weight:700;
  line-height:1.3;
  margin:0 0 8px;
  letter-spacing:0;
  color:#111827;
}
.feature-card p {
  font-size:13px;
  color:#6b7280;
  line-height:1.5;
  margin:0;
}
.landing-footer {
  min-height:98px;
  width:100%;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:24px;
  padding:0 64px;
  background:#fff;
  border-top:1px solid #e6e6e6;
  color:#6a6a6a;
  font-size:15px;
}
.footer-brand {
  display:flex;
  align-items:center;
  gap:14px;
  justify-self:start;
  color:#050505;
  font-weight:800;
}
.landing-footer p {
  margin:0;
}
.footer-links {
  justify-self:end;
  display:flex;
  gap:26px;
  align-items:center;
}
.footer-links a {
  color:#666;
  text-decoration:none;
  font-weight:500;
  font-size:14px;
}
.footer-links a:hover {
  color:#111;
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */
.auth-bg {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; flex-direction:column;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59,111,240,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(130,160,255,0.06) 0%, transparent 60%);
}
.auth-logo { margin-bottom:28px; animation:fadeUp .4s ease both; }

.auth-login-nav {
  width: min(100%, 440px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  animation: fadeUp .4s ease both;
}

.auth-login-nav .auth-logo {
  margin-bottom: 0;
  animation: none;
}

.auth-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.auth-home-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.auth-home-btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .auth-login-nav {
    gap: 12px;
  }

  .auth-home-btn {
    min-width: 40px;
    padding: 0 12px;
  }

  .auth-home-btn span {
    display: none;
  }
}

.auth-card {
  background:var(--card); border-radius:var(--radius-xl); padding:40px 38px 36px;
  width:100%; max-width:440px;
  border:1px solid var(--border);
  animation:fadeUp .45s .05s ease both;
}
.auth-title { font-size:24px; font-weight:700; text-align:center; margin-bottom:6px; letter-spacing:-0.4px; }
.auth-sub   { font-size:14px; color:var(--muted); text-align:center; margin-bottom:30px; }

.register-link {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}

.register-link a {
  color: var(--blue);
  font-weight: 500;
}

/* Summary Screen */
.summary-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--bg);
}

.summary-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.summary-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.summary-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.summary-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.summary-sections {
  text-align: left;
  margin-bottom: 32px;
}

.summary-section {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.summary-section h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item span:first-child {
  color: var(--muted);
}

.summary-item span:last-child {
  font-weight: 500;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-tag {
  background: var(--blue-100);
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
}

.summary-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.summary-actions .btn {
  flex: 1;
}
.auth-footer { text-align:center; margin-top:20px; font-size:13.5px; color:var(--muted); animation:fadeUp .4s .15s ease both; }
.auth-footer a { color:var(--blue); font-weight:600; cursor:pointer; }
.auth-footer a:hover { opacity:0.75; }
.success-screen { display:none; flex-direction:column; align-items:center; text-align:center; padding:10px 0 4px; }
.success-screen.show { display:flex; }
.success-icon { width:60px; height:60px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-bottom:18px; animation:popIn .4s cubic-bezier(.34,1.56,.64,1) both; }
.success-icon.green { background:#ECFDF5; }
.success-icon.blue  { background:var(--blue-100); }
.success-screen h3  { font-size:20px; font-weight:700; margin-bottom:6px; }
.success-screen p   { font-size:14px; color:var(--muted); line-height:1.6; }
.terms-note { font-size:12px; color:var(--placeholder); text-align:center; margin-top:14px; line-height:1.6; }
.terms-note a { color:var(--muted); text-decoration:underline; text-underline-offset:2px; }

/* ============================================================
   ONBOARDING
   ============================================================ */
#screen-onboarding {
  background:#fff;
  background-image: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59,111,240,0.05) 0%, transparent 70%);
}
.onboard-nav { display:flex; align-items:center; justify-content:space-between; padding:16px 40px; border-bottom:1px solid var(--border-light); background:white; }
.step-indicator { display:flex; align-items:center; gap:8px; }
.step-dot { width:8px; height:8px; border-radius:50%; background:var(--border); transition:all .25s; }
.step-dot.active { background:var(--blue); width:24px; border-radius:4px; }
.step-dot.done   { background:var(--green); }
.onboard-body { flex:1; display:flex; align-items:center; justify-content:center; padding:48px 24px; }
.onboard-content { max-width:700px; width:100%; animation:fadeUp .4s ease both; }
.onboard-content h2 { font-size:28px; font-weight:800; margin-bottom:8px; letter-spacing:-0.6px; }
.onboard-content > p { color:var(--muted); margin-bottom:36px; font-size:15px; }
.option-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:36px; }
.option-card { background:white; border:2px solid var(--border); border-radius:var(--radius-md); padding:18px 20px; cursor:pointer; transition:all .15s; display:flex; align-items:center; gap:14px; }
.option-card:hover { border-color:var(--blue-200); background:var(--blue-100); }
.option-card.selected, .option-card.multi-selected { border-color:var(--blue); background:var(--blue-100); }
.option-icon { width:40px; height:40px; background:var(--bg); border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; transition:background .15s; }
.option-card.selected .option-icon, .option-card.multi-selected .option-icon { background:rgba(59,111,240,0.15); }
.option-text h4 { font-size:14px; font-weight:600; margin-bottom:2px; }
.option-text p  { font-size:12.5px; color:var(--muted); margin:0; }
.option-card-stacked { flex-direction:column; align-items:flex-start; }
.option-card-stacked ul { list-style:none; font-size:13.5px; color:var(--muted); line-height:2.1; padding:0; margin:0; }
.onboard-hint { background:#FFFBEB; border:1px solid #FDE68A; border-radius:var(--radius-sm); padding:12px 16px; font-size:13px; color:#78350F; margin-bottom:32px; line-height:1.6; }
.onboard-actions { display:flex; justify-content:space-between; align-items:center; }

/* ============================================================
   APP LAYOUT — SIDEBAR
   ============================================================ */
.sidebar {
  width:var(--sidebar-w); background:white; border-right:1px solid var(--border-light);
  display:flex; flex-direction:column; position:fixed; top:0; left:0; height:100vh; z-index:10;

}
.sidebar-top { padding:18px 16px 14px; border-bottom:1px solid var(--border-light); }
.sidebar-tagline { font-size:11px; color:var(--placeholder); font-weight:500; margin-top:3px; margin-left:48px; }
.company-select {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 12px;
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
}
.company-select:hover { background: var(--blue-200); }
.sidebar-nav { flex:1; padding:16px 0; overflow-y:auto; }
.nav-section-label { font-size:11px; font-weight:700; color:#9e9e9e; text-transform:uppercase; letter-spacing:0.5px; padding:0 20px; margin-top:20px; margin-bottom:10px; }
.nav-section-label:first-child { margin-top:0; }
.nav-item { 
  display:flex; align-items:center; gap:15px; padding:12px 20px; 
  color:#546e7a; font-size:14px; cursor:pointer; transition:background-color 0.2s ease;
}
.nav-item:hover { background-color:#f0f4f8; color:#37474f; }
.nav-item.active { 
  background-color:#e3f2fd; color:#1976d2; font-weight:500;
}
.nav-item svg, .nav-item i { width:20px; text-align:center; color:#546e7a; flex-shrink:0; transition:color 0.2s; }
.nav-item:hover svg, .nav-item:hover i { color:#37474f; }
.nav-item.active svg, .nav-item.active i { color:#1976d2; }
.sidebar-footer { padding:14px 20px; border-top:1px solid #e0e0e0; }
.user-avatar { width:32px; height:32px; background:var(--blue-100); border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:var(--blue); flex-shrink:0; }
.user-row { display:flex; align-items:center; gap:10px; }
.user-name { font-size:13px; font-weight:600; color:var(--text); }
.user-org  { font-size:12px; color:var(--muted); }
.logout-btn { display:flex; align-items:center; gap:6px; margin-top:10px; color:#e53935; font-size:13px; cursor:pointer; background:none; border:none; font-family:var(--font); padding:0; transition:color .15s; }
.logout-btn:hover { color:#c62828; }

/* Login page refresh */
#screen-login .auth-bg {
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 48px 24px;
  background: #f5f7fb;
  background-image: none;
}

#screen-login .auth-login-nav {
  width: min(100%, 440px);
  justify-content: flex-start;
  margin-bottom: 30px;
}

#screen-login .auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  margin: 0;
}

#screen-login .auth-login-bolt {
  width: 22px;
  height: 22px;
  color: #050505;
  flex: 0 0 22px;
  display: block;
}

#screen-login .logo-name {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0;
}

#screen-login .auth-card {
  width: min(100%, 440px);
  max-width: 440px;
  padding: 43px 38px 36px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

#screen-login .auth-header {
  text-align: center;
  margin-bottom: 30px;
}

#screen-login .auth-title {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

#screen-login .auth-sub {
  margin: 0;
  color: #61708a;
  font-size: 14px;
  line-height: 1.5;
}

#screen-login .auth-card .form-group {
  margin-bottom: 20px;
}

#screen-login .auth-card .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

#screen-login .input-wrap {
  position: relative;
}

#screen-login .input-icon {
  display: none;
}

#screen-login .form-input {
  width: 100%;
  height: 40px;
  padding: 0 44px 0 14px !important;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 400;
  transition: border-color .18s, box-shadow .18s;
}

#screen-login #login-email {
  padding-right: 14px !important;
}

#screen-login .form-input:focus {
  border-color: #0f7cff;
  box-shadow: 0 0 0 3px rgba(15, 124, 255, 0.12);
}

#screen-login .pw-toggle {
  right: 13px;
  color: #94a3b8;
}

#screen-login .pw-toggle:hover {
  color: #1f2937;
}

#screen-login .btn-primary {
  background: #0f7cff;
  color: #ffffff;
  border: none;
}

#screen-login .btn-primary:hover {
  background: #086ee5;
}

#screen-login .btn-full {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 7px;
}

#screen-login .btn-outline {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #dbe3ee;
}

#screen-login .btn-outline:hover {
  background: #f8fafc;
  border-color: #bac6d6;
}

#screen-login .divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: #61708a;
  font-size: 12px;
  line-height: 1;
}

#screen-login .divider::before,
#screen-login .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dbe3ee;
}

#screen-login .divider span {
  white-space: nowrap;
}

#screen-login .auth-footer {
  margin-top: 22px;
  color: #61708a;
  font-size: 14px;
}

#screen-login .auth-footer a {
  color: #006fff;
  font-weight: 600;
}

@media (max-width: 520px) {
  #screen-login .auth-bg {
    padding: 32px 18px;
  }

  #screen-login .auth-card {
    padding: 34px 24px 30px;
  }
}
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  align-items: center;
  justify-content: center;
  z-index: 1100;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 900;
}
.sidebar-backdrop.open { display: block; }

/* ============================================================
   APP LAYOUT — MAIN AREA & PAGES
   ============================================================ */
.main-area { margin-left:var(--sidebar-w); flex:1; min-height:100vh; background:var(--bg); }
.page-shell { display:none; padding:36px 40px; max-width:1400px; margin: 0 auto; }
.page-shell.active { display:block; }
.page-header {
  margin-bottom: 28px;
  text-align: left;
}
.page-title { font-size:24px; font-weight:800; margin-bottom:4px; letter-spacing:-0.5px; }
.page-sub   { color:var(--muted); font-size:14px; }

/* Dashboard */
.dash-greeting { font-size:27px; font-weight:800; margin-bottom:4px; letter-spacing:-0.5px; }
.dash-date     { color:var(--muted); margin-bottom:30px; font-size:14px; }
.dash-top-grid { display:grid; grid-template-columns:1fr 300px; gap:20px; margin-bottom:20px; }
.score-card { padding:26px; }
.score-label  { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:12px; }
.score-number { font-size:48px; font-weight:800; line-height:1; margin-bottom:20px; letter-spacing:-2px; color:var(--text); }
.score-bar-bg { height:7px; background:var(--border-light); border-radius:999px; margin-bottom:16px; overflow:hidden; }
.score-bar    { height:7px; background:linear-gradient(90deg, var(--blue), #6fa0ff); border-radius:999px; transition:width .8s cubic-bezier(.4,0,.2,1); }
.score-footer { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); }
.quick-card { padding:24px; }
.quick-card h3 { font-size:13px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:16px; }
.qa-item { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--border-light); cursor:pointer; font-size:13.5px; font-weight:500; color:var(--text); transition:color .1s; }
.qa-item:last-child { border-bottom:none; }
.qa-item:hover { color:var(--blue); }
.qa-arrow { color:var(--muted); font-size:16px; }
.stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:20px; }
.stat-card { padding:20px; display:flex; align-items:center; gap:16px; }
.stat-icon { width:40px; height:40px; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.stat-icon.green { background:var(--green-light); }
.stat-icon.amber { background:var(--amber-light); }
.stat-icon.red   { background:var(--red-light); }
.stat-number { font-size:30px; font-weight:800; line-height:1; letter-spacing:-1px; }
.stat-label  { font-size:12.5px; color:var(--muted); font-weight:500; margin-top:3px; }
.dpo-register-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  background: #eff6ff;
  padding: 16px 18px;
}
.dpo-register-banner strong,
.dpo-register-banner span { display: block; }
.dpo-register-banner strong { color: var(--text); font-size: 14px; }
.dpo-register-banner span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.dpo-register-banner a {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.dash-bottom-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.card-head h3 { font-size:15px; font-weight:700; }
.count-badge { background:var(--red-light); color:var(--red); font-size:12px; font-weight:700; border-radius:var(--radius-sm); padding:2px 9px; }
.alert-item { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border-radius:var(--radius-sm); margin-bottom:8px; font-size:13px; line-height:1.5; }
.alert-item.warn  { background:#FFFBEB; border:1px solid #FDE68A; color:#78350F; }
.alert-item.error { background:var(--red-light); border:1px solid #FCA5A5; color:#991B1B; }
.glance-row { display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--border-light); font-size:13.5px; }
.glance-row:last-child { border-bottom:none; }
.glance-row span:first-child { color:var(--muted); }
.glance-val { display:flex; align-items:center; gap:5px; font-weight:600; color:var(--blue); cursor:pointer; transition:opacity .15s; }
.glance-val:hover { opacity:0.75; }

#page-dashboard.dashboard-shell {
  max-width: 1180px;
  padding: 38px 40px 56px;
}

#page-dashboard .dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

#page-dashboard .dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

#page-dashboard .dashboard-hero h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

#page-dashboard .dashboard-company-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 260px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-dashboard .dashboard-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
}

#page-dashboard .dashboard-warning[hidden] {
  display: none;
}

#page-dashboard .dashboard-warning > i {
  flex: 0 0 auto;
  color: var(--amber);
}

#page-dashboard .dashboard-warning div {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 13px;
}

#page-dashboard .dashboard-warning button,
#page-dashboard .dashboard-billing-footer button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

#page-dashboard .dashboard-warning button {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

#page-dashboard .dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

#page-dashboard .dashboard-metric-card,
#page-dashboard .dashboard-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

#page-dashboard .dashboard-metric-card {
  min-height: 134px;
  padding: 18px;
}

#page-dashboard .metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#page-dashboard .metric-top i {
  color: var(--blue);
}

#page-dashboard .metric-value {
  margin-top: 14px;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

#page-dashboard .metric-value.is-good { color: var(--green); }
#page-dashboard .metric-value.is-warn { color: var(--amber); }
#page-dashboard .metric-value.is-danger { color: var(--red); }

#page-dashboard .metric-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

#page-dashboard .dash-progress {
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
}

#page-dashboard .dash-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .5s ease;
}

#page-dashboard .dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

#page-dashboard .dashboard-panel {
  padding: 20px;
}

#page-dashboard .dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

#page-dashboard .dashboard-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

#page-dashboard .dashboard-panel-head p,
#page-dashboard .dashboard-panel-head span,
#page-dashboard .dashboard-panel-head a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

#page-dashboard .dashboard-panel-head a {
  color: var(--blue);
}

#page-dashboard .dashboard-alert-list,
#page-dashboard .dashboard-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#page-dashboard .dashboard-alert-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
}

#page-dashboard .dashboard-alert-list li:last-child {
  margin-bottom: 0;
}

#page-dashboard .dashboard-alert-list i {
  color: var(--amber);
  margin-right: 8px;
}

#page-dashboard .dashboard-alert-list a {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

#page-dashboard .dashboard-pending-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#page-dashboard .dashboard-pending-item button,
#page-dashboard .dashboard-pending-empty {
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
}

#page-dashboard .dashboard-pending-item button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  text-align: left;
}

#page-dashboard .dashboard-pending-item button:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

#page-dashboard .dashboard-pending-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#page-dashboard .dashboard-pending-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-dashboard .dashboard-pending-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-dashboard .dashboard-pending-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 210px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

#page-dashboard .dashboard-pending-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue);
}

#page-dashboard .dashboard-pending-badge.is-critical {
  background: var(--red-light);
  color: var(--red);
}

#page-dashboard .dashboard-owner-pill,
.dashboard-owner-pill {
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:0 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-weight:800;
}

#page-dashboard .dashboard-pending-empty {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

#page-dashboard .dashboard-pending-empty.is-muted {
  color: var(--muted);
}

#page-dashboard .dashboard-activity-list {
  display: grid;
  gap: 10px;
}

#page-dashboard .activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #f8fafc;
}

#page-dashboard .activity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
}

#page-dashboard .activity-icon.success {
  background: #dcfce7;
  color: #15803d;
}

#page-dashboard .activity-icon.danger {
  background: #fee2e2;
  color: #b91c1c;
}

#page-dashboard .activity-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

#page-dashboard .activity-title,
#page-dashboard .activity-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#page-dashboard .activity-title {
  justify-content: space-between;
}

#page-dashboard .activity-user {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-dashboard .activity-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

#page-dashboard .activity-status.success {
  background: #dcfce7;
  color: #166534;
}

#page-dashboard .activity-status.danger {
  background: #fee2e2;
  color: #991b1b;
}

#page-dashboard .activity-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

#page-dashboard .activity-meta span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 999px;
  background: #cbd5e1;
  vertical-align: middle;
}

#page-dashboard .activity-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px dashed #d8e2ef;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

#page-dashboard .dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#page-dashboard .dashboard-action-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

#page-dashboard .dashboard-action-grid button:hover,
#page-dashboard .dashboard-billing-footer button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

#page-dashboard .dashboard-action-grid i {
  color: var(--blue);
}

#page-dashboard .dashboard-glance-list {
  display: grid;
  gap: 4px;
}

#page-dashboard .dashboard-glance-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

#page-dashboard .dashboard-glance-list div:last-child {
  border-bottom: 0;
}

#page-dashboard .dashboard-glance-list span {
  color: var(--muted);
}

#page-dashboard .dashboard-glance-list strong {
  color: var(--text);
  font-weight: 800;
}

#page-dashboard .dashboard-billing-panel {
  margin-top: 16px;
}

#page-dashboard .dashboard-billing-head {
  align-items: center;
}

#page-dashboard .dashboard-billing-head p {
  margin-top: 4px;
  font-weight: 500;
}

#page-dashboard .dashboard-billing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#page-dashboard .dashboard-billing-grid div {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fbfdff;
}

#page-dashboard .dashboard-billing-grid span,
#page-dashboard .dashboard-billing-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

#page-dashboard .dashboard-billing-grid strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

#page-dashboard .dashboard-billing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

#page-dashboard .dashboard-billing-footer > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#page-dashboard .dashboard-billing-footer button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#page-dashboard .dashboard-billing-footer button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

/* Checklist */
.prog-wrap { padding:18px 22px; margin-bottom:24px; }
.prog-top  { display:flex; justify-content:space-between; font-size:13px; font-weight:600; margin-bottom:10px; }
.prog-bg   { height:8px; background:var(--bg); border-radius:999px; overflow:hidden; }
.prog-fill { height:8px; background:linear-gradient(90deg, var(--blue), #6fa0ff); border-radius:999px; transition:width .5s cubic-bezier(.4,0,.2,1); }
.assigned-task-panel { margin-bottom:24px; padding:18px 22px; }
.assigned-task-head { display:flex; justify-content:space-between; gap:16px; margin-bottom:14px; }
.assigned-task-kicker { color:var(--blue); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.07em; margin-bottom:4px; }
.assigned-task-head h3 { color:var(--text); font-size:16px; font-weight:800; margin:0; }
.assigned-task-head p { color:var(--muted); font-size:12.5px; font-weight:700; margin-top:4px; }
.assigned-task-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.assigned-task-card {
  display:flex;
  justify-content:space-between;
  gap:12px;
  min-height:72px;
  padding:12px;
  border:1px solid var(--border-light);
  border-radius:8px;
  background:#f8fafc;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.assigned-task-card:hover { border-color:var(--blue); background:#eff6ff; }
.assigned-task-card strong,
.assigned-task-card small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.assigned-task-card strong { font-size:13px; font-weight:800; }
.assigned-task-card small { color:var(--muted); font-size:11.5px; font-weight:700; margin-top:3px; }
.assigned-task-meta { display:flex; align-items:flex-start; flex-wrap:wrap; justify-content:flex-end; gap:6px; max-width:220px; }
.assigned-task-empty { display:flex; align-items:center; gap:8px; min-height:58px; color:var(--muted); font-size:13px; font-weight:800; }
.generated-checklist-card { display:grid; grid-template-columns:minmax(220px,1fr) 2fr auto; align-items:center; gap:16px; margin-bottom:16px; }
.generated-checklist-title { font-size:14px; font-weight:800; color:var(--text); }
.generated-checklist-sub { margin-top:4px; color:var(--muted); font-size:12.5px; }
.generated-rule-summary { display:flex; flex-wrap:wrap; gap:8px; }
.rule-chip { display:inline-flex; align-items:center; min-height:28px; padding:5px 10px; border-radius:999px; background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; font-size:12px; font-weight:800; }
.rule-chip.muted { background:var(--bg); color:var(--muted); border-color:var(--border); }
.generated-evidence-count { justify-self:end; color:#92400e; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:8px 10px; font-size:12px; font-weight:800; white-space:nowrap; }
.checklist-section { margin-bottom:24px; background:white; border:1px solid var(--border-light); border-radius:var(--radius-lg); padding:20px; }
.checklist-monitor {
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:10px;
  padding:7px 10px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:700;
}
.checklist-monitor span {
  color:#64748b;
  font-weight:600;
}
.checklist-monitor.is-missing {
  border-color:#fed7aa;
  background:#fff7ed;
  color:#9a3412;
}
.section-head { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--border-light); }
.section-head h3 { font-size:15px; font-weight:700; color:var(--text); }
.section-count { font-size:12px; color:var(--placeholder); font-weight:600; background:var(--bg); padding:3px 9px; border-radius:var(--radius-sm); }
.section-count.complete { background:var(--green-light); color:var(--green); }
.check-item { background:var(--bg); border:1px solid transparent; border-radius:var(--radius-md); padding:16px 18px; display:flex; flex-direction:column; gap:14px; margin-bottom:10px; transition:all .15s; }
.check-item:hover { border-color:#bfdbfe; background:#f8fbff; }
.check-item.done { border-color:#bbf7d0; background:#f8fffb; }
.check-item.is-highlighted { border-color:var(--blue); box-shadow:0 0 0 3px rgba(37,99,235,.14); }
.check-main { display:flex; align-items:flex-start; gap:14px; }
.check-title-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.check-text h4 { font-size:13.5px; font-weight:600; margin-bottom:4px; }
.check-text p { font-size:12.5px; color:var(--muted); line-height:1.55; }
.check-evidence-hint { display:block; color:#475569; font-size:12px; font-weight:600; margin-top:6px; }
.check-rule-source { display:block; color:#334155; font-size:12px; margin-top:6px; }
.check-rule-badge { display:inline-flex; vertical-align:middle; align-items:center; min-height:20px; margin-left:6px; padding:2px 7px; border-radius:999px; font-size:10px; font-weight:800; text-decoration:none; }
.check-rule-badge.must { background:#7f1d1d; color:#fff7ed; border:1px solid #7f1d1d; }
.check-rule-badge.critical { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }
.check-rule-badge.evidence { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }
.check-rule-badge.applicable { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; }
.check-rule-badge.dpo-signoff { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.check-card-status,
.check-status-btn {
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.check-card-status { padding:5px 10px; background:#f1f5f9; color:#475569; }
.check-card-status.in-progress { background:#fff7ed; color:#c2410c; }
.check-card-status.done { background:#dcfce7; color:#15803d; }
.check-card-status.not-applicable { background:#ede9fe; color:#6d28d9; }
.check-status-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.check-status-btn {
  min-height:34px;
  padding:7px 12px;
  border:1px solid var(--border);
  background:white;
  color:#475569;
  cursor:pointer;
  transition:all .16s;
}
.check-status-btn:hover { border-color:#93c5fd; color:var(--blue); background:#eff6ff; }
.check-status-btn.active.not-started { background:#e2e8f0; border-color:#cbd5e1; color:#334155; }
.check-status-btn.active.in-progress { background:#ffedd5; border-color:#fdba74; color:#c2410c; }
.check-status-btn.active.done { background:#dcfce7; border-color:#86efac; color:#15803d; }
.check-status-btn.active.not-applicable { background:#ede9fe; border-color:#c4b5fd; color:#6d28d9; }
.check-meta-grid { display:grid; grid-template-columns:minmax(180px,280px) minmax(0,1fr); gap:12px; }
.check-meta-grid label { display:flex; flex-direction:column; gap:6px; min-width:0; }
.check-meta-grid label span { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.check-owner-input,
.check-notes-input {
  width:100%;
  min-height:38px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  color:var(--text);
  font-size:13px;
  padding:8px 10px;
  outline:none;
  transition:border-color .16s, box-shadow .16s;
}
.check-owner-input:focus,
.check-notes-input:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.check-notes-input { resize:vertical; line-height:1.4; }
.check-meta-wide { grid-column:auto; }
.check-card-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  border-top:1px solid var(--border-light);
  padding-top:12px;
}
.check-save-state {
  margin-right:auto;
  color:#64748b;
  font-size:12.5px;
  font-weight:700;
}

@media (max-width: 900px) {
  .generated-checklist-card { grid-template-columns:1fr; align-items:start; }
  .generated-evidence-count { justify-self:start; }
  .check-meta-grid { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  .check-title-row,
  .check-card-actions { flex-direction:column; align-items:stretch; }
  .check-meta-grid { grid-template-columns:1fr; }
  .check-meta-wide { grid-column:auto; }
}

/* ============================================================
   DATA TABLES — Clean Theme
   ============================================================ */

.data-table-wrap {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 14px 0 0;
  width: 100%;
  overflow-x: auto;
}

/* Flat table (like the reference) */
.styled-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 100%;
  font-size: 13.5px;
  background: white;
  table-layout: fixed;
}

.styled-table th,
.styled-table td {
  padding: 20px 25px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.styled-table thead th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 25px;
}

.styled-table td {
  color: var(--text);
  line-height: 1.5;
  vertical-align: middle;
  overflow: visible;
}

.styled-table tbody tr {
  border-bottom: 1px solid var(--border);
}

/* Zebra Striping */
.styled-table tbody tr:nth-of-type(even) {
  background-color: var(--bg);
}

.styled-table tbody tr:hover {
  background-color: var(--blue-100);
}

/* Table Header Variants */
.styled-table .th-narrow {
  width: 80px;
}

.styled-table .th-actions {
  width: 100px;
}

.styled-table .th-date {
  width: 160px;
}

.styled-table .th-activity {
  width: 220px;
}

.styled-table .th-destination,
.styled-table .th-recipient {
  width: 200px;
}

.styled-table .th-employee,
.styled-table .th-training {
  width: 180px;
}

.styled-table .th-case {
  width: 120px;
}

.styled-table .th-type {
  width: 160px;
}

.styled-table .th-assigned {
  width: 160px;
}

.styled-table .th-desc {
  width: 300px;
}

.styled-table .th-period {
  width: 150px;
}

.styled-table .th-company {
  width: 280px;
}

.styled-table .th-industry,
.styled-table .th-country {
  width: 180px;
}

.styled-table .th-dpo {
  width: 220px;
}

/* Table Cell Variants */
.styled-table .td-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
}

.styled-table .td-type {
  min-width: 140px;
  font-weight: 600;
}

.styled-table .td-purpose {
  white-space: normal;
  min-width: 200px;
}

.styled-table .td-desc {
  white-space: normal;
  min-width: 200px;
}

.styled-table .td-actions {
  justify-content: flex-end;
}

.styled-table .td-mono {
  font-family: monospace;
}

/* Retention Input Wrapper */
.retention-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.retention-input-wrap .months-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.styled-table .td-actions {
  justify-content: flex-end;
}

/* Row actions - always visible */
.styled-table .row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Action buttons */
.styled-table .btn {
  border: none;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.styled-table .btn-edit {
  background-color: var(--green);
  color: white;
  opacity: 1 !important;
  visibility: visible !important;
}

.styled-table .btn-edit:hover {
  background-color: #15803D;
}

.styled-table .btn-delete {
  background-color: var(--red);
  color: white;
  padding: 8px 16px;
  opacity: 1 !important;
  visibility: visible !important;
}

.styled-table .btn-delete:hover {
  background-color: #B91C1C;
}

.styled-table .btn-icon-action,
.row-actions .btn-icon-action {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.styled-table .btn-icon-action i,
.row-actions .btn-icon-action i {
  font-size: 13px;
  line-height: 1;
}

.styled-table .btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

/* Table avatar */
.styled-table .table-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.styled-table .table-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--blue-100);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.styled-table .table-avatar-name {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
}

/* Table tag */
.styled-table .table-tag {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* Status badges */
.styled-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.styled-table .status-active {
  background-color: var(--green-light);
  color: var(--green);
}

/* Empty state */
.styled-table .empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

table { width:100%; border-collapse:collapse; }

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

td {
  padding:12px 16px;
  font-size:13.5px;
  border-bottom:1px solid var(--border-light);
  color:var(--text);
  vertical-align:middle;
}
tr:last-child td { border-bottom:none; }
tbody tr { transition:background .1s; }
tbody tr:hover td { background:var(--bg); }

/* Cell helpers */
.td-muted { color:var(--muted); font-size:12.5px; }
.td-mono  { font-family:var(--mono, monospace); font-size:12.5px; color:var(--muted); }
.td-bold  { font-weight:600; }

/* Row actions — always visible in styled tables */
.styled-table .row-actions { 
  display:flex; align-items:center; gap:6px; 
}

/* Table avatar */
.table-avatar { display:flex; align-items:center; gap:10px; }
.table-avatar-icon {
  width:30px; height:30px; border-radius:var(--radius-sm);
  background:var(--blue-100); color:var(--blue);
  font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.table-avatar-name { font-weight:600; font-size:13.5px; }

/* Table tag pill */
.table-tag {
  display:inline-flex; align-items:center;
  background:var(--bg); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:2px 7px;
  font-size:11.5px; font-weight:500; color:var(--muted);
}

/* Status badges */
.status-badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 8px; border-radius:var(--radius-sm);
  font-size:11.5px; font-weight:600;
}
.status-active   { background:var(--green-light); color:var(--green); }
.status-pending  { background:var(--amber-light); color:var(--amber); }
.status-inactive { background:var(--border-light); color:var(--muted); }
.status-error    { background:var(--red-light); color:var(--red); }

/* Empty state */
.empty-state {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding:56px 24px; gap:8px;
  color:var(--muted); text-align:center;
}
.empty-state p { font-size:14px; font-weight:600; color:var(--text); margin:0; }
.empty-state small { font-size:12.5px; color:var(--placeholder); }

/* Page top bar */
.page-top-bar {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 24px; gap: 12px;
}

.access-top-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.access-company-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}

.access-company-switcher span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.access-company-switcher select {
  min-height: 40px;
  width: 100%;
  padding: 0 38px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.access-company-switcher select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.access-company-switcher select:disabled {
  color: var(--muted);
  background: var(--bg);
  cursor: not-allowed;
}

@media (max-width: 800px) {
  .page-top-bar {
    flex-direction: column;
  }

  .access-top-actions,
  .access-company-switcher,
  .access-top-actions .btn-primary {
    width: 100%;
  }

  .access-top-actions {
    align-items: stretch;
  }
}


/* Consent */
.consent-item { 
  background:white; 
  border:1px solid var(--border); 
  border-radius:var(--radius-md); 
  padding:22px; 
  margin-bottom:14px;
  transition: border-color 0.2s ease;
}
.consent-item:hover {
  border-color: var(--blue-200);
}
.consent-head  { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
.consent-title   { font-size:15px; font-weight:700; color:var(--text); }
.consent-purpose { font-size:12px; color:var(--muted); margin-top:2px; }
.consent-icon {
  width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:20px; flex-shrink:0; margin-right:14px;
}
.consent-header-row { display:flex; align-items:flex-start; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; background:var(--bg); border-radius:var(--radius-sm); padding:12px 16px; margin-bottom:10px; font-size:13.5px; font-weight:500; transition: all 0.15s ease; }
.toggle-row:hover { background:var(--blue-light); }
.toggle-row span { color:var(--text); }
.toggle-label { display:flex; align-items:center; gap:8px; }
.toggle-status { font-size:11px; padding:2px 8px; border-radius:999px; font-weight:600; }
.toggle-status.on { background:var(--green-light); color:var(--green); }
.toggle-status.off { background:var(--bg); color:var(--placeholder); }
.consent-note { width:100%; border:1.5px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; font-size:13px; resize:none; height:68px; color:var(--text); background:white; font-family:var(--font); transition:border-color .18s; margin-top:12px; }
.consent-note:focus { border-color:var(--blue); outline:none; }
.consent-footer { display:flex; justify-content:flex-end; padding-top:12px; border-top:1px solid var(--border-light); margin-top:12px; }

/* Access Control */
.access-page { max-width: 1300px; }

.data-register-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.org-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.org-selector label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.org-selector .form-input {
  min-width: 180px;
  padding: 10px 14px;
  font-size: 14px;
}

/* ============================================================
   COMPANIES PAGE — Enhanced
   ============================================================ */

/* Summary bar */
.co-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  background: white;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  width: 100%;
}

.co-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.co-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.co-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.co-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.co-num-green { color: var(--green); }
.co-num-blue  { color: var(--blue); }
.co-num-red   { color: var(--red); }

/* Data Subject Requests - DSR Page Styles */
.dsr-page-top {
  margin-bottom: 20px;
}

.dsr-summary-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.dsr-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
}

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

.dsr-icon-total {
  background: var(--blue-100);
  color: var(--blue);
}

.dsr-icon-overdue {
  background: var(--amber-light);
  color: var(--amber);
}

.dsr-icon-fulfilled {
  background: var(--green-light);
  color: var(--green);
}

.dsr-stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dsr-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.dsr-value-overdue {
  color: var(--red);
}

.dsr-value-fulfilled {
  color: var(--green);
}

.dsr-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.dsr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dsr-table-container {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.dsr-table {
  width: 100%;
  border-collapse: collapse;
}

.dsr-table th,
.dsr-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-light);
}

.dsr-table th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dsr-table tbody tr:last-child td {
  border-bottom: none;
}

.dsr-table tbody tr:hover td {
  background: var(--bg);
}

.dsr-ref {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12.5px;
}

.dsr-subject {
  font-weight: 500;
  color: var(--text);
}

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

.dsr-date {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dsr-deadline {
  font-weight: 500;
  font-size: 13px;
}

.dsr-deadline-overdue {
  color: var(--red);
}

.dsr-deadline-soon {
  color: var(--amber);
}

.dsr-deadline-safe {
  color: var(--green);
}

.dsr-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

.dsr-badge-open {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.dsr-badge-progress {
  background: var(--blue);
  color: white;
}

.dsr-badge-fulfilled {
  background: var(--green-light);
  color: var(--green);
}

.dsr-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.dsr-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.dsr-empty small {
  font-size: 13px;
  color: var(--placeholder);
}

/* DSR Modal Styles */
.modal-dsr {
  background: #fff;
  width: 500px;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.modal-dsr-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.modal-dsr-close {
  cursor: pointer;
  font-size: 24px;
  color: #6b7280;
  line-height: 1;
}

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

.modal-dsr-body .form-group {
  margin-bottom: 16px;
}

.modal-dsr-body label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
  font-weight: 500;
}

.modal-dsr-body input,
.modal-dsr-body select,
.modal-dsr-body textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
  background: white;
  color: var(--text);
  font-family: inherit;
}

.modal-dsr-body input:focus,
.modal-dsr-body select:focus,
.modal-dsr-body textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.modal-dsr-body textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-dsr-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 10px;
}

.btn-dsr-cancel {
  background: white;
  color: #374151;
  padding: 10px 18px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.btn-dsr-cancel:hover {
  background: #f9fafb;
}

.btn-dsr-submit {
  background: #1d4ed8;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.btn-dsr-submit:hover {
  background: #1e40af;
}

/* Search toolbar */
.co-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.co-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  max-width: 320px;
  color: var(--placeholder);
  transition: border-color .15s;
}
.page-content-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.co-search-input {
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  width: 100%;
  outline: none;
}
.co-search-input::placeholder { color: var(--placeholder); }

/* Coloured avatar */
.co-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Reg number sub-label */
.co-reg {
  font-size: 11.5px;
  color: var(--placeholder);
  font-family: var(--mono, monospace);
  margin-top: 1px;
}

/* Active row highlight */
.co-row-active td:first-child {
  border-left: 3px solid var(--blue);
}
.co-row-active { background: var(--blue-light) !important; }
.co-row-active td { background: transparent !important; }

/* Active indicator dot next to name */
.co-active-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 5px;
  vertical-align: middle;
  margin-top: -2px;
}

/* Date column */
.co-date { white-space: nowrap; }

/* Row actions — always visible for companies page */
.co-actions {
  opacity: 1 !important;
}

/* Company Cards */

.company-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.company-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.company-card:hover {
  border-color: var(--blue-200);
}
.company-card .company-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-100);
  border-radius: 10px;
}
.company-card .company-info {
  flex: 1;
}
.company-card .company-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.company-card .company-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.access-section { background:white; border:1px solid var(--border-light); border-radius:var(--radius-md); padding:24px; margin-bottom:20px; }
.access-section-title { font-size:16px; font-weight:700; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.access-section-desc { font-size:13px; color:var(--muted); margin-bottom:20px; }
.access-item   { background:white; border:1px solid var(--border-light); border-radius:var(--radius-md); padding:16px 20px; margin-bottom:10px; display:flex; align-items:center; gap:16px; transition: all 0.2s ease; }
.access-item:hover { border-color:var(--blue-200); }
.access-avatar { width:44px; height:44px; background:var(--blue-100); border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:16px; color:var(--blue); flex-shrink:0; }
.access-info   { flex:1; }
.access-name   { font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; margin-bottom:3px; }
.access-role   { font-size:12px; color:var(--muted); }
.access-meta   { font-size:12px; color:var(--placeholder); text-align:right; line-height:1.6; }
.access-perms { margin-top:6px; font-size:11px; color:var(--muted); display:flex; gap:6px; flex-wrap:wrap; }
.access-perm-tag { background:var(--bg); padding:3px 8px; border-radius:4px; border:1px solid var(--border-light); font-weight:500; }

/* Nav Permissions */
.perm-section { margin-bottom:24px; }
.perm-section-header { font-size:12px; font-weight:700; color:var(--muted); margin-bottom:10px; text-transform:uppercase; letter-spacing:0.05em; padding-left:4px; }
.perm-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:10px; }
.perm-card { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--bg); border-radius:var(--radius-md); border:1px solid transparent; transition: all 0.2s ease; }
.perm-card:hover { background:white; border-color:var(--border); }
.perm-card-label { font-size:14px; font-weight:500; display:flex; align-items:center; gap:10px; }
.perm-card-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; }
.perm-card-icon.blue { background:var(--blue-100); color:var(--blue); }
.perm-card-icon.green { background:var(--green-light); color:var(--green); }
.perm-card-icon.amber { background:var(--amber-light); color:var(--amber); }
.perm-card-icon.red { background:var(--red-light); color:var(--red); }

/* Role Selector */
.role-selector { display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.role-select-wrap { display:flex; align-items:center; gap:8px; }
.role-select-label { font-size:13px; color:var(--muted); font-weight:500; }

/* Retention */
.retention-item { background:white; border:1px solid var(--border-light); border-radius:var(--radius-md); padding:18px 22px; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ret-info  { flex:1; }
.ret-title { font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.ret-sub   { font-size:12px; color:var(--muted); }
.ret-control { display:flex; align-items:center; gap:8px; }
.months-input { width:72px; border:2px solid var(--border); border-radius:var(--radius-sm); padding:7px 10px; font-size:16px; font-weight:700; text-align:center; color:var(--text); font-family:var(--font); transition:border-color .18s; }
.months-input:focus { border-color:var(--blue); outline:none; }
.months-label { font-size:13px; color:var(--muted); }

/* Documents List */
#documents-list { margin-bottom: 20px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}
.doc-item:hover {
  border-color: var(--blue-200);
}
.doc-icon { 
  font-size: 28px; 
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-100);
  border-radius: 10px;
  flex-shrink: 0;
}
.doc-info { flex: 1; }
.doc-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.doc-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-delete {
  background: var(--bg);
  border: 1px solid var(--border-light);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-delete:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

.doc-cat-badge {
  background: var(--blue-100);
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.doc-actions { display:flex; gap:10px; align-items:center; }
.doc-download {
  background: var(--green-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--green);
  font-size: 14px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.doc-download:hover { background: var(--green); color: white; }

.doc-edit {
  background: var(--amber-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--amber);
  font-size: 14px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-edit:hover { background: var(--amber); color: white; }

/* Alerts */
.alert-item { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; background: white; border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: 12px; transition: all 0.2s ease; }
.alert-item:hover { border-color: var(--blue-200); }
.alert-item.error { border-left: 4px solid var(--red); background: var(--red-light); }
.alert-item.warning { border-left: 4px solid var(--amber); background: var(--amber-light); }
.alert-item.info { border-left: 4px solid var(--blue); background: var(--blue-100); }
.alert-icon { font-size: 20px; flex-shrink: 0; width: 32px; text-align: center; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.alert-message { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.alert-link { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; }
.alert-link:hover { text-decoration: underline; }
.alert-dismiss { background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 4px; font-size: 12px; transition: all 0.15s ease; }
.alert-dismiss:hover { background: var(--bg); color: var(--text); }
  color: var(--green);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration: none;
  font-size: 12px;
}
.doc-download:hover { background: var(--green); color: white; }
.doc-edit {
  background: var(--blue-100);
  color: var(--blue);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration: none;
  font-size: 12px;
  border: none;
  cursor: pointer;
}
.doc-edit:hover { background: var(--blue); color: white; }

@media (max-width: 768px) {
  .feature-grid     { grid-template-columns: 1fr; }
  .option-grid      { grid-template-columns: 1fr; }
  .dash-top-grid    { grid-template-columns: 1fr; }
  .stats-row        { grid-template-columns: 1fr; }
  .dash-bottom-grid { grid-template-columns: 1fr; }
  #page-dashboard.dashboard-shell { padding: 28px 20px 42px; }
  #page-dashboard .dashboard-hero,
  #page-dashboard .dashboard-billing-footer { flex-direction: column; align-items: stretch; }
  #page-dashboard .dashboard-metric-grid,
  #page-dashboard .dashboard-main-grid,
  #page-dashboard .dashboard-billing-grid,
  #page-dashboard .dashboard-action-grid { grid-template-columns: 1fr; }
  .assigned-task-list { grid-template-columns: 1fr; }
  .assigned-task-card { flex-direction:column; }
  .assigned-task-meta { justify-content:flex-start; max-width:none; }
}
/* Simple Audit Report Styles */
.report-header-simple { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: white; border-bottom: 1px solid var(--border-light); }
.report-header-simple h2 { font-size: 18px; font-weight: 700; margin: 0 0 4px 0; }
.report-header-simple p { font-size: 13px; color: var(--muted); margin: 0; }
.report-header-simple > div:last-child { text-align: right; font-size: 13px; }
.report-header-simple strong { display: block; }
.report-header-simple span { color: var(--muted); }

.report-summary { display: flex; background: white; border-bottom: 1px solid var(--border-light); }
.summary-item { flex: 1; padding: 16px 20px; text-align: center; border-right: 1px solid var(--border-light); }
.summary-item:last-child { border-right: none; }
.summary-num { display: block; font-size: 22px; font-weight: 700; }
.summary-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.summary-risk-high { background: #fee2e2; }
.summary-risk-high .summary-num { color: #dc2626; }
.summary-risk-medium { background: #fef3c7; }
.summary-risk-medium .summary-num { color: #d97706; }
.summary-risk-low { background: #d1fae5; }
.summary-risk-low .summary-num { color: #059669; }

.report-section { background: white; border-bottom: 1px solid var(--border-light); padding: 16px 24px; }
.report-section h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin: 0 0 12px 0; letter-spacing: 0.05em; }
.report-section ul { list-style: none; padding: 0; margin: 0; }
.report-section li { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--bg); color: var(--muted); }
.report-section li:last-child { border-bottom: none; }
.report-section li.done { color: #059669; font-weight: 500; }

@media (max-width: 768px) {
  .page-shell       { padding: 72px 16px 20px; }
  .sidebar          { transform: translateX(-100%); z-index: 1000; transition: transform 0.2s ease; }
  .sidebar.open     { transform: translateX(0); }
  .mobile-nav-toggle { display: flex; }
  .main-area        { margin-left: 0; }
  .landing-nav {
    min-height: 74px;
    padding: 0 20px;
  }
  .landing-nav .logo-name {
    font-size: 18px;
  }
  .nav-links {
    gap: 12px;
  }
  .landing-primary-btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }
  .landing-link-btn {
    font-size: 14px;
  }
  .landing-hero {
    min-height: auto;
    padding: 60px 20px 58px;
  }
  .hero-bolt {
    width: 38px;
    height: 38px;
    margin-bottom: 34px;
  }
  .hero-h1 {
    font-size: 42px;
    line-height: 1.08;
  }
  .hero-kicker {
    font-size: 19px;
  }
  .hero-p {
    font-size: 17px;
    max-width: 520px;
  }
  .landing-signup {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .landing-features {
    padding: 58px 20px;
  }
  .feature-eyebrow {
    margin-bottom: 34px;
  }
  .feature-card {
    padding: 20px;
  }
  .feature-card h3 {
    font-size: 15px;
  }
  .feature-card p {
    font-size: 14px;
  }
  .landing-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 28px 20px;
    text-align: center;
  }
  .footer-brand,
  .footer-links {
    justify-self: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 22px;
  }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 360px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-warning { background: var(--amber); }

.toast-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.toast-close {
  background: transparent;
  border: none;
  color: white;
  opacity: 0.7;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.toast-close:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  #jarvis-debug {
    display: none !important;
  }
}

/* Audit Report Styles */
.audit-report {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.audit-header {
  text-align: center;
  margin-bottom: 30px;
}

.audit-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.audit-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.audit-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.audit-score-card {
  display: flex;
  align-items: center;
  gap: 40px;
  background: white;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 30px;
}

.audit-regulatory-mapping,
.audit-critical-gaps {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.audit-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.audit-block-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.audit-block-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.audit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.audit-mapping-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.audit-mapping-table th,
.audit-mapping-table td {
  border-bottom: 1px solid var(--border-light);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 12.5px;
  line-height: 1.5;
}

.audit-mapping-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-mapping-table tr:last-child td {
  border-bottom: 0;
}

.audit-mapping-table td:last-child span:last-child {
  display: block;
  margin-top: 6px;
  color: #475569;
}

.audit-status-pill,
.audit-risk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.audit-status-pill.strong {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.audit-status-pill.partial {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.audit-status-pill.missing {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.audit-risk-pill.high {
  background: #fee2e2;
  color: #991b1b;
}

.audit-risk-pill.medium-high,
.audit-risk-pill.medium {
  background: #fffbeb;
  color: #92400e;
}

.audit-reference-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.audit-reference-links span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.audit-reference-links a {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring circle:last-child {
  transition: stroke-dasharray 0.5s ease;
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.score-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.score-details {
  display: flex;
  gap: 30px;
  flex: 1;
}

.score-item {
  text-align: center;
}

.score-item-num {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.score-item-label {
  font-size: 12px;
  color: var(--muted);
}

.risk-item .score-item-num {
  color: var(--risk-color);
}

.audit-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audit-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}

.audit-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.audit-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.audit-section-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-section-progress .progress-bar {
  width: 80px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.audit-section-progress .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.audit-section-progress span {
  font-size: 13px;
  color: var(--muted);
}

.audit-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
}

.audit-checklist li.done {
  background: #f0fdf4;
}

.check-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--border);
  color: white;
  font-size: 12px;
  flex-shrink: 0;
}

.audit-checklist li.done .check-icon {
  background: #22c55e;
}

.check-text {
  flex: 1;
  font-size: 14px;
}

.check-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.audit-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.audit-footer p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.btn-print {
  background: var(--blue);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-print:hover {
  background: var(--blue-hover);
}

.btn-print:hover {
  background: var(--blue-hover);
}

@media print {
  .audit-report { padding: 0; }
  .audit-footer { display: none; }
}

/* Navigation Admin Only */
.nav-admin-only {
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
  padding-top: 8px;
}

/* Modal components (consolidated) */
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 22px; font-weight: 600; color: var(--text); }
.modal-close {
  background: var(--bg);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body {
  padding: 28px 28px;
}
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

#modal-person .person-modal {
  max-width: 680px;
  border-radius: 8px;
  border: 1px solid #dbe5f2;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

#modal-person .person-modal-head {
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px 20px;
  background: #ffffff;
}

#modal-person .person-modal-head h3 {
  font-size: 24px;
  line-height: 1.2;
}

#modal-person .person-modal-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

#modal-person .modal-close {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.person-modal-body {
  padding: 24px 28px 22px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.person-login-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.person-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #dbeafe;
  color: var(--primary);
  flex: 0 0 auto;
}

.person-login-note strong,
.person-login-note span {
  display: block;
}

.person-login-note strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #16396f;
}

.person-login-note span {
  margin-top: 3px;
  color: #4b6f9f;
  font-size: 13px;
  line-height: 1.45;
}

.person-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.person-form-grid .form-group {
  gap: 8px;
}

.person-form-grid .form-group label {
  color: #334155;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.person-form-grid .form-input {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d8e2ef;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.person-form-grid .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.person-password-field {
  grid-column: 1 / -1;
}

#modal-person .person-modal-footer {
  padding: 18px 28px;
  background: #f8fafc;
  border-radius: 0 0 8px 8px;
}

#modal-person .btn-cancel,
#modal-person .btn-save {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
}

#modal-person .btn-save {
  gap: 8px;
  min-width: 148px;
}

@media (max-width: 700px) {
  #modal-person.modal-overlay {
    padding: 16px;
  }

  #modal-person .person-modal-head,
  .person-modal-body,
  #modal-person .person-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .person-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Button styles */
.btn-cancel, .btn-save {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-cancel:hover { background: var(--border); }
.btn-save {
  background: var(--blue);
  border: none;
  color: white;
}
.btn-save:hover { background: var(--blue-hover); }



.toggle-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.toggle-field-text small { color: var(--muted); font-size: 12px; }
.toggle-wrap { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.2s;
}
.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle-wrap input:checked + .toggle-slider { background: var(--blue); }
.toggle-wrap input:checked + .toggle-slider:before { transform: translateX(20px); }

/* DPO Upload Zone - Trackable */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 24px;
  margin-top: 8px;
  transition: all .2s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue);
  background: rgba(59, 111, 240, 0.04);
}
.upload-zone-inner { text-align: center; }
.upload-zone-icon { color: var(--muted); margin: 0 auto 12px; }
.upload-zone-text { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.upload-zone-hint { font-size: 12px; color: var(--muted); }
.upload-browse-btn {
  background: none; border: none; color: var(--blue); font-weight: 600;
  cursor: pointer; padding: 0; text-decoration: underline;
}
.upload-browse-btn:hover { color: var(--blue-dark); }

.upload-progress {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upload-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.upload-file-details { display: flex; flex-direction: column; gap: 2px; }
.upload-file-name { font-size: 13px; font-weight: 600; }
.upload-file-size { font-size: 11px; color: var(--muted); }
.upload-bar-container {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.upload-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  border-radius: 3px;
  width: 0%;
  transition: width .3s ease;
}
.upload-percent {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-align: right;
}

.upload-complete {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

#dpo-submit-btn { position: relative; }
#dpo-submit-btn.loading { opacity: 0.7; pointer-events: none; }
#dpo-submit-btn.loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ============================================================
   ORGANIZATION DROPDOWN (PREMIUM)
   ============================================================ */
.org-context { padding: 1.25rem 1rem; position: relative; }
.context-label { 
  font-size: 11px; font-weight: 700; color: var(--muted); 
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; 
  display: flex; align-items: center; gap: 8px;
}
.context-label::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

.context-selector {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: white; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.context-selector:hover { 
  border-color: var(--blue-200); background: var(--blue-light);
}
.context-selector:active { transform: translateY(0); }
.context-selector.is-disabled {
  cursor: default;
}
.context-selector.is-disabled:hover {
  border-color: var(--border);
  background: white;
}
.context-selector.is-disabled svg {
  display: none;
}

.context-selector .org-icon {
  width: 24px; height: 24px; background: var(--blue); color: white;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}

.org-dropdown {
  position: absolute; top: calc(100% + 8px); left: 1rem; right: 1rem;
  background: white; border: 1px solid var(--border); border-radius: var(--radius-lg);

  z-index: 100; display: none; overflow: hidden;
  animation: dropdownPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.org-dropdown.open { display: block; }
@keyframes dropdownPop { 
  from { opacity: 0; transform: scale(0.95) translateY(-10px); } 
  to { opacity: 1; transform: scale(1) translateY(0); } 
}

.org-dropdown-list { max-height: 260px; overflow-y: auto; padding: 8px; }
.org-dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  font-size: 13.5px; font-weight: 500; color: var(--text); border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.15s; margin-bottom: 2px;
}
.org-dropdown-item:hover { background: var(--bg); color: var(--blue); }
.org-dropdown-item.active { background: var(--blue-100); color: var(--blue); font-weight: 700; }

.org-dropdown-item .item-icon {
  width: 28px; height: 28px; background: var(--border-light); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: all 0.2s; flex-shrink: 0;
}
.org-dropdown-item:hover .item-icon { background: var(--blue-200); color: var(--blue); }
.org-dropdown-item.active .item-icon { background: var(--blue); color: white; }

.org-dropdown-footer {
  padding: 12px 16px; border-top: 1px solid var(--border-light);
  background: var(--input-bg); display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: all 0.2s;
}
.org-dropdown-footer:hover { color: var(--blue); background: var(--blue-light); }
.org-dropdown-footer svg { color: var(--placeholder); }
.org-dropdown-footer:hover svg { color: var(--blue); }

/* Vendors / Third Parties Page */
.vendor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.vendor-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.vendor-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.vendor-btn {
  background: #1d4ed8;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vendor-btn:hover {
  background: #1e40af;
}

.vendor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.vendor-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
}

.vendor-stat-label {
  font-size: 13px;
  color: #6b7280;
}

.vendor-stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

.vendor-stat-red {
  color: #dc2626;
}

.vendor-table-wrap {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.vendor-table {
  width: 100%;
  border-collapse: collapse;
}

.vendor-table th,
.vendor-table td {
  padding: 16px;
  text-align: left;
  font-size: 14px;
}

.vendor-table th {
  background: #eef2f7;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.vendor-table tr:not(:last-child) td {
  border-bottom: 1px solid #e5e7eb;
}

.vendor-table tbody tr:hover td {
  background: #fafafa;
}

.vendor-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.vendor-badge-low {
  background: #e5f7ee;
  color: #047857;
}

.vendor-badge-medium {
  background: #e0edff;
  color: #1d4ed8;
}

.vendor-badge-high {
  background: #fee2e2;
  color: #dc2626;
}

.vendor-signed {
  color: #16a34a;
  font-weight: 500;
  font-size: 13px;
}

.vendor-missing {
  color: #f59e0b;
  font-weight: 500;
  font-size: 13px;
}

.vendor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.vendor-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.vendor-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.vendor-empty small {
  font-size: 13px;
  color: var(--placeholder);
}

/* Vendor Modal */
.modal-vendor {
  background: #fff;
  width: 500px;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.modal-vendor-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.modal-vendor-close {
  cursor: pointer;
  font-size: 24px;
  color: #6b7280;
  line-height: 1;
}

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

.modal-vendor-body .form-group {
  margin-bottom: 16px;
}

.modal-vendor-body label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
  font-weight: 500;
}

.modal-vendor-body input,
.modal-vendor-body select,
.modal-vendor-body textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
  background: white;
  color: var(--text);
  font-family: inherit;
}

.modal-vendor-body input:focus,
.modal-vendor-body select:focus,
.modal-vendor-body textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.modal-vendor-body textarea {
  min-height: 80px;
  resize: vertical;
}

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

.modal-vendor-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 10px;
}

.btn-vendor-cancel {
  background: white;
  color: #374151;
  padding: 10px 18px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.btn-vendor-cancel:hover {
  background: #f9fafb;
}

.btn-vendor-submit {
  background: #1d4ed8;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.btn-vendor-submit:hover {
  background: #1e40af;
}

/* Breach Log Page */
.breach-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.breach-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.breach-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.breach-btn {
  background: #dc2626;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breach-btn:hover {
  background: #b91c1c;
}

.breach-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.breach-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
}

.breach-stat-label {
  font-size: 13px;
  color: #6b7280;
}

.breach-stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

.breach-stat-red {
  color: #dc2626;
}

.breach-stat-amber {
  color: #f59e0b;
}

.breach-stat-green {
  color: #16a34a;
}

.breach-table-wrap {
  background: white;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e5e7eb;
}

.breach-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.breach-table th,
.breach-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
}

.breach-table th {
  background: #eef2f7;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.breach-table tr:not(:last-child) td {
  border-bottom: 1px solid #e5e7eb;
}

.breach-table tbody tr:hover td {
  background: #fafafa;
}

.breach-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.breach-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.breach-empty small {
  font-size: 13px;
  color: var(--placeholder);
}

.breach-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Cross-border Transfers Page */
.cb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.cb-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.cb-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.cb-btn {
  background: #1d4ed8;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cb-btn:hover {
  background: #1e40af;
}

.cb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.cb-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
}

.cb-stat-label {
  font-size: 13px;
  color: #6b7280;
}

.cb-stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

.cb-stat-red {
  color: #dc2626;
}

.cb-table-wrap {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.cb-table {
  width: 100%;
  border-collapse: collapse;
}

.cb-table th,
.cb-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
}

.cb-table th {
  background: #eef2f7;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.cb-table tr:not(:last-child) td {
  border-bottom: 1px solid #e5e7eb;
}

.cb-table tbody tr:hover td {
  background: #fafafa;
}

.cb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.cb-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.cb-empty small {
  font-size: 13px;
  color: var(--placeholder);
}

.cb-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cb-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.cb-badge-approved {
  background: #e5f7ee;
  color: #047857;
}

.cb-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.cb-badge-restricted {
  background: #fee2e2;
  color: #dc2626;
}

.pa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.pa-header-text {
  flex: 1;
}

.pa-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pa-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.pa-header-buttons {
  display: flex;
  gap: 12px;
}

.pa-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.pa-btn-outline {
  background: white;
  color: var(--text);
}

.pa-btn-outline:hover {
  background: var(--hover-bg);
}

.pa-btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

.pa-btn-primary:hover {
  background: var(--primary-dark);
}

.pa-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

.pa-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

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

.pa-card-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pa-card-icon {
  color: var(--primary);
  font-size: 20px;
}

.pa-card h2 {
  font-size: 18px;
  margin: 0;
  color: var(--text);
}

.pa-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: #334155;
  background: white;
}

.pa-badge-crossborder {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.pa-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 40px;
}

.pa-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.pa-stat-box {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg);
}

.pa-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.pa-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.pa-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.pa-btn-edit {
  padding: 6px 14px;
  font-size: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.pa-btn-delete {
  padding: 6px 14px;
  font-size: 13px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.pa-btn-edit:hover {
  background: var(--primary-dark);
}

.pa-btn-delete:hover {
  background: #fee2e2;
}

.sidebar-profile-link {
  margin: 10px 0 8px;
}

.dashboard-profile-prompt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.dashboard-profile-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-profile-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.dashboard-profile-copy strong {
  color: var(--text);
  font-size: 14px;
}

.dashboard-profile-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-page {
  padding: 24px;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-completeness-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-completeness-chip.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.profile-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.profile-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.profile-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.profile-panel {
  max-width: 860px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.profile-panel[hidden] {
  display: none;
}

.profile-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-panel-head h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
}

.profile-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.profile-field[hidden] {
  display: none !important;
}

.profile-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.profile-field small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.profile-empty-link {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.profile-scope-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.profile-scope-grid {
  grid-template-columns: 1fr;
}

.profile-scope-grid .profile-field:last-child {
  max-width: none;
}

.profile-scope-grid #profile-sensitive-subject-volume {
  max-width: 220px;
}

.profile-field-nowrap span {
  white-space: nowrap;
}

.profile-scope-preview-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.profile-scope-preview-panel h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

.profile-scope-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.profile-scope-preview ul {
  margin: 0;
  padding-left: 18px;
}

.profile-scope-preview li + li {
  margin-top: 8px;
}

.profile-dpo-assessment-result {
  margin-top: 14px;
}

.profile-dpo-assessment-result.is-required {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
}

.profile-dpo-assessment-result a {
  display: inline-block;
  margin-top: 8px;
  color: #c2410c;
  font-weight: 700;
  text-decoration: none;
}

.profile-select-control {
  position: relative;
  width: 100%;
}

.profile-select-control .profile-select {
  height: 44px;
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.profile-select-control .profile-select:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.profile-select-control .profile-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.profile-select-control i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 12px;
  pointer-events: none;
}

.profile-select-control:focus-within i {
  color: var(--primary);
}

.profile-field:last-child {
  max-width: 220px;
}

.profile-field-full {
  grid-column: 1 / -1;
  max-width: none;
  margin-bottom: 8px;
}

.profile-field-full:last-child {
  max-width: none;
}

.profile-field-full textarea.form-input {
  min-height: 112px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.profile-save-status {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.profile-save-status.success {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
}

.profile-save-status.error {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 760px) {
  .dashboard-profile-prompt,
  .profile-header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-header-actions,
  .profile-scope-layout {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .profile-header-actions {
    flex-direction: column;
  }

  .profile-field:last-child {
    max-width: none;
  }
}

/* Accounts admin dashboard */
#page-accounts.accounts-shell {
  max-width: 1180px;
  padding: 42px 40px 56px;
}

#page-accounts .accounts-page-inner {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

#page-accounts .accounts-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

#page-accounts .accounts-eyebrow {
  display: inline-flex;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

#page-accounts .accounts-hero h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

#page-accounts .accounts-new-btn {
  min-height: 44px;
  white-space: nowrap;
}

#page-accounts .accounts-new-btn i {
  font-size: 13px;
}

#page-accounts .accounts-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#page-accounts .accounts-stat-card {
  min-height: 104px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

#page-accounts .accounts-stat-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

#page-accounts .accounts-stat-icon.success {
  background: var(--green-light);
  color: var(--green);
}

#page-accounts .accounts-stat-icon.primary {
  background: #EEF2FF;
  color: #4F46E5;
}

#page-accounts .accounts-stat-icon.danger {
  background: var(--red-light);
  color: var(--red);
}

#page-accounts .stat-num {
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

#page-accounts .stat-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#page-accounts .accounts-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

#page-accounts .accounts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
}

#page-accounts .accounts-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

#page-accounts .accounts-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--placeholder);
  transform: translateY(-50%);
  pointer-events: none;
}

#page-accounts .accounts-search-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

#page-accounts .accounts-search-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 6px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: left center;
}

#page-accounts #account-search,
#page-accounts #account-status-filter {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 14px;
}

#page-accounts #account-search {
  width: 100%;
  padding: 0 14px 0 42px;
}

#page-accounts #account-status-filter {
  width: 170px;
  padding: 0 12px;
}

#page-accounts #account-search:focus,
#page-accounts #account-status-filter:focus,
.accounts-form input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 111, 240, 0.12);
}

#page-accounts .accounts-list {
  padding: 0;
}

#page-accounts .accounts-table-head,
#page-accounts .account-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 118px 120px minmax(370px, auto);
  align-items: center;
  gap: 16px;
}

#page-accounts .accounts-table-head {
  padding: 12px 16px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-light);
}

#page-accounts .account-row {
  min-height: 74px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s ease;
}

#page-accounts .account-row:last-child {
  border-bottom: 0;
}

#page-accounts .account-row:hover {
  background: #f8fafc;
}

#page-accounts .account-row.is-suspended {
  background: linear-gradient(0deg, rgba(239, 68, 68, 0.035), rgba(239, 68, 68, 0.035)), white;
}

#page-accounts .account-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

#page-accounts .account-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ECFDF5;
  color: #059669;
  font-size: 13px;
  font-weight: 800;
}

#page-accounts .account-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#page-accounts .account-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-accounts .account-meta {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono, monospace);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-accounts .account-status-badge,
#page-accounts .account-seat-pill {
  min-width: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

#page-accounts .account-status-badge.active {
  background: var(--green-light);
  color: var(--green);
}

#page-accounts .account-status-badge.suspended {
  background: var(--red-light);
  color: var(--red);
}

#page-accounts .account-seat-pill {
  background: #f1f5f9;
  color: #475569;
  text-transform: none;
}

#page-accounts .account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

#page-accounts .account-actions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

#page-accounts .account-action-primary {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: white !important;
}

#page-accounts .account-actions .btn-secondary {
  background: white;
  color: var(--text);
}

#page-accounts .account-actions .btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

#page-accounts .accounts-empty {
  padding: 54px 24px;
  text-align: center;
}

#page-accounts .accounts-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 14px;
}

#page-accounts .accounts-empty h3 {
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}

#page-accounts .accounts-empty p {
  color: var(--muted);
  font-size: 13.5px;
}

.accounts-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.accounts-modal-card {
  width: min(100%, 560px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.accounts-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-light);
}

.accounts-modal-head h2 {
  font-size: 20px;
  margin-bottom: 5px;
}

.accounts-modal-head p {
  color: var(--muted);
  font-size: 13.5px;
}

.accounts-form {
  padding: 22px 24px 24px;
}

.accounts-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accounts-form input {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.accounts-form-grid {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 14px;
}

.accounts-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
}

.accounts-checkbox input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.accounts-form-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

/* People admin dashboard */
#page-people.accounts-shell {
  width: calc(100vw - var(--sidebar-w));
  max-width: none;
  margin: 0;
  padding: 42px 40px 56px;
  background: #f8fafc;
  box-sizing: border-box;
}

#page-people .accounts-page-inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

#page-people .accounts-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

#page-people .accounts-eyebrow {
  display: inline-flex;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

#page-people .accounts-hero h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

#page-people .page-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

#page-people .people-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#page-people .people-stat-card {
  min-height: 104px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

#page-people .people-stat-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 15px;
}

#page-people .people-stat-icon.success {
  background: var(--green-light);
  color: var(--green);
}

#page-people .people-stat-icon.primary {
  background: #eef2ff;
  color: #4f46e5;
}

#page-people .people-stat-icon.danger {
  background: var(--red-light);
  color: var(--red);
}

#page-people .stat-num {
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

#page-people .stat-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#page-people .people-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

#page-people .people-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 170px 180px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
}

#page-people .accounts-search-wrap {
  position: relative;
  min-width: 240px;
}

#page-people .accounts-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--placeholder);
  transform: translateY(-50%);
  pointer-events: none;
}

#page-people .accounts-search-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

#page-people .accounts-search-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 6px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: left center;
}

#page-people #people-search,
#page-people #people-status-filter,
#page-people #people-role-filter {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 14px;
}

#page-people #people-search {
  width: 100%;
  padding: 0 14px 0 42px;
}

#page-people #people-status-filter,
#page-people #people-role-filter {
  width: 100%;
  padding: 0 12px;
}

#page-people #people-search:focus,
#page-people #people-status-filter:focus,
#page-people #people-role-filter:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 111, 240, 0.12);
}

#page-people .people-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: white;
}

#page-people .people-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  background: white;
  font-size: 13.5px;
}

#page-people .people-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px;
  background: #f8fafc;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

#page-people .people-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  line-height: 1.45;
  vertical-align: middle;
}

#page-people .people-table tbody tr {
  transition: background .15s ease;
}

#page-people .people-table tbody tr:hover {
  background: #f8fafc;
}

#page-people .people-name-cell {
  min-width: 210px;
}

#page-people .people-email-cell {
  min-width: 240px;
  color: var(--muted);
  white-space: nowrap;
}

#page-people .people-name-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

#page-people .people-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

#page-people .people-name-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#page-people .people-name-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

#page-people .people-name-copy span {
  color: var(--muted);
  font-size: 12px;
}

#page-people .people-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-transform: capitalize;
}

#page-people .people-badge.active {
  background: var(--green-light);
  color: var(--green);
}

#page-people .people-badge.suspended {
  background: var(--red-light);
  color: var(--red);
}

#page-people .people-badge.role-badge {
  background: #eef2ff;
  color: #4f46e5;
  text-transform: none;
}

#page-people .people-muted {
  color: var(--muted);
}

#page-people .people-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

#page-people .people-table-actions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

#page-people .people-action-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

#page-people .people-action-primary {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: white !important;
}

#page-people .people-action-danger {
  background: white !important;
  border-color: #fecaca !important;
  color: var(--red) !important;
}

#page-people .people-state {
  padding: 54px 24px;
  color: var(--muted);
  text-align: center;
}

#page-people .people-empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 16px;
}

#page-people .people-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

#page-people .people-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  #page-accounts .accounts-table-head {
    display: none;
  }

  #page-accounts .account-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #page-accounts .account-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  #page-accounts.accounts-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  #page-accounts .accounts-hero,
  #page-accounts .accounts-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-accounts .accounts-stat-grid,
  .accounts-form-grid {
    grid-template-columns: 1fr;
  }

  #page-accounts .accounts-new-btn,
  #page-accounts #account-status-filter {
    width: 100%;
  }

  #page-people.accounts-shell {
    width: 100vw;
    padding-left: 20px;
    padding-right: 20px;
  }

  #page-people .accounts-hero {
    align-items: stretch;
    flex-direction: column;
  }

  #page-people .people-stat-grid,
  #page-people .people-toolbar {
    grid-template-columns: 1fr;
  }
}

.pa-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.pa-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.pa-empty small {
  font-size: 13px;
}

.pa-table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.pa-table {
  width: 100%;
  border-collapse: collapse;
}

.pa-table th,
.pa-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.pa-table th {
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.pa-table tbody tr:hover td {
  background: var(--hover-bg);
}

.pa-table tbody tr:last-child td {
  border-bottom: none;
}

.pa-table .pa-name {
  font-weight: 600;
  color: var(--text);
}

.pa-table .pa-purpose {
  color: var(--muted);
  font-size: 13px;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-table .pa-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pa-table .pa-legal {
  font-size: 12px;
  color: var(--muted);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-actions {
  display: flex;
  gap: 8px;
}

.pa-btn-edit {
  padding: 5px 10px;
  font-size: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.pa-btn-delete {
  padding: 5px 10px;
  font-size: 12px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 6px;
  cursor: pointer;
}

.pa-btn-edit:hover {
  background: var(--primary-dark);
}

.pa-btn-delete:hover {
  background: #fee2e2;
}

/* ============================================================
   ONBOARDING STEPPER
   ============================================================ */
.onboarding-stepper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  padding: 24px 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 25px;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.onboarding-header h3 {
  margin: 0;
  font-size: 1.1em;
  color: var(--text);
}

.onboarding-header p {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 0.85em;
}

.stepper-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
  padding: 0 10px;
}

.stepper-line {
  position: absolute;
  top: 11px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-node {
  border: 0;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
  background: var(--bg-card);
  text-align: center;
  padding: 0 5px;
  cursor: pointer;
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: bold;
  margin: 0 auto 6px auto;
  transition: all 0.2s ease;
}

.step-node.active .step-circle {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.step-node.completed .step-circle {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.step-node.skipped .step-circle {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning);
}

.step-label {
  display: block;
  max-width: 92px;
  margin: 0 auto;
  font-size: 0.7em;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-light);
  overflow-wrap: break-word;
}

.step-node.active .step-label {
  font-weight: 700;
  color: var(--text);
}

.step-node.skipped .step-label {
  color: var(--warning);
}

.onboarding-action-card {
  background: var(--primary-light);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-card-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-card-icon {
  background: var(--primary);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25em;
}

.action-card-text-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.action-card-text-desc {
  font-size: 0.85em;
  color: var(--primary-dark);
}

.action-card-buttons {
  display: flex;
  gap: 12px;
}

.dashboard-wizard-panel {
  margin-top: 16px;
  border-top: 1px solid var(--blue-200);
  padding-top: 18px;
}

.dashboard-wizard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dashboard-wizard-eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-wizard-panel h4 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 18px;
}

.dashboard-wizard-panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.dashboard-wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-wizard-grid label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-wizard-grid label span,
.dashboard-wizard-check {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-wizard-field-full {
  grid-column: 1 / -1;
}

.dashboard-wizard-check {
  flex-direction: row !important;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.dashboard-wizard-check input {
  width: 16px;
  height: 16px;
}

.dashboard-wizard-note {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-muted);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-wizard-note.is-warning {
  margin-top: 12px;
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.dashboard-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-wizard-actions .btn-primary,
.dashboard-wizard-actions .btn-secondary,
.dashboard-wizard-actions .btn-ghost {
  padding: 10px 16px;
}

@media (max-width: 760px) {
  .onboarding-stepper {
    padding: 20px;
  }

  .dashboard-wizard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-wizard-actions {
    justify-content: stretch;
  }

  .dashboard-wizard-actions button {
    flex: 1 1 100%;
  }
}

.skipped-onboarding-panel {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.skipped-onboarding-head,
.skipped-onboarding-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.skipped-onboarding-head {
  border-bottom: 1px solid var(--border);
}

.skipped-onboarding-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.skipped-onboarding-head p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.skipped-onboarding-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-muted);
}

.skipped-onboarding-list {
  display: grid;
  gap: 10px;
  padding: 18px 22px;
}

.skipped-onboarding-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.skipped-onboarding-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
}

.skipped-onboarding-item strong,
.skipped-onboarding-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skipped-onboarding-item strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.skipped-onboarding-item small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.skipped-onboarding-item button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.skipped-onboarding-foot {
  align-items: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Onboarding stepper — secondary progress label inside header */
.onboarding-header-progress {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Breach log — severity, containment, countdown, yes/no, data-type chips */
.breach-cell-sub { font-size: 11px; color: #64748b; margin-top: 2px; line-height: 1.4; }
.breach-sev { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.breach-sev-low      { background: #ecfdf5; color: #047857; }
.breach-sev-medium   { background: #fef3c7; color: #92400e; }
.breach-sev-high     { background: #ffedd5; color: #c2410c; }
.breach-sev-critical { background: #fee2e2; color: #b91c1c; }
.breach-sev-na       { background: #f1f5f9; color: #64748b; }

.breach-risk { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.breach-risk-medium { background: #fef3c7; color: #92400e; }
.breach-risk-high { background: #fee2e2; color: #b91c1c; }

.breach-con { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.breach-con-open       { background: #fee2e2; color: #b91c1c; }
.breach-con-contained  { background: #fef3c7; color: #92400e; }
.breach-con-monitoring { background: #e0f2fe; color: #075985; }
.breach-con-closed     { background: #ecfdf5; color: #047857; }

.breach-yn { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.breach-yn small { font-weight: 400; opacity: 0.8; margin-left: 4px; }
.breach-yn-yes { background: #ecfdf5; color: #047857; }
.breach-yn-no  { background: #fef2f2; color: #b91c1c; }

.breach-due { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.breach-due small { font-weight: 400; opacity: 0.85; margin-left: 4px; }
.breach-due-notified { background: #ecfdf5; color: #047857; }
.breach-due-overdue  { background: #fee2e2; color: #b91c1c; }
.breach-due-urgent   { background: #fee2e2; color: #b91c1c; }
.breach-due-warning  { background: #ffedd5; color: #c2410c; }
.breach-due-normal   { background: #f1f5f9; color: #475569; }
.breach-due-na       { background: #f1f5f9; color: #94a3b8; }

.breach-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; color: #334155; font-size: 11px; margin-right: 4px; margin-bottom: 2px; }
.breach-chip-empty { color: #94a3b8; background: transparent; padding: 0; }

.breach-data-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.breach-data-type-pill input { margin: 0; }
.breach-data-type-pill:has(input:checked) {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

/* Audit page — "Fix now →" action buttons on Partial/Missing rows */
.audit-fix-cell { white-space: nowrap; }
.audit-fix-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 12px;
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition: background 120ms ease;
}
.audit-fix-btn:hover { background: #1d4ed8; border-color: #1d4ed8; }
.audit-fix-btn small {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  text-transform: none;
  letter-spacing: 0;
}
.audit-fix-btn-empty { margin-top: 8px; }

.audit-section-cta {
  align-self: flex-start;
  padding: 6px 12px;
  background: transparent;
  color: #2563eb;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.audit-section-cta:hover { background: #eff6ff; border-color: #2563eb; }
.audit-evidence-section .audit-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* Empty-state can now stack text + CTA */
.audit-empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* Audit page — evidence sections (DPO, vendors, training, breach, DPIA, activities, opt-outs) */
.audit-evidence-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}
.audit-evidence-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  break-inside: avoid;
}
.audit-empty-state {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  color: #64748b;
  font-size: 13px;
  font-style: italic;
}

/* Step 8 (final) — Audit Readiness summary grid */
.wizard-final-summary { display: flex; flex-direction: column; gap: 16px; }
.wizard-final-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.wizard-final-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.wizard-final-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}
.wizard-final-card-value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}
.wizard-final-card-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

/* Flatpickr — make disabled (today + future) cells physically unclickable and visibly blurred */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  pointer-events: none;
  opacity: 0.35;
  filter: blur(0.4px);
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  text-decoration: line-through;
}
