/* ═══════════════════════════════════════════════════════════════
   Zorro's Employee Profiles — profiles.css
   Dark premium theme — matches staff/styles.css design tokens
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --card: #1a1a1a;
  --card-hover: #1f1f1f;
  --panel: #222222;
  --border: #2a2a2a;
  --border-light: #333333;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --red-glow: rgba(231,76,60,0.18);
  --gold: #f1c40f;
  --gold-dim: rgba(241,196,15,0.15);
  --blue: #3498db;
  --green: #27ae60;
  --green-bright: #22c55e;
  --purple: #8e44ad;
  --orange: #e67e22;
  --amber: #f59e0b;
  --text: #f0f0f0;
  --text-dim: #aaaaaa;
  --text-muted: #666666;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
  --glass-bg: rgba(26,26,26,0.7);
  --glass-border: rgba(255,255,255,0.06);
  --glass-blur: blur(16px);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ── Top Bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-left { flex: 0 0 auto; }
.topbar-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; }
.topbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-z {
  width: 34px;
  height: 34px;
  background: var(--red-bright);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}
.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13px;
}

.live-clock {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  font-family: 'SF Mono', 'Courier New', monospace;
}

.btn-icon-link {
  color: var(--text-muted);
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.btn-icon-link:hover { color: var(--gold); background: var(--gold-dim); }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   PAGE CONTENT
═══════════════════════════════════════════════════════════ */
.page-content {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════════════════ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-icon.employees { background: rgba(52,152,219,0.15); color: var(--blue); }
.stat-icon.affiliates { background: rgba(142,68,173,0.15); color: var(--purple); }
.stat-icon.pending { background: rgba(245,158,11,0.15); color: var(--amber); }
.stat-icon.active { background: rgba(34,197,94,0.15); color: var(--green-bright); }

.stat-info { flex: 1; }
.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   ENROLLMENT CONTROL PANEL
═══════════════════════════════════════════════════════════ */
.enrollment-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  transition: var(--transition);
}
.enrollment-panel.enabled {
  border-color: rgba(34,197,94,0.3);
  background: linear-gradient(135deg, rgba(34,197,94,0.04) 0%, var(--glass-bg) 100%);
}
.enrollment-panel.disabled {
  border-color: rgba(245,158,11,0.2);
}

.enrollment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.enrollment-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.enrollment-title i {
  font-size: 18px;
  color: var(--amber);
}
.enrollment-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.enrollment-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.enrollment-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.enrollment-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.enrollment-message {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.enrollment-message.warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--amber);
}
.enrollment-message.success {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  color: var(--green-bright);
}

/* ═══════════════════════════════════════════════════════════
   TOOLBAR / SEARCH / FILTER
═══════════════════════════════════════════════════════════ */
.profiles-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label i { color: var(--red-bright); }

.search-box {
  position: relative;
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 34px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  width: 240px;
  transition: var(--transition);
}
.search-input:focus {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(231,76,60,0.15);
}
.search-input::placeholder { color: var(--text-muted); }

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--panel);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--border); }
.tab-btn.active {
  background: var(--red-bright);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(231,76,60,0.35);
}
.tab-btn i { font-size: 12px; }

/* ═══════════════════════════════════════════════════════════
   PROFILE CARDS GRID
═══════════════════════════════════════════════════════════ */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.profile-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: default;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-bright), var(--amber));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.profile-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.profile-card:hover::before { opacity: 1; }

.profile-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.profile-card-info {
  flex: 1;
  min-width: 0;
}
.profile-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.profile-card-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 2px;
}

.profile-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Employment type badges */
.badge-employee { background: rgba(52,152,219,0.15); color: #5dade2; }
.badge-affiliate { background: rgba(142,68,173,0.15); color: #bb8fce; }
.badge-contractor { background: rgba(230,126,34,0.15); color: #e67e22; }

/* Enrollment status badges */
.badge-pending { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge-invited { background: rgba(52,152,219,0.15); color: var(--blue); }
.badge-enrolled { background: rgba(142,68,173,0.15); color: var(--purple); }
.badge-active { background: rgba(34,197,94,0.15); color: var(--green-bright); }
.badge-inactive { background: rgba(102,102,102,0.15); color: #999; }

.profile-card-phone {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}
.profile-card-phone i { font-size: 12px; color: var(--text-muted); }

/* Clearance badges row */
.profile-card-clearances {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.clearance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.clearance-badge.granted {
  background: rgba(34,197,94,0.1);
  color: var(--green-bright);
  border-color: rgba(34,197,94,0.2);
}
.clearance-badge i { font-size: 8px; }

.profile-card-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS (matches existing)
═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--red-bright);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--red); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(231,76,60,0.4); }
.btn-primary:disabled, .btn-primary.locked {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(192,57,43,0.15);
  color: var(--red-bright);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger:hover { background: rgba(192,57,43,0.3); }

.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(34,197,94,0.15);
  color: var(--green-bright);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }

.btn-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--red-bright); color: var(--red-bright); background: var(--red-glow); }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.18s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalSlideIn {
  from { transform: translateY(30px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--red-bright); border-color: var(--red-bright); }

.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Section Tabs inside modal ──────────────────────────── */
.section-tabs {
  display: flex;
  gap: 4px;
  background: var(--panel);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.section-tab {
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-tab:hover { color: var(--text); background: var(--border); }
.section-tab.active {
  background: var(--red-bright);
  color: #fff;
  font-weight: 600;
}
.section-tab i { font-size: 11px; }

.section-panel { display: none; }
.section-panel.active { display: block; }

/* ── Form elements ────────────────────────────────────────── */
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.form-group label .hint {
  font-size: 11px;
  font-weight: 400;
  color: #555;
  text-transform: none;
  letter-spacing: 0;
}
.form-row {
  display: flex;
  gap: 14px;
}
.form-control {
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: var(--transition);
  color-scheme: dark;
}
.form-control:focus { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }
.form-control option { background: var(--panel); color: var(--text); }
textarea.form-control { resize: vertical; line-height: 1.5; }

.form-control:disabled, .form-control.readonly {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Sensitive Field ─────────────────────────────────────── */
.sensitive-field {
  position: relative;
}
.sensitive-field .form-control {
  padding-right: 80px;
  font-family: 'SF Mono', 'Courier New', monospace;
  letter-spacing: 1px;
}
.sensitive-field .reveal-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 10px;
  background: var(--border);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.sensitive-field .reveal-btn:hover {
  background: rgba(231,76,60,0.15);
  color: var(--red-bright);
  border-color: rgba(231,76,60,0.3);
}

.sensitive-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--amber);
  margin-bottom: 16px;
}
.sensitive-warning i { font-size: 14px; flex-shrink: 0; }

/* ── Toggle Switch ────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-light);
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green-bright); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Clearance toggle row */
.clearance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}
.clearance-row:hover { border-color: var(--border-light); }
.clearance-info {
  flex: 1;
}
.clearance-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.clearance-label i {
  font-size: 12px;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
}
.clearance-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  padding-left: 26px;
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════ */
.profiles-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
}
.profiles-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 14px;
  color: var(--border-light);
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  pointer-events: all;
  animation: toastIn 0.25s ease;
  max-width: 360px;
}
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast.fadeout { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut {
  to { transform: translateX(20px); opacity: 0; }
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red-bright); }
.toast.info    { border-left: 3px solid var(--blue); }
.toast i { font-size: 15px; }
.toast.success i { color: var(--green); }
.toast.error   i { color: var(--red-bright); }
.toast.info    i { color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   LOADING OVERLAY
═══════════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--red-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-ring.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   ADD PROFILE BUTTONS AREA
═══════════════════════════════════════════════════════════ */
.add-profile-area {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topbar { padding: 0 14px; height: 54px; }
  .page-content { padding: 14px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profiles-grid { grid-template-columns: 1fr; }
  .profiles-toolbar { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }
  .enrollment-header { flex-direction: column; align-items: flex-start; }
  .form-row { flex-direction: column; }
  .modal-sheet { max-height: 95vh; border-radius: var(--radius-lg); }
  .section-tabs { flex-wrap: nowrap; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .add-profile-area { flex-direction: column; }
  .toast-container { bottom: 12px; right: 12px; left: 12px; }
  .tab-nav { overflow-x: auto; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .stat-card { padding: 14px 16px; }
  .stat-number { font-size: 22px; }
  .profile-card { padding: 16px; }
  .enrollment-controls { flex-direction: column; align-items: flex-start; }
}
