/* =====================================   Wakeel — Shared Stylesheet
   Wave 4-B: Premium Portals Redesign
   ============================================ */

/* Brand logo tint — shifts amber logo to match #D94F0C accent with its natural dark gradient */
.brand-logo {
  filter: hue-rotate(-18deg) saturate(1.15) brightness(0.9);
}

/* ── Welcome / Onboarding (new user first login) ── */
.welcome-banner {
  background: linear-gradient(135deg, var(--dark-surface, #1A1611) 0%, #2d1a0a 100%);
  border-radius: 20px; padding: 40px 36px; position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,79,12,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.welcome-banner-inner { position: relative; z-index: 1; }
.welcome-eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.3px; }
.welcome-h1 { font-family: 'Clash Display', sans-serif; font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 10px; letter-spacing: -0.5px; }
.welcome-sub { font-size: 15px; color: rgba(255,255,255,0.55); line-height: 1.6; max-width: 480px; }

.onboarding-steps { display: flex; flex-direction: column; gap: 10px; }
.onboarding-step {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  cursor: pointer; transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.onboarding-step:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateX(4px); border-color: var(--accent); }
.onboarding-step-num {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-family: 'Clash Display', sans-serif; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.onboarding-step-icon { font-size: 22px; flex-shrink: 0; }
.onboarding-step-body { flex: 1; }
.onboarding-step-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.onboarding-step-sub { font-size: 13px; color: var(--muted); }
.onboarding-step-arrow { font-size: 18px; color: var(--muted); transition: color 0.2s, transform 0.2s; }
.onboarding-step:hover .onboarding-step-arrow { color: var(--accent); transform: translateX(4px); }

/* ---------- Design Tokens ---------- */
:root {
  --bg: #F7F5F2;
  --bg2: #EDEBE7;
  --surface: #FFFFFF;
  --surface2: #FAFAF8;
  --border: #E8E3DC;
  --border2: #D5CEC5;
  --ink: #1A1611;
  --ink2: #3D3629;
  --muted: #8C857A;
  --accent: #D94F0C;
  --accent-h: #C04509;
  --accent-light: #FEF0E8;
  --blue: #1847D1;
  --blue-light: #EBF0FD;
  --green: #0A7F53;
  --green-light: #E4F5EE;
  --amber: #C97B06;
  --amber-light: #FEF3C7;
  --purple: #6D28D9;
  --purple-light: #EDE9FE;
  --red: #C81E1E;
  --red-light: #FEF2F2;
  --shadow-xs: 0 1px 3px rgba(26,22,17,0.06);
  --shadow-sm: 0 2px 8px rgba(26,22,17,0.08);
  --shadow: 0 8px 24px rgba(26,22,17,0.10);
  --shadow-lg: 0 20px 60px rgba(26,22,17,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --transition: 0.18s ease;
}

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

body {
  font-family: 'Epilogue', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Clash Display', 'Epilogue', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---------- Toast Notifications ---------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  color: var(--ink);
  padding: 14px 18px 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--green);
  max-width: 380px;
  min-width: 260px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.toast-fade-out {
  opacity: 0;
  transform: translateY(-10px);
}
.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error   { border-left-color: var(--red); }
.toast.toast-info    { border-left-color: var(--accent); }
@media (max-width: 768px) {
  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .toast { max-width: 100%; min-width: 0; }
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 14px;
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--bg2) 25%, #f0ede8 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.w-80  { width: 80%; }
.skeleton-line.w-70  { width: 70%; }
.skeleton-line.w-60  { width: 60%; }
.skeleton-line.w-40  { width: 40%; }
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.skeleton-grid .skeleton-card { margin-bottom: 0; }

/* ---------- Error State ---------- */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.6;
}
.error-state .error-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.error-state .error-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 360px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- Login Screen ---------- */
#login-screen,
#register-screen,
#forgot-screen,
#reset-screen {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 100vh;
}

.login-left {
  background: #18150F;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(217,79,12,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 56px;
  position: relative;
}

.login-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.login-logo-text {
  font-family: 'Clash Display', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.login-logo-text span {
  color: var(--accent);
}

.login-tagline {
  font-family: 'Clash Display', sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
}
.login-tagline em {
  font-style: italic;
  color: #ff8a5b;
}

.login-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  max-width: 360px;
  line-height: 1.6;
  position: relative;
  margin-bottom: 40px;
}

.login-trust {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  position: relative;
}
.login-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.login-trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.login-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.login-stat-val {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.login-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  font-weight: 500;
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
}

.login-form-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-form-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.demo-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.demo-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.demo-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}
.demo-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.demo-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.demo-card-role {
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.demo-card-name {
  font-size: 12px;
  color: var(--ink2);
  font-weight: 500;
}
.demo-card-email {
  font-size: 11px;
  color: var(--muted);
}

.form-divider {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0;
  position: relative;
}
.form-divider::before,
.form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 50px);
  height: 1px;
  background: var(--border);
}
.form-divider::before { left: 0; }
.form-divider::after  { right: 0; }

.login-btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  border: none;
}
.login-btn:hover {
  background: var(--accent-h);
  box-shadow: var(--shadow-sm);
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.error-msg {
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  display: none;
}
.error-msg.show {
  display: block;
}

/* ---------- App Layout ---------- */
#app-screen {
  position: relative;
  min-height: 100vh;
}

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

/* ---------- Sidebar (Dark, Linear-style) ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.logo-text {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.logo-text span {
  color: var(--accent);
}

.sidebar-section {
  padding: 12px 12px 4px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 4px 10px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  line-height: 1.6;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 14px;
  margin-top: auto;
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: var(--accent);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  margin-top: 6px;
}

.logout-btn:hover {
  background: rgba(200,30,30,0.15);
  color: #ff6b6b;
}

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

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  background: none;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}
.topbar-user-btn:hover { background: var(--surface2); }
.topbar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Clash Display', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar-user-name { white-space: nowrap; }

.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Clash Display', sans-serif;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink2);
  position: relative;
  transition: background var(--transition);
}

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

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
}

.role-badge.client {
  background: var(--accent-light);
  color: var(--accent);
}

.role-badge.agent {
  background: var(--blue-light);
  color: var(--blue);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* ---------- Pages ---------- */
.page {
  display: none;
  flex: 1;
}

.page.active {
  display: flex;
  flex-direction: column;
}

.page-body {
  padding: 28px;
  flex: 1;
  overflow-y: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  transition: background var(--transition), box-shadow var(--transition), transform 0.1s ease;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-h);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border2);
}

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

.btn-blue {
  background: var(--blue);
  color: #fff;
}

.btn-blue:hover {
  background: #1339A8;
  box-shadow: var(--shadow-sm);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: #066840;
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--ink2);
}

.btn-ghost:hover {
  background: var(--bg2);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: #A31818;
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-full {
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border2);
}

.card-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

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

.card-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

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

.badge-amber {
  background: var(--amber-light);
  color: var(--amber);
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-purple {
  background: var(--purple-light);
  color: var(--purple);
}

.badge-gray {
  background: var(--bg2);
  color: var(--muted);
}

.badge-red {
  background: var(--red-light);
  color: var(--red);
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink2);
  cursor: pointer;
  transition: all var(--transition);
}

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

.chip.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Stat Grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.85;
}

.stat-card .stat-val,
.stat-card .stat-value {
  font-family: 'Clash Display', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

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

.stat-card .stat-trend {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.stat-card .stat-trend.up {
  color: var(--green);
}

.stat-card .stat-trend.down {
  color: var(--red);
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--muted);
}

.stat-card .stat-sub .up {
  color: var(--green);
  font-weight: 600;
}

.stat-card .stat-sub .down {
  color: var(--red);
  font-weight: 600;
}

/* Colored stat values */
.stat-value.accent, .stat-val.accent { color: var(--accent); }
.stat-value.blue, .stat-val.blue { color: var(--blue); }
.stat-value.green, .stat-val.green { color: var(--green); }
.stat-value.amber, .stat-val.amber { color: var(--amber); }
.stat-value.purple, .stat-val.purple { color: var(--purple); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

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

td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--surface2);
}

/* ---------- Pill Tabs ---------- */
.pill-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border-radius: var(--radius-full);
  padding: 3px;
  width: fit-content;
  margin-bottom: 20px;
}

.pill-tab {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.pill-tab:hover {
  color: var(--ink);
}

.pill-tab.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ---------- Section Header ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

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

/* ---------- Grid Layouts ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.grid-main-rev {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

/* ---------- Flex Utilities ---------- */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* ---------- Gap Utilities ---------- */
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* ---------- Margin Bottom Utilities ---------- */
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-6  { margin-bottom: 6px; }
.mb-8  { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mb-32 { margin-bottom: 32px; }

/* ---------- Text Utilities ---------- */
.text-muted   { color: var(--muted); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; }
.text-lg      { font-size: 16px; }
.text-xl      { font-size: 20px; }
.text-center  { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }
.text-green   { color: var(--green); }
.text-accent  { color: var(--accent); }
.text-blue    { color: var(--blue); }
.text-red     { color: var(--red); }
.text-amber   { color: var(--amber); }
.text-purple  { color: var(--purple); }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Progress Bar ---------- */
.progress {
  height: 6px;
  background: var(--bg2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 8px;
  background: var(--bg2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: width 0.4s ease;
}

.progress-fill.green {
  background: var(--green);
}

.progress-fill.blue {
  background: var(--blue);
}

.progress-fill.amber {
  background: var(--amber);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border2);
  border: 2px solid var(--surface);
}

.timeline-item.active::before {
  background: var(--accent);
}

.timeline-item .timeline-date {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

.timeline-item .timeline-text {
  font-size: 13px;
  color: var(--ink2);
}

/* ---------- Stars ---------- */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--amber);
  font-size: 14px;
}

.stars .empty {
  color: var(--border);
}

/* ---------- Notification Bar ---------- */
.notif-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.notif-bar.info {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(24,71,209,0.15);
}

.notif-bar.success, .notif-bar.green {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid rgba(10,127,83,0.15);
}

.notif-bar.warning, .notif-bar.amber {
  background: var(--amber-light);
  color: var(--amber);
  border: 1px solid rgba(201,123,6,0.15);
}

.notif-bar.error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(200,30,30,0.15);
}

.notif-bar .notif-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.notif-bar .notif-close:hover {
  opacity: 1;
}

/* ---------- Application Card ---------- */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
  margin-bottom: 12px;
}

.app-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border2);
}

.app-card .app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.app-card .app-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.app-card .app-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.app-card .app-role {
  font-size: 12px;
  color: var(--muted);
}

.app-card .app-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.app-card .app-actions {
  display: flex;
  gap: 8px;
}

.app-card-grid {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
}

/* ---------- Job Card ---------- */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.job-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border2);
}

.job-card .job-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.job-card .job-company {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

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

.job-card .job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.job-card .job-salary {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Metric Row ---------- */
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-label {
  font-size: 13px;
  color: var(--ink2);
}

.metric-value {
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Search Bar ---------- */
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Form Elements ---------- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--ink2);
}

.form-label-inner {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  text-transform: none;
  letter-spacing: normal;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea::placeholder {
  color: var(--border2);
}

.form-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C857A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

/* ---------- Input (generic) ---------- */
.input {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ---------- Contract Card ---------- */
.contract-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.contract-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border2);
}

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

.contract-card .contract-title {
  font-weight: 600;
  font-size: 14px;
}

.contract-card .contract-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.contract-card .contract-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 13px;
}

.contract-card .contract-detail-label {
  color: var(--muted);
  font-size: 11px;
}

.contract-card .contract-detail-value {
  font-weight: 600;
}

/* ---------- Hero Panel (Dashboard) ---------- */
.hero-panel {
  background: linear-gradient(135deg, #1A1611 0%, #2D2419 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(217,79,12,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-panel h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  position: relative;
}

.hero-panel p {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  max-width: 520px;
  position: relative;
  margin-bottom: 18px;
}

.hero-panel .hero-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

/* --- Hero Panel Components (app dashboard) --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-bottom: 14px;
  position: relative;
}
.hero-h1 {
  font-family: 'Clash Display', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 10px;
  position: relative;
}
.hero-h1 em {
  font-style: italic;
  color: #ff8a5b;
}
.hero-p {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  max-width: 500px;
  line-height: 1.55;
  margin-bottom: 20px;
  position: relative;
}
.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stat-val {
  font-family: 'Clash Display', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- Quick Actions ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.quick-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.quick-action:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-color: var(--border2);
}

.quick-action-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

.quick-action-label {
  font-family: 'Clash Display', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- How Grid (How It Works) ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}

.how-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.how-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.how-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.how-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Hiring Flow Steps ---------- */
.hiring-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hiring-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.hiring-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  text-align: center;
}

.hiring-step .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.hiring-step.active {
  color: var(--accent);
}

.hiring-step.active .step-num {
  background: var(--accent);
  color: #fff;
}

.hiring-step.done {
  color: var(--green);
}

.hiring-step.done .step-num {
  background: var(--green);
  color: #fff;
}

.hiring-step-divider {
  width: 32px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* hiring-step-icon = alias for step-num used in JS-generated HTML */
.hiring-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.hiring-step-name {
  font-size: 12px;
  font-weight: 600;
}
.hiring-step-sub {
  font-size: 10px;
  color: var(--muted);
}
.hiring-step.active .hiring-step-icon {
  background: var(--accent);
  color: #fff;
}
.hiring-step.done .hiring-step-icon {
  background: var(--green);
  color: #fff;
}

/* Agent avatar / icon pill */
.agent-avi {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Contract icon pill */
.contract-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-light);
  border: 1px solid rgba(217,79,12,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.5;
}

.empty-state .empty-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state .empty-sub,
.empty-state .empty-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- Chart Container ---------- */
.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.chart-container .chart-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- Chart Bars (legacy CSS chart) ---------- */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-top: 10px;
}

.chart-bar {
  flex: 1;
  background: var(--accent-light);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: background var(--transition);
  cursor: pointer;
  min-width: 0;
}

.chart-bar:hover {
  background: var(--accent);
}

.chart-bar-label {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.chart-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

/* ---------- Modal / Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,21,15,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--bg);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--muted);
  gap: 14px;
}

/* ---------- Admin Table Styles ---------- */
.admin-table th {
  background: var(--bg);
}

.admin-table td {
  font-size: 13px;
}

.admin-table .row-actions {
  display: flex;
  gap: 6px;
}

.admin-table .row-action {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.admin-table .row-action:hover {
  background: var(--bg);
  color: var(--ink);
}

.admin-table .row-action.danger:hover {
  background: var(--red-light);
  color: var(--red);
}

/* ---------- Search Box ---------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 260px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-box input {
  flex: 1;
  font-size: 13px;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--border2);
}

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

/* =====================================   Landing Page Styles (index.html)
   ============================================ */

/* ---------- Landing Nav ---------- */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
}

.landing-nav .nav-logo {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.landing-nav .nav-logo span {
  color: var(--accent);
}

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  transition: color var(--transition);
}

.landing-nav .nav-link:hover {
  color: var(--accent);
}

.landing-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-nav .nav-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  padding: 8px 16px;
  transition: color var(--transition);
}

.landing-nav .nav-signin:hover {
  color: var(--accent);
}

.landing-nav .nav-cta {
  padding: 9px 22px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.landing-nav .nav-cta:hover {
  background: var(--accent-h);
}

/* ---------- Landing Hero ---------- */
.landing-hero {
  padding: 140px 48px 80px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.landing-hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.landing-hero h1 span {
  color: var(--accent);
}

.landing-hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.landing-hero .hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}

.landing-hero .hero-btn-primary {
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

.landing-hero .hero-btn-primary:hover {
  background: var(--accent-h);
  box-shadow: var(--shadow);
}

.landing-hero .hero-btn-secondary {
  padding: 14px 36px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background var(--transition);
}

.landing-hero .hero-btn-secondary:hover {
  border-color: var(--border2);
  background: var(--bg);
}

.landing-hero .hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.landing-hero .hero-badge-icon {
  color: var(--green);
  margin-right: 4px;
}

/* ---------- Landing How It Works ---------- */
.landing-how {
  padding: 80px 48px;
  max-width: 1080px;
  margin: 0 auto;
}

.landing-how .section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.landing-how h2 {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 48px;
}

.landing-how .how-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- Landing Stats Bar ---------- */
.landing-stats {
  background: var(--ink);
  padding: 48px;
}

.landing-stats .stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
}

.landing-stats .stat-item {
  text-align: center;
}

.landing-stats .stat-num {
  font-family: 'Clash Display', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.landing-stats .stat-num span {
  color: var(--accent);
}

.landing-stats .stat-text {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

/* ---------- Landing Features ---------- */
.landing-features {
  padding: 80px 48px;
  max-width: 1080px;
  margin: 0 auto;
}

.landing-features .section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.landing-features h2 {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.feature-card .feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-card .feature-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card .feature-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Landing CTA Section ---------- */
.landing-cta {
  padding: 80px 48px;
  text-align: center;
}

.landing-cta .cta-box {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.landing-cta .cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(217,79,12,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.landing-cta h2 {
  font-size: 30px;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}

.landing-cta p {
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  margin-bottom: 28px;
  position: relative;
}

.landing-cta .cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

/* ---------- Landing Footer ---------- */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 48px;
  background: var(--surface);
}

.landing-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
}

.landing-footer .footer-brand {
  max-width: 280px;
}

.landing-footer .footer-logo {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.landing-footer .footer-logo span {
  color: var(--accent);
}

.landing-footer .footer-tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.landing-footer .footer-cols {
  display: flex;
  gap: 56px;
}

.landing-footer .footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 14px;
}

.landing-footer .footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
  transition: color var(--transition);
}

.landing-footer .footer-col a:hover {
  color: var(--accent);
}

.landing-footer .footer-bottom {
  max-width: 1080px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Miscellaneous ---------- */
.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-md {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* === AGENT PROFILE PAGE === */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Clash Display', sans-serif;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  overflow-x: auto;
}

.profile-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  border: none;
  background: none;
}

.profile-tab:hover {
  color: var(--ink);
  background: var(--bg);
}

.profile-tab.active {
  background: var(--ink);
  color: #fff;
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
}

.mt-16 {
  margin-top: 16px;
}

/* =====================================================   MOBILE RESPONSIVE
   ============================================================ */

/* --- Sidebar overlay backdrop --- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(24,21,15,0.5);
  z-index: 200;
  backdrop-filter: blur(3px);
}

/* --- Hamburger button --- */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--ink);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Tables: horizontal scroll wrapper --- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---- 768px breakpoint ---- */
@media (max-width: 768px) {

  body, html {
    overflow-x: hidden;
  }

  .hamburger {
    display: flex !important;
    background: var(--ink);
  }
  .hamburger span {
    background: #fff;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 210;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-backdrop.open {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }
  .topbar-title {
    font-size: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-right {
    flex-shrink: 0;
  }

  .page-body {
    padding: 16px;
  }

  .hero-panel {
    padding: 20px 18px;
  }
  .hero-h1 {
    font-size: 22px;
  }
  .hero-stats {
    gap: 16px;
  }
  .hero-stat-val {
    font-size: 20px !important;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-main,
  .grid-main-rev,
  .stat-grid,
  .stat-grid-3,
  .stat-grid-4 {
    grid-template-columns: 1fr !important;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  table {
    min-width: 560px;
  }
  .card:has(table),
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-card-grid {
    grid-template-columns: 44px 1fr;
    gap: 10px;
  }
  .app-card-grid > *:last-child {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .job-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pill-tabs {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .pill-tab {
    white-space: nowrap;
  }

  .flex-between.stack-mobile {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hiring-steps {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .contract-card {
    flex-wrap: wrap;
  }

  .stat-value, .stat-val {
    font-size: 28px !important;
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  /* --- LOGIN SCREEN (login/register handled in dedicated section below) --- */
  #forgot-screen,
  #reset-screen {
    grid-template-columns: 1fr !important;
    display: flex;
    flex-direction: column !important;
  }
  #forgot-screen .login-left,
  #reset-screen .login-left {
    display: none !important;
  }
  #forgot-screen .login-right,
  #reset-screen .login-right {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 40px !important;
    padding-top: 82px !important;
    min-height: 100vh;
    background: #fff !important;
  }
  .demo-accounts {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* --- LANDING PAGE --- */
  .landing-nav {
    padding: 0 16px;
  }
  .landing-nav-links,
  .landing-nav .nav-links,
  .landing-nav .nav-cta-group {
    display: none !important;
  }
  .landing-hero,
  .landing-hero-section {
    padding: 90px 16px 48px;
  }
  .landing-hero-h1,
  .landing-hero h1 {
    font-size: 32px !important;
    letter-spacing: -1px;
  }
  .landing-hero-p,
  .landing-hero p {
    font-size: 15px;
  }
  .landing-hero .flex.gap-12,
  .landing-hero .hero-btns {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .landing-hero .flex.gap-12 .btn,
  .landing-hero .hero-btns .btn {
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  .landing-hero .btn-ghost {
    color: var(--ink2) !important;
    border-color: var(--border2) !important;
    background: var(--surface) !important;
  }
  .landing-hero-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    text-align: center;
  }
  .hero-stat-val {
    font-size: 22px !important;
  }
  .landing-section,
  .landing-how,
  .landing-features,
  .landing-stats,
  .landing-cta {
    padding: 48px 16px;
  }
  .landing-section-title {
    font-size: 24px !important;
    text-align: center;
  }
  .landing-stats .stats-inner {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }
  .landing-footer .footer-inner,
  .landing-footer-inner {
    flex-direction: column;
    gap: 24px;
  }
  .landing-footer .footer-cols,
  .landing-footer-cols {
    flex-wrap: wrap;
    gap: 24px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .landing-section .grid-2 {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .agent-header-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .btn-mobile-full {
    width: 100%;
    justify-content: center;
  }

  .profile-header .flex.gap-20 {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .profile-header .flex.gap-20 > div:last-child {
    text-align: left;
    width: 100%;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
}

/* ---- 480px breakpoint ---- */
@media (max-width: 480px) {

  .how-grid,
  .landing-how .how-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr !important;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .page-body {
    padding: 12px;
  }

  .topbar {
    padding: 0 12px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .app-card {
    padding: 14px;
    border-radius: 14px;
  }

  .topbar-title {
    font-size: 13px;
  }

  .demo-accounts {
    grid-template-columns: 1fr;
  }

  .hiring-steps {
    grid-template-columns: 1fr !important;
  }

  .timeline-item {
    gap: 10px;
  }

  .badge {
    font-size: 10px;
    padding: 2px 7px;
  }

  .topbar-user-name { display: none; }
  .topbar-user-btn { padding: 4px; }
}

/* Notification dropdown */
.topbar-right { position: relative; }
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 999;
  display: none;
}
.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--bg2); }
.notif-item.unread { background: var(--accent-light); }
.notif-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; color: var(--ink); }
.notif-body { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-footer {
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #6366f1);
  cursor: pointer;
}
.notif-footer:hover { text-decoration: underline; }

/* === ONBOARDING WIZARD === */
.ob-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,21,15,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: obFadeIn 0.3s ease;
}
@keyframes obFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ob-modal {
  position: relative;
  background: var(--surface, #fff);
  max-width: 520px;
  width: 92%;
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  animation: obSlideUp 0.35s ease;
}
@keyframes obSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.ob-skip {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-family: 'Epilogue', sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}
.ob-skip:hover { color: var(--ink); }
.ob-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.ob-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border2);
  transition: background 0.2s;
}
.ob-dot.active { background: var(--accent); }
.ob-dot.done { background: var(--accent); opacity: 0.5; }
.ob-progress {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 32px;
  overflow: hidden;
}
.ob-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.35s ease;
  width: 33%;
}
.ob-body {
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ob-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.ob-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.ob-desc {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.6;
  max-width: 380px;
}
.ob-preview {
  margin-top: 20px;
  width: 100%;
  max-width: 360px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: left;
}
.ob-preview-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink2);
  border-bottom: 1px solid var(--border);
}
.ob-preview-field:last-child { border-bottom: none; }
.ob-preview-field span:first-child {
  font-size: 16px;
  flex-shrink: 0;
}
.ob-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}
.ob-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'Epilogue', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.ob-btn-primary {
  background: var(--accent);
  color: #fff;
}
.ob-btn-primary:hover { background: var(--accent-h); }
.ob-btn-secondary {
  background: var(--bg);
  color: var(--ink2);
  border: 1px solid var(--border);
}
.ob-btn-secondary:hover { background: var(--border); }
.ob-btn-secondary.hidden { visibility: hidden; }
@media (max-width: 768px) {
  .ob-modal {
    padding: 28px 20px;
    width: 96%;
    max-height: 90vh;
    overflow-y: auto;
  }
  .ob-title { font-size: 19px; }
  .ob-icon { font-size: 40px; }
  .ob-nav { flex-direction: column-reverse; gap: 8px; }
  .ob-btn { width: 100%; text-align: center; }
  .ob-btn-secondary.hidden { display: none; }
}
/* ---------- Recommended Job Cards ---------- */
.recommended-job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.recommended-job-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.match-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--green-light);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.match-agent-name {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .recommended-job-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .recommended-job-card > div:last-child {
    align-items: flex-start !important;
    flex-direction: row;
    gap: 10px;
  }
}
/* ========== Profile Page ========== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.profile-left { display: flex; flex-direction: column; gap: 16px; }
.profile-right { display: flex; flex-direction: column; gap: 16px; }
.profile-right-mobile { display: none; flex-direction: column; gap: 16px; }

.profile-hero .card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-stat:last-child { border-bottom: none; }

.profile-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(217, 79, 12, 0.08);
  color: var(--accent);
}

.review-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.review-card:last-child { border-bottom: none; }
.review-stars {
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 1px;
}
.review-author {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-right { display: none; }
  .profile-right-mobile { display: flex; }
}

/* Analytics — charts & tables */
.chart-wrap {
  position: relative;
  min-height: 140px;
}
.chart-wrap canvas {
  width: 100% !important;
  max-height: 200px;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
}
.analytics-table th,
.analytics-table td {
  text-align: left;
  padding: 10px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.analytics-table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.analytics-table tbody tr:last-child td {
  border-bottom: none;
}
.analytics-table tbody tr:hover {
  background: var(--bg);
}
.stat-grid-4 .stat-card .stat-val.green { color: var(--green); }
.stat-grid-4 .stat-card .stat-val.blue { color: var(--blue); }
.stat-grid-4 .stat-card .stat-val.accent { color: var(--accent); }

@media (max-width: 768px) {
  .chart-wrap canvas {
    max-height: 160px;
  }
  .analytics-table th,
  .analytics-table td {
    padding: 8px 10px;
    font-size: 12.5px;
  }
}

/* ========== Contract Detail Page ========== */
.contract-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contract-info-item {
  padding: 12px 0;
}
.contract-info-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 4px;
}
.contract-info-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

/* Dispute Banner */
.dispute-banner {
  background: #FEF3CD;
  border: 1px solid #F0D860;
  color: #856404;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}

/* Activity Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1;
}
.timeline-content {
  flex: 1;
}
.timeline-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.timeline-date {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .contract-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Cover Letter Quote ---------- */
.cover-letter-quote {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  font-style: italic;
  color: var(--ink2);
  line-height: 1.6;
}

/* ---------- Bookmark Button ---------- */
.bookmark-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  padding: 4px;
  transition: transform var(--transition);
}
.bookmark-btn:hover {
  transform: scale(1.2);
}

/* ---------- Match Score Bar ---------- */
.match-bar {
  width: 100%;
  height: 6px;
  background: var(--bg2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.match-fill {
  height: 100%;
  background: var(--green);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ---------- Featured Agent Card ---------- */
.asc-featured {
  border: 1.5px solid var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-light) 100%);
  box-shadow: 0 2px 12px rgba(217, 79, 12, 0.08);
}

@media (max-width: 768px) {
  .bookmark-btn {
    font-size: 18px;
    top: 8px;
    right: 8px;
  }
}

/* === FILTER BAR === */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; align-items: center; }
.filter-bar .form-input, .filter-bar .form-select { height: 36px; padding: 0 10px; font-size: 13px; min-width: 120px; }
.filter-bar .form-input[type="number"] { max-width: 100px; }
.filter-clear { font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.filter-clear:hover { color: var(--ink); }
.tab-filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-filter { padding: 6px 14px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--ink); transition: all 0.15s; }
.tab-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === PUBLIC MARKETPLACE === */
.marketplace-section { padding: 80px 0; background: var(--bg); }
.marketplace-section .container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.marketplace-section h2 { font-family: 'Clash Display', sans-serif; font-size: 42px; font-weight: 700; letter-spacing: -1.5px; text-align: center; margin-bottom: 8px; }
.section-subtitle { text-align: center; color: rgba(24,21,15,0.55); font-size: 17px; margin-bottom: 32px; }
.active-category-label { font-family: 'Clash Display', sans-serif; font-size: 20px; font-weight: 600; text-align: center; margin-bottom: 16px; color: var(--accent); }
.category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; justify-content: center; }
.cat-pill { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: white; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.cat-pill.active, .cat-pill:hover { background: var(--accent); color: white; border-color: var(--accent); }
.marketplace-search { margin-bottom: 24px; text-align: center; }
.marketplace-search input { width: 100%; max-width: 400px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; }
.agent-grid-public { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 40px; }
.agent-card-public { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-align: center; transition: box-shadow 0.2s; }
.agent-card-public:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.10); }
.agent-card-icon { font-size: 36px; margin-bottom: 12px; }
.agent-card-name { font-family: 'Clash Display', sans-serif; font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.agent-card-type { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.agent-card-rating { font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.agent-card-price { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.btn-hire { display: inline-block; padding: 10px 20px; background: var(--accent); color: white; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.btn-hire:hover { opacity: 0.9; }
.marketplace-cta { text-align: center; margin-top: 20px; }
.btn-primary-large { display: inline-block; padding: 16px 32px; background: var(--accent); color: white; border-radius: 12px; font-size: 16px; font-weight: 700; text-decoration: none; }
.btn-primary-large:hover { opacity: 0.9; }
.agent-card-skeleton { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 24px; height: 220px; }
.skeleton-pulse { background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%); background-size: 200% 100%; animation: skeleton-pulse 1.5s infinite; border-radius: 8px; }
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.marketplace-empty { text-align: center; padding: 48px 24px; color: var(--muted); font-size: 16px; grid-column: 1 / -1; }

@media (max-width: 768px) {
  .marketplace-section { padding: 48px 0; }
  .marketplace-section h2 { font-size: 28px; }
  .agent-grid-public { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
}
/* === WEBHOOK TEST === */
.webhook-test-section { margin-top: 8px; }
.webhook-result { margin-top: 8px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.webhook-result.success { background: var(--green-light); color: var(--green); border: 1px solid var(--green); }
.webhook-result.error { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }
.webhook-result.warning { background: #FEF3CD; color: #856404; border: 1px solid #F0D860; }

/* ==================================   LOGIN / REGISTER — BACK LINK & MOBILE BAR
   ========================================= */

/* Desktop back link (shown above form title on laptop/desktop) */
.login-back-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}
.login-back-link:hover { color: var(--ink); }

.login-back-desktop {
  margin-bottom: 24px;
}

/* ── Mobile header bar (.lmb) — hidden on desktop ── */
.lmb {
  display: none; /* shown only on mobile via media query */
}

/* ==================================   MOBILE OVERRIDES  ≤ 768px
   ========================================= */
@media (max-width: 768px) {

  /* Screen containers become flex columns */
  #login-screen,
  #register-screen {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh;
  }

  /* ── Fixed mobile header bar ── */
  .lmb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 58px;
    background: #18150F;
    padding: 0 20px;
    z-index: 500;
    box-shadow: 0 1px 0 rgba(255,255,255,0.07);
  }

  .lmb-back {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
    min-width: 60px;
  }
  .lmb-back:hover { color: #fff; }

  .lmb-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .lmb-logo .login-logo-mark {
    width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 7px;
  }

  .lmb-wordmark {
    font-family: 'Clash Display', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
  }
  .lmb-wordmark span { color: var(--accent); }

  .lmb-spacer { min-width: 60px; }

  /* ── Hide the dark left panel on mobile ── */
  #login-screen .login-left,
  #register-screen .login-left {
    display: none !important;
  }

  /* ── Hide desktop back link on mobile ── */
  .login-back-desktop { display: none; }

  /* ── Right panel = full-screen form area ── */
  #login-screen .login-right,
  #register-screen .login-right {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 40px !important;
    padding-top: 82px !important; /* 58px header + 24px gap */
    background: #fff !important;
    min-height: 100vh;
  }

  /* ── Form wrap: full width on mobile ── */
  #login-screen .login-form-wrap,
  #register-screen .login-form-wrap {
    width: 100%;
    max-width: 400px;
  }

  /* ── Form title: bold & bigger on mobile ── */
  #login-screen .login-form-title,
  #register-screen .login-form-title {
    font-size: 28px !important;
    margin-bottom: 6px;
  }

  /* ── Subtitle ── */
  #login-screen .login-form-sub,
  #register-screen .login-form-sub {
    font-size: 15px;
    margin-bottom: 28px;
  }

  /* ── Inputs: tall + large font (prevents iOS zoom) ── */
  #login-screen .form-input,
  #register-screen .form-input,
  #login-screen .form-select,
  #register-screen .form-select {
    height: 52px !important;
    font-size: 16px !important;
    border-radius: 10px;
  }

  /* ── Primary button: full height, thumb-friendly ── */
  #login-screen .login-btn,
  #register-screen .login-btn {
    height: 52px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 6px;
  }

  /* ── Footer links: centered ── */
  #login-screen .login-footer,
  #register-screen .login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
  }

  /* ── Form group spacing ── */
  #login-screen .form-group,
  #register-screen .form-group {
    margin-bottom: 16px;
  }
}

/* ---------- Top Rated Badge ---------- */
.badge-top-rated {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff8f0;
  color: #D94F0C;
  border: 1px solid #f5c6a0;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Completion Rate ---------- */
.agent-completion-rate {
  font-size: 12px;
  color: #2a7a4b;
  font-weight: 500;
  margin-top: 2px;
}

/* ---------- App Init Loader ---------- */
#app-init-loader {
  position: fixed;
  inset: 0;
  background: #F4F1ED;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}
.init-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e2d9;
  border-top-color: #D94F0C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Admin Analytics ─── */
.analytics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.analytics-card { background: var(--surface); border-radius: 12px; padding: 20px; border: 1px solid var(--border); }
.analytics-card .ac-label { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.analytics-card .ac-value { font-size: 28px; font-weight: 700; color: var(--ink); margin-top: 6px; font-family: 'Clash Display', sans-serif; }
.analytics-card .ac-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.analytics-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.analytics-chart-box { background: var(--surface); border-radius: 12px; padding: 20px; border: 1px solid var(--border); }
.analytics-chart-box h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.analytics-health { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) {
  .analytics-grid, .analytics-health { grid-template-columns: 1fr 1fr; }
  .analytics-charts { grid-template-columns: 1fr; }
}
/* ══════ Messages / Inbox ══════ */
.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #D94F0C;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  margin-left: 6px;
}
.inbox-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  height: calc(100vh - 160px);
  min-height: 400px;
}
.inbox-threads {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow-y: auto;
}
.inbox-thread-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.inbox-thread-item:hover, .inbox-thread-item.active { background: var(--bg2); }
.inbox-thread-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.inbox-thread-preview { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-thread-unread .inbox-thread-name { color: var(--accent); }
.inbox-chat {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.inbox-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inbox-chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-bubble.sent {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-bubble.received {
  background: var(--bg2);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-bubble-meta { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.inbox-compose {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.inbox-compose textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  height: 44px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.inbox-compose textarea:focus { outline: none; border-color: var(--accent); }
.inbox-compose .btn-send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
@media (max-width: 768px) {
  .inbox-layout { grid-template-columns: 1fr; height: auto; }
  .inbox-threads { max-height: 200px; }
}

/* ── Demo Tour ── */
#tour-box {
  background: #18150F;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  font-family: 'Epilogue', sans-serif;
}
.tour-progress {
  font-size: 11px; font-weight: 600; color: #D94F0C;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.tour-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.3;
}
.tour-text {
  font-size: 14px; color: rgba(255,255,255,0.7);
  line-height: 1.6; margin-bottom: 20px;
}
.tour-actions {
  display: flex; align-items: center; justify-content: space-between;
}
.tour-nav { display: flex; gap: 8px; }
.tour-btn-next {
  background: #D94F0C; color: #fff;
  border: none; border-radius: 8px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'Epilogue', sans-serif;
}
.tour-btn-next:hover { opacity: 0.9; }
.tour-btn-prev {
  background: rgba(255,255,255,0.1); color: #fff;
  border: none; border-radius: 8px; padding: 8px 14px;
  font-size: 14px; cursor: pointer;
  font-family: 'Epilogue', sans-serif;
}
.tour-btn-prev:hover { background: rgba(255,255,255,0.15); }
.tour-btn-skip {
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 12px; cursor: pointer; font-family: 'Epilogue', sans-serif;
  padding: 4px;
}
.tour-btn-skip:hover { color: rgba(255,255,255,0.6); }
/* ── Payment Modal ── */
.pay-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; padding: 20px;
}
.pay-overlay.hidden { display: none; }
.pay-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.pay-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.pay-modal-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px; font-weight: 700; color: #18150F;
}
.pay-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: #888; padding: 4px 8px; border-radius: 6px;
}
.pay-close:hover { background: #f4f1ed; }
.pay-summary {
  background: #f9f7f4; border-radius: 12px;
  padding: 16px; margin-bottom: 24px;
}
.pay-summary-row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: #555; padding: 6px 0;
  border-bottom: 1px solid #ede8e0;
}
.pay-summary-row:last-child { border-bottom: none; }
.pay-total-row { font-weight: 700; color: #18150F; font-size: 16px; margin-top: 4px; }
.pay-card-section { margin-bottom: 20px; }
.pay-card-label {
  font-size: 13px; font-weight: 600; color: #18150F;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.pay-card-mock {
  border: 1px solid #e0dbd3; border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.pay-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-card-field { display: flex; flex-direction: column; gap: 6px; }
.pay-card-field label { font-size: 12px; color: #666; font-weight: 500; }
.pay-input-wrap { position: relative; }
.pay-input {
  width: 100%; padding: 10px 12px; font-size: 15px;
  border: 1px solid #e0dbd3; border-radius: 8px;
  font-family: 'Epilogue', sans-serif; outline: none;
  transition: border-color 0.15s;
}
.pay-input:focus { border-color: #D94F0C; }
.pay-card-icons { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.pay-secure-note {
  font-size: 12px; color: #888; text-align: center;
  margin-bottom: 20px; line-height: 1.5;
}
.pay-submit-btn {
  width: 100%; padding: 14px; background: #D94F0C; color: #fff;
  border: none; border-radius: 12px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: 'Epilogue', sans-serif;
  transition: opacity 0.2s;
}
.pay-submit-btn:hover { opacity: 0.9; }
.pay-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.pay-error-msg { color: #c0392b; font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }
@media (max-width: 480px) {
  .pay-modal { padding: 20px; border-radius: 16px; }
  .pay-modal-title { font-size: 18px; }
}

/* Agent Owner Dashboard v2 */
.ao-dash { display: flex; flex-direction: column; gap: 20px; }
.ao-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ao-kpi-card { background: var(--surface); border-radius: 14px; padding: 20px; border: 1px solid var(--border); }
.ao-kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.ao-kpi-value { font-family: 'Clash Display', sans-serif; font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.ao-kpi-sub { font-size: 12px; color: var(--muted); }
.ao-dash-mid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.ao-chart-card, .ao-contracts-card { background: var(--surface); border-radius: 14px; padding: 20px; border: 1px solid var(--border); }
.ao-side-stack { display: flex; flex-direction: column; gap: 16px; }
.ao-top-agent-card, .ao-apps-card { background: var(--surface); border-radius: 14px; padding: 20px; border: 1px solid var(--border); }
.ao-card-title { font-family: 'Clash Display', sans-serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.ao-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ao-card-link { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.ao-top-agent-row { display: flex; align-items: center; gap: 14px; }
.ao-top-agent-avatar { width: 44px; height: 44px; background: var(--dark-surface, #18150F); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: 'Clash Display', sans-serif; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.ao-contract-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ao-contract-row:last-child { border-bottom: none; }
@media (max-width: 900px) {
  .ao-kpi-row { grid-template-columns: 1fr 1fr; }
  .ao-dash-mid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .ao-kpi-row { grid-template-columns: 1fr; }
}

/* ── Admin Featured Toggle ── */
.admin-feat-btn {
  background: none; border: 1px solid #e0dbd3; border-radius: 6px;
  padding: 4px 10px; cursor: pointer; font-size: 16px;
  transition: all 0.15s; color: #aaa;
}
.admin-feat-btn:hover { border-color: #D94F0C; color: #D94F0C; }
.admin-feat-btn.is-featured { border-color: #f0a500; color: #f0a500; background: rgba(240,165,0,0.06); }
.admin-feat-btn:disabled { opacity: 0.5; cursor: not-allowed; }


/* -----------------------------------------------
   PORTAL MOBILE � Targeted Overflow & Layout Fixes
   fix/mobile-overflow
   ----------------------------------------------- */

/* 1. Contain main content on mobile � prevent any child from blowing out width */
@media (max-width: 768px) {
  .main {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .page-body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .card {
    overflow: hidden;
    min-width: 0;
  }
}

/* 2. Force all canvas elements to be contained */
canvas {
  display: block;
  max-width: 100% !important;
  box-sizing: border-box;
}
.chart-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.chart-wrap canvas {
  width: 100% !important;
  max-width: 100% !important;
}
@media (max-width: 768px) {
  .chart-wrap canvas {
    height: 160px !important;
    max-height: 160px;
  }
}

/* 3. Table wrapper � contain scroll inside, don't overflow page */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  display: block;
}
/* Tables inside wrap scroll within their container */
.table-wrap > table {
  min-width: 420px;
}

/* 4. stat-grid-4: correct cascade � 2-col at 768px, 1-col at 480px */
@media (max-width: 768px) {
  .stat-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 480px) {
  .stat-grid-4 {
    grid-template-columns: 1fr !important;
  }
  .stat-val,
  .stat-value {
    font-size: 24px !important;
  }
}

/* 5. ao-kpi-row breakpoints */
@media (max-width: 900px) {
  .ao-kpi-row { grid-template-columns: 1fr 1fr; }
  .ao-dash-mid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ao-kpi-row { grid-template-columns: 1fr !important; }
  .ao-kpi-value { font-size: 24px; }
}

/* 6. Analytics admin grids */
@media (max-width: 900px) {
  .analytics-grid,
  .analytics-health {
    grid-template-columns: 1fr 1fr;
  }
  .analytics-charts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .analytics-grid,
  .analytics-health {
    grid-template-columns: 1fr !important;
  }
  .analytics-card .ac-value {
    font-size: 22px;
  }
}

/* 7. Quick actions */
@media (max-width: 768px) {
  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 380px) {
  .quick-actions {
    grid-template-columns: 1fr !important;
  }
}

/* 8. Hiring steps � stack on mobile */
@media (max-width: 540px) {
  .hiring-steps {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
  }
  .hiring-step-divider {
    display: none !important;
  }
  .hiring-step {
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 8px 0;
    width: 100%;
  }
}

/* 9. Job card right side: don't overflow on narrow phones */
@media (max-width: 480px) {
  .job-card {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 8px;
  }
  .job-card > div:last-child {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* 10. Inbox layout */
@media (max-width: 768px) {
  .inbox-layout {
    grid-template-columns: 1fr !important;
    height: auto;
  }
  .inbox-threads {
    max-height: 220px;
  }
}

/* 11. Pill tabs � always scrollable horizontally, never wrap */
.pill-tabs {
  max-width: 100%;
}
@media (max-width: 768px) {
  .pill-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .pill-tabs::-webkit-scrollbar { display: none; }
  .pill-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* 12. Admin tabs bar */
@media (max-width: 768px) {
  .admin-tabs-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .admin-tabs-bar::-webkit-scrollbar { display: none; }
  .admin-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 8px 14px;
  }
}

/* 13. Hero panel � contain text on small phones */
@media (max-width: 400px) {
  .hero-panel {
    padding: 16px 14px;
  }
  .hero-h1 {
    font-size: 20px !important;
  }
  .hero-p {
    font-size: 13px;
  }
  .hero-badge {
    font-size: 11px;
  }
}

/* 14. Page body tight padding on tiny phones */
@media (max-width: 360px) {
  .page-body {
    padding: 10px !important;
  }
  .card {
    padding: 12px;
    border-radius: 12px;
  }
}

/* 15. Section headers should wrap nicely */
@media (max-width: 540px) {
  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* 16. Filter bar wrap on mobile */
@media (max-width: 600px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .form-input,
  .filter-bar .form-select {
    width: 100%;
    max-width: 100%;
  }
}

/* 17. Contract card */
@media (max-width: 540px) {
  .contract-card {
    flex-wrap: wrap;
  }
}

/* 18. ao-chart canvas size */
@media (max-width: 600px) {
  .ao-chart-card canvas {
    max-height: 180px !important;
  }
}

/* 19. Profile grid */
@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =================================   DARK THEME
   ======================================== */
[data-theme="dark"] {
  --bg: #0f0e0c;
  --bg2: #1a1916;
  --surface: #1f1e1b;
  --surface2: #252320;
  --border: #2e2c28;
  --border2: #3d3a35;
  --ink: #f0ede8;
  --ink2: #c8c3bb;
  --muted: #7a746e;
  --accent-light: #2a1a10;
  --blue-light: #0d1a3a;
  --green-light: #0a1f15;
  --amber-light: #1f1505;
  --purple-light: #1a1030;
  --red-light: #1f0a0a;
}

/* Topbar in dark mode */
[data-theme="dark"] .topbar {
  background: #18150F;
  border-bottom-color: #2e2c28;
}

/* Sidebar — always dark bg; override --ink flip in dark mode */
[data-theme="dark"] .sidebar { background: #141210; }

/* Hamburger button — always dark bg */
[data-theme="dark"] .hamburger { background: #141210; }

/* Elements that use var(--ink) as a dark background */
[data-theme="dark"] .landing-stats { background: var(--bg2); }
[data-theme="dark"] .landing-cta .cta-box { background: var(--surface); }
[data-theme="dark"] .profile-tab.active { background: var(--surface2); color: var(--ink); }

/* Login/auth screens — keep light regardless of theme */
#login-screen,
#register-screen,
#forgot-screen,
#reset-screen {
  color-scheme: light;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: opacity 0.2s, background 0.15s;
  line-height: 0;
}
.theme-toggle:hover {
  opacity: 1;
  background: rgba(0,0,0,0.06);
}
[data-theme="dark"] .theme-toggle { color: var(--ink); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.08); }

/* ===================================   NOTIFICATIONS PAGE (Wave 19A)
   ========================================== */
.notif-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.notif-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.notif-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.notif-tab:hover:not(.active) { color: var(--ink); }

.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.notif-page-item.unread { background: var(--bg2); border-radius: 8px; padding: 14px 12px; margin: 0 -12px; }
.npi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); margin-top: 6px; flex-shrink: 0;
}
.npi-dot.active { background: var(--accent); }
.npi-body { flex: 1; cursor: pointer; }
.npi-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.npi-text { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.npi-time { font-size: 12px; color: var(--muted); }
.npi-delete {
  background: none; border: none; padding: 4px;
  color: var(--muted); cursor: pointer; opacity: 0; border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}
.notif-page-item:hover .npi-delete { opacity: 1; }
.npi-delete:hover { background: var(--bg2); color: var(--ink); }

.notif-page-actions { display: flex; gap: 8px; }

/* Updated notification bell dropdown footer */
.notif-footer {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}
.notif-footer span { cursor: pointer; }
.notif-footer span:last-child { color: var(--accent); font-weight: 500; }

/* Dark mode */
[data-theme="dark"] .notif-page-item.unread { background: var(--surface); }
[data-theme="dark"] .notif-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,0.4); }

/* Mobile: notification dropdown full-width */
@media (max-width: 600px) {
  .notif-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}

/* ===================================   CONTRACT DELIVERY & ENHANCEMENTS (Wave 19B)
   ========================================== */

/* Contract filter tabs */
.contract-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.ctab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.ctab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ctab:hover:not(.active) { color: var(--ink); }

/* Review prompt card */
.review-prompt-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-prompt-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.review-prompt-sub { font-size: 14px; color: var(--muted); }
.star-row { display: flex; gap: 6px; }
.star {
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s, transform 0.1s;
}
.star:hover, .star.filled { color: #f59e0b; transform: scale(1.1); }
.review-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
}
.review-textarea:focus { outline: none; border-color: var(--accent); }
.review-submitted-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--green-light, rgba(34,197,94,0.1));
  color: var(--green, #16a34a);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}

/* Dark mode adjustments */
[data-theme="dark"] .review-prompt-card { background: var(--surface); }
[data-theme="dark"] .review-textarea { background: var(--bg2); border-color: var(--border); }

/* ===================================   FRONTEND POLISH (Wave 20B)
   ========================================== */

/* Load more button wrapper */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

/* Smooth page fade-in */
.page.active {
  animation: pageFadeIn 0.18s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217,79,12,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 500;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: #bf420a; }

/* Dark mode adjustments */
[data-theme="dark"] .back-to-top { box-shadow: 0 4px 12px rgba(217,79,12,0.5); }

/* ===================================   ACTIVATION CHECKLIST (Wave 21B)
   ========================================== */
.checklist-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.checklist-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.checklist-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.checklist-sub {
  font-size: 13px;
  color: var(--muted);
}
.checklist-progress-wrap {
  width: 120px;
  height: 6px;
  background: var(--bg2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
  flex-shrink: 0;
}
.checklist-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.checklist-body {
  padding: 8px 0;
}
.checklist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  transition: background 0.15s;
}
.checklist-row:hover { background: var(--bg2); }
.checklist-row.done { opacity: 0.55; }
.checklist-check { width: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.checklist-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border2, #ccc);
}
.checklist-label {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}
.checklist-row.done .checklist-label {
  text-decoration: line-through;
  color: var(--muted);
}
.checklist-cta {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.checklist-cta:hover { background: rgba(217,79,12,0.06); border-color: var(--accent); }

/* Dark mode */
[data-theme="dark"] .checklist-card { background: var(--surface); }
[data-theme="dark"] .checklist-progress-wrap { background: var(--bg2); }

/* ==========================================
   PWA & SHAREABILITY (Wave 21A)
   ========================================== */
.pwa-install-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.15s, background 0.15s;
}
.pwa-install-btn:hover { opacity: 1; background: var(--bg2); }

.btn-share-agent {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.btn-share-agent:hover { color: var(--ink); background: var(--bg2); }

.badge-new {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

[data-theme="dark"] .pwa-install-btn { border-color: var(--border); }

/* ==========================================
   AGENT COMPARISON (Wave 22A)
   ========================================== */

/* Floating compare bar */
.compare-bar {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  transition: bottom 0.3s ease;
  width: auto;
  max-width: 600px;
}
.compare-bar.active { bottom: 24px; }
.compare-bar-inner {
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.compare-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.compare-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
}
.compare-slot-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.compare-slot-remove:hover { color: #fff; }
.compare-bar-actions { display: flex; gap: 8px; margin-left: auto; }

/* Compare checkbox on cards */
.compare-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin-top: 8px;
}
.compare-checkbox-wrap input { cursor: pointer; accent-color: var(--accent); }

/* Compare modal */
.compare-modal-inner {
  background: var(--bg);
  border-radius: 20px;
  width: 90vw;
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}
.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.compare-modal-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}
.compare-headers-row {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}
.compare-label-spacer { width: 140px; flex-shrink: 0; }
.compare-col-header {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: var(--bg2);
  border-radius: 12px;
}
.compare-agent-avi {
  font-size: 28px;
  margin-bottom: 8px;
}
.compare-agent-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.compare-agent-tag {
  margin-bottom: 8px;
  line-height: 1.4;
}
.compare-rows { display: flex; flex-direction: column; gap: 0; }
.compare-data-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.compare-data-row:last-child { border-bottom: none; }
.compare-row-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.compare-row-cell {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
}
.badge-cap {
  display: inline-block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  margin: 2px;
}

/* Dark mode */
[data-theme="dark"] .compare-bar-inner { background: #1a1916; }
[data-theme="dark"] .compare-modal-inner { background: var(--bg); }
[data-theme="dark"] .compare-col-header { background: var(--surface); }

@media (max-width: 600px) {
  .compare-row-label { width: 80px; font-size: 11px; }
  .compare-modal-inner { width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; }
  .compare-label-spacer { width: 80px; }
}

/* ==========================================
   AVAILABILITY BADGES + JOB EXPIRY (Wave 22B)
   ========================================== */

/* Availability badges */
.badge-booked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-slots-low {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245,158,11,0.12);
  color: #d97706;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}
.badge-slots-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34,197,94,0.1);
  color: #16a34a;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Job expiry warning */
.expiry-warning {
  font-size: 12px;
  color: #d97706;
  font-weight: 500;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Copy job link button */
.btn-copy-link {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.btn-copy-link:hover { color: var(--ink); background: var(--bg2); }

/* Dark mode */
[data-theme="dark"] .badge-booked { background: rgba(239,68,68,0.15); }
[data-theme="dark"] .badge-slots-low { background: rgba(245,158,11,0.15); }
[data-theme="dark"] .badge-slots-open { background: rgba(34,197,94,0.15); }

/* ==========================================
   REAL-TIME CHAT (Wave 23B)
   ========================================== */

/* Typing indicator (optional — shown when _socket is connected) */
.inbox-typing {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  min-height: 24px;
}

/* Send button loading state */
.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Live message pulse (briefly highlight newly received messages) */
@keyframes msg-pulse {
  0% { background: rgba(217, 79, 12, 0.08); }
  100% { background: transparent; }
}
.msg-bubble.received.live {
  animation: msg-pulse 0.8s ease-out forwards;
}

/* ==========================================
   WEBHOOK TESTER PANEL (Wave 24A)
   ========================================== */

.wh-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}
.wh-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wh-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.wh-url-badge {
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  color: var(--muted);
}
.wh-controls { display: flex; flex-direction: column; gap: 12px; }
.wh-field { display: flex; flex-direction: column; gap: 4px; }
.wh-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.wh-payload-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  font-family: monospace;
  color: var(--ink);
  max-height: 140px;
  overflow: auto;
  white-space: pre;
  margin: 0;
}
.wh-result-area { margin-top: 12px; }
.wh-result {
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
}
.wh-result-ok { border-color: #22c55e; background: rgba(34,197,94,0.06); }
.wh-result-err { border-color: #ef4444; background: rgba(239,68,68,0.06); }
.wh-result-warn { border-color: #f59e0b; background: rgba(245,158,11,0.06); color: #92400e; }
.wh-result-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wh-result-label { font-weight: 600; color: var(--ink); flex: 1; }
.wh-result-time { font-size: 12px; color: var(--muted); }
.wh-result-error-msg { font-size: 12px; color: #dc2626; margin-bottom: 6px; }
.wh-result-body {
  background: var(--bg2);
  border-radius: 6px;
  padding: 8px;
  font-size: 11px;
  font-family: monospace;
  color: var(--ink);
  max-height: 120px;
  overflow: auto;
  white-space: pre;
  margin: 0;
}
.wh-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 7px;
  min-width: 36px;
}
.wh-status-badge.ok { background: rgba(34,197,94,0.15); color: #16a34a; }
.wh-status-badge.err { background: rgba(239,68,68,0.15); color: #dc2626; }
.wh-status-badge.sm { font-size: 10px; padding: 1px 5px; }
.wh-history { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.wh-history-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.wh-history-empty { font-size: 12px; color: var(--muted); font-style: italic; }
.wh-history-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.wh-history-item:last-child { border-bottom: none; }
.wh-history-event { flex: 1; color: var(--ink); font-family: monospace; font-size: 11px; }
.wh-history-time { color: var(--muted); }
.wh-history-ts { color: var(--muted); font-size: 11px; }

[data-theme="dark"] .wh-payload-preview { background: var(--surface); }
[data-theme="dark"] .wh-result-body { background: var(--surface); }

/* ==========================================
   CLIENT ANALYTICS V2 (Wave 25A)
   ========================================== */

.period-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.period-tab {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.period-tab.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.period-tab:hover:not(.active) { color: var(--ink); }

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .analytics-grid { grid-template-columns: 1fr; }
}

/* Funnel chart */
.funnel-bars { display: flex; flex-direction: column; gap: 12px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-label { width: 110px; flex-shrink: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.funnel-bar-wrap { flex: 1; background: var(--bg2); border-radius: 4px; height: 20px; overflow: hidden; }
.funnel-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.funnel-val { width: 32px; text-align: right; font-size: 14px; font-weight: 700; color: var(--ink); }

[data-theme="dark"] .period-tab.active { background: var(--surface); }

/* ==========================================
   BULK ADMIN + AUDIT LOG (Wave 25B)
   ========================================== */

/* Bulk action bar */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bulk-bar.hidden { display: none; }
.bulk-bar-count { font-size: 13px; font-weight: 600; margin-right: 4px; }
.bulk-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #dc2626;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* Bulk checkboxes */
.bulk-cb { cursor: pointer; accent-color: var(--accent); width: 15px; height: 15px; }

/* Admin global search */
.admin-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.admin-search-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.admin-search-input:focus { border-color: var(--accent); }
.admin-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 500;
  max-height: 280px;
  overflow-y: auto;
}
.admin-search-dropdown.hidden { display: none; }
.asr-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.asr-item:last-child { border-bottom: none; }
.asr-item:hover { background: var(--bg2); }
.asr-sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.asr-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

[data-theme="dark"] .admin-search-dropdown { background: var(--surface); }
[data-theme="dark"] .bulk-bar { background: #1a1916; }

/* ==========================================
   DISPUTE RESOLUTION (Wave 26B)
   ========================================== */

.dispute-banner {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 12px;
  padding: 14px 16px;
}
.dispute-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.dispute-note {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 4px;
}
.dispute-meta { font-size: 12px; color: var(--muted); }

.resolution-banner {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 12px;
  padding: 14px 16px;
}
.resolution-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
}
.resolution-note {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 4px;
}

/* Admin dispute filter tabs */
.tab-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tab-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.badge-count {
  background: #D94F0C;
  color: #fff;
  border-radius: 20px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
}

/* Admin modal */
#admin-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--bg);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 0;
}
.modal-body { padding: 16px 24px 24px; }

[data-theme="dark"] .dispute-banner { background: rgba(245,158,11,0.06); }
[data-theme="dark"] .resolution-banner { background: rgba(34,197,94,0.06); }
[data-theme="dark"] .modal-box { background: var(--surface); }

/* ==========================================
   AGENT VERIFICATION BADGES (Wave 26A)
   ========================================== */

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(99,102,241,0.12));
  color: #3b82f6;
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  vertical-align: middle;
  margin-left: 6px;
}
.verified-badge svg { flex-shrink: 0; }
.verified-badge-sm { font-size: 10px; padding: 1px 6px; }

.verified-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.verified-status-pill.verified {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}
.verified-status-pill.unverified {
  background: var(--bg2);
  color: var(--muted);
}

[data-theme="dark"] .verified-badge {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
}

/* ==========================================
   UX POLISH - KEYBOARD SHORTCUTS (Wave 27B)
   ========================================== */

.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.shortcut-row:last-child { border-bottom: none; }

kbd.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--border2);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Epilogue', monospace;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
kbd.shortcut-key-sm {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Epilogue', monospace;
  color: var(--ink);
}
.shortcut-desc {
  font-size: 13px;
  color: var(--ink2);
}

/* Keyboard shortcut hint in topbar */
.kb-hint {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.kb-hint kbd {
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  font-family: 'Epilogue', monospace;
}

[data-theme="dark"] kbd.shortcut-key {
  background: var(--surface2);
  border-color: var(--border2);
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

/* ==========================================
   TEAM INVITES (Wave 27A)
   ========================================== */

.team-invite-form {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.team-invite-form .form-input { flex: 1; }

.team-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--surface);
}
.team-member-avi {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.team-member-info { flex: 1; min-width: 0; }
.team-member-name { font-weight: 600; font-size: 14px; }
.team-member-email { font-size: 12px; color: var(--muted); }

.invite-pending-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--bg2);
}
.invite-pending-email { flex: 1; font-size: 13px; color: var(--muted); }

[data-theme="dark"] .team-member-card { background: var(--surface); }
[data-theme="dark"] .invite-pending-card { background: var(--surface2); }

/* ==========================================
   WEBHOOK EVENT LOG (Wave 28B)
   ========================================== */

.wh-log-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}
.wh-log-item:hover { border-color: var(--accent); }
.wh-log-item.success { border-left: 3px solid #22c55e; }
.wh-log-item.fail { border-left: 3px solid #ef4444; }

.wh-log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.wh-log-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.wh-log-type {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-log-status { font-size: 12px; color: var(--muted); }
.wh-log-duration { font-size: 12px; color: var(--muted); }
.wh-log-time { font-size: 11px; margin-left: auto; white-space: nowrap; }
.wh-log-toggle { font-size: 10px; color: var(--muted); flex-shrink: 0; }

.wh-log-detail {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--bg2);
}
.wh-log-detail.hidden { display: none; }
.wh-log-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  margin-top: 10px;
}
.wh-log-section-label:first-child { margin-top: 0; }
.wh-log-pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
  font-family: monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
}
.wh-log-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

[data-theme="dark"] .wh-log-detail { background: var(--surface2); }
[data-theme="dark"] .wh-log-pre { background: var(--surface); }

/* ==========================================
   ADVANCED SEARCH & FILTERS (Wave 28A)
   ========================================== */

.browse-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
}
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.filter-panel-title { font-weight: 700; font-size: 14px; }

.filter-group { margin-bottom: 18px; }
.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-range-sep { color: var(--muted); font-size: 13px; }

.rating-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.rating-filter-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink2);
  transition: all 0.15s;
}
.rating-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.rating-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.filter-toggle-row input { cursor: pointer; }

/* Active filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(217,79,12,0.2);
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  font-weight: 600;
}
.filter-chip button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  font-weight: 700;
}

/* Result count */
.result-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.result-count strong { color: var(--ink); }

/* Mobile: stack layout */
@media (max-width: 768px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}

[data-theme="dark"] .filter-panel { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .rating-filter-btn { background: var(--surface2); border-color: var(--border2); }

/* ─── Setup Wizard ────────────────────────────────────────────────────────── */
.wizard-progress { height: 4px; background: var(--border); border-radius: 4px; margin-bottom: 20px; }
.wizard-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.wizard-step-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.wizard-step-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }

/* ─── Activity Feed ───────────────────────────────────────────────────────── */
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.activity-dot.activity-info { background: #3b82f6; }
.activity-dot.activity-success { background: #22c55e; }
.activity-dot.activity-error { background: #ef4444; }
.activity-dot.activity-warning { background: #f59e0b; }
.activity-msg { flex: 1; font-size: 13px; color: var(--ink2); }
.activity-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ─── Status Dot ─────────────────────────────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot-green { background: #22c55e; }
.status-dot-red { background: #ef4444; }
.status-dot-amber { background: #f59e0b; }

/* ─── Capability Schema Builder ──────────────────────────────────────────── */
.schema-step-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--bg); }
.schema-step-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.schema-tag-label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; font-size: 12px; cursor: pointer; background: var(--surface); transition: background 0.15s, border-color 0.15s; }
.schema-tag-label:hover { border-color: var(--accent); }
.schema-tag-label input { display: none; }
.schema-tag-label:has(input:checked) { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ─── Collapsible ─────────────────────────────────────────────────────────── */
.collapsible-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.collapsible-body { display: none; }
.collapsible-body.open { display: block; }

/* ==========================================
   CSV EXPORT (Wave 29A)
   ========================================== */

/* Export buttons use existing .btn .btn-secondary .btn-sm styles */

/* ==========================================
   PUBLIC SEO PROFILES (Wave 29B)
   ========================================== */

/* ─── Activity Feed ───────────────────────────────────────────────────────── */
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.activity-dot.activity-info { background: #3b82f6; }
.activity-dot.activity-success { background: #22c55e; }
.activity-dot.activity-error { background: #ef4444; }
.activity-dot.activity-warning { background: #f59e0b; }
.activity-msg { flex: 1; font-size: 13px; color: var(--ink2); }
.activity-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ─── Status Dot ─────────────────────────────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot-green { background: #22c55e; }
.status-dot-red { background: #ef4444; }
.status-dot-amber { background: #f59e0b; }

/* ─── Capability Schema Builder ──────────────────────────────────────────── */
.schema-step-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--bg); }
.schema-step-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.schema-tag-label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; font-size: 12px; cursor: pointer; background: var(--surface); transition: background 0.15s, border-color 0.15s; }
.schema-tag-label:hover { border-color: var(--accent); }
.schema-tag-label input { display: none; }
.schema-tag-label:has(input:checked) { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ─── Collapsible ─────────────────────────────────────────────────────────── */
.collapsible-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.collapsible-body { display: none; }
.collapsible-body.open { display: block; }
