/* ============================================================================
   GNR SYSTEM — Griho Nirman Realty Pvt. Ltd. (Executive ERP & CRM Design System)
   Exact Visual Parity with the Live Software UI/UX — Pure CSS3 (No Frameworks)
   Typography: Plus Jakarta Sans (Display) + DM Sans (Body) + JetBrains Mono (Data)
   ============================================================================ */

:root {
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg-app: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-sidebar: #111827;
  --bg-sidebar-hover: rgba(30, 41, 59, 0.72);
  --bg-strip: #0f172a;
  --border: #e2e8f0;
  --border-dark: #1e293b;

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --brand: #047857;
  --brand-hover: #065f46;
  --brand-600: #059669;
  --brand-soft: #ecfdf5;
  --teal: #0f766e;
  --teal-hover: #115e59;
  --sky: #0284c7;
  --amber: #d97706;
  --amber-hover: #b45309;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 48px rgba(7, 13, 25, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-main);
  background-color: var(--bg-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

button, input, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.font-mono, .tabular-nums, code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

/* Custom thin scrollbars */
.gnr-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.gnr-scroll::-webkit-scrollbar-track { background: transparent; }
.gnr-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 3px; }
.gnr-scroll::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.55); }

/* ============================================================================
   1. PORTAL GATEWAY (Full-bleed Architectural Backdrop + 3 Frosted Cards)
   ============================================================================ */
.portal-gateway-body {
  min-height: 100vh;
  background-color: #0b1220;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.gateway-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.gateway-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.gateway-backdrop-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 13, 25, 0.90) 0%, rgba(11, 18, 32, 0.82) 50%, rgba(7, 13, 25, 0.96) 100%);
}

.gateway-header {
  position: relative;
  z-index: 10;
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: #cbd5e1;
}

.gateway-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.gateway-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.gateway-hero {
  max-width: 680px;
  margin-bottom: 40px;
}

.gateway-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #34d399;
  margin-bottom: 12px;
}

.gateway-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  text-wrap: balance;
}

.gateway-hero p {
  margin: 16px 0 0;
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
}

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

.portal-card {
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 22px 44px rgba(2, 44, 34, 0.45);
}

.portal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.portal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.portal-icon.admin { background: #047857; }
.portal-icon.employee { background: #0f766e; }
.portal-icon.agent { background: #d97706; }

.portal-path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
}

.portal-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.portal-card p {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
}

.portal-features {
  list-style: none;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #1e293b;
}

.portal-features li {
  font-size: 11.5px;
  color: #94a3b8;
  padding: 4px 0 4px 14px;
  position: relative;
}

.portal-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #047857;
  position: absolute;
  left: 0;
  top: 10px;
}

.portal-card.employee-card .portal-features li::before { background: #0f766e; }
.portal-card.agent-card .portal-features li::before { background: #d97706; }

.portal-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: var(--brand);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.portal-btn:hover { background: var(--brand-hover); }
.portal-btn.employee-btn { background: var(--teal); }
.portal-btn.employee-btn:hover { background: var(--teal-hover); }
.portal-btn.agent-btn { background: var(--amber); }
.portal-btn.agent-btn:hover { background: var(--amber-hover); }

.gateway-footer {
  position: relative;
  z-index: 10;
  max-width: 1152px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
}

/* ============================================================================
   2. DEDICATED SPLIT-SCREEN LOGIN PAGES (Admin, Employee, Agent)
   ============================================================================ */
.split-login-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg-app);
}

.split-login-aside {
  position: relative;
  width: 46%;
  min-height: 100vh;
  color: #ffffff;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  flex-shrink: 0;
}

.split-login-aside.theme-admin {
  background: linear-gradient(135deg, #071612 0%, #0c2620 50%, #0b1324 100%);
}
.split-login-aside.theme-employee {
  background: linear-gradient(135deg, #091823 0%, #0f293a 50%, #0c1626 100%);
}
.split-login-aside.theme-agent {
  background: linear-gradient(135deg, #1a130b 0%, #271c10 50%, #0f172a 100%);
}

.split-aside-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

.split-aside-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.90) 0%, rgba(2, 6, 23, 0.55) 55%, rgba(2, 6, 23, 0.78) 100%);
  pointer-events: none;
}

.split-aside-top, .split-aside-mid, .split-aside-foot {
  position: relative;
  z-index: 2;
}

.split-aside-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.all-portals-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.all-portals-btn:hover { background: rgba(255, 255, 255, 0.20); }

.split-aside-mid {
  max-width: 440px;
  margin: 40px 0;
}

.split-aside-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e2e8f0;
  margin-bottom: 14px;
}

.split-aside-mid h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  color: #ffffff;
}

.split-aside-mid p {
  margin: 0 0 22px;
  font-size: 14px;
  color: #cbd5e1;
}

.split-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
}

.split-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.split-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.split-aside-foot {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}

.split-login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.split-form-wrap {
  width: 100%;
  max-width: 430px;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.login-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.login-card-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.login-card h2 {
  margin: 2px 0 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
}

.login-card-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.login-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
}

.input-icon-wrap {
  position: relative;
}

.input-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
}

.input-with-icon {
  padding-left: 38px !important;
  padding-right: 38px !important;
  background: rgba(248, 250, 252, 0.75) !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.input-with-icon:focus {
  background: #ffffff !important;
}

.pwd-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.pwd-toggle-btn:hover { color: #334155; }

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.demo-cred-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.demo-cred-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  padding: 10px 14px;
}

.demo-cred-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.demo-cred-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

.demo-cred-line strong { color: #0f172a; }

.login-bottom-nav {
  margin-top: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.login-bottom-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #334155;
}

.login-bottom-nav a.portal-switch {
  font-weight: 600;
  color: var(--brand);
}

.login-bottom-nav a.portal-switch:hover { text-decoration: underline; }

/* ============================================================================
   3. WORKSPACE SHELL (Dark Navy Sidebar + Sticky 2-Row Executive Header)
   ============================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  width: 252px;
  background: var(--bg-sidebar);
  color: #cbd5e1;
  flex-shrink: 0;
  border-right: 1px solid #1e293b;
  transition: width 0.2s ease, transform 0.2s ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

.sidebar-sticky {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 68px;
}

.sidebar.collapsed .sb-hide-compact {
  display: none !important;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 0 10px;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .nav-group-btn {
  justify-content: center;
  padding: 9px;
}

.sidebar.collapsed .sub-menu-list {
  display: none !important;
}

.sidebar-brand {
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  flex-shrink: 0;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-collapse-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapse-btn:hover {
  color: #ffffff;
  background: #1e293b;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.nav-section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 2px 10px 8px;
}

.nav-link, .nav-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item-lead {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sub-menu-list .nav-item-lead {
  gap: 8px;
}

.nav-item-lead span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon {
  color: #94a3b8;
}

.nav-link:hover, .nav-group-btn:hover {
  background: rgba(30, 41, 59, 0.65);
  color: #ffffff;
}

.nav-group-btn.has-active {
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
}

.nav-group-btn.has-active .nav-icon {
  color: #34d399;
}

.nav-link.active {
  background: var(--brand);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.nav-link.active .nav-icon {
  color: #ffffff;
}

.nav-chevron {
  color: #94a3b8;
  display: inline-flex;
  transition: transform 0.18s ease;
  transform: rotate(-90deg);
}

.nav-group-btn.open .nav-chevron {
  transform: rotate(0deg);
}

.sub-menu-list {
  margin: 4px 0 6px 12px;
  padding-left: 12px;
  border-left: 1px solid #1e293b;
  display: none;
}

.sub-menu-list.open {
  display: block;
}

.sub-menu-list .nav-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1rem;
  padding: 6px 10px;
  margin-bottom: 2px;
  color: #94a3b8;
  border-radius: 6px;
}

.sub-menu-list .nav-link .nav-icon {
  color: rgba(56, 189, 248, 0.85);
}

.sub-menu-list .nav-link:hover {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.6);
}

.sub-menu-list .nav-link.active {
  background: var(--brand);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.4);
}

.sub-menu-list .nav-link.active .nav-icon {
  color: #a7f3d0;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  margin-bottom: 10px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(6, 78, 59, 0.85);
  border: 1px solid rgba(5, 150, 105, 0.45);
  color: #6ee7b7;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-signout-btn {
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid #334155;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.sidebar-signout-btn:hover {
  background: #334155;
  color: #ffffff;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  margin-left: 252px;
  transition: margin-left 0.2s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed + .main-wrap {
  margin-left: 68px;
}

/* Row 1: Sticky Crisp White Topbar (56px) */
.topbar {
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  min-width: 0;
}

.topbar-crumb-org {
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.topbar-crumb-sep {
  color: #cbd5e1;
}

.topbar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.topbar-portal-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.topbar-profile-chip:hover { background: #f1f5f9; }

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-profile-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.topbar-profile-role {
  font-weight: 400;
  color: #64748b;
}

/* Alerts Popover */
.alerts-wrap { position: relative; }

.alerts-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 12px;
  z-index: 60;
}

.alerts-popover.open { display: block; }

.alerts-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.alert-tile {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
}

.alert-tile.rose { background: #fff1f2; border-color: #ffe4e6; color: #9f1239; }
.alert-tile.amber { background: #fffbeb; border-color: #fef3c7; color: #92400e; }
.alert-tile.slate { background: #f8fafc; border-color: #e2e8f0; color: #1e293b; }

.alert-tile strong { display: block; font-size: 12px; }
.alert-tile span { display: block; font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* Row 2: Executive Dark Navy Context Strip */
.context-strip {
  background: var(--bg-strip);
  color: #e2e8f0;
  padding: 8px 22px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.scope-selector-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.scope-select-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 10px;
}

.scope-select-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.scope-select-input {
  background: transparent;
  border: none;
  color: #fcd34d;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 230px;
}

.scope-select-input option {
  background: #0f172a;
  color: #ffffff;
}

.scope-meta-text {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.scope-meta-text strong {
  color: #e2e8f0;
  font-weight: 500;
}

.quick-tabs-row {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.quick-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.quick-tab:hover {
  background: #1e293b;
  color: #ffffff;
}

.quick-tab.active {
  background: #059669;
  color: #ffffff;
}

.quick-tab-count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #1e293b;
  color: #94a3b8;
}

.quick-tab.active .quick-tab-count {
  background: rgba(6, 95, 70, 0.85);
  color: #d1fae5;
}

.content-area {
  padding: 22px;
  flex: 1;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================================
   4. EXECUTIVE DASHBOARD, KPI STRIP, CARDS, GRIDS & CHARTS
   ============================================================================ */
.page-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.page-subheader h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.page-subheader p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

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

.kpi-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-tag-rose { font-size: 11px; font-weight: 500; color: #e11d48; white-space: nowrap; }
.kpi-tag-emerald { font-size: 11px; font-weight: 500; color: #047857; white-space: nowrap; }
.kpi-tag-sky { font-size: 11px; font-weight: 500; color: #0369a1; white-space: nowrap; }
.kpi-tag-slate { font-size: 11px; font-weight: 500; color: #475569; white-space: nowrap; }

.kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 6px;
  color: var(--text-main);
  line-height: 1.15;
}

.kpi-value.brand { color: var(--brand); }

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.kpi-sub strong {
  color: #1e293b;
  font-family: var(--font-mono);
}

.kpi-sub .text-em { color: #047857; font-weight: 600; font-family: var(--font-mono); }

.bento-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

.card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}

.bento-12 .card-box {
  margin-bottom: 0;
}

.card-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.card-box-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.card-box-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.card-link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

.card-link-action:hover { color: var(--brand-hover); }

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

/* ============================================================================
   5. BUTTONS, FORMS, TABLES, TABS, MODALS, TIMELINE & TOASTS
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: #ffffff; color: #334155; border-color: var(--border); }
.btn-secondary:hover { background: #f8fafc; color: #0f172a; }
.btn-subtle { background: #f8fafc; color: #334155; border-color: var(--border); }
.btn-subtle:hover { background: #f1f5f9; }
.btn-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.btn-warning:hover { background: #fef3c7; }
.btn-danger { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.btn-danger:hover { background: #ffe4e6; }
.btn-info { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.btn-info:hover { background: #e0f2fe; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.req-star { color: var(--danger); font-weight: 700; }

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14);
}

textarea.form-control { min-height: 90px; resize: vertical; }

.input_alert {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  color: var(--danger);
  min-height: 14px;
}

.table-responsive { width: 100%; overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}

.data-table tbody tr:hover { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: #ecfdf5; color: #047857; }
.badge-danger { background: #fff1f2; color: #be123c; }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-info { background: #f0f9ff; color: #0369a1; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.thumb-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
}

/* Segmented Tabs */
.tab-bar {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100;
}

.modal-backdrop.open { display: flex; }

.modal-dialog {
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.modal-dialog.modal-lg { max-width: 1020px; }

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

.modal-header h4 { margin: 0; font-size: 15px; font-weight: 700; }

.modal-close {
  border: none;
  background: #f1f5f9;
  color: #334155;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 18px;
  cursor: pointer;
}

.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }

.modal-footer {
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Visual Funnel, Charts & Timeline */
.funnel-row { margin-bottom: 12px; }
.funnel-row:last-child { margin-bottom: 0; }

.funnel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 5px;
}

.funnel-meta strong { font-weight: 500; color: #334155; }
.funnel-meta span { font-family: var(--font-mono); font-weight: 700; color: #0f172a; }
.funnel-meta .pct-muted { font-weight: 400; color: #94a3b8; font-size: 11px; }

.funnel-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.funnel-fill {
  height: 100%;
  border-radius: 999px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: #475569;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.activity-feed-list {
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.activity-feed-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.activity-feed-item:first-child { padding-top: 0; }
.activity-feed-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-feed-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.activity-feed-actor { font-weight: 600; color: #0f172a; }
.activity-feed-portal { font-weight: 400; color: #64748b; }
.activity-feed-time { font-family: var(--font-mono); font-size: 10px; color: #94a3b8; }
.activity-feed-desc { margin: 3px 0 0; font-size: 12px; color: #475569; line-height: 1.4; }

.timeline-list {
  list-style: none;
  padding: 0 0 0 18px;
  margin: 0;
  border-left: 2px solid #cbd5e1;
}

.timeline-item { position: relative; padding: 0 0 16px 14px; }

.timeline-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #ffffff;
  position: absolute;
  left: -24px;
  top: 4px;
}

.timeline-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
}

/* Loading Overlay & Toasts */
.background_overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.spinner-box {
  background: #ffffff;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-md);
}

#toast_container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  padding: 11px 16px;
  border-radius: 9px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  min-width: 240px;
}

.toast-success { background: #047857; }
.toast-error { background: #dc2626; }
.toast-warning { background: #d97706; }
.toast-info { background: #0284c7; }

/* Mobile Overlay Backdrop */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  z-index: 35;
}

.mobile-drawer-backdrop.open { display: block; }

/* Shared Text & Empty State Helpers */
.text-muted { color: var(--text-muted); }

.empty-msg {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

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

.card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.card-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Client Tracker Split Workspace & Chronological Timeline */
.tracker-split {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.roster-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.roster-head strong {
  color: var(--text-main);
  font-weight: 700;
}

.roster-list {
  max-height: 680px;
  overflow-y: auto;
}

.roster-item {
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  padding: 13px 16px;
  cursor: pointer;
  display: block;
  transition: background-color 0.15s ease;
  font-family: inherit;
}

.roster-item:hover { background: #f8fafc; }
.roster-item.active { background: #ecfdf5; }

.roster-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.roster-item-top strong {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.roster-item-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.tracker-detail-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tracker-client-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.tracker-client-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.attr-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.attr-tile.purchased {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.attr-kicker {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.attr-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
}

.attr-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.tl-list {
  position: relative;
  list-style: none;
  margin: 0 0 0 10px;
  padding: 0 0 0 22px;
  border-left: 2px solid #e2e8f0;
}

.tl-item {
  position: relative;
  margin-bottom: 16px;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -31px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #1e293b;
}

.tl-dot.booking { background: #059669; }
.tl-dot.created { background: #0284c7; }

.tl-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.tl-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.tl-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #64748b;
}

.tl-badge {
  font-weight: 700;
  color: #047857;
}

.tl-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}

.tl-body {
  font-size: 12.5px;
  color: #334155;
  margin: 7px 0 0;
  line-height: 1.5;
}

/* Status Unboxed Text Accents (Zero-Pill Discipline) */
.status-text { font-size: 12px; font-weight: 700; }
.status-text.st-emerald { color: #047857; }
.status-text.st-teal { color: #0f766e; }
.status-text.st-amber { color: #b45309; }
.status-text.st-rose { color: #be123c; }
.status-text.st-indigo { color: #4338ca; }
.status-text.st-sky { color: #0369a1; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 11px;
  color: #475569;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

/* Quiet Executive Workspace Footer */
.workspace-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-quick-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.footer-quick-btn.sky { background: #f0f9ff; color: #0369a1; }
.footer-quick-btn.sky:hover { background: #e0f2fe; }
.footer-quick-btn.emerald { background: #ecfdf5; color: #047857; }
.footer-quick-btn.emerald:hover { background: #d1fae5; }

/* Chart.js Responsive Containers */
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 245px;
}

.chart-canvas-wrap.chart-sm {
  height: 205px;
}

.chart-canvas-wrap.chart-tall {
  height: 270px;
}

/* Leads Quick-Filter Tabs & Solid Status Badges (Exact LeadsView.tsx Parity) */
.quick-filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.qf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qf-btn:hover { background: #f8fafc; color: #0f172a; }
.qf-btn.active { background: #0f172a; color: #ffffff; border-color: #0f172a; }
.qf-btn.qf-rose.active { background: #be123c; border-color: #be123c; color: #ffffff; }
.qf-btn.qf-amber.active { background: #d97706; border-color: #d97706; color: #ffffff; }

.qf-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
}

.qf-btn.active .qf-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lead-status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.ls-booked { background: #047857; }
.ls-interested { background: #0d9488; }
.ls-sitevisit { background: #4f46e5; }
.ls-followup { background: #d97706; }
.ls-onhold { background: #1e3a8a; }
.ls-rejected { background: #e11d48; }
.ls-new { background: #0284c7; }
.ls-default { background: #475569; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #0f172a;
}

.contact-link:hover { color: var(--brand); text-decoration: underline; }

/* Property Stock Catalog Cards & View Toggle (Exact PropertiesStockView.tsx Parity) */
.view-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

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

.stock-unit-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stock-unit-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.stock-card-banner {
  position: relative;
  height: 128px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #064e3b 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.stock-card-banner.cat-dev {
  background: linear-gradient(135deg, #0c223a 0%, #075985 100%);
}

.stock-card-banner.cat-ind {
  background: linear-gradient(135deg, #271a0c 0%, #92400e 100%);
}

.stock-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-cat-chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.stock-card-body {
  padding: 14px 16px;
  flex: 1;
}

.stock-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
}

.stock-card-foot {
  padding: 11px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Responsive Rules */
@media (max-width: 1200px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .span-3, .span-4, .span-5, .span-7 { grid-column: span 12; }
  .tracker-split { grid-template-columns: 1fr; }
  .stock-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .portal-grid, .grid-2, .grid-3, .grid-4, .kpi-grid-5, .stock-card-grid {
    grid-template-columns: 1fr;
  }
  .split-login-shell { flex-direction: column; }
  .split-login-aside { width: 100%; min-height: auto; padding: 28px 22px; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: 268px;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrap, .sidebar.collapsed + .main-wrap {
    margin-left: 0;
  }
  .topbar-crumb-org, .topbar-crumb-sep, .topbar-portal-text, .scope-meta-text, .topbar-profile-chip {
    display: none;
  }
}

@media print {
  .no-print { display: none !important; }
  body { background: #ffffff !important; }
}
