/* ============================================================
   White Pigeon CRM — Master Stylesheet
   ============================================================ */

/* ── CSS Variables (Light Mode) ─────────────────────────── */
:root {
  --primary:        #1a3a5c;
  --primary-light:  #2557a7;
  --primary-dark:   #0f2540;
  --accent:         #e8a020;
  --accent-light:   #fef3dc;
  --success:        #16a34a;
  --success-light:  #dcfce7;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --warning:        #d97706;
  --warning-light:  #fef3c7;
  --purple:         #7c3aed;
  --purple-light:   #ede9fe;
  --teal:           #0d9488;
  --teal-light:     #ccfbf1;
  --info:           #0ea5e9;
  --info-light:     #e0f2fe;

  --bg:             #f4f6fa;
  --surface:        #ffffff;
  --surface2:       #f8f9fc;
  --surface3:       #f0f2f8;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;
  --text:           #0f172a;
  --text2:          #475569;
  --text3:          #94a3b8;
  --text-inv:       #ffffff;

  --sidebar-bg:     #0f172a;
  --sidebar-hover:  rgba(255,255,255,0.08);
  --sidebar-active: rgba(255,255,255,0.15);
  --sidebar-text:   rgba(255,255,255,0.7);
  --sidebar-text2:  rgba(255,255,255,0.4);
  --sidebar-border: rgba(255,255,255,0.1);

  --sidebar-w:      260px;
  --topbar-h:       60px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.06);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.08);
  --transition:     0.18s ease;
}

/* ── Dark Mode ───────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:             #0d1117;
  --surface:        #161b22;
  --surface2:       #1f2937;
  --surface3:       #111827;
  --border:         #30363d;
  --border-strong:  #3d4450;
  --text:           #e6edf3;
  --text2:          #8b949e;
  --text3:          #6e7681;
  --primary:        #2563eb;
  --accent-light:   rgba(232,160,32,0.15);
  --success-light:  rgba(22,163,74,0.15);
  --danger-light:   rgba(220,38,38,0.15);
  --warning-light:  rgba(217,119,6,0.15);
  --purple-light:   rgba(124,58,237,0.15);
  --teal-light:     rgba(13,148,136,0.15);
  --info-light:     rgba(14,165,233,0.15);
  --shadow:         0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
  --shadow-md:      0 4px 16px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.2);
}

[data-theme="dark"] .sidebar-toggle svg,
[data-theme="dark"] .topbar-title { color: var(--text); }

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
svg { display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

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

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sb-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sb-logo {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 2px;
}
.sb-logo-fallback {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-brand-text { overflow: hidden; }
.sb-name { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .01em; white-space: nowrap; }
.sb-sub  { font-size: 10px; color: var(--sidebar-text2); white-space: nowrap; }

.sb-nav { flex: 1; padding: 10px 8px; }

.nav-section {
  padding: 14px 10px 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--sidebar-text2);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  text-decoration: none;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 700; }
.nav-item-sm { font-size: 12px; padding: 7px 12px; }
.country-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 10px; color: var(--sidebar-text2); }
.sb-logout {
  color: var(--sidebar-text2);
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  display: flex;
  flex-shrink: 0;
}
.sb-logout svg { width: 16px; height: 16px; }
.sb-logout:hover { color: #fc5c5c; background: rgba(252,92,92,.15); text-decoration: none; }

/* ── Main Wrapper ────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.topbar-left  { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text); }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text2); display: none; padding: 6px;
  border-radius: var(--radius-sm);
}
.sidebar-toggle svg { width: 20px; height: 20px; }
.sidebar-toggle:hover { background: var(--surface2); }

.nepal-time {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 20px;
  white-space: nowrap;
}
.nepal-time svg { width: 13px; height: 13px; }
.np-label { font-weight: 700; color: var(--primary); font-size: 10px; }

.theme-toggle {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px;
  cursor: pointer; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

/* ── Page Content ────────────────────────────────────────── */
.page-content {
  padding: 24px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-header-left  { display: flex; flex-direction: column; gap: 2px; }
.page-header-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--text); }
.page-sub   { font-size: 13px; color: var(--text2); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body  { padding: 20px; }
.card-footer{ padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface2); border-radius: 0 0 var(--radius) var(--radius); }

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon { font-size: 22px; margin-bottom: 8px; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 600; color: var(--text); line-height: 1.1; }
.stat-sub   { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: opacity var(--transition), transform .1s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--primary);   color: #fff; }
.btn-accent  { background: var(--accent);    color: #fff; }
.btn-success { background: var(--success);   color: #fff; }
.btn-danger  { background: var(--danger);    color: #fff; }
.btn-warning { background: var(--warning);   color: #fff; }
.btn-ghost   { background: var(--surface2);  color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 7px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--border); color: var(--text2); cursor: pointer; display: inline-flex; align-items: center; }
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { background: var(--border); }
.btn-icon-danger:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--text2);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 9px 13px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,87,167,.12);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control::placeholder { color: var(--text3); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-grid { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.form-section-title {
  font-size: 12px; font-weight: 700;
  color: var(--text2);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}
.form-section-title svg { width: 14px; height: 14px; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); cursor: pointer; }
tbody tr:hover td { background: var(--surface2); }
.td-nowrap { white-space: nowrap; }
.td-truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Badges & Pills ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .03em; white-space: nowrap;
}
.badge-primary { background: var(--info-light);    color: var(--info); }
.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-purple  { background: var(--purple-light);  color: var(--purple); }
.badge-teal    { background: var(--teal-light);    color: var(--teal); }
.badge-gray    { background: var(--surface3);      color: var(--text2); }
.badge-accent  { background: var(--accent-light);  color: var(--accent); }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.name-cell { display: flex; align-items: center; gap: 10px; }

/* ── Progress Bar ────────────────────────────────────────── */
.progress-wrap { width: 100%; }
.progress-bar-bg {
  height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width .4s ease;
}
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-bottom: 4px; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.tab-btn {
  padding: 10px 16px; border: none; background: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--text2);
  cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tab-btn svg { width: 14px; height: 14px; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-height: 92vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(-10px); } to { opacity:1; transform:none; } }
.modal-sm  { max-width: 420px; }
.modal-md  { max-width: 600px; }
.modal-lg  { max-width: 860px; }
.modal-xl  { max-width: 1100px; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-body   { padding: 20px 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--surface2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text3);
  padding: 4px; border-radius: 6px; display: flex;
  transition: background var(--transition), color var(--transition);
}
.modal-close svg { width: 20px; height: 20px; }
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

/* ── Toast Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: var(--shadow-lg); min-width: 220px;
  animation: toastIn .28s ease;
  display: flex; align-items: center; gap: 8px;
}
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:none; } }
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--primary); }
.toast-warning { background: var(--warning); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Search & Filter Bar ─────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; margin-bottom: 16px;
}
.search-box {
  position: relative; flex: 1; min-width: 180px;
}
.search-box input {
  padding-left: 36px; height: 38px;
  font-size: 13px; border-radius: 20px;
  width: 100%;
}
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text3);
}
.filter-select {
  height: 38px; font-size: 13px;
  border-radius: 20px; padding: 0 30px 0 12px;
  min-width: 130px; width: auto;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text3);
}
.empty-state-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: var(--surface2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.empty-state-icon svg { width: 28px; height: 28px; color: var(--text3); }
.empty-state h3 { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; }

/* ── Checklist ───────────────────────────────────────────── */
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: var(--surface2); }
.check-box {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
  cursor: pointer;
}
.check-box.checked { border-color: var(--success); background: var(--success); }
.check-box svg { width: 12px; height: 12px; color: #fff; }
.checklist-item.done .check-label { color: var(--text3); text-decoration: line-through; }

/* ── Visa Stage Tracker ──────────────────────────────────── */
.stage-tracker { display: flex; flex-direction: column; gap: 0; }
.stage-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0; position: relative;
}
.stage-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  flex-shrink: 0; z-index: 1; position: relative;
  background: var(--border-strong);
}
.stage-dot.done   { background: var(--success); }
.stage-dot.active { background: var(--primary); box-shadow: 0 0 0 3px rgba(37,87,167,.25); }
.stage-line {
  position: absolute; left: 11px; top: 30px;
  width: 2px; height: calc(100% + 10px);
  background: var(--border);
  z-index: 0;
}
.stage-line.done { background: var(--success); }
.stage-label {
  font-size: 13px; padding-top: 2px;
  transition: color var(--transition);
}
.stage-label.done   { color: var(--success); font-weight: 600; }
.stage-label.active { color: var(--primary); font-weight: 700; }
.stage-label.pending{ color: var(--text3); }

/* ── Country / University Card ───────────────────────────── */
.country-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative; overflow: hidden;
}
.country-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.country-card-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; }

.uni-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.uni-card:hover { box-shadow: var(--shadow-md); }
.uni-card-header { padding: 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
.uni-logo { width: 50px; height: 50px; border-radius: 10px; object-fit: contain; background: var(--surface2); padding: 4px; }
.uni-logo-fallback {
  width: 50px; height: 50px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.uni-card-body { padding: 16px 18px; }

/* ── Profile Layout ──────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-sidebar > * + * { margin-top: 16px; }
.profile-main > * + * { margin-top: 16px; }

.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.profile-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.profile-card-title { font-size: 14px; font-weight: 700; }
.profile-card-body  { padding: 18px 20px; }

.info-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.info-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; min-width: 110px; flex-shrink: 0; padding-top: 2px; }
.info-value { font-size: 13px; color: var(--text); flex: 1; word-break: break-word; }

/* ── Alert Boxes ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--info-light);    color: var(--info);    border: 1px solid rgba(14,165,233,.25); }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(22,163,74,.25); }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(217,119,6,.25); }
.alert-danger  { background: var(--danger-light);  color: var(--danger);  border: 1px solid rgba(220,38,38,.25); }

/* ── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── File Upload ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text2);
}
.upload-zone:hover { border-color: var(--primary); background: var(--surface2); }
.upload-zone svg { width: 32px; height: 32px; margin: 0 auto 8px; color: var(--text3); }
.upload-zone p { font-size: 13px; }
.upload-zone strong { color: var(--primary); }

/* ── Photo Grid ──────────────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.photo-thumb {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,38,38,.85); color: #fff;
  border: none; border-radius: 4px; padding: 2px 5px;
  font-size: 11px; cursor: pointer; display: none;
}
.photo-thumb:hover .photo-thumb-del { display: block; }

/* ── Credential Row ──────────────────────────────────────── */
.cred-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cred-row:last-child { border-bottom: none; }
.cred-type { font-size: 12px; font-weight: 700; color: var(--text2); min-width: 140px; }
.cred-val  { font-size: 13px; color: var(--text); font-family: monospace; flex: 1; }

/* ── Destination Tags ────────────────────────────────────── */
.dest-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dest-tag {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  background: var(--surface2); color: var(--text2);
  transition: all .15s;
}
.dest-tag.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.dest-tag.primary  { border-color: var(--accent); }

/* ── English Test Section ────────────────────────────────── */
.test-toggle { display: flex; gap: 6px; }
.test-toggle-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--text2); cursor: pointer;
  transition: all .15s;
}
.test-toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Course Result Card ──────────────────────────────────── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.result-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.result-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.result-uni  { font-size: 12px; color: var(--text2); margin-bottom: 2px; }
.result-course { font-size: 15px; font-weight: 700; color: var(--text); }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .profile-layout { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .nepal-time span:not(.np-label) { display: none; }
}

@media (max-width: 600px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .modal { margin: 0 10px; }
  .tabs { padding-bottom: 4px; }
}

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1a3a5c 60%, #2557a7 100%);
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 80px; height: 80px; border-radius: 50%; }
.login-logo h2 { margin-top: 12px; font-size: 20px; font-weight: 800; }
.login-logo p  { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ── Sidebar Overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.5);
}
@media (max-width: 900px) {
  .sidebar.open + .main-wrapper .sidebar-overlay { display: block; }
  .sidebar-overlay.show { display: block; }
}

/* ── Country Hero ────────────────────────────────────────── */
.country-hero {
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 20px;
  border: 1px solid var(--border);
}
.country-hero-name { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 600; }
.country-hero-meta { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* ── Scrollbar in modal ──────────────────────────────────── */
.modal::-webkit-scrollbar { width: 4px; }

/* ── Utils ───────────────────────────────────────────────── */
.text-muted    { color: var(--text3) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.text-warning  { color: var(--warning) !important; }
.fw-700        { font-weight: 700 !important; }
.fs-12         { font-size: 12px !important; }
.fs-13         { font-size: 13px !important; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
