/* ============================================================
   ClientFlow CRM v2 — Stylesheet
   Clean, modern, professional design
   ============================================================ */

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  --radius: 10px;
  --sidebar-w: 248px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-brand {
  padding: 22px 24px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .logo {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14.5px; font-weight: 500;
  color: #94a3b8;
  transition: all 0.15s;
  margin-bottom: 4px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #64748b;
}

.main { margin-left: var(--sidebar-w); flex: 1; padding: 32px 40px; max-width: 100%; }

/* ---------- Page header ---------- */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-title { font-size: 26px; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon {
  padding: 8px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-icon svg { width: 17px; height: 17px; }

/* ---------- Stat cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.pink   { background: #fce7f3; color: #db2777; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 2px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.panel-title { font-size: 16px; font-weight: 600; }
.panel-body { padding: 22px; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; margin-bottom: 20px;
}
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted);
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); transition: border 0.15s;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
select.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); cursor: pointer; color: var(--text);
}
select.filter-select:focus { outline: none; border-color: var(--primary); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 13px 22px;
  font-weight: 600; color: var(--text-muted);
  font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
td { padding: 14px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s; cursor: pointer; }
tbody tr:hover { background: #f8fafc; }
.client-cell { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; flex-shrink: 0; text-transform: uppercase;
}
.client-name { font-weight: 600; }
.client-company { font-size: 12.5px; color: var(--text-muted); }
.value-cell { font-weight: 600; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 4px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
/* Client statuses */
.badge-active         { background: #dcfce7; color: #16a34a; }
.badge-lead           { background: #dbeafe; color: #2563eb; }
.badge-prospect       { background: #fef3c7; color: #b45309; }
.badge-email_contact  { background: #e0e7ff; color: #4f46e5; }
.badge-call           { background: #dbeafe; color: #2563eb; }
.badge-telephone      { background: #cffafe; color: #0891b2; }
.badge-no_contact     { background: #f1f5f9; color: #64748b; }
.badge-not_interested { background: #fee2e2; color: #dc2626; }
/* Staff statuses */
.badge-onboarding        { background: #dbeafe; color: #2563eb; }
.badge-visa_pending      { background: #fef3c7; color: #b45309; }
.badge-document_review   { background: #ede9fe; color: #7c3aed; }
.badge-arrived           { background: #dcfce7; color: #16a34a; }
.badge-inactive          { background: #f1f5f9; color: #64748b; }
/* Pipeline stages */
.badge-new_lead          { background: #e0e7ff; color: #4f46e5; }
.badge-qualified         { background: #dbeafe; color: #2563eb; }
.badge-proposal_sent     { background: #fef3c7; color: #b45309; }
.badge-negotiation       { background: #fce7f3; color: #db2777; }
.badge-won              { background: #dcfce7; color: #16a34a; }
.badge-lost              { background: #fee2e2; color: #dc2626; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay:empty { display: none; }
.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full, .form-group-full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: var(--text); }
input, textarea, select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: border 0.15s; width: 100%;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ---------- Detail view ---------- */
.detail-header { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.detail-avatar { width: 56px; height: 56px; font-size: 20px; }
.detail-info h2 { font-size: 22px; margin-bottom: 4px; }
.detail-info .company { color: var(--text-muted); margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.detail-item .label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 4px;
}
.detail-item .value { font-size: 15px; font-weight: 500; }

/* ---------- Interaction timeline ---------- */
.interaction-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.interaction-item:last-child { border-bottom: none; }
.interaction-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.interaction-icon.call { background: #dbeafe; }
.interaction-icon.email { background: #ede9fe; }
.interaction-icon.meeting { background: #fef3c7; }
.interaction-icon.other { background: #f1f5f9; }
.interaction-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.interaction-meta .type { font-weight: 600; text-transform: capitalize; color: var(--text); }
.interaction-content { font-size: 14px; }

/* ---------- File list ---------- */
.file-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.15s;
}
.file-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.file-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: #fee2e2;
  color: #dc2626;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- Upload area ---------- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 16px;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-area svg { width: 36px; height: 36px; color: var(--text-muted); margin-bottom: 8px; }
.upload-area .upload-text { font-weight: 600; font-size: 14px; }
.upload-area .upload-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.upload-area input[type="file"] { display: none; }
.file-progress {
  display: none; margin-top: 12px; height: 6px;
  background: var(--border); border-radius: 3px; overflow: hidden;
}
.file-progress.show { display: block; }
.file-progress-bar { height: 100%; background: var(--primary); width: 0; transition: width 0.3s; }

/* ---------- Stats breakdown ---------- */
.stat-breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.stat-breakdown-row:last-child { border-bottom: none; }
.stat-breakdown-label { text-transform: capitalize; font-weight: 500; }
.stat-breakdown-value { font-weight: 700; font-size: 16px; }
.stat-bar {
  width: 100%; height: 8px; background: var(--bg); border-radius: 4px; margin-top: 6px; overflow: hidden;
}
.stat-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.4s; }

/* ---------- Conversion rate ring ---------- */
.conversion-rate {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.conversion-rate-value { font-size: 42px; font-weight: 800; color: var(--primary); }
.conversion-rate-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Two-column grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text); color: #fff;
  padding: 13px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px); opacity: 0;
  transition: all 0.25s;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- Spinner ---------- */
.spinner {
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 32px; height: 32px;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- PDF viewer modal (larger) ---------- */
.modal.modal-lg { max-width: 900px; }
.pdf-iframe { width: 100%; height: 65vh; border: 1px solid var(--border); border-radius: 8px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar-nav { display: flex; gap: 4px; padding: 8px; flex: 1; }
  .nav-item { margin-bottom: 0; white-space: nowrap; }
  .nav-badge { display: none; }
  .sidebar-footer { display: none; }
  .main { margin-left: 0; padding: 20px; }
  .form-grid, .detail-grid, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   v2 — Additional styles for detail views and components
   ============================================================ */
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-info { background: #3b82f6; color: #fff; }
.btn-info:hover { background: #2563eb; }

/* Client/staff detail */
.client-detail { padding: 4px 0; }
.info-item { margin-bottom: 14px; }
.info-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.info-value { font-size: 15px; color: var(--text); font-weight: 500; }

/* Empty state box (large) */
.empty-state-box { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-box h3 { font-size: 18px; margin-bottom: 6px; color: var(--text); }
.empty-state-box p { font-size: 14px; }

/* Error box */
.error-box { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 12px; padding: 20px; font-size: 14px; }

/* Drag-over state for upload area */
.upload-area.drag-over { border-color: var(--primary); background: var(--primary)10; }

/* Toolbar (search + filter) */
.toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); }
.search-input:focus { outline: none; border-color: var(--primary); }
.filter-select { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text); cursor: pointer; min-width: 160px; }
.filter-select:focus { outline: none; border-color: var(--primary); }

/* Modal header h2 */
.modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--surface-hover); color: var(--text); }

/* Actions column */
td.actions, th.actions { white-space: nowrap; text-align: right; }
.btn-sm.btn-danger, .btn-sm.btn-info { color: #fff; }

/* Empty state text */
.empty-state { text-align: center; padding: 24px; color: var(--text-muted); font-size: 14px; }

/* ============================================================
   v3 — Login page, sidebar user, logout, export buttons
   ============================================================ */

/* ---------- Login page ---------- */
.login-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand .logo {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
}
.login-brand h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.login-brand p { font-size: 13.5px; color: var(--text-muted); }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.login-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}
.login-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.login-error {
  min-height: 20px;
  font-size: 13.5px;
  color: var(--danger);
  text-align: center;
  margin-bottom: 6px;
}
.btn-block { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; }
.login-hint { margin-top: 20px; text-align: center; padding: 12px; background: var(--primary-light); border-radius: 8px; }
.login-hint p { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.login-hint strong { color: var(--primary); }
.login-footer { margin-top: 24px; font-size: 12px; color: rgba(255,255,255,0.4); }

/* ---------- Sidebar user section ---------- */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  margin: 0 12px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11.5px; color: #94a3b8; text-transform: capitalize; }

/* ---------- Logout button ---------- */
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 8px; }
.logout-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.logout-btn:hover { background: rgba(239,68,68,0.25); color: #fff; }
.logout-btn svg { width: 16px; height: 16px; }
.version-label { font-size: 11.5px; color: #64748b; }

/* ---------- Export buttons in toolbar ---------- */
.export-btns { display: flex; gap: 8px; }
.btn-export {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: all 0.15s;
}
.btn-export:hover { background: var(--surface-hover); border-color: var(--primary); color: var(--primary); }
.btn-export svg { width: 16px; height: 16px; }

/* ---------- Sidebar user clickable (profile) ---------- */
.sidebar-user {
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-user:hover {
  background: rgba(255,255,255,0.1);
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
}

/* Profile summary card (left) */
.profile-summary-card {
  text-align: center;
  padding: 32px 24px;
}
.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.profile-summary-info {
  margin-top: 24px;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.profile-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.profile-summary-row:last-child { border-bottom: none; }

/* Profile form panel (right) */
.profile-form-panel {
  padding: 0;
}
.profile-form-panel .panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
#profile-form {
  padding: 24px;
}
.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}
.profile-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

