@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   DUAL THEME ENGINE (DARK / LIGHT MODES)
   ========================================================================== */

/* DARK MODE STYLE (DEFAULT)
   Deep dark-slate/charcoal surfaces (#09090b to #121215), soft zinc typography (#f4f4f5),
   precise muted borders (#27272a), and confident blue accents (#2563eb). */
:root,
[data-theme="dark"],
.dark {
  --bg: #09090b;
  --bg-sidebar: #0c0c0e;
  --bg-topbar: rgba(9, 9, 11, 0.88);
  --panel: #121215;
  --panel-card: #18181b;
  --panel-hover: #222227;
  
  --text: #f4f4f5;
  --text-body: #d4d4d8;
  --muted: #a1a1aa;
  --muted-dark: #71717a;
  
  --line: #27272a;
  --line-subtle: #1f1f23;
  --line-strong: #3f3f46;
  
  /* Blue accent for active states and primary actions */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-surface: rgba(37, 99, 235, 0.14);
  --accent-border: rgba(96, 165, 250, 0.38);
  --accent-text: #60a5fa;
  
  /* Understated Indicator Dots */
  --dot-neutral: #71717a;
  --dot-active: #60a5fa;
  --dot-success: #10b981;
  --dot-warning: #f59e0b;
  --dot-error: #f43f5e;

  /* Disciplined Status Colors */
  --orange: #60a5fa;
  --orange-bg: rgba(37, 99, 235, 0.12);
  --orange-border: rgba(96, 165, 250, 0.28);
  
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --green-border: rgba(16, 185, 129, 0.25);
  
  --red: #f43f5e;
  --red-bg: rgba(244, 63, 94, 0.1);
  --red-border: rgba(244, 63, 94, 0.25);
  
  --blue: #38bdf8;
  --blue-bg: rgba(56, 189, 248, 0.1);
  --blue-border: rgba(56, 189, 248, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.55);
  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-pill: 9999px;
  --transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* LIGHT MODE STYLE
   Crisp off-white/pure white backgrounds (#fafafa / #ffffff), deep charcoal typography (#09090b),
   ultra-fine neutral borders (#e4e4e7), and clear blue accents (#1d4ed8). */
[data-theme="light"],
.light {
  --bg: #fafafa;
  --bg-sidebar: #ffffff;
  --bg-topbar: rgba(250, 250, 250, 0.90);
  --panel: #ffffff;
  --panel-card: #ffffff;
  --panel-hover: #f4f4f5;
  
  --text: #09090b;
  --text-body: #27272a;
  --muted: #71717a;
  --muted-dark: #a1a1aa;
  
  --line: #e4e4e7;
  --line-subtle: #f4f4f5;
  --line-strong: #d4d4d8;
  
  /* Deep blue accent for contrast on light backgrounds */
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-surface: rgba(29, 78, 216, 0.08);
  --accent-border: rgba(29, 78, 216, 0.24);
  --accent-text: #1d4ed8;
  
  --dot-neutral: #a1a1aa;
  --dot-active: #1d4ed8;
  --dot-success: #059669;
  --dot-warning: #d97706;
  --dot-error: #e11d48;

  --orange: #1d4ed8;
  --orange-bg: rgba(29, 78, 216, 0.08);
  --orange-border: rgba(29, 78, 216, 0.2);
  
  --green: #059669;
  --green-bg: rgba(5, 150, 105, 0.08);
  --green-border: rgba(5, 150, 105, 0.2);
  
  --red: #e11d48;
  --red-bg: rgba(225, 29, 72, 0.08);
  --red-border: rgba(225, 29, 72, 0.2);
  
  --blue: #0284c7;
  --blue-bg: rgba(2, 132, 199, 0.08);
  --blue-border: rgba(2, 132, 199, 0.2);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ==========================================================================
   SIDEBAR (FLAT, HIGH CONTRAST)
   ========================================================================== */
.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  padding: 4px 8px 24px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  display: grid;
  place-items: center;
}

.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.brand-mark i { display: block; width: 5px; height: 22px; border-radius: 3px; background: var(--accent); }
.brand-mark i:last-child { height: 16px; background: #fff; border: 1px solid var(--accent); }

.brand-accent {
  color: var(--accent);
  font-weight: 800;
}

.nav-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-dark);
  letter-spacing: 0.8px;
  padding: 0 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.nav-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 3px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.nav-link svg {
  color: var(--muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text);
  background: var(--panel-hover);
  border-color: var(--line);
}

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

.nav-link.active {
  color: var(--text);
  background: var(--panel-hover);
  border-color: var(--line);
  border-left: 2px solid var(--accent);
  font-weight: 600;
}

.nav-link.active svg {
  color: var(--accent);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-surface);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-copy b {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-copy small {
  color: var(--muted);
  font-size: 11px;
}

.logout {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.logout:hover {
  color: var(--red);
  background: var(--red-bg);
}

/* ==========================================================================
   MAIN LAYOUT & TOPBAR
   ========================================================================== */
.main {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.main-public {
  margin-left: 0;
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 30;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.6px;
}

.top-current {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--panel-card);
  border: 1px solid var(--line);
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-success);
}

/* ==========================================================================
   MINIMALIST STATUS PILL & SYNC BUTTON
   ========================================================================== */
.sync-btn,
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
  line-height: 1.3;
}

.sync-btn:hover,
.sync-pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--panel-hover);
}

.sync-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-neutral);
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.sync-pill.is-idle .sync-pill-dot {
  background: var(--dot-success);
}

.sync-pill.is-syncing {
  border-color: var(--line-strong);
  color: var(--text);
}

.sync-pill.is-syncing .sync-pill-dot {
  background: var(--dot-active);
  animation: pulse-sync 1.8s infinite ease-in-out;
}

.sync-pill.is-success {
  border-color: var(--line);
  color: var(--text-body);
}

.sync-pill.is-success .sync-pill-dot {
  background: var(--dot-success);
}

.sync-btn.is-failed,
.sync-pill.is-failed {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red);
}

.sync-btn.is-failed:hover,
.sync-pill.is-failed:hover {
  border-color: var(--red);
  color: var(--red);
  background: color-mix(in srgb, var(--red) 15%, transparent);
}

.sync-btn.is-failed .sync-pill-dot,
.sync-pill.is-failed .sync-pill-dot {
  background: var(--red);
}

@keyframes pulse-sync {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */
.theme-toggle-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-body);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--panel-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* Light / Dark icon visibility */
[data-theme="dark"] .theme-icon-sun {
  display: block;
}
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}
[data-theme="light"] .theme-icon-moon {
  display: block;
}

/* ==========================================================================
   PUBLIC NAVIGATION (PRE-LOGIN LANDING & AUTH)
   ========================================================================== */
.public-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
}

.public-nav .brand {
  padding: 0;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.public-nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--transition);
}

.public-nav-links a:hover {
  color: var(--text);
}

.public-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-btn-secondary {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  border: 1px solid var(--line);
  background: var(--panel-card);
  transition: var(--transition);
}

.nav-btn-secondary:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--panel-hover);
}

.nav-btn-primary {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.arrow-accent {
  font-weight: 700;
  transition: transform 0.15s ease;
}

.nav-btn-primary:hover .arrow-accent {
  transform: translateX(2px);
}

/* ==========================================================================
   PAGE HEADING TYPOGRAPHY HIERARCHY
   ========================================================================== */
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-heading h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 4px 0 6px;
}

.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 620px;
  line-height: 1.5;
}

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

/* ==========================================================================
   CONTENT CONTAINER
   ========================================================================== */
.content {
  padding: 28px 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.main-public .content {
  max-width: 100%;
  padding: 0;
}

/* ==========================================================================
   BUTTONS & CONTROLS (HIGH-END ENTERPRISE MONOCHROME)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn.secondary {
  background: var(--panel-card);
  color: var(--text-body);
  border: 1px solid var(--line);
}

.btn.secondary:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn.tiny {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn.full {
  width: 100%;
}

/* ==========================================================================
   PANELS & CARDS
   ========================================================================== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.panel:hover {
  border-color: var(--line-strong);
}

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

.panel-heading h2 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.panel-heading p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.panel-head-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.panel-head-link:hover {
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.stat-card:hover {
  border-color: var(--line-strong);
}

.stat-card.stat-card-warning {
  border-color: var(--line-strong);
}

.stat-header,
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.stat-warning-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-error);
  margin-left: 6px;
}

.stat-status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-neutral);
  margin-left: 6px;
}

.stat-status-dot.dot-connected {
  background: var(--dot-success);
}

.stat-status-dot.dot-disconnected {
  background: var(--dot-neutral);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--panel-card);
  color: var(--muted);
  border: 1px solid var(--line);
}

.stat-icon svg {
  width: 13px;
  height: 13px;
}

.stat-icon.orange,
.stat-icon.green {
  background: var(--panel-card);
  color: var(--text);
  border-color: var(--line);
}

.stat-value {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.6px;
  margin: 8px 0 2px;
  color: var(--text);
}

.stat-value.text-warning {
  color: var(--text);
}

.small-value {
  font-size: 15px;
  font-weight: 600;
}

.stat-foot {
  font-size: 11.5px;
  color: var(--muted-dark);
}

.two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ==========================================================================
   MODERN GLASSMORPHISM DROPDOWN SELECTOR (REPLACING UNMODERN SELECT)
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.native-hidden-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.custom-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 220px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

/* Responsive hover state */
.custom-select-trigger:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.custom-select-trigger:focus,
.custom-select-wrapper.is-open .custom-select-trigger {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-surface);
}

.custom-select-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-label.has-selection {
  color: var(--text);
  font-weight: 600;
}

.custom-select-chevron {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.custom-select-wrapper.is-open .custom-select-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  max-width: 340px;
  z-index: 100;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-select-menu.custom-select-menu-right {
  left: auto;
  right: 0;
}

.custom-select-wrapper.is-open .custom-select-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.custom-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-body);
  transition: var(--transition);
  user-select: none;
}

.custom-select-item:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.custom-select-item.is-selected {
  background: var(--accent-surface);
  color: var(--accent);
  font-weight: 600;
}

.item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.custom-select-item.is-selected .item-dot {
  background: var(--accent);
}

.item-text {
  flex: 1;
}

.item-check {
  display: none;
  color: var(--accent);
}

.custom-select-item.is-selected .item-check {
  display: block;
}

/* ==========================================================================
   FILTER TOOLBAR
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-card);
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 4px 2px 10px;
  transition: var(--transition);
}

.filter-group:hover {
  border-color: var(--line-strong);
}

.filter-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.filter-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  user-select: none;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent 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='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 28px 6px 2px;
  cursor: pointer;
  outline: none;
}

.filter-select option {
  background: var(--panel);
  color: var(--text);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ==========================================================================
   CARDS LIST CONTAINERS & DISTINCT ITEM CARDS (ZERO RUN-TOGETHER CLUTTER)
   ========================================================================== */
.cards-list-container {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-cards-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Standalone Card Container Enclosure */
.item-card,
.overview-item-card,
.overview-email-card,
.review-item-card {
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .item-card,
[data-theme="dark"] .overview-item-card,
[data-theme="dark"] .overview-email-card,
[data-theme="dark"] .review-item-card,
[data-theme="dark"] .inbox-row {
  background: var(--panel-card);
  border-color: var(--line);
}

[data-theme="light"] .item-card,
[data-theme="light"] .overview-item-card,
[data-theme="light"] .overview-email-card,
[data-theme="light"] .review-item-card,
[data-theme="light"] .inbox-row {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.item-card:hover,
.overview-item-card:hover,
.overview-email-card:hover,
.review-item-card:hover,
.inbox-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Stacking context immunity when dropdown is open */
.item-card:has(.custom-select-wrapper.is-open),
.overview-item-card:has(.custom-select-wrapper.is-open),
.review-item-card:has(.custom-select-wrapper.is-open) {
  z-index: 60;
  position: relative;
  transform: none !important;
}

.card-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-action-inline {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.bulk-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  margin-top: 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-card);
  border: 1px solid var(--line);
}

.bulk-actions-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.meta-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.meta-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* Card Header Row */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
  word-break: break-word;
}

.overview-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: block;
}

/* Minimalist Kind Badges (Clean text, zero decorative icons) */
.badge-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

/* Unified muted zinc tags — dot-only status, no colored fills */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.1px;
  white-space: nowrap;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-neutral);
  flex-shrink: 0;
}

.tag.open::before,
.tag.pending::before,
.tag.in_progress::before { background: var(--dot-active); }

.tag.done::before,
.tag.approved::before,
.tag.decided::before { background: var(--dot-success); }

.tag.risk::before,
.tag.overdue::before,
.tag.rejected::before { background: var(--dot-error); }

.tag.neutral { color: var(--muted-dark); }
.tag.neutral::before { background: var(--dot-neutral); }

/* Card Body Area */
.card-body-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.card-body-text p {
  margin: 0;
}

.item-evidence-quote {
  border-left: 2px solid var(--accent, #4f8cff);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 12px;
  padding-left: 10px;
}

/* Card Footer Meta Row */
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}

.card-meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
}

.meta-tag-label {
  font-weight: 600;
  color: var(--muted-dark);
}

.meta-overdue {
  border-color: var(--line-strong);
  background: var(--panel-card);
  color: var(--muted);
}
.meta-overdue .meta-tag-label { color: var(--dot-error); }

.meta-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.meta-link:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

.meta-muted {
  font-size: 11px;
  color: var(--muted-dark);
}

.card-status-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.card-status-select {
  padding: 4px 8px;
  font-size: 11px;
  font-family: inherit;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.card-status-select:focus {
  border-color: var(--accent);
}

.source-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: var(--transition);
  margin-left: auto;
}

.source-link-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

.meta-sender {
  font-size: 11px;
  color: var(--muted);
}

.meta-time {
  font-size: 11px;
  color: var(--muted-dark);
}

.meta-dot {
  color: var(--line-strong);
  font-size: 10px;
}

.email-card-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.review-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.candidate-consensus-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}

.candidate-row {
  color: var(--muted);
}

.candidate-cat {
  color: var(--text);
  font-weight: 600;
}

.email-snippet-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}

/* ==========================================================================
   ROWS & LIST ITEMS (LEGACY COMPATIBILITY)
   ========================================================================== */
.work-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-subtle);
  transition: var(--transition);
}

.work-row:last-child {
  border-bottom: 0;
}

.work-row:hover {
  background: var(--panel-hover);
}

.work-main {
  flex: 1;
  min-width: 0;
}

.work-main b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-main small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.work-main small.source a {
  color: var(--muted-dark);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.work-main small.source a:hover {
  color: var(--accent);
}

/* ==========================================================================
   EMAIL ROWS & STREAM
   ========================================================================== */
.email-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-subtle);
  transition: var(--transition);
}

.email-row:last-child {
  border-bottom: 0;
}

.email-row:hover {
  background: var(--panel-hover);
}

.email-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--panel-card);
  color: var(--text);
  border: 1px solid var(--line);
  flex-shrink: 0;
  margin-top: 1px;
}

.email-avatar svg {
  width: 14px;
  height: 14px;
}

.email-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.email-main b {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}

.email-main small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.source-link {
  color: var(--muted);
  padding: 4px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
}

.source-link:hover {
  color: var(--accent);
  background: var(--panel-hover);
}

/* Error badge & banner in stream */
.stream-error-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin: 3px 0;
}

.badge-error {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dot-error);
  letter-spacing: 0.6px;
}

.error-desc {
  font-size: 11px;
  color: var(--muted);
}

.text-error {
  color: var(--red);
  font-weight: 700;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 20px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--panel-card);
  color: var(--muted);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.empty-icon svg {
  width: 18px;
  height: 18px;
}

.empty-state b {
  font-size: 13.5px;
  color: var(--text);
}

.empty-state p {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 14px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-top: 18px;
}

.privacy-note span {
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.privacy-note b {
  display: block;
  font-size: 12.5px;
  color: var(--text);
}

.privacy-note p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

/* ==========================================================================
   SETTINGS & INTEGRATIONS
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.setting-panel {
  padding: 22px;
}

.setting-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--panel-card);
  color: var(--text);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.setting-icon svg {
  width: 17px;
  height: 17px;
}

.setting-icon.orange {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: var(--orange-border);
}

.setting-icon.green {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

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

.setting-title h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.setting-title p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

.setting-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0;
}

.setting-foot {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--muted-dark);
  line-height: 1.5;
}

.connected-account {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-card);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.account-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.account-check svg {
  width: 13px;
  height: 13px;
}

.config-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  margin-top: 8px;
  font-size: 11.5px;
}

.config-line span {
  color: var(--muted);
}

.config-line code {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* ==========================================================================
   FORMS & AUTH
   ========================================================================== */
.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-surface);
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-md);
}

.auth-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-surface);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  margin-bottom: 20px;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: var(--text);
}

.auth-card > p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

.auth-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}

.auth-foot a {
  color: var(--accent);
  font-weight: 600;
}

.auth-foot a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   NEW PRE-LOGIN LANDING PAGE (MATCHING COKE/BLVCK SPLIT-SCREEN REFERENCE)
   ========================================================================== */
.landing-page {
  width: 100%;
  overflow-x: hidden;
}

/* 1. HERO SPLIT SECTION (3-COLUMN SPLIT-SCREEN ARCHITECTURE) */
.hero-split-section {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  align-items: center;
  gap: 32px;
  padding: 60px 48px;
  max-width: 1540px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

/* LEFT COLUMN: TYPOGRAPHY, ORANGE ACCENT LINE, CTAS */
.hero-split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 16px;
}

.hero-pill-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 22px;
  width: fit-content;
}

.pulse-orange-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-sync 1.5s infinite ease-in-out;
}

.hero-headline {
  font-size: 58px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -1.8px;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
}

.text-gradient-orange {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Bold minimalist burnt-orange accent line */
.orange-accent-line {
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 18px 0 20px;
}

.hero-subtext {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 460px;
  margin: 0 0 28px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.btn-orange-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 18px var(--accent-surface);
  transition: var(--transition);
}

.btn-orange-hero:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-surface);
}

.btn-orange-hero svg {
  transition: transform 0.2s ease;
}

.btn-orange-hero:hover svg {
  transform: translateX(4px);
}

.btn-matte-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.btn-matte-hero:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.hero-specs-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}

.spec-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

/* CENTER COLUMN: FLOATING 3D PRODUCT SHOWCASE */
.hero-split-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-3d-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  perspective: 1200px;
}

.product-ambient-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--accent-surface) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.product-3d-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 32px var(--accent-surface);
  overflow: hidden;
  z-index: 2;
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  animation: float-card 6s ease-in-out infinite alternate;
}

.product-3d-card:hover {
  transform: rotateY(0deg) rotateX(0deg) translateY(-4px);
  box-shadow: 0 24px 60px -8px rgba(0, 0, 0, 0.8), 0 0 44px var(--accent-surface);
}

@keyframes float-card {
  0% { transform: rotateY(-6deg) rotateX(4deg) translateY(0); }
  100% { transform: rotateY(-3deg) rotateX(2deg) translateY(-12px); }
}

.card-3d-glass-rim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.card-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-card);
}

.window-controls {
  display: flex;
  gap: 5px;
}

.w-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.w-dot.red { background: #FF5F56; }
.w-dot.yellow { background: #FFBD2E; }
.w-dot.green { background: #27C93F; }

.card-3d-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.card-3d-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--green);
}

.pulse-dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.card-3d-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stream-simulate-card {
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: var(--transition);
}

.stream-simulate-card.primary-focus {
  border-color: var(--accent-border);
  background: var(--panel-hover);
}

.sim-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sim-kind-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.sim-kind-tag.task {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.sim-kind-tag.approval {
  background: var(--accent-surface);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.sim-due-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
}

.stream-simulate-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.35;
}

.sim-evidence {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 10px;
  line-height: 1.4;
}

.sim-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line-subtle);
  font-size: 10.5px;
}

.sim-author {
  color: var(--muted-dark);
}

.sim-match-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.sim-status-tag.pending {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

.sim-consensus-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.engine-check {
  font-size: 9.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-body);
}

.engine-check.arbiter {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-surface);
}

.card-3d-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--panel-card);
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}

.stat-mini-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.pill-dot-amber {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.crypto-hash {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted-dark);
}

/* Floating holographic pills */
.floating-holo-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9999px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 4;
}

.pill-top-right {
  top: -16px;
  right: -24px;
  animation: float-pill-1 5s ease-in-out infinite alternate;
}

.pill-bottom-left {
  bottom: -16px;
  left: -20px;
  animation: float-pill-2 5.5s ease-in-out infinite alternate;
}

@keyframes float-pill-1 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes float-pill-2 {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

/* RIGHT COLUMN: MINIMALIST FEATURE DESCRIPTION BLOCKS & PAGINATION */
.hero-split-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  max-height: 480px;
  padding-left: 12px;
}

.features-meta-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-feature-block {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: var(--transition);
}

.meta-feature-block:hover,
.meta-feature-block.active {
  border-color: var(--accent);
  background: var(--panel-hover);
}

.meta-block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meta-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.circle-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: var(--transition);
}

.meta-feature-block:hover .circle-icon-btn,
.meta-feature-block.active .circle-icon-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: rotate(45deg);
}

.meta-feature-block h3 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.meta-feature-block p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Pagination & subtle progress bar */
.split-pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pagination-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  gap: 4px;
}

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

.step-divider {
  color: var(--muted-dark);
}

.total-steps {
  color: var(--muted);
}

.progress-bar-track {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-orange {
  width: 45%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   2. FEATURES SHOWCASE GRID (MICRO-ANIMATIONS)
   ========================================================================== */
.landing-showcase-section {
  padding: 80px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

.section-header-centered {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header-centered h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin: 0 0 12px;
}

.section-header-centered p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.showcase-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.showcase-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px -4px var(--accent-surface);
}

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

.showcase-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--accent);
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.showcase-card:hover .showcase-icon-box {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.showcase-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-dark);
}

.showcase-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.showcase-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 24px;
  flex: 1;
}

.card-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  transition: var(--transition);
}

.card-footer-link .arrow {
  transition: transform 0.2s ease;
}

.showcase-card:hover .card-footer-link {
  color: var(--accent);
}

.showcase-card:hover .card-footer-link .arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   3. ARCHITECTURE STRIP
   ========================================================================== */
.architecture-strip {
  padding: 40px 48px;
  max-width: 1200px;
  margin: 0 auto 70px;
}

.arch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  box-shadow: var(--shadow-sm);
}

.arch-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.arch-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.8px;
}

.arch-badge.orange-badge {
  color: var(--accent);
}

.arch-node b {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.arch-node small {
  font-size: 11.5px;
  color: var(--muted);
}

.arch-connector {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-dark);
}

.connector-line {
  width: 48px;
  height: 1px;
  background: var(--line-strong);
}

/* ==========================================================================
   4. HIGH CONVERTING CTA BANNER
   ========================================================================== */
.landing-cta-section {
  padding: 0 48px 80px;
  max-width: 1300px;
  margin: 0 auto;
}

.cta-banner-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cta-banner-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 240px;
  background: radial-gradient(circle, var(--accent-surface) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.cta-banner-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.cta-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.cta-banner-card h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--text);
  margin: 0 0 14px;
}

.cta-banner-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 32px;
}

.cta-button-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: auto;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-meta {
  color: var(--muted-dark);
}
.footer-meta a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

.legal-page { max-width: 860px; margin: 0 auto; padding: 18px 0 56px; }
.legal-page h1 { color: var(--text); font-size: clamp(32px, 5vw, 48px); letter-spacing: -1.5px; margin: 8px 0 4px; }
.legal-updated { color: var(--muted); font-size: 12px; margin: 0 0 32px; }
.legal-copy { color: var(--text-body); line-height: 1.75; }
.legal-copy h2 { color: var(--text); font-size: 17px; margin: 28px 0 7px; }
.legal-copy p { margin: 0 0 12px; }
.terms-accept-form { display: grid; gap: 18px; margin-top: 34px; padding: 22px; border: 1px solid var(--accent-border); border-radius: var(--radius); background: var(--accent-surface); }
.terms-accept-form label { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-weight: 600; }
.terms-accept-form input { accent-color: var(--accent); margin-top: 4px; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .hero-split-section {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 40px 24px;
  }
  .hero-split-right {
    grid-column: 1 / -1;
    max-height: none;
    padding-left: 0;
  }
  .features-meta-list {
    flex-direction: row;
  }
  .meta-feature-block {
    flex: 1;
  }
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-split-section {
    grid-template-columns: 1fr;
    padding: 30px 16px;
  }
  .hero-headline {
    font-size: 42px;
  }
  .product-3d-stage {
    max-width: 100%;
  }
  .features-meta-list {
    flex-direction: column;
  }
  .arch-container {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .arch-connector {
    display: none;
  }
  .public-nav-links {
    display: none;
  }
  .public-nav {
    padding: 0 16px;
  }
}

@media (max-width: 720px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg-sidebar);
  }
  .brand {
    padding: 0 10px 0 0;
    font-size: 15px;
    flex-shrink: 0;
  }
  .nav-label, .sidebar-user {
    display: none;
  }
  .nav-link {
    font-size: 12px;
    padding: 7px 9px;
    flex-shrink: 0;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 14px;
  }
  .content {
    padding: 18px 12px;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .hero-cta-group,
  .cta-button-row {
    flex-direction: column;
    width: 100%;
  }
  .btn-orange-hero,
  .btn-matte-hero {
    width: 100%;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ==========================================================================
   ENTERPRISE OAUTH 2.0 ("SIGN IN WITH GOOGLE / MICROSOFT") STYLING
   ========================================================================== */

.oauth-button-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 16px;
  width: 100%;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.btn-oauth:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-oauth-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-oauth-hero:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.hero-oauth-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--muted, #64748b);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.auth-divider span {
  padding: 0 12px;
}

/* 1-Click Enterprise OAuth Onboarding in Settings */
.oauth-onboarding-box {
  background: var(--panel-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 14px;
}

.oauth-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.oauth-promise-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text, #e2e8f0);
  margin-bottom: 18px;
  font-weight: 500;
}

.oauth-connect-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-oauth-connect {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 13px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-oauth-connect:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.oauth-security-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oauth-security-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

.oauth-security-perks li svg {
  color: var(--dot-success);
  flex-shrink: 0;
}

/* ── Missing utility classes ───────────────────────────────────────────── */

/* Ghost resolve button used in dashboard item cards */
.btn-resolve-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-resolve-outline:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

/* Resolved state tag pill */
.tag-resolved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--muted-dark);
}
.tag-resolved::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-success);
  flex-shrink: 0;
}

/* ── Missing utility classes ───────────────────────────────────────────── */

/* Ghost resolve button used in dashboard item cards */
.btn-resolve-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-resolve-outline:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

/* Resolved state tag pill */
.tag-resolved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  background: var(--panel-card);
  border: 1px solid var(--line);
  color: var(--muted-dark);
}
.tag-resolved::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-success);
  flex-shrink: 0;
}

/* ==========================================================================
   EMAILIQ HEADER LOGO & COMMAND PALETTE
   Replaces the top search/filter container with brand branding.
   ========================================================================== */

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.topbar-brand:hover {
  opacity: 0.88;
  background: var(--panel-hover);
}

.topbar-brand-text {
  letter-spacing: -0.3px;
}

/* Command palette trigger button */
.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-card);
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cmd-trigger:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
  color: var(--text);
}

.cmd-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-surface);
}

.cmd-trigger svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Command palette overlay */
.command-palette {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .command-palette {
  background: rgba(15, 23, 42, 0.40);
}

.command-palette.is-open {
  display: flex;
}

.command-palette-content {
  width: min(560px, 92vw);
  max-height: 80vh;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cmdFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.command-palette-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-subtle);
}

.command-search {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
}

.command-search::placeholder {
  color: var(--muted-dark);
}

.command-sections {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
  min-height: 240px;
  overflow: visible;
}

#cmd-actions-container {
  max-height: 240px;
  overflow-y: auto;
}

.command-section {
  flex: 1;
  min-width: 190px;
  display: flex;
  flex-direction: column;
}

.command-section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  user-select: none;
}

.command-hint {
  padding: 10px 20px;
  font-size: 11px;
  color: var(--muted-dark);
  border-top: 1px solid var(--line-subtle);
  text-align: center;
  background: var(--panel-card);
}

/* Compact custom dropdown inside command palette */
.command-palette .custom-select-wrapper {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

.command-palette .custom-select-trigger {
  width: 100%;
  min-width: 0;
  padding: 7px 11px;
  font-size: 12.5px;
  justify-content: space-between;
}

.command-palette .custom-select-menu {
  min-width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
}

.command-palette .custom-select-item {
  padding: 7px 10px;
  font-size: 12.5px;
}

/* Refined global custom-select trigger: crisper border, subtle hover */
.custom-select-trigger {
  min-width: 150px;
}

.custom-select-menu {
  min-width: 200px;
}

/* Ensure custom dropdowns render inside filter groups consistently */
.filter-group .custom-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
}
.filter-group .custom-select-wrapper .custom-select-trigger {
  min-width: 150px;
}

/* Filter bar text inputs (search, sender, etc.) */
.filter-input {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-card);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease;
  min-width: 140px;
}
.filter-input::placeholder {
  color: var(--muted);
}
.filter-input:focus {
  border-color: var(--accent);
}
[data-theme="light"] .filter-input {
  background: var(--bg);
}

/* ==========================================================================
   END: HEADER LOGO & COMMAND PALETTE
   ========================================================================== */
/* ==========================================================================
   NOTIFICATIONS — bell, badge, dropdown panel
   ========================================================================== */

.notifications-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-btn {
  position: relative;
}

.notifications-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-pill);
  border: 1px solid var(--bg);
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
  pointer-events: none;
}

.notifications-badge.has-unread {
  opacity: 1;
  transform: scale(1);
}

.notifications-label {
  display: none;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 550;
}

[data-theme="light"] .notifications-dropdown {
  border-color: var(--line);
}

.notifications-dropdown[aria-hidden="false"] {
  display: flex;
}

.notifications-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-subtle);
}

.notifications-dropdown-header span {
  font-weight: 800;
  color: var(--text);
  font-size: 13px;
}

.notifications-view-all {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.notifications-view-all:hover {
  text-decoration: underline;
}

.notifications-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}

.notifications-empty,
.notifications-loading {
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.notification-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-subtle);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--panel-hover);
}

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

.notification-item .badge-kind {
  font-size: 11px;
}

.notification-item .card-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.notification-item .card-body-text p {
  font-size: 12px;
  color: var(--text-body);
  margin: 0;
  line-height: 1.4;
}

.notification-item .card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.notification-item .meta-tag {
  font-size: 11px;
  color: var(--muted-dark);
}

.notification-item .meta-tag-label {
  font-weight: 700;
}

.notification-mark-read {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
}

.notification-mark-read:hover {
  text-decoration: underline;
}

/* Notification preferences need compact controls, not the generic form inputs. */
.notification-settings-panel { grid-column: 1 / -1; }
.notification-settings-form { gap: 18px; }
.notification-options,
.notification-category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.notification-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}
.notification-setting-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.notification-setting-copy b {
  color: var(--text);
  font-size: 13px;
}
.notification-setting-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.setting-switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
}
.setting-switch input,
.notification-category-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.setting-switch-track {
  display: block;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .18s ease;
}
.setting-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s ease;
}
.setting-switch input:checked + .setting-switch-track,
.notification-category-row input:checked + .setting-switch-track {
  background: var(--accent);
}
.setting-switch input:checked + .setting-switch-track::after,
.notification-category-row input:checked + .setting-switch-track::after {
  transform: translateX(18px);
}
.setting-switch input:focus-visible + .setting-switch-track,
.notification-category-row input:focus-visible + .setting-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.notification-permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 2px;
  color: var(--muted);
  font-size: 11px;
}
.notification-category-section {
  padding-top: 2px;
}
.notification-category-heading {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.notification-settings-form > .btn { align-self: flex-start; }
@media (max-width: 720px) {
  .notification-settings-panel { padding: 16px; }
  .notification-setting-row { gap: 12px; }
}

/* Full notifications page follows the workspace card and spacing system. */
.notifications-page-heading { align-items: center; }
.notifications-page-heading .heading-actions { align-self: center; }
.notification-feed-item {
  position: relative;
  padding: 20px 22px;
  margin: 0 16px 10px;
  border-radius: var(--radius-lg);
}
.notifications-feed-item.is-unread {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--panel-card));
}
.notification-feed-item .card-header-row { align-items: center; }
.notification-feed-item .card-title-group { min-width: 0; flex-wrap: wrap; }
.notification-feed-item .card-title { line-height: 1.4; }
.notification-feed-item .card-body-text p { color: var(--text-body); line-height: 1.6; }
.notification-feed-item .card-footer-row { margin-top: 14px; }
.notification-unread-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.notification-item-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.notification-item-category { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.notification-item-copy b { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item-preview { color: var(--muted); font-size: 11px; line-height: 1.45; }
.notification-item-copy time { color: var(--muted-dark); font-size: 10px; }
.notification-item .notification-mark-read { flex: 0 0 auto; border: 0; background: transparent; cursor: pointer; }
.notifications-list .notification-item { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.notifications-list .notifications-empty { display: block; }
@media (max-width: 640px) {
  .notifications-page-heading { align-items: flex-start; flex-direction: column; }
  .notification-feed-item { margin-right: 10px; margin-left: 10px; padding: 16px; }
}

/* ========================================================================== 
   END: NOTIFICATIONS
   ========================================================================== */

/* App-wide errors, success, and validation toasts */
.app-toast-stack {
  position: fixed;
  z-index: 2000;
  top: 18px;
  right: 18px;
  display: flex;
  width: min(420px, calc(100vw - 32px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.app-toast,
.app-error-toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 14px 13px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  pointer-events: auto;
  animation: app-toast-in .18s ease-out;
}
.app-toast-error,
.app-error-toast {
  border-color: var(--red-border);
  border-left-color: var(--red);
}
.app-toast-success {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
}
.app-toast-info {
  border-color: var(--line);
  border-left-color: var(--muted);
}
.app-toast > span,
.app-error-toast > span { flex: 1; }
.app-toast-close {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.app-toast-close:hover { color: var(--text); }
@keyframes app-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .app-toast-stack { top: 10px; right: 10px; width: calc(100vw - 20px); }
}

/* Settings page */
.settings-page-heading { margin-bottom: 24px; }
.settings-page-grid .settings-card { min-width: 0; }
.settings-connect-actions { display: flex; flex-direction: column; gap: 10px; }
.settings-connected-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.settings-connected-copy b { overflow-wrap: anywhere; color: var(--text); }
.settings-connected-copy small,
.settings-help { color: var(--muted); font-size: 12px; line-height: 1.55; }
.settings-form { gap: 14px; }
.settings-choice { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.settings-choice input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.settings-choice-copy { display: flex; flex-direction: column; gap: 4px; }
.settings-choice-copy b { color: var(--text); font-size: 13px; }
.settings-choice-copy small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-theme-button { display: inline-flex; align-items: center; gap: 9px; }
.settings-signout-button { border: 1px solid var(--red-border); background: var(--red-bg); color: var(--red); }
.settings-signout-button:hover { filter: brightness(.96); }
.settings-account-card .setting-title strong { color: var(--text); }
.auth-terms-copy { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 18px 0 0; text-align: center; }
.auth-terms-copy a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.discount-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.discount-form label { color: var(--text); font-weight: 600; }
.discount-form input { width: 100%; max-width: 320px; }
.plan-duration-grid { display: grid; gap: 10px; margin-top: 10px; }
.plan-duration-grid input { width: 100%; }
.plans-settings-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0 4px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.plans-settings-link:hover { text-decoration: underline; }
.notification-permission-button { margin-top: 10px; }
.plans-heading { margin-bottom: 24px; }
.plans-login-note {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel);
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 470px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.plan-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow);
}
.plan-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.plan-card h2 { margin: 14px 0 8px; font-size: 25px; }
.plan-description { min-height: 48px; color: var(--muted); line-height: 1.5; }
.plan-price { margin: 20px 0 4px; font-size: 36px; font-weight: 800; }
.plan-price small { color: var(--muted); font-size: 14px; font-weight: 500; }
.plan-current { color: var(--muted); font-size: 13px; }
.plan-card ul { display: grid; gap: 10px; margin: auto 0 0; padding: 22px 0 0 18px; color: var(--muted); line-height: 1.45; }
.plan-card > .btn { margin-top: 20px; text-align: center; }
.plan-actions { display: grid; gap: 8px; margin-top: 20px; }
.plan-actions .btn { width: 100%; }
.plan-card-cta { display: inline-flex; margin-top: 18px; text-decoration: none; }
.plan-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.plan-summary-row div { display: grid; gap: 5px; }
.plan-summary-row span { color: var(--muted); font-size: 13px; }
.plan-billing-note { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.4; }
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; }
  .plan-card { min-height: 0; }
}
@media (max-width: 720px) {
  .settings-page-grid { grid-template-columns: minmax(0, 1fr); }
}

/* EmailIQ loader is disabled for instant, seamless page transitions without loading screens */
.emailiq-loader,
.emailiq-loader-active .emailiq-loader {
  display: none !important;
}
