/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #1a3a6b;
  --brand-600: #152f58;
  --brand-700: #0f2340;
  --brand-800: #091828;
  --brand-900: #050e18;

  --accent:    #f59e0b;
  --accent-hover: #d97706;

  --green-50:  #f0fdf4;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;

  --amber-50:  #fffbeb;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --red-50:   #fef2f2;
  --red-500:  #ef4444;
  --red-600:  #dc2626;

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

  --sidebar-w: 256px;
  --topbar-h:  60px;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 2px 8px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--cloud-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--brand-600); text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img, svg { display: block; }

/* ── Auth Layout ────────────────────────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-logo { flex-shrink: 0; }
.auth-title { font-size: 1.25rem; font-weight: 700; color: var(--brand-500); line-height: 1.2; }
.auth-subtitle { font-size: 0.8rem; color: var(--gray-500); }
.auth-heading { font-size: 1.3rem; font-weight: 600; color: var(--gray-900); margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-link { text-align: center; color: var(--gray-500); font-size: 0.875rem; margin-top: 20px; }
.auth-link a { color: var(--brand-500); font-weight: 500; }

/* ── App Shell ──────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--brand-700);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.brand-sub  { font-size: 0.72rem; color: rgba(255,255,255,.5); letter-spacing: .04em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255,255,255,.15); color: #fff; }
.nav-item svg { flex-shrink: 0; opacity: .8; }
.nav-item.active svg { opacity: 1; }
.nav-divider { height: 1px; background: rgba(255,255,255,.08); margin: 6px 4px; }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-avatar.sm { width: 28px; height: 28px; font-size: 0.75rem; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name  { font-size: 0.8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.7rem; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.btn-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

.sidebar-overlay { display: none; }

/* ── Main ──────────────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  transition: background .15s;
}
.topbar-menu-btn:hover { background: var(--gray-100); }
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--gray-900); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-username { font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }

.content { flex: 1; padding: 28px 28px 40px; max-width: 1200px; width: 100%; }

/* ── Page Header ────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); }
.page-desc  { font-size: 0.875rem; color: var(--gray-500); margin-top: 3px; }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Stat Cards ─────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.blue  { background: var(--brand-50);  color: var(--brand-500); }
.stat-icon.amber { background: var(--amber-50);  color: var(--amber-600); }
.stat-icon.green { background: var(--green-50);  color: var(--green-600); }
.stat-info  { display: flex; flex-direction: column; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }

/* ── Section Card ───────────────────────────────────────────────────────────── */
.section-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.section-card.no-padding { padding: 0; overflow: hidden; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 0.95rem; font-weight: 600; color: var(--gray-900); }
.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* ── Doc List ───────────────────────────────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 1px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.doc-item:last-child { border-bottom: none; }
.doc-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-500);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-icon.sm { width: 28px; height: 28px; }
.doc-icon.green { background: var(--green-50); color: var(--green-600); }
.doc-info { flex: 1; min-width: 0; }
.doc-title { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta  { display: block; font-size: 0.78rem; color: var(--gray-400); margin-top: 2px; }

/* ── Data Table ─────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--gray-200);
}
.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.table-doc-name { display: flex; align-items: center; gap: 10px; }
.table-actions  { display: flex; align-items: center; gap: 6px; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--brand-500);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background .15s, transform .1s;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--brand-600); color: #fff; text-decoration: none; }
.btn-primary:active { transform: scale(.98); }
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); text-decoration: none; color: var(--gray-800); }

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--gray-200); text-decoration: none; color: var(--gray-800); }
.btn-sm-primary, .btn-primary-sm {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
}
.btn-primary-sm:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-danger-sm {
  background: var(--red-50);
  color: var(--red-600);
  border-color: #fecaca;
}
.btn-danger-sm:hover { background: #fee2e2; color: var(--red-600); }
.btn-sign { padding: 12px 24px; font-size: 1rem; width: 100%; justify-content: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: var(--green-50); color: var(--green-700); }
.badge-amber  { background: var(--amber-50); color: var(--amber-600); }
.badge-blue   { background: var(--brand-50); color: var(--brand-500); }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: var(--red-50);   color: var(--red-600);   border: 1px solid #fecaca; }
.alert-success { background: var(--green-50); color: var(--green-700); border: 1px solid #bbf7d0; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label  { font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }
.form-input  {
  padding: 9px 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-input:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint  { font-size: 0.78rem; color: var(--gray-400); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }
.required { color: var(--red-500); }
.optional { color: var(--gray-400); font-size: 0.8em; }
.mb-3 { margin-bottom: 12px; }

.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 42px; }
.btn-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  transition: color .15s;
  padding: 4px;
}
.btn-toggle-pw:hover { color: var(--gray-600); }

/* ── Upload Dropzone ────────────────────────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--gray-500);
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--brand-400);
  background: var(--brand-50);
  color: var(--brand-600);
}
.dropzone-text { font-size: 0.9rem; font-weight: 500; margin-top: 10px; }
.dropzone-hint { font-size: 0.8rem; color: var(--gray-400); margin-top: 4px; }
.dropzone-selected {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--green-700);
  font-size: 0.875rem;
  font-weight: 500;
  justify-content: center;
}
.upload-dropzone svg { margin: 0 auto; }

/* ── Sign Layout ────────────────────────────────────────────────────────────── */
.sign-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
.sign-preview-panel, .sign-form-panel { min-width: 0; }
.pdf-preview-wrap { padding: 16px 16px 8px; }
.pdf-scroll-wrap { overflow-x: auto; }
.pdf-drag-area { position: relative; width: 794px; background: var(--gray-100); min-height: 200px; }
.pdf-drag-area canvas { display: block; width: 794px; }
.pdf-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 0.85rem; }
.pdf-iframe { display: block; width: 794px; height: 560px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }
.pdf-iframe.tall { height: 700px; border: none; border-radius: 0; width: 100%; }
.pdf-hint { font-size: 0.78rem; color: var(--gray-400); margin-top: 8px; }

.sig-placeholder { position: absolute; pointer-events: none; border: 2px dashed var(--brand-500); background: rgba(37, 99, 235, 0.08); border-radius: 4px; align-items: center; justify-content: center; }
.sig-placeholder-inner { font-size: 0.7rem; color: var(--brand-500); font-weight: 600; text-align: center; padding: 4px; }
/* Unlocked/draggable state gets a pulsing outline so it's obvious, at a
   glance and without hovering, that the box can be dragged right now
   (matches PATRA-MAILER's e-sign editor "editing mode" affordance). */
.sig-placeholder.draggable { pointer-events: auto; cursor: move; touch-action: none; background: rgba(37, 99, 235, 0.15); z-index: 5; outline: 2px dashed var(--brand-500); outline-offset: 3px; animation: sigEditingPulse 1.6s ease-in-out infinite; }
.sig-placeholder.draggable:active { background: rgba(37, 99, 235, 0.25); }
@keyframes sigEditingPulse { 0%, 100% { outline-color: var(--brand-500); } 50% { outline-color: #5b9bf0; } }

.step-indicator { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.step-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--gray-400); }
.step-item.active { color: var(--brand-500); font-weight: 600; }
.step-item.done { color: var(--green-700); }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
.step-item.active .step-num { background: var(--brand-500); color: #fff; }
.step-item.done .step-num { background: var(--green-50); color: var(--green-700); }
.step-line { flex: 0 0 40px; height: 1px; background: var(--gray-200); }
.locked-position-card { background: var(--green-50); border-color: var(--green-700); margin-bottom: 16px; }

/* ── Canvas ─────────────────────────────────────────────────────────────────── */
.canvas-wrap {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fafafa;
  cursor: crosshair;
}
.canvas-wrap canvas { display: block; width: 100%; touch-action: none; }
.canvas-tabs { display: flex; gap: 4px; margin-top: 8px; }
.canvas-tab {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  transition: background .15s, color .15s;
}
.canvas-tab.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.canvas-tab:hover:not(.active) { background: var(--gray-200); }

.font-select-row { display: flex; gap: 6px; margin-top: 8px; }
.font-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  transition: background .15s;
}
.font-btn.active { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-200); }

/* ── Range Slider ───────────────────────────────────────────────────────────── */
.position-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.form-grid .btn-primary { grid-column: 1 / -1; justify-self: start; }
.hidden { display: none !important; }
.range-input { width: 100%; accent-color: var(--brand-500); cursor: pointer; }
.range-val { font-size: 0.78rem; color: var(--gray-500); font-family: 'DM Mono', monospace; }

/* ── Detail Layout ──────────────────────────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.detail-preview, .detail-info { min-width: 0; }

/* ── Info List ──────────────────────────────────────────────────────────────── */
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-row  { display: flex; gap: 12px; align-items: flex-start; }
.info-row.vertical { flex-direction: column; }
.info-label { font-size: 0.8rem; color: var(--gray-500); min-width: 120px; flex-shrink: 0; padding-top: 1px; }
.info-value { font-size: 0.875rem; color: var(--gray-800); }
.divider { height: 1px; background: var(--gray-200); margin: 16px 0; }
.subsection-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }

/* ── Signature Preview ──────────────────────────────────────────────────────── */
.sig-preview-box {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: #fafafa;
  max-width: 200px;
}
.sig-preview-img { max-width: 100%; max-height: 70px; object-fit: contain; }

/* ── Verify Block ───────────────────────────────────────────────────────────── */
.verify-block { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.verify-code {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-500);
  background: var(--brand-50);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: .12em;
  border: 1px solid var(--brand-200);
}
.qr-code-img { width: 90px; height: 90px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }

/* ── Verify Page ────────────────────────────────────────────────────────────── */
.verify-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
}
.verify-result { text-align: center; padding: 20px 0; }
.verify-result svg { margin: 0 auto 14px; }
.verify-result h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.verify-result p  { color: var(--gray-500); font-size: 0.9rem; }
.verify-result.valid   svg, .verify-result.valid   h2 { color: var(--green-600); }
.verify-result.invalid svg, .verify-result.invalid h2 { color: var(--red-500); }
.verify-details { border-top: 1px solid var(--gray-200); margin-top: 20px; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }

/* ── Profile ────────────────────────────────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.profile-card { text-align: center; }
.profile-avatar-big {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--brand-500);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.profile-name  { font-size: 1rem; font-weight: 600; color: var(--gray-900); }
.profile-email { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }
.profile-joined, .profile-last-login { font-size: 0.78rem; color: var(--gray-400); margin-top: 6px; }

/* ── Empty State ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}
.empty-state svg { margin: 0 auto 16px; }
.empty-state h3  { font-size: 1rem; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p   { font-size: 0.875rem; }

/* ── Spinner ────────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.fw-medium  { font-weight: 500; }
.fw-bold    { font-weight: 700; }
.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-muted { color: var(--gray-500); }
.mono       { font-family: 'DM Mono', monospace; }
.link-secondary { font-size: 0.8rem; color: var(--gray-500); text-decoration: none; }
.link-secondary:hover { color: var(--brand-500); text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sign-layout   { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .content { padding: 20px 16px 32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .position-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card  { padding: 28px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
