/* ============================================================
   style.css — שדה חמד / mdsh-pro
   Based on Claude Design handoff (Dashboard variation A)
   Depends on tokens.css (loaded first in base.html)
   ============================================================ */

/* Legacy alias — some templates still reference brand-primary */
:root {
  --brand-primary: var(--pine-700);
  --brand-primary-hover: var(--pine-800);
  --shadow-sm: var(--sh-sm);
  --shadow-md: var(--sh-md);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96) translateY(-8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.page-enter { animation: fadeInUp 0.45s var(--ease-soft); }

/* ===== APP SHELL ===== */
.app-shell {
  display: flex;
  flex-direction: row; /* in RTL, first child (sidebar) renders on the RIGHT */
  min-height: 100vh;
  background: var(--bg-page);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-content { flex: 1; padding: 0; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 256px; flex-shrink: 0;
  height: 100vh; position: sticky; top: 0;
  background: var(--bg-sidebar);
  border-inline-start: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  z-index: 50;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
}
.sidebar-brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--pine-700), var(--pine-900));
  box-shadow: 0 4px 10px rgba(38, 88, 82, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-logo svg { width: 22px; height: 22px; }
.sidebar-brand-title {
  font-weight: 800; font-size: 16px; color: var(--fg-strong);
  letter-spacing: -0.01em; line-height: 1.1;
}
.sidebar-brand-subtitle {
  font-size: 11px; color: var(--fg-muted); font-weight: 500;
}

/* Search trigger */
.sidebar-search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; height: 36px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--fg-muted); font-size: 13px; font-weight: 500;
  text-align: right; cursor: pointer;
  width: 100%;
}
.sidebar-search:hover { background: var(--bg-muted); color: var(--fg-default); }
.sidebar-search .spacer { flex: 1; }

/* Nav group */
.nav-group-title {
  font-size: 11px; font-weight: 700; color: var(--fg-subtle);
  padding: 0 10px 8px; letter-spacing: 0.05em; text-transform: uppercase;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px; height: 38px;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--fg-default); font-weight: 500; font-size: 14px;
  position: relative;
  transition: all var(--dur-fast) var(--ease-soft);
  text-align: right; text-decoration: none;
  cursor: pointer;
}
.nav-item:hover { background: rgba(0,0,0,0.035); }
.nav-item.active {
  background: var(--bg-surface);
  color: var(--fg-strong);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--border-default);
}
.nav-item.active .nav-icon { color: var(--accent-peach); }
.nav-item.disabled { opacity: 0.5; pointer-events: none; }
.nav-item .nav-icon { flex-shrink: 0; width: 18px; height: 18px; }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--bg-muted); color: var(--fg-muted);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-item.active .nav-badge { background: var(--accent-primary); color: #fff; }
.nav-soon {
  font-size: 10px; font-weight: 600;
  background: var(--bg-muted); color: var(--fg-muted);
  padding: 2px 6px; border-radius: 999px;
}

/* Peach "last update" card in sidebar */
.sidebar-spacer { flex: 1; }
.sidebar-tip {
  padding: 14px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--peach-100), var(--peach-200));
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.sidebar-tip::before {
  content: ''; position: absolute;
  top: -20px; inset-inline-end: -20px; width: 80px; height: 80px;
  border-radius: 50%; background: var(--peach-300); opacity: 0.5;
}
.sidebar-tip-body { position: relative; z-index: 1; }
.sidebar-tip-title {
  font-size: 13px; font-weight: 700; color: var(--brown-800);
  margin-top: 8px; margin-bottom: 2px;
}
.sidebar-tip-text {
  font-size: 12px; color: var(--brown-700); line-height: 1.5; margin-bottom: 10px;
}
.sidebar-tip-link {
  font-size: 12px; font-weight: 700; color: var(--brown-800);
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 0; cursor: pointer;
}

/* User pod */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px; font-weight: 700; color: var(--fg-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: var(--fg-muted); }

/* Avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; letter-spacing: -0.02em;
  background: var(--pine-100); color: var(--pine-800);
  font-size: 13px;
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.ring-peach { box-shadow: 0 0 0 2px var(--peach-400), 0 0 0 4px var(--bg-surface); }

/* ===== TOPBAR ===== */
.topbar {
  height: 64px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(8px);
}
.topbar-title-wrap { flex: 1; }
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-muted); margin-bottom: 2px;
}
.breadcrumbs .crumb-sep { color: var(--fg-subtle); }
.breadcrumbs .crumb-last { font-weight: 600; color: var(--fg-default); }
.topbar-title {
  font-size: 20px; font-weight: 800;
  color: var(--fg-strong); letter-spacing: -0.015em;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px;
  border-radius: var(--r-md); background: var(--bg-surface);
  border: 1px solid var(--border-default); color: var(--fg-muted);
  font-size: 13px; cursor: pointer;
}
.topbar-search:hover { background: var(--bg-muted); }
.topbar-search-divider { width: 1px; height: 16px; background: var(--border-default); margin: 0 4px; }
.topbar-divider { width: 1px; height: 24px; background: var(--border-default); margin: 0 4px; }

.kbd {
  display: inline-block; padding: 2px 6px;
  font-size: 11px; font-weight: 600; font-family: var(--font-mono);
  color: var(--fg-muted); background: var(--bg-surface);
  border: 1px solid var(--border-default); border-bottom-width: 2px;
  border-radius: 4px; line-height: 1.2;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-md);
  cursor: pointer; border: none;
  transition: all var(--dur-fast) var(--ease-soft);
  letter-spacing: -0.005em;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; gap: 10px; }
.btn.primary {
  background: var(--accent-primary); color: #fff;
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn.primary:hover { background: var(--accent-primary-hover); }
.btn.secondary {
  background: var(--bg-surface); color: var(--fg-strong);
  border: 1px solid var(--border-default); box-shadow: var(--sh-xs);
}
.btn.secondary:hover { border-color: var(--border-strong); }
.btn.ghost { background: transparent; color: var(--fg-default); }
.btn.ghost:hover { background: var(--bg-muted); }
.btn.peach {
  background: linear-gradient(180deg, var(--peach-500), var(--peach-600));
  color: var(--brown-900); box-shadow: var(--sh-sm);
}
.btn.peach:hover { filter: brightness(1.05); }
.btn.danger { background: var(--rose-500); color: #fff; box-shadow: var(--sh-sm); }
.btn.danger:hover { background: var(--rose-700); }
.btn.on-dark {
  background: rgba(255,255,255,0.15); color: #fff;
  backdrop-filter: blur(4px);
}
.btn.on-dark:hover { background: rgba(255,255,255,0.25); }
.btn-new-inquiry {
  /* legacy class used in a few templates — alias to primary */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-md);
  background: var(--accent-primary); color: #fff;
  box-shadow: var(--sh-sm); transition: all var(--dur-fast) var(--ease-soft);
}
.btn-new-inquiry:hover { background: var(--accent-primary-hover); color: #fff; }

/* Icon button */
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); background: transparent;
  color: var(--fg-default); border: none; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-soft);
}
.icon-btn:hover { background: var(--bg-muted); }

/* ===== CARDS ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-xs);
  transition: all var(--dur-base) var(--ease-soft);
}
.card.hoverable:hover {
  box-shadow: var(--sh-md); transform: translateY(-2px);
  border-color: var(--border-default);
}
.card.flush { padding: 0; overflow: hidden; }

.card-title {
  font-size: 16px; font-weight: 800;
  color: var(--fg-strong); margin: 0;
}
.card-subtitle {
  font-size: 12px; color: var(--fg-muted); margin-top: 2px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  line-height: 1; white-space: nowrap;
}
.badge.sm { padding: 2px 8px; font-size: 11px; }
.badge.lg { padding: 6px 12px; font-size: 13px; }
.badge.neutral { background: var(--cream-100); color: var(--brown-800); }
.badge.brand { background: var(--pine-100); color: var(--pine-800); }
.badge.azure { background: var(--azure-50); color: var(--azure-700); }
.badge.violet { background: var(--violet-50); color: var(--violet-700); }
.badge.peach { background: var(--peach-100); color: var(--brown-700); }
.badge.success { background: var(--status-success-bg); color: var(--status-success-fg); }
.badge.warning { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.badge.danger { background: var(--status-danger-bg); color: var(--status-danger-fg); }
.badge.info { background: var(--status-info-bg); color: var(--status-info-fg); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.neutral .badge-dot { background: var(--brown-500); }
.badge.brand .badge-dot { background: var(--pine-600); }
.badge.azure .badge-dot { background: var(--azure-500); }
.badge.violet .badge-dot { background: var(--violet-500); }
.badge.peach .badge-dot { background: var(--peach-600); }
.badge.success .badge-dot { background: var(--green-500); }
.badge.warning .badge-dot { background: var(--amber-500); }
.badge.danger .badge-dot { background: var(--rose-500); }

/* ===== HERO (Variation A greeting) ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e3d3a 0%, #2f6a62 55%, #3c837a 100%);
  color: #fff; border-radius: var(--r-xl);
}
.hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
}
.hero-house-deco {
  position: absolute; top: -30px; inset-inline-start: -40px;
  width: 220px; height: 220px; opacity: 0.15; pointer-events: none;
}
.hero-body {
  position: relative;
  padding: 36px 40px;
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 320px; }
.hero-date {
  font-size: 13px; font-weight: 600; opacity: 0.75;
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.hero-greeting {
  font-family: var(--font-display-chunky);
  font-size: 36px; font-weight: 400; letter-spacing: -0.01em;
  margin: 0 0 6px; line-height: 1.1;
}
.hero-subtitle {
  font-size: 16px; opacity: 0.85; max-width: 520px; line-height: 1.55;
}
.hero-subtitle b { color: #fde4d6; font-weight: 700; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.hero-pills { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.hero-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.hero-pill-icon {
  width: 28px; height: 28px; border-radius: 8px;
  color: var(--pine-900);
  display: flex; align-items: center; justify-content: center;
}
.hero-pill-label { font-size: 13px; font-weight: 700; }
.hero-pill-time { font-size: 11px; opacity: 0.7; }

/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--sh-xs);
  transition: all var(--dur-base) var(--ease-soft);
}
.stat-card:hover {
  box-shadow: var(--sh-md); transform: translateY(-2px);
  border-color: var(--border-default);
}
.stat-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.stat-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-card-icon.pine   { background: var(--pine-100);   color: var(--pine-700); }
.stat-card-icon.azure  { background: var(--azure-50);   color: var(--azure-600); }
.stat-card-icon.peach  { background: var(--peach-100);  color: var(--peach-700); }
.stat-card-icon.violet { background: var(--violet-50);  color: var(--violet-600); }
.stat-card-icon.green  { background: var(--green-100);  color: var(--green-700); }
.stat-card-icon.amber  { background: var(--amber-100);  color: var(--amber-700); }
.stat-card-icon.rose   { background: var(--rose-100);   color: var(--rose-700); }
.stat-card-label {
  font-size: 13px; color: var(--fg-muted); font-weight: 600;
}
.stat-card-value-row {
  display: flex; align-items: baseline; gap: 6px; margin-top: 2px;
}
.stat-card-value {
  font-size: 28px; font-weight: 800;
  color: var(--fg-strong); letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.stat-card-suffix {
  font-size: 14px; color: var(--fg-muted); font-weight: 600;
}
.stat-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* ===== MODULE CARD (landing entry cards) ===== */
.module-card {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 20px; text-decoration: none;
  color: var(--fg-default);
  box-shadow: var(--sh-xs);
  transition: all var(--dur-base) var(--ease-soft);
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--border-default);
  color: var(--fg-default);
}
.module-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.module-card-icon i { font-size: 24px; }
.module-card-title {
  font-size: 17px; font-weight: 800; color: var(--fg-strong);
  margin-bottom: 4px; letter-spacing: -0.01em;
}
.module-card-count {
  font-size: 28px; font-weight: 800; color: var(--accent-primary);
  font-feature-settings: "tnum"; letter-spacing: -0.02em;
  margin: 8px 0 4px;
}

/* ===== SCHEDULE TIMELINE ===== */
.schedule-block { position: relative; }
.schedule-spine {
  position: absolute; inset-inline-end: 62px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border-subtle); border-radius: 2px;
}
.schedule-list { display: flex; flex-direction: column; gap: 2px; }
.schedule-row {
  display: flex; gap: 14px; padding: 10px 0; align-items: center;
  animation: slideIn 400ms var(--ease-soft) backwards;
}
.schedule-time {
  width: 50px; font-size: 13px; font-weight: 700;
  color: var(--fg-strong); text-align: left; font-feature-settings: "tnum";
}
.schedule-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-primary);
  position: relative; z-index: 1; flex-shrink: 0;
}
.schedule-dot.azure { border-color: var(--azure-500); }
.schedule-dot.peach { border-color: var(--peach-600); }
.schedule-dot.violet { border-color: var(--violet-500); }
.schedule-dot.success { border-color: var(--green-500); }
.schedule-dot.warning { border-color: var(--amber-500); }
.schedule-body {
  flex: 1; padding: 10px 14px;
  background: var(--bg-surface-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 12px;
  transition: all var(--dur-fast) var(--ease-soft);
  cursor: pointer;
}
.schedule-body:hover {
  border-color: var(--border-default);
  transform: translateX(-2px);
}
.schedule-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.schedule-icon.brand { background: var(--pine-100); color: var(--pine-700); }
.schedule-icon.azure { background: var(--azure-50); color: var(--azure-600); }
.schedule-icon.peach { background: var(--peach-100); color: var(--peach-700); }
.schedule-icon.violet { background: var(--violet-50); color: var(--violet-600); }
.schedule-icon.success { background: var(--green-100); color: var(--green-700); }
.schedule-icon.warning { background: var(--amber-100); color: var(--amber-700); }
.schedule-title { font-size: 14px; font-weight: 700; color: var(--fg-strong); }
.schedule-meta {
  font-size: 12px; color: var(--fg-muted);
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.schedule-meta .dot {
  width: 3px; height: 3px; border-radius: 50%; background: var(--fg-subtle);
}

/* Segmented pill filter (used in schedule + spotlight) */
.seg-filter {
  display: inline-flex; gap: 4px;
  background: var(--bg-muted);
  padding: 3px; border-radius: var(--r-md);
}
.seg-filter button {
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  border-radius: 6px; color: var(--fg-muted);
  background: transparent; border: none; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-soft);
}
.seg-filter button.active {
  background: var(--bg-surface); color: var(--fg-strong);
  box-shadow: var(--sh-xs);
}

/* ===== HOUSES PANEL ===== */
.houses-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.house-card {
  padding: 16px; border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  transition: all var(--dur-base) var(--ease-soft);
  cursor: pointer;
  position: relative; overflow: hidden;
}
.house-card:hover {
  transform: translateY(-2px); box-shadow: var(--sh-md);
}
.house-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.house-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pine-100); color: var(--pine-700);
}
.house-icon.azure { background: var(--azure-50); color: var(--azure-600); }
.house-icon.violet { background: var(--violet-50); color: var(--violet-600); }
.house-icon.peach { background: var(--peach-100); color: var(--peach-700); }
.house-name { font-size: 14px; font-weight: 700; color: var(--fg-strong); }
.house-staff { font-size: 11px; color: var(--fg-muted); }
.house-row {
  display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px;
}
.house-muted { color: var(--fg-muted); font-weight: 500; }
.house-strong { font-weight: 700; color: var(--fg-strong); font-feature-settings: "tnum"; }
.house-progress {
  height: 6px; background: var(--bg-muted);
  border-radius: 999px; overflow: hidden;
}
.house-progress-bar {
  height: 100%; border-radius: 999px;
  background: var(--pine-600);
  transition: width 600ms var(--ease-soft);
}
.house-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
}

/* ===== TASKS PANEL ===== */
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-soft);
  cursor: pointer;
}
.task-row:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-subtle);
}
.task-check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: transparent; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-soft);
}
.task-check.done {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.task-label {
  font-size: 13px; font-weight: 600; color: var(--fg-strong);
}
.task-label.done {
  color: var(--fg-muted); text-decoration: line-through;
}
.task-due { font-size: 11px; color: var(--fg-muted); margin-top: 1px; }

/* ===== RESIDENTS SPOTLIGHT ===== */
.spotlight-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  transition: all var(--dur-fast) var(--ease-soft);
  cursor: pointer; text-decoration: none; color: inherit;
}
.spotlight-row:hover {
  border-color: var(--border-default);
  transform: translateX(-2px);
}
.spotlight-divider {
  width: 1px; background: var(--border-subtle);
  align-self: stretch;
}
.spotlight-metric {
  text-align: center; padding: 0 12px;
  border-inline-start: 1px solid var(--border-subtle);
}
.spotlight-metric-value {
  font-size: 16px; font-weight: 800;
  color: var(--fg-strong); font-feature-settings: "tnum";
}
.spotlight-metric-label {
  font-size: 10px; color: var(--fg-muted); font-weight: 600;
}

/* ===== ACTIVITY FEED ===== */
.activity-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px;
}
.activity-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--fg-default); line-height: 1.5; padding-top: 3px; }
.activity-text b { color: var(--fg-strong); }
.activity-target { color: var(--accent-primary); font-weight: 700; }
.activity-time { font-size: 11px; color: var(--fg-muted); margin-top: 2px; }
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-muted);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500);
  animation: pulse 2s infinite;
}

/* ===== ALERTS (flash messages) ===== */
.alert {
  padding: 12px 16px; border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--status-success-bg); color: var(--status-success-fg); border-color: var(--status-success-fg); }
.alert-danger  { background: var(--status-danger-bg);  color: var(--status-danger-fg);  border-color: var(--status-danger-fg); }
.alert-warning { background: var(--status-warning-bg); color: var(--status-warning-fg); border-color: var(--status-warning-fg); }
.alert-info    { background: var(--status-info-bg);    color: var(--status-info-fg);    border-color: var(--status-info-fg); }

/* ===== LEGACY DASHBOARD-HERO (used by existing templates) ===== */
.dashboard-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 28px 32px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}

/* ===== FORMS / BOOTSTRAP HARMONY ===== */
.form-control, .form-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--fg-strong);
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-soft);
}
.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: var(--sh-focus);
  background: var(--bg-surface);
  color: var(--fg-strong);
}
.form-label {
  font-size: 13px; font-weight: 600;
  color: var(--fg-default); margin-bottom: 4px;
}

.table {
  --bs-table-bg: var(--bg-surface);
  --bs-table-color: var(--fg-default);
  --bs-table-border-color: var(--border-subtle);
  --bs-table-striped-bg: var(--bg-surface-2);
  --bs-table-hover-bg: var(--bg-surface-2);
  --bs-table-hover-color: var(--fg-strong);
}
.table thead.table-light {
  --bs-table-bg: var(--bg-surface-2);
  --bs-table-color: var(--fg-default);
  font-weight: 700;
}

/* Utility */
.text-muted { color: var(--fg-muted) !important; }
.text-danger { color: var(--status-danger-fg) !important; }
.text-success { color: var(--status-success-fg) !important; }
.text-warning { color: var(--status-warning-fg) !important; }

/* Command palette backdrop */
.cmd-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 13, 11, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: fadeIn 160ms var(--ease-soft);
}
.cmd-panel {
  width: min(640px, 90vw);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  animation: scaleIn 200ms var(--ease-soft);
}
.cmd-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-subtle);
}
.cmd-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 15px; color: var(--fg-strong); font-family: inherit;
  text-align: right;
}
.cmd-list { max-height: 360px; overflow-y: auto; padding: 8px 0; }
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; cursor: pointer;
  color: var(--fg-default); font-size: 14px;
}
.cmd-item:hover { background: var(--bg-muted); color: var(--fg-strong); }
.cmd-item-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-muted); color: var(--fg-default);
  display: flex; align-items: center; justify-content: center;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar { width: 72px; padding: 18px 8px; }
  .sidebar-brand-text, .nav-label, .nav-soon, .sidebar-tip, .sidebar-search span, .sidebar-user-info,
  .nav-group-title { display: none; }
  .sidebar-brand { justify-content: center; }
  .nav-item { justify-content: center; padding: 0 8px; }
  .sidebar-search { padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; }
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar-search { display: none; }
}

/* === Modal animations (globally applied to all .modal.fade) === */
.modal.fade .modal-dialog {
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease-out;
  opacity: 0;
}
.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-backdrop.fade {
  transition: opacity 0.2s ease-out;
}

/* Slightly elevated shadow for the modal content card */
.modal-content {
  border: none;
  box-shadow: 0 24px 48px rgba(80, 50, 30, 0.18);
}

/* === Brand voice utilities === */
/* Handwritten signature moments — taglines, empty states, email footers */
.tagline {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 600;
  color: var(--brown-800);
  line-height: 1.3;
}
.tagline.lg { font-size: 28px; }
.tagline.on-dark { color: var(--peach-300); }

/* Chunky display title — Suez One, brand-true heading moments */
.display-chunky {
  font-family: var(--font-display-chunky);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--fg-strong);
}
