/* ===================================================================
   NIRVTRACK - POWER BI EXECUTIVE THEME
   =================================================================== */

:root {
  --bg-app: #0a0d14;
  --bg-sidebar: #0f1422;
  --bg-card: #141b2d;
  --bg-card-hover: #192238;
  --bg-input: #1b233a;
  --bg-elevated: #212c47;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent Colors */
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.15);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.15);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.15);
  --rose: #ef4444;
  --rose-glow: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   [FEAT-11] THEME DEFINITIONS
   =================================================================== */

/* Theme 1: Default Power BI Dark Slate */
body[data-theme="dark"], body.theme-dark {
  --bg-app: #0a0d14;
  --bg-sidebar: #0f1422;
  --bg-card: #141b2d;
  --bg-card-hover: #192238;
  --bg-input: #1b233a;
  --bg-elevated: #212c47;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
}

/* Theme 2: Executive Clean Light */
body[data-theme="light"], body.theme-light {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;
  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 2px 10px -2px rgba(0, 0, 0, 0.06), 0 1px 3px -1px rgba(0, 0, 0, 0.04);
}

/* Theme 3: Midnight OLED (Pure Black) */
body[data-theme="midnight"], body.theme-midnight {
  --bg-app: #000000;
  --bg-sidebar: #050508;
  --bg-card: #0c0c12;
  --bg-card-hover: #14141e;
  --bg-input: #12121c;
  --bg-elevated: #1a1a28;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-focus: #06b6d4;
  --text-main: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --shadow-card: 0 4px 24px -2px rgba(0, 0, 0, 0.95);
}

/* Theme 4: Emerald Wealth (Forest Green & Gold) */
body[data-theme="emerald"], body.theme-emerald {
  --bg-app: #05140f;
  --bg-sidebar: #091f18;
  --bg-card: #0e2a21;
  --bg-card-hover: #14392e;
  --bg-input: #13362a;
  --bg-elevated: #1a4738;
  --border-subtle: rgba(16, 185, 129, 0.18);
  --border-focus: #10b981;
  --text-main: #ecfdf5;
  --text-secondary: #a7f3d0;
  --text-muted: #6ee7b7;
  --shadow-card: 0 4px 22px -2px rgba(0, 0, 0, 0.6);
}

/* Theme 5: Cyber Neon (Synthwave) */
body[data-theme="cyber"], body.theme-cyber {
  --bg-app: #0b0717;
  --bg-sidebar: #120c24;
  --bg-card: #181132;
  --bg-card-hover: #231849;
  --bg-input: #201542;
  --bg-elevated: #2d1d5c;
  --border-subtle: rgba(236, 72, 153, 0.22);
  --border-focus: #d946ef;
  --text-main: #faf5ff;
  --text-secondary: #e9d5ff;
  --text-muted: #c084fc;
  --shadow-card: 0 4px 24px -2px rgba(236, 72, 153, 0.2);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 150;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
  cursor: pointer;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, filter 0.22s ease;
  user-select: none;
}

.brand-icon:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.55);
}

.brand-icon:active {
  transform: scale(0.96);
}

/* Tier-responsive accent for brand-icon */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-icon {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.38);
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-icon:hover {
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.55);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-icon {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.38);
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-icon:hover {
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.38);
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-icon:hover {
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.55);
}

/* Subtle pulse dot indicating PWA install readiness */
.brand-icon.has-install-prompt::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #38bdf8;
  border: 2px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 8px #38bdf8;
  animation: pwaPulseDot 2.4s infinite ease-in-out;
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-icon.has-install-prompt::after {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-icon.has-install-prompt::after {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

@keyframes pwaPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.brand-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.badge-pro,
.brand-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.25s ease;
  line-height: 1.3;
  user-select: none;
}

.brand-tier-badge.badge-tier-free {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}

.brand-tier-badge.badge-tier-pro {
  background: rgba(6, 182, 212, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
}

.brand-tier-badge.badge-tier-executive {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(217, 119, 6, 0.12));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
  font-weight: 800;
}

/* ---------------- [FEAT-40] Smart Unified Filter Pill & Floating Popover ---------------- */
.sidebar-filter-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.sidebar-filter-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary, #f9fafb);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  font-size: 0.82rem;
  text-align: left;
  user-select: none;
}

.sidebar-filter-pill:hover,
.sidebar-filter-pill.active {
  background: rgba(6, 182, 212, 0.09);
  border-color: var(--cyan, #06b6d4);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.22);
}

.sidebar-filter-pill .pill-content {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.sidebar-filter-pill .pill-ws-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-filter-pill .pill-ws-name {
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.sidebar-filter-pill .pill-dot {
  color: var(--text-muted, #9ca3af);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar-filter-pill .pill-period-label {
  color: var(--cyan, #06b6d4);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}

.sidebar-filter-pill .pill-caret {
  color: var(--text-muted, #9ca3af);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  margin-left: 4px;
  flex-shrink: 0;
}

.sidebar-filter-pill.active .pill-caret {
  transform: rotate(180deg);
  color: var(--cyan, #06b6d4);
}

/* [FEAT-40] Unified Filter Drawer / Popover Container */
.sidebar-filter-popover {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  background: #111827;
  background: linear-gradient(180deg, #161e2e 0%, #0f172a 100%);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: var(--radius-md, 10px);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(6, 182, 212, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 1000;
  animation: filterPopoverSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-filter-popover.active {
  display: flex;
}

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

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 6px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.popover-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan, #06b6d4);
  user-select: none;
}

.btn-popover-close {
  background: none;
  border: none;
  color: var(--text-muted, #9ca3af);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-popover-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Card 1: Workspace Selector Inside Filter Popover */
.sidebar-filter-popover .sidebar-workspace-card {
  margin: 0;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 8px);
}

.sidebar-filter-popover .sidebar-ws-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}

.sidebar-filter-popover .sidebar-ws-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #94a3b8);
  font-weight: 700;
}

.sidebar-filter-popover .sidebar-ws-tag {
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan, #06b6d4);
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.3);
  white-space: nowrap;
}

.sidebar-filter-popover .sidebar-ws-main {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0;
}

.sidebar-filter-popover #sidebarWorkspaceIcon {
  display: none !important;
}

.sidebar-filter-popover .sidebar-ws-select {
  width: 100%;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.sidebar-filter-popover .sidebar-ws-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-filter-popover .btn-ws-quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  font-size: 0.67rem;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  white-space: nowrap;
  min-width: 0;
  text-align: center;
  transition: var(--transition);
}

/* Card 2: Period Selector Inside Filter Popover */
.sidebar-filter-popover .sidebar-date-selector {
  margin: 0;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 8px);
}

.sidebar-filter-popover .period-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-filter-popover .period-label-row label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  margin-bottom: 0;
}

.sidebar-filter-popover .btn-text-tiny {
  padding: 2px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.sidebar-filter-popover .period-control {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-filter-popover .period-control .btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-filter-popover .period-control .input-month {
  flex: 1;
  min-width: 0;
  height: 28px;
  font-size: 0.8rem;
  padding: 3px 6px;
  text-align: center;
  box-sizing: border-box;
}

.sidebar-filter-popover .period-presets-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-filter-popover .preset-pill {
  padding: 4px 1px;
  font-size: 0.64rem;
  font-weight: 600;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Light Theme Support for Filter Popover */
body.theme-light .sidebar-filter-popover,
body[data-theme="light"] .sidebar-filter-popover {
  background: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.theme-light .sidebar-filter-popover .sidebar-workspace-card,
body[data-theme="light"] .sidebar-filter-popover .sidebar-workspace-card,
body.theme-light .sidebar-filter-popover .sidebar-date-selector,
body[data-theme="light"] .sidebar-filter-popover .sidebar-date-selector {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Minimal mode support for popover */
body[data-ui-mode="minimal"] .sidebar-filter-wrapper,
body.ui-mode-minimal .sidebar-filter-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

body[data-ui-mode="minimal"] .sidebar-filter-pill,
body.ui-mode-minimal .sidebar-filter-pill {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  margin: 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-content,
body.ui-mode-minimal .sidebar-filter-pill .pill-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  flex: none !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-ws-icon,
body.ui-mode-minimal .sidebar-filter-pill .pill-ws-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-ws-name,
body.ui-mode-minimal .sidebar-filter-pill .pill-ws-name,
body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-dot,
body.ui-mode-minimal .sidebar-filter-pill .pill-dot,
body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-period-label,
body.ui-mode-minimal .sidebar-filter-pill .pill-period-label,
body[data-ui-mode="minimal"] .sidebar-filter-pill .pill-caret,
body.ui-mode-minimal .sidebar-filter-pill .pill-caret {
  display: none !important;
}

/* [FEAT-58] Minimalist mode floating popover */
body[data-ui-mode="minimal"] .sidebar-filter-popover,
body.ui-mode-minimal .sidebar-filter-popover,
body[data-ui-mode="minimalist"] .sidebar-filter-popover,
body.ui-mode-minimalist .sidebar-filter-popover {
  position: absolute !important;
  left: 64px !important;
  top: 0 !important;
  width: 300px !important;
  min-width: 290px !important;
  max-width: 320px !important;
  margin-top: 0 !important;
  z-index: 2000 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .popover-header,
body.ui-mode-minimal .sidebar-filter-popover .popover-header,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .popover-header,
body.ui-mode-minimalist .sidebar-filter-popover .popover-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .popover-title,
body.ui-mode-minimal .sidebar-filter-popover .popover-title,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .popover-title,
body.ui-mode-minimalist .sidebar-filter-popover .popover-title {
  white-space: nowrap !important;
  display: block !important;
  font-size: 0.74rem !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-workspace-card,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-workspace-card,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-workspace-card,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-workspace-card {
  width: 100% !important;
  height: auto !important;
  padding: 9px 12px !important;
  margin: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-ws-top,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-ws-top,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-ws-top,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-ws-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-ws-main,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-ws-main,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-ws-main,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-ws-main {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 6px !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-ws-select,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-ws-select,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-ws-select,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-ws-select {
  display: block !important;
  width: 100% !important;
  flex: 1 !important;
  min-width: 0 !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-ws-actions,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-ws-actions,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-ws-actions,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-ws-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .sidebar-date-selector,
body.ui-mode-minimal .sidebar-filter-popover .sidebar-date-selector,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .sidebar-date-selector,
body.ui-mode-minimalist .sidebar-filter-popover .sidebar-date-selector {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 8px 10px !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .period-label-row,
body.ui-mode-minimal .sidebar-filter-popover .period-label-row,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .period-label-row,
body.ui-mode-minimalist .sidebar-filter-popover .period-label-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .period-control,
body.ui-mode-minimal .sidebar-filter-popover .period-control,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .period-control,
body.ui-mode-minimalist .sidebar-filter-popover .period-control {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 6px !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .period-control .input-month,
body.ui-mode-minimal .sidebar-filter-popover .period-control .input-month,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .period-control .input-month,
body.ui-mode-minimalist .sidebar-filter-popover .period-control .input-month {
  display: block !important;
  flex: 1 !important;
  width: auto !important;
  min-width: 0 !important;
}

body[data-ui-mode="minimal"] .sidebar-filter-popover .period-presets-bar,
body.ui-mode-minimal .sidebar-filter-popover .period-presets-bar,
body[data-ui-mode="minimalist"] .sidebar-filter-popover .period-presets-bar,
body.ui-mode-minimalist .sidebar-filter-popover .period-presets-bar {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
}

/* Sidebar Period Selector */
.sidebar-date-selector {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 24px;
}

.period-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.period-label-row label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.btn-text-tiny {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-text-tiny:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan);
}

.multi-btn-mini {
  display: none;
}

.period-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.period-presets-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.preset-pill {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.preset-pill:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.5);
  font-weight: 700;
}

.multi-month-status-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #34d399;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  margin-right: 6px;
}

.btn-clear-multi {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.btn-clear-multi:hover {
  color: var(--rose);
}

.input-month {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  flex: 1;
  outline: none;
}

.input-month:focus {
  border-color: var(--border-focus);
}

.btn-icon {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-elevated);
  color: #fff;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-weight: 600;
}

.nav-item svg {
  flex-shrink: 0;
}

/* Sidebar Footer / Health Widget */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quick-stats-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.quick-stats-box .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.health-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  background: var(--emerald);
}

.quick-stats-box .subtext {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  transition: var(--transition);
}

.btn-sidebar:hover {
  background: #2b395d;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sidebar.secondary {
  background: rgba(6, 182, 212, 0.1);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.25);
}

.btn-sidebar.secondary:hover {
  background: rgba(6, 182, 212, 0.2);
}

/* ---------------- Main Content ---------------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Topbar */
.topbar {
  position: relative;
  min-height: 72px;
  height: auto;
  padding: 8px 24px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  z-index: 100;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.topbar-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px 0;
  line-height: 1.25;
}

.topbar-period-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.2;
}

.topbar-period-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.btn-topbar-period {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.62rem;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.btn-topbar-period:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan);
  color: #fff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
  margin-left: auto;
}

.currency-wrapper, .theme-wrapper, .ui-mode-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.currency-wrapper label, .theme-wrapper label, .ui-mode-wrapper label, .topbar-ctrl-label {
  display: none !important; /* Clean compact topbar: icons and selects are self-explanatory */
}

@media (max-width: 1560px) {
  .topbar-right #btnOpenBudgetModal {
    display: none !important; /* Secondary action; budget is accessible in sidebar nav */
  }
}

@media (max-width: 1400px) {
  .topbar {
    padding: 8px 16px;
    gap: 8px 12px;
  }
  .page-title {
    font-size: 1.05rem;
  }
  .topbar-right {
    gap: 6px;
  }
  .btn-topbar-faq .faq-label {
    display: none !important;
  }
  .ui-mode-wrapper {
    display: none !important; /* Layout mode is already in sidebar bottom rail */
  }
  .topbar-workspace-pill,
  .topbar-ws-add-btn {
    display: none !important; /* Workspace is prominently managed in sidebar top card */
  }
  .user-profile-badge .user-role {
    display: none !important;
  }
  .user-profile-badge .user-name {
    max-width: 80px;
  }
}

@media (max-width: 1200px) {
  .page-title {
    font-size: 0.98rem;
  }
}

.select-clean {
  background: transparent;
  color: var(--text-main);
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding: 0;
}

.select-clean option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(40%);
  transform: none !important;
  box-shadow: none !important;
}

.topbar-right .btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45);
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #2a3759;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-text {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-text:hover {
  text-decoration: underline;
}

.mobile-only {
  display: none;
}

/* Scrollable Container */
.content-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 60px 32px;
}

/* Tabs */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Power BI KPI Cards ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.kpi-card.card-income {
  border-top: 2px solid var(--emerald);
}

.kpi-card.card-cyan {
  border-top: 2px solid var(--cyan);
}

.kpi-card.card-purple {
  border-top: 2px solid var(--purple);
}

.kpi-card.card-emerald {
  border-top: 2px solid var(--emerald);
}

.kpi-card.card-amber {
  border-top: 2px solid var(--amber);
}

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

.kpi-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.kpi-icon-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-pill.green { background: var(--emerald-glow); color: var(--emerald); }
.kpi-icon-pill.cyan { background: var(--cyan-glow); color: var(--cyan); }
.kpi-icon-pill.purple { background: var(--purple-glow); color: var(--purple); }
.kpi-icon-pill.emerald { background: var(--emerald-glow); color: var(--emerald); }
.kpi-icon-pill.amber { background: var(--amber-glow); color: var(--amber); }

.text-green { color: #34d399; }
.text-amber { color: #fbbf24; }

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.text-emerald { color: #34d399; }
.text-rose { color: #f87171; }

.kpi-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.kpi-tag {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.kpi-surplus-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 6px;
}

.kpi-surplus-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.kpi-surplus-badge:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
}

.kpi-trend.positive { color: var(--emerald); }
.kpi-trend.warning { color: var(--amber); }
.kpi-trend.negative { color: var(--rose); }

.kpi-bar-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.kpi-bar-indicator .fill {
  height: 100%;
  transition: width 0.4s ease;
}

.kpi-bar-indicator .fill.cyan { background: var(--cyan); }
.kpi-bar-indicator .fill.purple { background: var(--purple); }
.kpi-bar-indicator .fill.emerald { background: var(--emerald); }
.kpi-bar-indicator .fill.amber { background: var(--amber); }

/* Gauge Card */
.kpi-card.card-gauge {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(20, 27, 45, 0.95) 100%);
}

.kpi-status-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }

.kpi-gauge-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gauge-percentage {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.gauge-caption {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 12px;
}

.gauge-visual-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 80%, #ef4444 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.gauge-scale {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ---------------- Charts Grid ---------------- */
.charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 24px;
}

.panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.chart-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

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

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.panel-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.legend-dot.cyan { background-color: var(--cyan); }
.legend-dot.purple { background-color: var(--purple); }

.badge-mini {
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan);
}

.chart-wrapper {
  position: relative;
  flex: 1;
  min-height: 280px;
  width: 100%;
}

.chart-pie-wrapper {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-bar-wrapper {
  min-height: 340px;
}

/* ---------------- Bottom Row Dashboard ---------------- */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.top-categories-list, .recent-transactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.cat-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cat-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.cat-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.cat-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.cat-amount-wrap {
  text-align: right;
}

.cat-amount {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.cat-percent-bar {
  width: 90px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

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

/* Transaction List Item */
.tx-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.tx-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-desc {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

.tx-details {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
}

.tx-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f87171;
}

/* ---------------- Section Header Panels ---------------- */
.section-header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 18px 24px;
}

.section-title-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.section-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.section-actions {
  display: flex;
  gap: 10px;
}

.text-highlight {
  color: var(--cyan);
}

/* ---------------- Budget & Income Management ---------------- */
.income-setup-panel {
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(20, 27, 45, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.income-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.income-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.income-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.income-total-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.income-total-pill .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.income-total-pill .val {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.income-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: flex-end;
}

.income-field-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.paycheck-date-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.paycheck-date-badge.extra {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.field-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.field-subtext {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.income-btn-box {
  padding-bottom: 4px;
}

.btn-save-income {
  height: 42px;
  white-space: nowrap;
}

.budget-summary-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
}

.summary-stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.summary-stat .value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.summary-stat .value.cyan {
  color: var(--cyan);
}

.summary-tip {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 340px;
}

.budget-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.budget-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.budget-cat-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ---------------- Interactive Add Category Card in Grid ---------------- */
.budget-card-add-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  user-select: none;
  box-sizing: border-box;
}

.budget-card-add-placeholder:hover {
  background: rgba(6, 182, 212, 0.07);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.18);
}

.budget-card-add-placeholder .add-card-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.budget-card-add-placeholder:hover .add-card-icon-circle {
  transform: scale(1.1);
  background: var(--cyan);
  color: #fff;
}

.budget-card-add-placeholder .add-card-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.budget-card-add-placeholder .add-card-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

[data-theme="light"] .budget-card-add-placeholder {
  background: rgba(6, 182, 212, 0.04);
  border: 2px dashed rgba(6, 182, 212, 0.45);
}

[data-theme="light"] .budget-card-add-placeholder:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--cyan);
}

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

.budget-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.cat-emoji {
  font-size: 1.25rem;
}

.budget-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: text;
  transition: var(--transition);
}

.budget-input-group:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.05);
}

.budget-currency-symbol {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 6px;
}

.budget-amount-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  width: 100%;
  outline: none;
  font-family: inherit;
}

.budget-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  color: var(--text-secondary);
}

/* ---------------- [FEAT-23] Click-to-Edit Budget Target Pill ---------------- */
.budget-target-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.budget-target-pill.clickable {
  cursor: pointer;
}

.budget-target-pill.clickable:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

/* ---------------- [FEAT-50] Category Pacing & Burn Rate Indicator ---------------- */
.budget-card-pacing-wrap {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.budget-pace-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.budget-pace-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.budget-pace-bar-fill.emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.budget-pace-bar-fill.cyan { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.budget-pace-bar-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.budget-pace-bar-fill.rose { background: linear-gradient(90deg, #ef4444, #f87171); }
.budget-pace-bar-fill.neutral { background: rgba(255, 255, 255, 0.15); }

.budget-pace-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.70rem;
  gap: 6px;
}

.budget-pace-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.69rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.budget-pace-badge.pace-frugal {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.budget-pace-badge.pace-moderate {
  background: rgba(6, 182, 212, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.28);
}

.budget-pace-badge.pace-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.budget-pace-badge.pace-over {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.budget-pace-badge.pace-neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.budget-pace-spent-val {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.70rem;
  white-space: nowrap;
}

/* ---------------- [FEAT-50] Unswept Previous Month Surplus Prompt Banner ---------------- */
.surplus-rollover-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  animation: slideDownBanner 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.srb-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.srb-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.srb-title {
  color: #34d399;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.srb-desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
}

.srb-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.srb-month-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 99px;
  font-size: 0.77rem;
  font-weight: 600;
  color: #34d399;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  line-height: 1.2;
}

.srb-month-chip:hover {
  background: rgba(16, 185, 129, 0.26);
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}

.srb-month-chip .srb-chip-amt {
  font-weight: 700;
  color: #a7f3d0;
}

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

.btn-srb-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-srb-dismiss:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ---------------- Filter & Table ---------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  flex: 1;
  min-width: 220px;
}

.search-input-wrap input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}

.filter-select-wrap select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.filter-info-tag {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.filter-reset-btn {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.filter-reset-btn:hover {
  background: rgba(248, 113, 113, 0.25);
  border-color: #f87171;
  color: #fff;
  transform: translateY(-1px);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.data-table thead th {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 18px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 700;
}

/* ---------------- [FEAT-25] Variance Scorecard Sortable Column Headers ---------------- */
.data-table thead th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  white-space: nowrap;
}

.data-table thead th.sortable-th:hover {
  color: var(--cyan);
  background-color: rgba(6, 182, 212, 0.08);
}

.data-table thead th.sortable-th .sort-icon {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.76rem;
  opacity: 0.45;
  transition: all 0.15s ease;
}

.data-table thead th.sortable-th:hover .sort-icon {
  opacity: 0.9;
  color: var(--cyan);
}

.data-table thead th.sortable-th.sorted-asc,
.data-table thead th.sortable-th.sorted-desc {
  color: var(--cyan);
  background-color: rgba(6, 182, 212, 0.06);
}

.data-table thead th.sortable-th.sorted-asc .sort-icon,
.data-table thead th.sortable-th.sorted-desc .sort-icon {
  opacity: 1;
  color: var(--cyan);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.data-table td {
  padding: 13px 18px;
  color: var(--text-main);
  vertical-align: middle;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.table-total-row td {
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  padding: 16px 18px;
  border-top: 2px solid var(--border-subtle);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

/* Variance Table Elements */
.progress-pill-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-val {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}

/* ---------------- Modals ---------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

/* [FEAT-57] High-priority confirmation dialog (stacks cleanly on top of all drawers, modals, and admin hub) */
#confirmModal {
  z-index: 20000 !important;
}

#confirmModal .modal-card {
  max-width: 480px;
  background: var(--bg-card, #111827);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 20001 !important;
}


.modal-overlay.active {
  display: flex;
  animation: modalFade 0.2s ease forwards;
}

@keyframes modalFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

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

.form-row {
  display: flex;
  gap: 14px;
}

.flex-1 { flex: 1; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group label .req {
  color: var(--rose);
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
}

.input-addon-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.currency-addon {
  padding-left: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

.input-addon-wrap .form-control {
  border: none;
  background: transparent;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Category Card Actions & Edit/Delete Buttons */
.budget-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-cat,
.btn-del-cat {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  transition: var(--transition);
}

.btn-edit-cat:hover {
  color: var(--cyan);
  background: var(--cyan-glow);
  border-color: rgba(6, 182, 212, 0.3);
}

.btn-del-cat:hover {
  color: var(--rose);
  background: var(--rose-glow);
  border-color: rgba(239, 68, 68, 0.3);
}

.budget-card-title.clickable {
  cursor: pointer;
  transition: var(--transition);
}

.budget-card-title.clickable:hover {
  color: var(--cyan);
}

/* ---------------- [FEAT-21] Category Multi-Select & Bulk Actions Bar ---------------- */
.category-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

.btn-toolbar-add-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
  transition: all 0.2s ease;
}

.btn-toolbar-add-cat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.45);
}

.category-modal-bulk-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius-md, 8px);
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  transition: var(--transition, all 0.2s ease);
}

body.theme-light .category-modal-bulk-banner {
  background: #f0f7ff;
  border-color: #bfdbfe;
}

.selection-count-badge {
  background: rgba(6, 182, 212, 0.18);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* ---------------- [FEAT-42] Category Classification Filter Tabs & Badges ---------------- */
.cat-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

.btn-cat-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-cat-filter:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-cat-filter.active {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 700;
}

/* [FEAT-39 v2] Category Card Budget Classification Row */
.budget-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: -2px;
  margin-bottom: 2px;
}

.budget-card-meta-row .badge-budget-tag {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.budget-card-meta-row .badge-budget-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}

.budget-card-meta-row .badge-budget-tag.badge-tag-wants:hover {
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.35);
}

.cat-rule-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-danger-subtle {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-danger-subtle:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #f87171;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Card Selection Checkbox & Highlight */
.cat-select-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 4px;
}

.cat-select-chk {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--cyan);
  border-radius: 4px;
}

.budget-cat-card.selected {
  border-color: var(--cyan) !important;
  background: rgba(6, 182, 212, 0.07) !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.22);
}

/* Copy Categories Modal Body */
.copy-cat-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 110px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.copy-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-main);
}

.copy-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Category Modal Custom Controls */
.quick-emojis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.btn-emoji {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-size: 1.15rem;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-emoji:hover {
  background: var(--bg-elevated);
  transform: scale(1.1);
  border-color: var(--cyan);
}

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  height: 42px;
}

.form-control-color {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.form-control-color::-webkit-color-swatch {
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
}

.color-hex-label {
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--text-secondary);
}

/* ---------------- [FEAT-12] Multi-Month Selection Modal ---------------- */
.modal-month-picker {
  max-width: 520px;
}

.month-picker-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
}

.picker-year-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  flex-wrap: wrap;
}

.picker-year-select {
  width: auto;
  min-width: 100px;
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.picker-quick-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

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

.month-tile {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.month-tile:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.month-tile.selected {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.month-tile .month-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.month-tile .month-quarter {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.month-tile.selected .month-quarter {
  color: #38bdf8;
}

.selected-months-summary-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ---------------- [FEAT-18 / FEAT-43] Firebase Admin Profile, Real-Time Role & Auth Gateway ---------------- */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.user-avatar {
  font-size: 0.95rem;
  background: var(--bg-elevated);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.64rem;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: 4px;
}

.btn-logout:hover {
  color: var(--rose);
  background: rgba(239, 68, 68, 0.15);
}

.auth-gateway-overlay {
  z-index: 500;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.92);
}

.auth-card {
  max-width: 430px;
  width: 90vw;
  padding: 34px 28px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.15);
  animation: modalScaleUp 0.3s ease forwards;
}

.auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.35);
}

.auth-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.auth-alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 16px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.google-auth-wrap {
  margin-bottom: 4px;
}

.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-google-auth:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-google-auth:active {
  transform: translateY(0);
}

.btn-google-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-google-auth svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.auth-actions {
  margin-top: 22px;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: center;
}

.auth-switch-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-link {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
  font-size: 0.82rem;
}

.btn-link:hover {
  color: #7dd3fc;
}

.auth-status-tip {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ---------------- Toast Notification ---------------- */
.toast-container {
  position: fixed;
  bottom: 76px;
  right: 24px;
  z-index: 25000 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------------- Responsive Media Queries ---------------- */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .income-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .budget-summary-banner {
    flex-wrap: wrap;
    gap: 18px;
  }
  .summary-tip {
    max-width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .income-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px), (pointer: coarse) and (max-width: 1200px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    z-index: 1000 !important;
    width: 285px !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.75) !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  .main-content {
    width: 100vw !important;
    max-width: 100vw !important;
    padding-bottom: 84px !important;
  }
  .topbar {
    padding: 0 16px;
  }
  .content-scrollable {
    padding: 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------- [FEAT-19] FAQ & User Guide Styles ---------------- */
.btn-topbar-faq {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-topbar-faq:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.btn-topbar-faq .faq-icon {
  font-size: 0.95rem;
}

.faq-modal-card {
  width: 94vw;
  max-width: 840px;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 26px;
  box-sizing: border-box;
}

.faq-modal-card .modal-header {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.faq-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.faq-badge-icon {
  font-size: 1.7rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-toolbar {
  flex-shrink: 0;
  margin: 10px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-search-wrap {
  position: relative;
  width: 100%;
}

.faq-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.7;
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding-left: 36px;
  font-size: 0.86rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.faq-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.faq-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.faq-chip {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.faq-chip:hover {
  border-color: var(--cyan);
  color: var(--text-primary);
}

.faq-chip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.faq-accordion-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 8px;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.6) rgba(0, 0, 0, 0.25);
}

.faq-accordion-list::-webkit-scrollbar {
  width: 7px;
}

.faq-accordion-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.faq-accordion-list::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.5);
  border-radius: 999px;
}

.faq-accordion-list::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

.faq-item {
  flex-shrink: 0 !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.faq-item.open {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.faq-modal-card .modal-footer {
  flex-shrink: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0;
}

.faq-question-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s ease;
}

.faq-question-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-q-text {
  flex: 1;
  padding-right: 12px;
}

.faq-q-icon {
  font-size: 0.85rem;
  color: var(--cyan);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-q-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 16px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary);
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 4000px;
  opacity: 1;
  padding: 8px 18px 18px 18px;
  border-top: 1px dashed var(--border-subtle);
}

.faq-badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(6, 182, 212, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
  margin-right: 6px;
  vertical-align: middle;
}

.faq-badge-tag.accent {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.faq-badge-tag.success {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.faq-badge-tag.amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Visual UI Mockup & Step-by-Step Containers */
.faq-visual-guide {
  margin: 12px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-step-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.faq-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.faq-mockup-window {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  margin: 10px 0 14px 0;
}

.faq-mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-mockup-dots {
  display: flex;
  gap: 5px;
}

.faq-mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.faq-mockup-dot.red { background: #ef4444; }
.faq-mockup-dot.yellow { background: #f59e0b; }
.faq-mockup-dot.green { background: #10b981; }

.faq-mockup-title {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.faq-mockup-body {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.55);
}

.faq-mockup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}

.faq-mockup-row:last-child {
  margin-bottom: 0;
}

.faq-mockup-row.highlighted {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
}

.faq-annotated-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 0.81rem;
  color: var(--cyan);
}

.faq-annotated-callout .callout-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  color: #020617;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.faq-visual-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.faq-flow-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.faq-flow-step .step-number {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--cyan);
}

.faq-flow-step .step-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.faq-flow-step .step-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Light Theme Support for FAQ Mockups */
body.theme-light .faq-mockup-window,
body[data-theme="light"] .faq-mockup-window {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

body.theme-light .faq-mockup-header,
body[data-theme="light"] .faq-mockup-header {
  background: #e2e8f0;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .faq-mockup-body,
body[data-theme="light"] .faq-mockup-body {
  background: #ffffff;
}

body.theme-light .faq-mockup-row,
body[data-theme="light"] .faq-mockup-row {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.theme-light .faq-step-card,
body[data-theme="light"] .faq-step-card {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left-color: var(--cyan);
}

body.theme-light .faq-flow-step,
body[data-theme="light"] .faq-flow-step {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.faq-answer p {
  margin: 6px 0;
}

.faq-answer ol,
.faq-answer ul {
  padding-left: 20px;
  margin: 6px 0;
}

.faq-answer li {
  margin-bottom: 4px;
}

.faq-answer a {
  color: var(--cyan);
  text-decoration: underline;
}

.faq-footer-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.faq-footer-tip kbd {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
}

@media (max-width: 600px) {
  .btn-topbar-faq .faq-label {
    display: none;
  }
  .btn-topbar-faq {
    padding: 6px 8px;
  }
}

/* ---------------- [FEAT-20] Firestore Cloud Sync Badge ---------------- */
.firestore-sync-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.74rem;
  font-weight: 600;
  color: #6ee7b7;
  margin-top: 4px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.firestore-sync-badge .sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
}

.firestore-sync-badge.syncing {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.firestore-sync-badge.syncing .sync-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 0.8s infinite alternate;
}

.firestore-sync-badge.offline {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.firestore-sync-badge.offline .sync-dot {
  background: #94a3b8;
  box-shadow: none;
}

.firestore-sync-badge.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.firestore-sync-badge.error .sync-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes pulseDot {
  0% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.25); }
}





/* ---------------- [FEAT-27 v2] Blueprint Isolated Workspace Switcher & Slide-Over Drawer ---------------- */
.sidebar-workspace-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  margin: 10px 14px 6px 14px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.sidebar-workspace-card:hover {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.07);
  transform: translateY(-1px);
}

.sidebar-ws-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.sidebar-ws-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 700;
}

.sidebar-ws-tag {
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.sidebar-ws-main {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.84rem;
}

.sidebar-ws-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.sidebar-ws-select:hover,
.sidebar-ws-select:focus {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
}

.sidebar-ws-select option {
  background: #0f1422;
  color: #f8fafc;
}

body.theme-light .sidebar-ws-select,
body[data-theme="light"] .sidebar-ws-select {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

body.theme-light .sidebar-ws-select option,
body[data-theme="light"] .sidebar-ws-select option {
  background: #ffffff;
  color: #0f172a;
}

.sidebar-ws-icon {
  font-size: 1rem;
  line-height: 1;
}

.sidebar-ws-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-ws-chevron {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sidebar-ws-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-ws-quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 4px;
  font-size: 0.69rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-ws-quick:hover {
  color: var(--text-primary);
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
}

.btn-ws-quick.primary {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.35);
  color: var(--cyan);
}

.btn-ws-quick.primary:hover {
  background: var(--cyan);
  color: #030712;
}

/* Compact Topbar Workspace Pill inside Subtitle Row */
.topbar-workspace-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  padding: 2px 10px 2px 8px;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 4px;
  max-width: 220px;
}

.topbar-workspace-pill:hover {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.topbar-ws-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-ws-add-btn:hover {
  background: var(--cyan);
  color: #030712;
  transform: translateY(-1px);
}

.ws-pill-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.ws-pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

.ws-pill-tag {
  font-size: 0.63rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-weight: 700;
}

.ws-pill-caret {
  font-size: 0.68rem;
  opacity: 0.7;
}

/* Unified Slide-Over Workspace Drawer */
.workspace-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(5px);
  z-index: 2200;
  display: none;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.workspace-drawer-overlay.active {
  display: flex;
  opacity: 1;
}

.workspace-drawer-panel {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -16px 0 45px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  animation: slideInRightDrawer 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRightDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.ws-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.ws-drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-drawer-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.ws-drawer-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ws-drawer-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.ws-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.ws-drawer-count-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.ws-count-pill {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
}

/* Inline Collapsible Create Workspace Panel */
.ws-create-panel {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ws-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--cyan);
  margin-bottom: 12px;
}

.btn-ws-close-inline {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.ws-create-callout {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  margin-top: 8px;
}

.ws-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Workspace Cards List */
.ws-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.ws-card.active,
.ws-card.is-active {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.07);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.1);
}

.ws-card-top,
.ws-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ws-card-select-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.ws-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.ws-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ws-card-texts {
  flex: 1;
  min-width: 0;
}

.ws-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.ws-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.ws-card-tag-pill {
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.ws-active-badge,
.ws-card-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  flex-shrink: 0;
}

.ws-card-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.ws-card-meta,
.ws-card-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.ws-card-tag {
  color: var(--cyan);
  font-weight: 600;
}

.ws-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ws-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.ws-action-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.12);
}

.ws-action-btn.ws-switch-btn {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan);
}

.ws-action-btn.ws-switch-btn:hover {
  background: var(--cyan);
  color: #030712;
}

.ws-action-btn.ws-delete-btn:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.ws-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Inline Rename Form inside Workspace Card */
.ws-inline-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.ws-inline-input {
  flex: 1 1 160px;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 7px;
  border: 1px solid var(--cyan);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
}

.ws-inline-select {
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
}

.ws-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.ws-footer-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---------------- [FEAT-28] Month-Scoped Category Deletion & Scope Modal ---------------- */
.btn-restore-month {
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  transition: var(--transition);
}

.btn-restore-month:hover {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #10b981 !important;
  transform: translateY(-1px);
}

.delete-scope-body {
  padding: 16px 22px 20px 22px;
}

.delete-scope-target-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.scope-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.scope-option-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.scope-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.scope-option-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--cyan);
  width: 17px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.scope-option-card.selected {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.scope-option-card.danger input[type="radio"] {
  accent-color: #ef4444;
}

.scope-option-card.danger.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.scope-option-content {
  flex: 1;
}

.scope-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.scope-option-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
}

.badge-scope-recommended {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-scope-permanent {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-scope-global {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

body.theme-light .badge-scope-global {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

body.theme-light .scope-option-title {
  color: #1e293b;
}

body.theme-light .scope-option-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .scope-option-card:hover {
  background: #f1f5f9;
}

body.theme-light .scope-option-card.selected {
  background: #ecfeff;
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.12);
}

.scope-option-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.delete-warning-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-top: 12px;
}

.delete-warning-box.danger-alert {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.delete-warning-box .warning-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.delete-warning-box .warning-text {
  flex: 1;
}

/* ---------------- [FEAT-29] Expandable Category Expense Drilldowns in Variance Scorecard ---------------- */
.variance-cat-row {
  cursor: pointer;
  transition: var(--transition);
}

.variance-cat-row:hover {
  background-color: rgba(6, 182, 212, 0.05) !important;
}

.variance-cat-row.expanded {
  background-color: rgba(6, 182, 212, 0.08) !important;
  border-bottom: none;
}

.variance-cat-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-variance-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-variance-expand:hover {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.btn-variance-expand .chevron-icon {
  transition: transform 0.2s ease;
}

.btn-variance-expand.is-open {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn-variance-expand.is-open .chevron-icon {
  transform: rotate(180deg);
}

.variance-cat-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.variance-cat-name {
  color: var(--text-primary);
  font-weight: 600;
}

.variance-tx-count-pill {
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.variance-tx-count-pill.has-tx {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.variance-tx-count-pill.empty {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Detail Sub-Row */
.variance-detail-row {
  background: rgba(2, 6, 23, 0.45);
}

.variance-detail-td {
  padding: 0 16px 16px 28px !important;
  border-bottom: 2px solid rgba(6, 182, 212, 0.25) !important;
}

.variance-drilldown-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 4px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 0.2s ease-out;
}

.variance-drilldown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 10px;
}

.drilldown-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.drilldown-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid;
}

.drilldown-meta-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.drilldown-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-drilldown-tracker {
  font-size: 0.75rem;
  padding: 4px 10px;
  color: var(--cyan) !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.08);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.btn-drilldown-tracker:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: var(--cyan) !important;
}

.drilldown-empty-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.drilldown-table-responsive {
  max-height: 280px;
  overflow-y: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.drilldown-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.drilldown-subtable thead th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.drilldown-subtable tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

.drilldown-subtable tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.drilldown-subtable td {
  padding: 8px 12px;
  vertical-align: middle;
}

.drilldown-date {
  color: var(--text-secondary);
  white-space: nowrap;
}

.drilldown-desc {
  display: flex;
  flex-direction: column;
}

.drilldown-desc-main {
  color: var(--text-primary);
  font-weight: 500;
}

.drilldown-desc-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-style: italic;
}

.drilldown-amount {
  font-family: var(--font-numeric, monospace);
  white-space: nowrap;
}

.drilldown-pct {
  color: var(--text-secondary);
  font-family: var(--font-numeric, monospace);
}

.btn-xs {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}





/* ---------------- [FEAT-30] Safe-to-Spend Daily Allowance Widget ---------------- */
.safe-spend-widget {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(260px, 1.6fr) minmax(200px, 1.2fr);
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md, 12px);
  transition: var(--transition);
}
.safe-spend-widget[data-state="warn"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.05));
  border-color: rgba(245, 158, 11, 0.4);
}
.safe-spend-widget[data-state="over"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.05));
  border-color: rgba(239, 68, 68, 0.45);
}
.safe-spend-widget[data-state="idle"] {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-subtle);
}
.safe-spend-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.safe-spend-per { color: var(--text-muted); font-weight: 600; }
.safe-spend-amount {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  color: #34d399;
}
.safe-spend-widget[data-state="warn"] .safe-spend-amount { color: #fbbf24; }
.safe-spend-widget[data-state="over"] .safe-spend-amount { color: #f87171; }
.safe-spend-widget[data-state="idle"] .safe-spend-amount { color: var(--text-secondary); }
.safe-spend-caption { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.safe-spend-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.safe-spend-stat { display: flex; flex-direction: column; gap: 2px; }
.safe-spend-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.safe-spend-stat strong { font-size: 1.05rem; color: var(--text-primary); }
.safe-spend-bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.safe-spend-bar { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.safe-spend-bar-fill { height: 100%; background: #10b981; border-radius: 99px; transition: width 0.4s ease, background-color 0.3s ease; }
.safe-spend-bar-text { font-size: 0.74rem; color: var(--text-secondary); }
@media (max-width: 900px) {
  .safe-spend-widget { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------------- [FEAT-32] Recurring Bills & Subscriptions ---------------- */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--rose);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}
.bills-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.bills-summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 12px);
}
.bills-summary-card.warn { border-color: rgba(245, 158, 11, 0.35); }
.bills-summary-card.danger { border-color: rgba(239, 68, 68, 0.35); }
.bills-summary-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--text-muted); }
.bills-summary-value { font-size: 1.5rem; color: var(--text-primary); }
.bills-summary-card.warn .bills-summary-value { color: #fbbf24; }
.bills-summary-card.danger .bills-summary-value { color: #f87171; }
.bills-summary-sub { font-size: 0.78rem; color: var(--text-secondary); }
.bill-sub { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.bill-row-paused { opacity: 0.55; }
.bill-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bill-actions .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.upcoming-bills-strip {
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: var(--transition);
}
.upcoming-bills-strip:hover { border-color: var(--cyan); }
.upcoming-bills-title { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--text-secondary); }
.upcoming-bills-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.upcoming-bill-chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
}
.upcoming-bill-chip.warn { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.4); }
.upcoming-bill-chip.danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.45); }
.upcoming-bill-more { font-size: 0.78rem; color: var(--text-muted); align-self: center; }
@media (max-width: 800px) {
  .bills-summary-grid { grid-template-columns: 1fr; }
}

/* ---------------- [FEAT-33] Overspend Alerts toggle ---------------- */
.btn-alert-toggle {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-alert-toggle.is-off {
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

/* ---------------- [FEAT-44] Executive Privacy Stealth Mode & 5-Second Undo Engine ---------------- */
.btn-privacy-toggle {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-privacy-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}
.btn-privacy-toggle.active {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* Toast with Undo Action */
.toast.toast-with-action {
  gap: 12px;
  padding: 10px 14px 10px 18px;
  align-items: center;
}
.btn-toast-undo {
  background: var(--cyan);
  color: #0b1120;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}
.btn-toast-undo:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

/* Privacy Masking Rules with Peek-on-Hover */
body.privacy-mode .kpi-value,
body.privacy-mode .kpi-income-tags span,
body.privacy-mode .safe-spend-value,
body.privacy-mode .sa-metric-value,
body.privacy-mode .sa-stat-val,
body.privacy-mode .budget-cat-amount,
body.privacy-mode .budget-input,
body.privacy-mode .budget-input-group,
body.privacy-mode .budget-amount-input,
body.privacy-mode .budget-currency-symbol,
body.privacy-mode .budget-target-pill,
body.privacy-mode .summary-stat .value,
body.privacy-mode .income-total-pill .val,
body.privacy-mode #incomePaycheck15,
body.privacy-mode #incomePaycheck30,
body.privacy-mode #incomeAdditional,
body.privacy-mode .zero-status-badge,
body.privacy-mode .zero-status-msg,
body.privacy-mode #btnAssignRemainingToSavings,
body.privacy-mode .zero-legend-item strong,
body.privacy-mode .variance-cat-cell:nth-child(2),
body.privacy-mode .variance-cat-cell:nth-child(3),
body.privacy-mode .variance-cat-cell:nth-child(4),
body.privacy-mode #expensesTableBody td[data-field="amount"],
body.privacy-mode #expensesTableBody td:nth-child(6),
body.privacy-mode #expenseBatchTotalVal,
body.privacy-mode #recurringBillsTable td:nth-child(3),
body.privacy-mode .drilldown-subtable td:nth-child(4),
body.privacy-mode .income-card-val,
body.privacy-mode .surplus-stat-val,
body.privacy-mode .surplus-table-wrap td:nth-child(2),
body.privacy-mode .surplus-table-wrap td:nth-child(3),
body.privacy-mode .surplus-table-wrap td:nth-child(4),
body.privacy-mode #surplusApplyBtnAmount,
body.privacy-mode #incomeCarryoverBadge,
body.privacy-mode #kpiIncomeSurplusTag,
body.privacy-mode .kpi-surplus-badge,
body.privacy-mode #budgetIncomeBannerSurplusSub,
body.privacy-mode [data-privacy-mask] {
  filter: blur(7px) !important;
  user-select: none !important;
  transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
}

body.privacy-mode .kpi-value:hover,
body.privacy-mode .kpi-income-tags span:hover,
body.privacy-mode .safe-spend-value:hover,
body.privacy-mode .sa-metric-value:hover,
body.privacy-mode .sa-stat-val:hover,
body.privacy-mode .budget-cat-amount:hover,
body.privacy-mode .budget-input:hover,
body.privacy-mode .budget-input-group:hover,
body.privacy-mode .budget-input-group:focus-within,
body.privacy-mode .budget-amount-input:hover,
body.privacy-mode .budget-amount-input:focus,
body.privacy-mode .budget-currency-symbol:hover,
body.privacy-mode .budget-target-pill:hover,
body.privacy-mode .summary-stat .value:hover,
body.privacy-mode .income-total-pill .val:hover,
body.privacy-mode #incomeCarryoverBadge:hover,
body.privacy-mode #kpiIncomeSurplusTag:hover,
body.privacy-mode .kpi-surplus-badge:hover,
body.privacy-mode #budgetIncomeBannerSurplusSub:hover,
body.privacy-mode #incomePaycheck15:hover,
body.privacy-mode #incomePaycheck15:focus,
body.privacy-mode #incomePaycheck30:hover,
body.privacy-mode #incomePaycheck30:focus,
body.privacy-mode #incomeAdditional:hover,
body.privacy-mode #incomeAdditional:focus,
body.privacy-mode .zero-status-badge:hover,
body.privacy-mode .zero-status-msg:hover,
body.privacy-mode #btnAssignRemainingToSavings:hover,
body.privacy-mode .zero-legend-item strong:hover,
body.privacy-mode .variance-cat-cell:nth-child(2):hover,
body.privacy-mode .variance-cat-cell:nth-child(3):hover,
body.privacy-mode .variance-cat-cell:nth-child(4):hover,
body.privacy-mode #expensesTableBody td[data-field="amount"]:hover,
body.privacy-mode #expensesTableBody td:nth-child(6):hover,
body.privacy-mode #expenseBatchTotalVal:hover,
body.privacy-mode #recurringBillsTable td:nth-child(3):hover,
body.privacy-mode .drilldown-subtable td:nth-child(4):hover,
body.privacy-mode .income-card-val:hover,
body.privacy-mode .surplus-stat-val:hover,
body.privacy-mode .surplus-table-wrap td:nth-child(2):hover,
body.privacy-mode .surplus-table-wrap td:nth-child(3):hover,
body.privacy-mode .surplus-table-wrap td:nth-child(4):hover,
body.privacy-mode #surplusApplyBtnAmount:hover,
body.privacy-mode [data-privacy-mask]:hover {
  filter: blur(0px) !important;
}

body.privacy-mode .chart-container canvas,
body.privacy-mode .charts-grid canvas {
  filter: blur(4px) !important;
  transition: filter 0.2s ease !important;
}
body.privacy-mode .chart-container canvas:hover,
body.privacy-mode .charts-grid canvas:hover {
  filter: blur(0px) !important;
}

/* ---------------- [FEAT-35] Minimalist Collapsible Keyboard Shortcuts Guide HUD ---------------- */
.shortcuts-hud {
  position: fixed;
  bottom: 18px;
  right: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  user-select: none;
  font-family: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Minimized Pill View */
.shortcuts-hud-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(20, 27, 45, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.shortcuts-hud-pill:hover {
  border-color: var(--cyan);
  background: rgba(20, 27, 45, 0.98);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.25), 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.shortcuts-hud-pill:active {
  transform: translateY(0);
}

.hud-pill-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.hud-pill-label {
  letter-spacing: 0.02em;
}

.hud-pill-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  line-height: 1.2;
}

.hud-pill-expand-icon {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.shortcuts-hud-pill:hover .hud-pill-expand-icon {
  color: var(--cyan);
  transform: translateY(-1px);
}

/* Expanded Card View */
.shortcuts-hud-card {
  display: flex;
  flex-direction: column;
  width: 396px;
  max-width: calc(100vw - 20px);
  background: rgba(20, 27, 45, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(6, 182, 212, 0.15);
  overflow: hidden;
  animation: hudSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

@keyframes hudSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Visibility based on .is-minimized */
.shortcuts-hud.is-minimized .shortcuts-hud-pill {
  display: inline-flex;
}

.shortcuts-hud.is-minimized .shortcuts-hud-card {
  display: none !important;
}

.shortcuts-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shortcuts-hud-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.hud-title-icon {
  font-size: 0.9rem;
}

.shortcuts-hud-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-hud-link {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: #22d3ee;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-hud-link:hover {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

.btn-hud-min {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  transition: var(--transition);
}

.btn-hud-min:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.shortcuts-hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 8px 9px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.shortcut-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.shortcut-item.is-pressed {
  background: rgba(6, 182, 212, 0.22) !important;
  border-color: var(--cyan) !important;
  color: #22d3ee !important;
  transform: scale(0.97);
}

.shortcut-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.shortcut-item.is-pressed .shortcut-kbd {
  border-color: #22d3ee;
  background: rgba(6, 182, 212, 0.4);
  color: #fff;
}

.shortcut-name {
  font-size: 0.70rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.shortcut-item .nav-tier-badge {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.58rem;
  padding: 1px 4px;
}

.shortcuts-hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hud-footer-hint {
  font-size: 0.67rem;
  color: var(--text-muted);
}

.btn-hud-collapse-text {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  padding: 1px 4px;
  border-radius: 3px;
  transition: color 0.15s;
}

.btn-hud-collapse-text:hover {
  color: var(--cyan);
}

/* Light theme overrides for shortcuts HUD */
body[data-theme="light"] .shortcuts-hud-pill,
body.theme-light .shortcuts-hud-pill {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .shortcuts-hud-card,
body.theme-light .shortcuts-hud-card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .shortcuts-hud-header,
body.theme-light .shortcuts-hud-header {
  background: rgba(0, 0, 0, 0.02);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .shortcut-item,
body.theme-light .shortcut-item {
  background: rgba(0, 0, 0, 0.02);
}

body[data-theme="light"] .shortcut-item:hover,
body.theme-light .shortcut-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .shortcut-kbd,
body.theme-light .shortcut-kbd {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  border-bottom-color: rgba(0, 0, 0, 0.3);
}

body[data-theme="light"] .shortcuts-hud-footer,
body.theme-light .shortcuts-hud-footer {
  background: rgba(0, 0, 0, 0.04);
  border-top-color: rgba(0, 0, 0, 0.06);
}

/* Responsive adjustment for small mobile screens */
@media (max-width: 640px) {
  .shortcuts-hud {
    bottom: 12px;
    right: 12px;
  }
  .shortcuts-hud-card {
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}

/* ---------------- [FEAT-36] Multi-Layout UI Mode Switcher (Default, Minimalist, Mobile) ---------------- */
.ui-mode-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ui-mode-wrapper label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sidebar Layout Mode Picker */
.sidebar-layout-picker {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.sidebar-layout-picker .label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}
.layout-pills-row {
  display: flex;
  gap: 4px;
}
.btn-layout-pill {
  flex: 1;
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}
.btn-layout-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.btn-layout-pill.active {
  background: rgba(6, 182, 212, 0.18);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.4);
  font-weight: 700;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------------- 1. Minimalist Mode (Clean / Zen) ---------------- */
@media (min-width: 769px) {
  body[data-ui-mode="minimal"] .sidebar,
  body.ui-mode-minimal .sidebar {
    width: 76px !important;
    padding: 20px 10px 16px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1050 !important;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-right: 1px solid var(--border-subtle) !important;
    flex-shrink: 0 !important;
  }

  /* 1. Sleek Brand Icon Squircle */
  body[data-ui-mode="minimal"] .sidebar-brand,
  body.ui-mode-minimal .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }
  body[data-ui-mode="minimal"] .sidebar-brand .brand-icon,
  body.ui-mode-minimal .sidebar-brand .brand-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(2, 132, 199, 0.1)) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.18) !important;
    color: var(--cyan) !important;
    margin: 0 auto !important;
  }
  body[data-ui-mode="minimal"] .sidebar-brand .brand-info,
  body[data-ui-mode="minimal"] .sidebar-brand .badge-pro,
  body[data-ui-mode="minimal"] .sidebar-brand h2,
  body.ui-mode-minimal .sidebar-brand .brand-info,
  body.ui-mode-minimal .sidebar-brand .badge-pro,
  body.ui-mode-minimal .sidebar-brand h2 {
    display: none !important;
  }

  /* [FEAT-40] In Minimalist mode, the sidebar-filter-pill serves as the compact 44x44 filter trigger in the dock */
  body[data-ui-mode="minimal"] .sidebar-filter-wrapper,
  body.ui-mode-minimal .sidebar-filter-wrapper {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
  }


  /* 3. Sleek Centered Nav Menu (Icon Dock) */
  body[data-ui-mode="minimal"] .nav-menu,
  body.ui-mode-minimal .nav-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body[data-ui-mode="minimal"] .nav-item,
  body.ui-mode-minimal .nav-item {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-secondary) !important;
    position: relative !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
  }
  body[data-ui-mode="minimal"] .nav-item:hover,
  body.ui-mode-minimal .nav-item:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }
  body[data-ui-mode="minimal"] .nav-item.active,
  body.ui-mode-minimal .nav-item.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(2, 132, 199, 0.12)) !important;
    color: var(--cyan) !important;
    border-color: rgba(6, 182, 212, 0.45) !important;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25) !important;
  }
  body[data-ui-mode="minimal"] .nav-item span:not(.nav-badge),
  body.ui-mode-minimal .nav-item span:not(.nav-badge) {
    display: none !important;
  }
  body[data-ui-mode="minimal"] .nav-item svg,
  body.ui-mode-minimal .nav-item svg {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    stroke-width: 2.1 !important;
  }
  body[data-ui-mode="minimal"] .nav-item .nav-badge,
  body.ui-mode-minimal .nav-item .nav-badge {
    position: absolute !important;
    top: 3px !important;
    right: 3px !important;
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
    min-width: 15px !important;
    background: #ef4444 !important;
    color: #fff !important;
    border-radius: 999px !important;
    border: 1.5px solid var(--bg-sidebar) !important;
  }

  /* 4. Sleek Minimal Sidebar Footer with Quick Mode Switcher */
  body[data-ui-mode="minimal"] .sidebar-footer,
  body.ui-mode-minimal .sidebar-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: auto !important;
    gap: 8px !important;
    padding: 14px 0 0 0 !important;
    border-top: 1px solid var(--border-subtle) !important;
  }
  body[data-ui-mode="minimal"] .sidebar-footer .quick-stats-box,
  body.ui-mode-minimal .sidebar-footer .quick-stats-box,
  body[data-ui-mode="minimal"] .sidebar-footer .action-buttons,
  body.ui-mode-minimal .sidebar-footer .action-buttons,
  body[data-ui-mode="minimal"] .sidebar-layout-picker .label,
  body.ui-mode-minimal .sidebar-layout-picker .label {
    display: none !important;
  }
  body[data-ui-mode="minimal"] .sidebar-layout-picker,
  body.ui-mode-minimal .sidebar-layout-picker {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  body[data-ui-mode="minimal"] .layout-pills-row,
  body.ui-mode-minimal .layout-pills-row {
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    align-items: center !important;
  }
  body[data-ui-mode="minimal"] .btn-layout-pill,
  body.ui-mode-minimal .btn-layout-pill {
    width: 44px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
  }
  body[data-ui-mode="minimal"] .btn-layout-pill .pill-text,
  body.ui-mode-minimal .btn-layout-pill .pill-text {
    display: none !important;
  }
  body[data-ui-mode="minimal"] .btn-layout-pill .pill-icon,
  body.ui-mode-minimal .btn-layout-pill .pill-icon {
    font-size: 1rem !important;
    margin: 0 auto !important;
  }

  body[data-ui-mode="minimal"] .main-content,
  body.ui-mode-minimal .main-content {
    width: calc(100vw - 76px) !important;
    max-width: calc(100vw - 76px) !important;
  }
}

body[data-ui-mode="minimal"] .content-scrollable,
body.ui-mode-minimal .content-scrollable {
  padding: 16px 28px !important;
}
body[data-ui-mode="minimal"] .kpi-grid,
body.ui-mode-minimal .kpi-grid {
  gap: 12px !important;
  margin-bottom: 16px !important;
}
body[data-ui-mode="minimal"] .kpi-card,
body.ui-mode-minimal .kpi-card {
  padding: 14px 18px !important;
  border-radius: 10px !important;
  background: rgba(20, 27, 45, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
}
body[data-ui-mode="minimal"] .kpi-card:hover,
body.ui-mode-minimal .kpi-card:hover {
  transform: none !important;
  border-color: var(--cyan) !important;
}
body[data-ui-mode="minimal"] .kpi-subtext,
body.ui-mode-minimal .kpi-subtext {
  display: none !important;
}
body[data-ui-mode="minimal"] .kpi-value,
body.ui-mode-minimal .kpi-value {
  font-size: 1.6rem !important;
  margin-bottom: 2px !important;
}
body[data-ui-mode="minimal"] .safe-spend-widget,
body.ui-mode-minimal .safe-spend-widget {
  padding: 12px 18px !important;
  margin-bottom: 14px !important;
  border-radius: 10px !important;
}
body[data-ui-mode="minimal"] .data-table th,
body[data-ui-mode="minimal"] .data-table td,
body.ui-mode-minimal .data-table th,
body.ui-mode-minimal .data-table td {
  padding: 9px 12px !important;
  font-size: 0.83rem !important;
}

/* ---------------- 2. Mobile Pocket Mode ---------------- */
html[data-ui-mode="mobile"] .app-layout,
html.ui-mode-mobile .app-layout,
body[data-ui-mode="mobile"] .app-layout,
body.ui-mode-mobile .app-layout {
  flex-direction: column !important;
  width: 100vw !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
}
html[data-ui-mode="mobile"] .sidebar,
html.ui-mode-mobile .sidebar,
body[data-ui-mode="mobile"] .sidebar,
body.ui-mode-mobile .sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 285px !important;
  height: 100vh !important;
  z-index: 1000 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.75) !important;
}
html[data-ui-mode="mobile"] .sidebar.open,
html.ui-mode-mobile .sidebar.open,
body[data-ui-mode="mobile"] .sidebar.open,
body.ui-mode-mobile .sidebar.open {
  transform: translateX(0) !important;
}
html[data-ui-mode="mobile"] .main-content,
html.ui-mode-mobile .main-content,
body[data-ui-mode="mobile"] .main-content,
body.ui-mode-mobile .main-content {
  width: 100vw !important;
  max-width: 100vw !important;
  padding-bottom: 84px !important;
}
html[data-ui-mode="mobile"] .mobile-only,
html.ui-mode-mobile .mobile-only,
body[data-ui-mode="mobile"] .mobile-only,
body.ui-mode-mobile .mobile-only {
  display: inline-flex !important;
}
body[data-ui-mode="mobile"] .topbar,
body.ui-mode-mobile .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  height: 56px !important;
  padding: 0 14px !important;
  background: var(--bg-sidebar) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
body[data-ui-mode="mobile"] .topbar-period-row,
body[data-ui-mode="mobile"] .page-subtitle,
body.ui-mode-mobile .topbar-period-row,
body.ui-mode-mobile .page-subtitle {
  display: none !important;
}
body[data-ui-mode="mobile"] .page-title,
body.ui-mode-mobile .page-title {
  font-size: 0.96rem !important;
  max-width: 170px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body[data-ui-mode="mobile"] .theme-wrapper label,
body[data-ui-mode="mobile"] .currency-wrapper label,
body[data-ui-mode="mobile"] .ui-mode-wrapper label,
body.ui-mode-mobile .theme-wrapper label,
body.ui-mode-mobile .currency-wrapper label,
body.ui-mode-mobile .ui-mode-wrapper label {
  display: none !important;
}
body[data-ui-mode="mobile"] .btn-topbar-faq .faq-label,
body.ui-mode-mobile .btn-topbar-faq .faq-label {
  display: none !important;
}
body[data-ui-mode="mobile"] .btn-topbar-faq,
body.ui-mode-mobile .btn-topbar-faq {
  padding: 6px 8px !important;
}
body[data-ui-mode="mobile"] .btn-alert-toggle,
body.ui-mode-mobile .btn-alert-toggle {
  padding: 6px 8px !important;
  font-size: 0.72rem !important;
}
body[data-ui-mode="mobile"] .btn-privacy-toggle .privacy-label,
body.ui-mode-mobile .btn-privacy-toggle .privacy-label {
  display: none !important;
}
body[data-ui-mode="mobile"] .btn-privacy-toggle,
body.ui-mode-mobile .btn-privacy-toggle {
  padding: 6px 8px !important;
  font-size: 0.85rem !important;
}
body[data-ui-mode="mobile"] .content-scrollable,
body.ui-mode-mobile .content-scrollable {
  padding: 12px 10px 92px 10px !important;
}
body[data-ui-mode="mobile"] .kpi-grid,
body.ui-mode-mobile .kpi-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}
body[data-ui-mode="mobile"] .kpi-card,
body.ui-mode-mobile .kpi-card {
  padding: 12px 14px !important;
}
body[data-ui-mode="mobile"] .kpi-value,
body.ui-mode-mobile .kpi-value {
  font-size: 1.35rem !important;
}
body[data-ui-mode="mobile"] .charts-grid,
body.ui-mode-mobile .charts-grid {
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}
body[data-ui-mode="mobile"] .safe-spend-widget,
body.ui-mode-mobile .safe-spend-widget {
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  padding: 12px 14px !important;
}
body[data-ui-mode="mobile"] .income-grid,
body.ui-mode-mobile .income-grid {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}
body[data-ui-mode="mobile"] .table-container,
body.ui-mode-mobile .table-container {
  border-radius: var(--radius-md) !important;
  -webkit-overflow-scrolling: touch !important;
}
body[data-ui-mode="mobile"] .data-table th,
body[data-ui-mode="mobile"] .data-table td,
body.ui-mode-mobile .data-table th,
body.ui-mode-mobile .data-table td {
  padding: 9px 8px !important;
  font-size: 0.8rem !important;
}
body[data-ui-mode="mobile"] .modal-card,
body.ui-mode-mobile .modal-card {
  border-radius: 20px 20px 0 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  max-height: 90vh !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
}
body[data-ui-mode="mobile"] .modal-overlay,
body.ui-mode-mobile .modal-overlay {
  align-items: flex-end !important;
}
body[data-ui-mode="mobile"] .shortcuts-hud,
body.ui-mode-mobile .shortcuts-hud {
  bottom: 74px !important;
  right: 14px !important;
}
body[data-ui-mode="mobile"] .toast-container,
body.ui-mode-mobile .toast-container {
  bottom: 76px !important;
  right: 14px !important;
  max-width: calc(100vw - 28px) !important;
}

/* ---------------- 3. Mobile Bottom Navigation Bar ---------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(15, 20, 34, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: space-around;
  z-index: 180;
  padding: 0 4px;
}
body[data-ui-mode="mobile"] .mobile-bottom-nav,
body.ui-mode-mobile .mobile-bottom-nav {
  display: flex !important;
}
body[data-theme="light"] .mobile-bottom-nav,
body.theme-light .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top-color: rgba(0, 0, 0, 0.1);
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 2px;
  transition: color 0.15s, transform 0.15s;
  position: relative;
}
.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--cyan);
}
.mobile-nav-item.active svg {
  stroke: var(--cyan);
  transform: scale(1.1);
}
.mobile-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.45);
  transform: translateY(-10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  flex-shrink: 0;
}
.mobile-nav-fab:hover {
  transform: translateY(-13px) scale(1.06);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}
.mobile-nav-fab:active {
  transform: translateY(-8px) scale(0.96);
}
.mobile-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 15px);
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 5px;
  min-width: 15px;
  text-align: center;
}

/* ------------------------------------------------------------- */
/* [FEAT-38] SAVINGS ANALYST EXECUTIVE WIDGET                     */
/* ------------------------------------------------------------- */
.savings-analyst-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 14px);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.savings-analyst-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 35%, #8b5cf6 70%, #f59e0b 100%);
}

.savings-analyst-widget[data-state="deficit"]::before {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.savings-analyst-widget[data-state="warning"]::before {
  background: linear-gradient(90deg, #f59e0b 0%, #06b6d4 100%);
}

.savings-analyst-widget[data-state="neutral"]::before {
  background: var(--border-subtle);
}

.sa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.sa-badge-icon {
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sa-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.sa-period-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  letter-spacing: 0.04em;
}

.sa-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.sa-status-pill {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.3s ease;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.savings-analyst-widget[data-state="deficit"] .sa-status-pill {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.savings-analyst-widget[data-state="warning"] .sa-status-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.savings-analyst-widget[data-state="neutral"] .sa-status-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

/* 7-Card Analytical Flow Grid */
.sa-metrics-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.sa-metric-card {
  background: var(--bg-hover, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sa-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.sa-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.sa-metric-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1.2;
}

.sa-formula-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.sa-formula-tag.highlight-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.sa-formula-tag.highlight-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sa-formula-tag.highlight-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sa-metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.sa-metric-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Card color indicators */
.sa-card-income { border-top: 2px solid var(--emerald); }
.sa-card-budget { border-top: 2px solid var(--cyan); }
.sa-card-recorded { border-top: 2px solid #38bdf8; }
.sa-card-recurring { border-top: 2px solid #ec4899; }
.sa-card-actual-exp { border-top: 2px solid var(--purple); background: rgba(139, 92, 246, 0.04); }
.sa-card-proj-savings { border-top: 2px solid var(--amber); background: rgba(245, 158, 11, 0.04); }
.sa-card-actual-savings { border-top: 2px solid var(--emerald); background: rgba(16, 185, 129, 0.04); }

/* Text utility classes */
.text-cyan { color: var(--cyan, #06b6d4) !important; }
.text-purple { color: var(--purple, #a78bfa) !important; }

/* Footer visual proportion bar & plain-English dynamic insight */
.sa-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.sa-bar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.sa-dual-bar {
  display: flex;
  height: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.sa-bar-fill-exp {
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  height: 100%;
  transition: width 0.4s ease;
}

.sa-bar-fill-sav {
  background: linear-gradient(90deg, #10b981, #06b6d4);
  height: 100%;
  transition: width 0.4s ease;
}

.sa-insight-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

/* Light theme overrides */
body[data-theme="light"] .sa-metric-card,
body.theme-light .sa-metric-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .sa-metric-card:hover,
body.theme-light .sa-metric-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
}
body[data-theme="light"] .sa-formula-tag,
body.theme-light .sa-formula-tag {
  background: rgba(0, 0, 0, 0.05);
}
body[data-theme="light"] .sa-dual-bar,
body.theme-light .sa-dual-bar {
  background: #e2e8f0;
}
body[data-theme="light"] .sa-insight-box,
body.theme-light .sa-insight-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Responsive Grid Breakpoints */
@media (max-width: 1400px) {
  .sa-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .sa-card-actual-savings {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .sa-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sa-card-actual-savings {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .sa-metrics-grid {
    grid-template-columns: 1fr;
  }
  .sa-card-actual-savings {
    grid-column: span 1;
  }
  .sa-metric-card {
    min-height: auto;
  }
}

/* Minimal mode overrides */
body[data-ui-mode="minimal"] .savings-analyst-widget,
body.ui-mode-minimal .savings-analyst-widget {
  padding: 14px 18px !important;
  margin-bottom: 16px !important;
  box-shadow: none !important;
}

body[data-ui-mode="minimal"] .sa-metric-card,
body.ui-mode-minimal .sa-metric-card {
  padding: 10px 12px !important;
  min-height: auto !important;
}

body[data-ui-mode="minimal"] .sa-metric-value,
body.ui-mode-minimal .sa-metric-value {
  font-size: 1.1rem !important;
}

/* Mobile mode overrides */
body[data-ui-mode="mobile"] .sa-metrics-grid,
body.ui-mode-mobile .sa-metrics-grid {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body[data-ui-mode="mobile"] .savings-analyst-widget,
body.ui-mode-mobile .savings-analyst-widget {
  padding: 14px !important;
  margin-bottom: 14px !important;
}

/* ------------------------------------------------------------- */
/* [FEAT-38] SAVINGS ANALYST DASHBOARD BANNER & DEEP DIVE STYLES  */
/* ------------------------------------------------------------- */

/* 1. Dashboard Quick Banner */
.sa-dashboard-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-md, 12px);
  padding: 14px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}

.sa-dashboard-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.sa-dashboard-banner[data-state="deficit"] {
  border-left-color: #ef4444;
}

.sa-dashboard-banner[data-state="warning"] {
  border-left-color: #f59e0b;
}

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

.sa-db-icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.sa-db-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-db-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.sa-db-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.sa-db-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.sa-db-metrics-quick {
  display: flex;
  gap: 16px;
}

.sa-db-stat {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.sa-db-stat-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.sa-db-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.sa-db-btn {
  font-size: 0.78rem;
  padding: 7px 14px;
  white-space: nowrap;
}

/* 2. Deep Dive Grid & Cards */
.sa-deep-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.sa-deep-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 12px);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sa-deep-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.sa-deep-icon {
  font-size: 1.3rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  flex-shrink: 0;
}

.sa-deep-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.sa-deep-sub {
  margin: 3px 0 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Grade badge */
.sa-grade-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.sa-grade-badge.grade-b {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}

.sa-grade-badge.grade-c {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.sa-grade-badge.grade-d {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Health overview */
.sa-grade-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
}

.sa-grade-score-wrap {
  display: flex;
  align-items: baseline;
}

.sa-grade-score-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.04em;
}

.sa-grade-score-max {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 2px;
}

.sa-grade-summary strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
}

.sa-grade-summary p {
  margin: 3px 0 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.sa-health-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sa-sub-stat {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
}

.sa-sub-stat-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sa-sub-stat strong {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 2px 0;
}

.sa-sub-stat-hint {
  font-size: 0.62rem;
  color: var(--text-secondary);
}

/* 50 / 30 / 20 rule */
.sa-rule-bars-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.sa-rule-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.sa-rule-item-top strong {
  color: var(--text-primary);
}

.sa-rule-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  position: relative;
  overflow: visible;
}

.sa-rule-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.sa-rule-fill.fill-needs { background: #06b6d4; }
.sa-rule-fill.fill-wants { background: #a78bfa; }
.sa-rule-fill.fill-savings { background: #10b981; }

.sa-rule-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1px;
}

.sa-rule-feedback {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Runway */
.sa-runway-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.sa-runway-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #06b6d4;
  line-height: 1;
}

.sa-runway-meta strong {
  font-size: 0.86rem;
  color: var(--text-primary);
  display: block;
}

.sa-runway-meta span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.sa-fund-targets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sa-fund-target-box {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
}

.sa-fund-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sa-fund-val {
  font-size: 1.15rem;
  margin: 3px 0 2px 0;
}

.sa-fund-status {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

/* Wealth simulator */
.sa-wealth-forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.sa-wealth-tier {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  position: relative;
}

.sa-wealth-tier.highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}

.sa-tier-badge {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sa-tier-val {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 4px 0 2px 0;
}

.sa-tier-sub {
  font-size: 0.66rem;
  color: var(--text-secondary);
}

.sa-wealth-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Top expense drag */
.sa-drag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sa-drag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.sa-drag-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sa-drag-rank {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 18px;
}

.sa-drag-icon {
  font-size: 1.1rem;
}

.sa-drag-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.sa-drag-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sa-trim-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  margin-top: 2px;
}

.sa-opportunity-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.sa-opportunity-box strong {
  color: var(--text-primary);
}

/* Light Theme overrides for deep dive */
body[data-theme="light"] .sa-dashboard-banner,
body.theme-light .sa-dashboard-banner {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .sa-deep-card,
body.theme-light .sa-deep-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .sa-grade-overview,
body[data-theme="light"] .sa-sub-stat,
body[data-theme="light"] .sa-runway-hero,
body[data-theme="light"] .sa-fund-target-box,
body[data-theme="light"] .sa-wealth-tier,
body[data-theme="light"] .sa-drag-item,
body[data-theme="light"] .sa-opportunity-box,
body[data-theme="light"] .sa-rule-feedback,
body.theme-light .sa-grade-overview,
body.theme-light .sa-sub-stat,
body.theme-light .sa-runway-hero,
body.theme-light .sa-fund-target-box,
body.theme-light .sa-wealth-tier,
body.theme-light .sa-drag-item,
body.theme-light .sa-opportunity-box,
body.theme-light .sa-rule-feedback {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.07);
}

body[data-theme="light"] .sa-rule-track,
body.theme-light .sa-rule-track {
  background: #e2e8f0;
}

body[data-theme="light"] .sa-rule-marker,
body.theme-light .sa-rule-marker {
  background: #64748b;
}

/* Responsive */
@media (max-width: 1000px) {
  .sa-deep-grid {
    grid-template-columns: 1fr;
  }
  .sa-dashboard-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .sa-db-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .sa-health-metrics-row,
  .sa-fund-targets-grid,
  .sa-wealth-forecast-grid {
    grid-template-columns: 1fr;
  }
  .sa-db-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ============================================================
   [FEAT-39] BUDGET CLASSIFICATION (NEEDS VS WANTS) STYLES
   ============================================================ */
.segmented-budget-type {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 4px;
  gap: 6px;
  width: 100%;
}

.btn-budget-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-budget-pill:hover {
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
}

.btn-budget-pill[data-type="needs"].active {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.btn-budget-pill[data-type="wants"].active {
  background: rgba(217, 70, 239, 0.18);
  border-color: rgba(217, 70, 239, 0.5);
  color: #e879f9;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
}

.btn-scope-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-scope-pill:hover {
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
}

.btn-scope-pill[data-scope="month"].active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.btn-scope-pill[data-scope="all"].active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

body.theme-light .btn-scope-pill {
  color: #64748b;
}

body.theme-light .btn-scope-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

body.theme-light .btn-scope-pill[data-scope="month"].active {
  background: rgba(16, 185, 129, 0.12);
  border-color: #059669;
  color: #047857;
}

body.theme-light .btn-scope-pill[data-scope="all"].active {
  background: rgba(59, 130, 246, 0.12);
  border-color: #2563eb;
  color: #1d4ed8;
}

/* Light theme overrides for segmented toggle */
body.theme-light .segmented-budget-type {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.theme-light .btn-budget-pill {
  color: #64748b;
}

body.theme-light .btn-budget-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

body.theme-light .btn-budget-pill[data-type="needs"].active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

body.theme-light .btn-budget-pill[data-type="wants"].active {
  background: #fdf4ff;
  border-color: #c026d3;
  color: #a21caf;
  box-shadow: 0 1px 3px rgba(192, 38, 211, 0.15);
}

/* Badges in Expense & Recurring Bill tables */
.badge-budget-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.25;
  white-space: nowrap;
}

.badge-budget-tag.badge-tag-needs {
  background: rgba(6, 182, 212, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-budget-tag.badge-tag-wants {
  background: rgba(217, 70, 239, 0.14);
  color: #e879f9;
  border: 1px solid rgba(217, 70, 239, 0.35);
}

body.theme-light .badge-budget-tag.badge-tag-needs {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

body.theme-light .badge-budget-tag.badge-tag-wants {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f0abfc;
}

/* ============================================================
   [FEAT-38] SAVINGS ANALYST TOOLTIPS & FINANCIAL STORY STYLES
   ============================================================ */
.sa-title-with-tooltip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.35);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  line-height: 1;
  text-transform: none;
}

.sa-info-btn:hover,
.sa-info-btn:focus {
  background: rgba(6, 182, 212, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
  outline: none;
}

.sa-tooltip-card {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  width: 290px;
  max-width: calc(100vw - 48px);
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.6), 0 0 14px rgba(6, 182, 212, 0.2);
  color: #f1f5f9;
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
}

.sa-tooltip-card::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 14px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(15, 23, 42, 0.98) transparent;
}

.sa-info-btn:hover .sa-tooltip-card,
.sa-info-btn:focus .sa-tooltip-card {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.sa-tooltip-card strong {
  display: block;
  font-size: 0.8rem;
  color: #38bdf8;
  margin-bottom: 5px;
  font-weight: 700;
}

.sa-tooltip-card .story-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  margin-top: 6px;
}

/* Financial story box under Cashflow Allocation Chart */
.sa-chart-story-card {
  margin-top: 12px;
  padding: 11px 14px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--text-secondary, #cbd5e1);
  text-align: left;
}

.sa-chart-story-card strong {
  color: #38bdf8;
}

/* Light theme overrides */
body.theme-light .sa-info-btn {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

body.theme-light .sa-info-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

body.theme-light .sa-tooltip-card {
  background: #ffffff;
  color: #334155;
  border-color: #93c5fd;
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

body.theme-light .sa-tooltip-card::after {
  border-color: transparent transparent #ffffff transparent;
}

body.theme-light .sa-tooltip-card strong {
  color: #0284c7;
}

body.theme-light .sa-chart-story-card {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #334155;
}

body.theme-light .sa-chart-story-card strong {
  color: #0284c7;
}

/* ==========================================
   WEALTH ACCUMULATION HORIZON SWITCHER & GROUPS
   ========================================== */
.sa-wealth-horizon-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.segmented-wealth-horizon {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.btn-wealth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-wealth-pill:hover {
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
}

.btn-wealth-pill.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.sa-wealth-section {
  margin-bottom: 10px;
}

.sa-wealth-group-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-wealth-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.08));
}

/* Light theme overrides for horizon switcher */
body.theme-light .segmented-wealth-horizon {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.theme-light .btn-wealth-pill {
  color: #64748b;
}

body.theme-light .btn-wealth-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

body.theme-light .btn-wealth-pill.active {
  background: #dcfce7;
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

/* ==========================================
   INLINE FIELD EDITING (EXPENSE TRACKER)
   ========================================== */
.inline-edit-hint-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.08);
  border: 1px dashed rgba(6, 182, 212, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  user-select: none;
}

.editable-cell {
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  border-radius: 4px;
}

.editable-cell:hover:not(.is-editing) {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.35);
}

.editable-cell:hover:not(.is-editing)::after {
  content: '✎';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--cyan, #06b6d4);
  opacity: 0.75;
  pointer-events: none;
}

.editable-cell.text-right:hover:not(.is-editing)::after {
  left: 6px;
  right: auto;
}

.editable-cell.is-editing {
  background: rgba(15, 23, 42, 0.85) !important;
  padding: 4px 6px !important;
  box-shadow: inset 0 0 0 1.5px #38bdf8 !important;
}

.inline-edit-input,
.inline-edit-select {
  width: 100%;
  min-width: 110px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--cyan, #06b6d4);
  border-radius: 6px;
  color: var(--text-primary, #f8fafc);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-edit-input:focus,
.inline-edit-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.badge-budget-tag.btn-toggle-btype {
  transition: transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
}

.badge-budget-tag.btn-toggle-btype:hover {
  transform: scale(1.08);
  opacity: 0.95;
}

/* Light Theme Overrides */
body.theme-light .inline-edit-hint-tag {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
}

body.theme-light .editable-cell:hover:not(.is-editing) {
  background: rgba(0, 0, 0, 0.03);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.35);
}

body.theme-light .editable-cell:hover:not(.is-editing)::after {
  color: #0284c7;
}

body.theme-light .editable-cell.is-editing {
  background: #f8fafc !important;
  box-shadow: inset 0 0 0 1.5px #0284c7 !important;
}

body.theme-light .inline-edit-input,
body.theme-light .inline-edit-select {
  background: #ffffff;
  border-color: #0284c7;
  color: #0f172a;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.25);
}

/* ---------------- [FEAT-45] Zero-Based Budget Allocation Bar & 50/30/20 Auto-Optimizer ---------------- */
.zero-based-budget-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.zero-budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.zero-budget-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.zero-status-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.zero-status-badge.balanced {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.zero-status-badge.under {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.zero-status-badge.over {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.zero-status-badge.zero {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.zero-status-msg {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

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

.btn-emerald-subtle {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-emerald-subtle:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #fff;
  transform: translateY(-1px);
}

.zero-budget-progress-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.zero-seg {
  height: 100%;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
}

.zero-seg-needs {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.zero-seg-wants {
  background: linear-gradient(90deg, #c026d3, #e879f9);
}

.zero-seg-surplus {
  background: linear-gradient(90deg, #059669, #10b981);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.zero-seg-savings {
  background: linear-gradient(90deg, #059669, #34d399);
}

.zero-seg-over {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.zero-budget-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.zero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zero-dot.needs { background: #38bdf8; }
.zero-dot.wants { background: #e879f9; }
.zero-dot.surplus { 
  background: #10b981; 
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); 
}
.zero-dot.savings { background: #34d399; }
.zero-dot.over { background: #f87171; }

.btn-emerald-subtle.swept-active {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  font-weight: 600;
}

/* 50/30/20 Smart Auto-Budget Modal */
.auto-budget-modal-card {
  width: 92vw;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.auto-budget-modal-body {
  overflow-y: auto;
  padding: 12px 2px 16px 2px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auto-budget-targets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.auto-target-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auto-target-card.needs {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.auto-target-card.wants {
  background: rgba(232, 121, 249, 0.08);
  border-color: rgba(232, 121, 249, 0.3);
}

.auto-target-card.savings {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
}

.auto-target-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.auto-target-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.auto-target-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.auto-budget-strategy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.auto-budget-strategy-row .strategy-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auto-budget-strategy-row .segmented-control {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.auto-budget-strategy-row .btn-seg {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auto-budget-strategy-row .btn-seg.active {
  background: var(--cyan);
  color: #0b1120;
}

.auto-budget-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

@media (max-width: 680px) {
  .auto-budget-targets-grid {
    grid-template-columns: 1fr;
  }
  .auto-budget-strategy-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   [FEAT-46] EXPENSE TRACKER MULTI-SELECT & BATCH BULK ACTIONS BAR
   ========================================================================== */
.expense-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.18s ease-in-out;
}

.batch-total-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.bulk-dropdown-wrap select {
  max-width: 175px;
  background: var(--bg-surface, #1e293b);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.bulk-dropdown-wrap select:hover,
.bulk-dropdown-wrap select:focus {
  border-color: var(--cyan);
  outline: none;
}

#expensesTable tr.selected-row {
  background: rgba(6, 182, 212, 0.08) !important;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.expense-row-chk {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

#chkSelectAllExpenses {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

@media (max-width: 768px) {
  .expense-selection-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .expense-selection-toolbar .toolbar-left {
    justify-content: space-between;
  }
  .expense-selection-toolbar .toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   [FEAT-47] MERCHANT MEMORY & SMART QUICK-FILL STYLES
   ========================================================================== */
.quickfill-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  animation: fadeIn 0.2s ease-in-out;
}

/* ==========================================================================
   [FEAT-48] SPOTLIGHT COMMAND PALETTE STYLES
   ========================================================================== */
.btn-topbar-cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-topbar-cmd:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.btn-topbar-cmd .topbar-kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 600px) {
  .btn-topbar-cmd .cmd-label {
    display: none !important;
  }
  .btn-topbar-cmd .topbar-kbd {
    display: none !important;
  }
  .btn-topbar-cmd {
    padding: 6px 8px !important;
  }
}

body[data-ui-mode="mobile"] .btn-topbar-cmd .cmd-label,
body.ui-mode-mobile .btn-topbar-cmd .cmd-label,
body[data-ui-mode="mobile"] .btn-topbar-cmd .topbar-kbd,
body.ui-mode-mobile .btn-topbar-cmd .topbar-kbd {
  display: none !important;
}

body[data-ui-mode="mobile"] .btn-topbar-cmd,
body.ui-mode-mobile .btn-topbar-cmd {
  padding: 6px 8px !important;
}

/* Command Palette Overlay */
.command-palette-overlay {
  align-items: flex-start !important;
  padding-top: 10vh !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 10050 !important;
}

.command-palette-card {
  width: 92vw;
  max-width: 620px;
  background: var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cmdScaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Search Header */
.command-palette-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

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

.command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 500;
}

.command-palette-input::placeholder {
  color: var(--text-muted);
}

.cmd-esc-kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmd-esc-kbd:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Results List */
.command-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-group-title {
  padding: 10px 10px 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.1s ease;
  user-select: none;
}

.cmd-item:hover,
.cmd-item.selected {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
}

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

.cmd-item-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.cmd-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cmd-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item.selected .cmd-item-title {
  color: var(--cyan);
}

.cmd-item-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item-kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
  margin-left: 10px;
}

.cmd-item.selected .cmd-item-kbd {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.cmd-empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.cmd-empty-state .empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.7;
}

/* Palette Footer */
.command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cmd-footer-keys {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-key-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cmd-key-tip kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.cmd-footer-brand {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.7rem;
}

/* Category jump flash highlight */
.budget-cat-card.flash-highlight {
  outline: 2px solid var(--cyan) !important;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.5) !important;
  transform: translateY(-3px) scale(1.02);
  transition: all 0.3s ease;
}

/* ==========================================================================
   [FEAT-49] 1-CLICK MONTH-END SURPLUS SWEEPER & WEALTH LOCK-IN MODAL
   ========================================================================== */
.surplus-sweeper-modal-card {
  width: 92vw;
  max-width: 740px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.surplus-sweeper-modal-body {
  overflow-y: auto;
  padding: 12px 2px 16px 2px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.surplus-metric-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.surplus-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.surplus-stat-box.highlight-emerald {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}

.surplus-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.surplus-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.surplus-month-select-wrap select {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  width: 100%;
}

.surplus-efficiency-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.surplus-efficiency-card.highlight-amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}

.surplus-destination-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.surplus-dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.surplus-safeguard-toggle {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 8px;
}

.surplus-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.btn-emerald-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #059669 !important;
  color: #fff !important;
  font-weight: 600;
}
.btn-emerald-action:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

@media (max-width: 680px) {
  .surplus-metric-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .surplus-dest-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   [FEAT-51] SINKING FUNDS & SAVINGS GOALS HUB
   ========================================== */
.savings-goals-hub {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.savings-goals-hub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.4), rgba(251, 191, 36, 0.4), transparent);
  pointer-events: none;
}

.goals-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.goals-hub-icon-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goals-hub-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(59, 130, 246, 0.16));
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.goals-hub-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
  margin: 0;
}

.goals-hub-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 3px 0 0 0;
}

.btn-new-goal {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-new-goal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
}

/* 4 Slick Glass KPI Metric Cards */
.goals-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.goal-kpi-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.goal-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.4), 0 0 16px rgba(6, 182, 212, 0.1);
}

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

.goal-kpi-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.target-card .goal-kpi-tag {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.accumulated-card .goal-kpi-tag {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.funded-card .goal-kpi-tag {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.jars-card .goal-kpi-tag {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.goal-kpi-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.goal-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.goal-kpi-body .goal-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.goal-metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.goal-metric-val.cyan {
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.goal-metric-val.emerald {
  color: #34d399;
  text-shadow: 0 0 14px rgba(52, 211, 153, 0.25);
}

.goal-metric-val.gold {
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.25);
}

.goal-metric-val.purple {
  color: #c084fc;
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.25);
}

.goal-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Overall Progress Track Bar */
.goals-total-track-wrap {
  margin: 10px 0 22px 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.goals-total-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.goals-total-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #10b981, #34d399);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Redesigned Empty State / Quick-Start Showcase */
.goals-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 28px;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.06), transparent 70%), rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
}

.goals-empty-aura {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.goals-empty-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.goals-empty-icon {
  font-size: 2rem;
  line-height: 1;
}

.goals-empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.goals-empty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 26px auto;
  line-height: 1.5;
}

/* Preset Goals Grid */
.preset-goals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}

.preset-goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.preset-goal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.15);
}

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

.preset-goal-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.preset-tag {
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.preset-tag.essential {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.preset-tag.lifestyle {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.preset-tag.tech {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.preset-tag.vehicle {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.preset-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preset-goal-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.preset-goal-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.preset-goal-target {
  font-size: 0.88rem;
  font-weight: 750;
  color: #34d399;
  margin-top: 4px;
}

.btn-preset-add {
  width: 100%;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-sm) !important;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.preset-goal-card:hover .btn-preset-add {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Active Goal Cards in Grid */
.savings-goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.goal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.goal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.12);
}

.goal-card.is-completed {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.goal-info-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.goal-card-emoji {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.goal-card.is-completed .goal-card-emoji {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
}

.goal-card-name {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-cat-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.goal-status-badge {
  font-size: 0.7rem;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.goal-status-badge.badge-started {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.goal-status-badge.badge-progress {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.goal-status-badge.badge-near {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.goal-status-badge.badge-completed {
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.goal-amounts-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.goal-accum-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.02em;
}

.goal-target-val {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.goal-track-wrap {
  position: relative;
}

.goal-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.goal-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  transition: width 0.4s ease;
}

.goal-card.is-completed .goal-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.goal-milestone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}
.goal-milestone.m-25 { left: 25%; }
.goal-milestone.m-50 { left: 50%; }
.goal-milestone.m-75 { left: 75%; }
.goal-milestone.m-100 { right: 0; }
.goal-milestone.reached {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 4px #fff;
}

.goal-footer-pacing {
  font-size: 0.76rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid #38bdf8;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

.goal-pacing.achieved {
  color: #34d399;
  font-weight: 600;
}
.goal-pacing.urgent {
  color: #fbbf24;
}
.goal-pacing.overdue {
  color: #fb7185;
}

.goal-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1024px) {
  .goals-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .preset-goals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .goals-metrics-bar {
    grid-template-columns: 1fr;
  }
  .preset-goals-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MINIMALIST DASHBOARD SAVINGS GOALS & SINKING FUNDS STRIP
   ========================================================================== */
.dashboard-goals-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 13px 18px 15px 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.dashboard-goals-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.6), rgba(16, 185, 129, 0.6), transparent 75%);
  pointer-events: none;
}

.dash-goals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.dash-goals-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-goals-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.dash-goals-count-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  text-transform: uppercase;
  line-height: 1;
}

.dash-goals-link {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dash-goals-link:hover {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
  text-decoration: none;
  transform: translateX(2px);
}

.dash-goals-scroller {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 11px;
}

@media (max-width: 600px) {
  .dash-goals-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x mandatory;
  }
}

.dash-goal-chip {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .dash-goal-chip {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
}

.dash-goal-chip:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.4), 0 0 14px rgba(6, 182, 212, 0.12);
}

.dash-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-chip-ident {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.dash-chip-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.dash-chip-name {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-chip-pct {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  flex-shrink: 0;
  line-height: 1.1;
}

.dash-chip-pct.completed {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.dash-chip-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.dash-chip-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-chip-fill.completed {
  background: linear-gradient(90deg, #10b981, #38bdf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.dash-chip-amounts {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.74rem;
  gap: 6px;
  line-height: 1.2;
}

.dash-chip-curr {
  font-weight: 750;
  color: #34d399;
  letter-spacing: -0.01em;
}

.dash-chip-target {
  font-size: 0.70rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Modal Form Helpers */
.goal-icon-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.goal-emoji-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.goal-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.goal-emoji-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.goal-quick-amounts-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-quick-amt {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-quick-amt:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}
.btn-quick-amt.highlight {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 600;
}

@media (max-width: 768px) {
  .goals-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .savings-goals-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   [FEAT-52] WORKSPACE CUSTOM DASHBOARD LAYOUT & WIDGET REORDERING ENGINE
   ========================================================================== */

/* Topbar Toggle Button */
.btn-layout-toggle {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-layout-toggle:hover {
  background: var(--bg-card-hover);
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-layout-toggle.active {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* Dashboard Layout Studio Dock */
.layout-studio-dock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(99, 102, 241, 0.18);
  animation: lsdSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

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

.lsd-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

.lsd-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lsd-icon {
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lsd-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}

.lsd-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lsd-sub {
  font-size: 0.74rem;
  color: #818cf8;
  font-weight: 600;
  white-space: nowrap;
}

.lsd-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

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

.lsd-actions .btn {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .lsd-hint {
    display: none;
  }
}

/* In Layout Mode: Highlight customizable widgets */
body.layout-mode-active [data-widget-id] {
  position: relative !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  border: 1.5px dashed rgba(99, 102, 241, 0.45) !important;
  border-radius: var(--radius-md) !important;
}

body.layout-mode-active [data-widget-id]:hover {
  border-color: #818cf8 !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2) !important;
}

/* Floating Toolbar on each widget in layout mode */
.widget-layout-toolbar {
  display: none;
}

body.layout-mode-active .widget-layout-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 40;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 3px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.wlt-pill-pos {
  font-size: 0.7rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  padding: 1px 6px;
  letter-spacing: 0.03em;
}

.wlt-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.wlt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.1);
}

.wlt-btn.btn-wlt-hide:hover {
  color: #f87171;
}

/* Hidden Widget State */
.layout-widget-hidden:not(body.layout-mode-active *) {
  display: none !important;
}

body.layout-mode-active .layout-widget-hidden {
  opacity: 0.58 !important;
  filter: grayscale(0.5);
  border: 1.5px dashed rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.03) !important;
}

body.layout-mode-active .layout-widget-hidden .widget-layout-toolbar {
  border-color: rgba(239, 68, 68, 0.45);
}

body.layout-mode-active .layout-widget-hidden .wlt-pill-pos {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Multi-Page Tabs inside Widget Manager Modal */
.wm-page-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.btn-wm-tab {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-wm-tab:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.btn-wm-tab.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #c7d2fe;
}

/* Widget Manager Modal List */
.widget-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.wm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.wm-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

.wm-row.is-hidden {
  opacity: 0.65;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.02);
}

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

.wm-order-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
  min-width: 26px;
  text-align: center;
}

.wm-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.wm-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wm-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.btn-wm-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-wm-nav:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: #818cf8;
}

.btn-wm-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-wm-toggle {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-wm-toggle:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-wm-toggle.state-hidden {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-wm-toggle.state-hidden:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Light Theme Overrides */
[data-theme="light"] .layout-studio-dock,
body.theme-light .layout-studio-dock {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.98) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lsd-title,
body.theme-light .lsd-title {
  color: #1e293b;
}

[data-theme="light"] .widget-layout-toolbar,
body.theme-light .widget-layout-toolbar {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .btn-layout-toggle,
body.theme-light .btn-layout-toggle {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .layout-studio-dock {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .lsd-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .lsd-hint {
    display: none;
  }
  .lsd-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
  .btn-layout-toggle .layout-label {
    display: none;
  }
}

/* ==========================================================================
   👑 ADMIN COMMAND CENTER & TIER MANAGER MODAL
   ========================================================================== */
.admin-hub-card {
  width: 95vw;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid rgba(234, 179, 8, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(234, 179, 8, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: max-width 0.25s ease, width 0.25s ease, height 0.25s ease;
}

/* Desktop Widescreen Expansion */
@media (min-width: 1024px) {
  .admin-hub-card {
    max-width: 1260px;
    width: 94vw;
  }
}

@media (min-width: 1440px) {
  .admin-hub-card {
    max-width: 1420px;
    width: 92vw;
  }
}

/* Maximized Fullscreen Cockpit Mode */
.admin-hub-card.maximized {
  width: 97vw !important;
  max-width: 1600px !important;
  height: 94vh !important;
  max-height: 94vh !important;
  border-radius: var(--radius-md) !important;
}

.admin-hub-card.maximized .admin-hub-body {
  max-height: calc(94vh - 145px) !important;
}

/* Executive KPI Ribbon */
.admin-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.admin-kpi-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-kpi-val.highlight-green {
  color: #34d399;
}

.admin-kpi-val.highlight-blue {
  color: #38bdf8;
}

.admin-kpi-val.highlight-gold {
  color: #fbbf24;
}

.admin-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Maximize button & hotkey hint */
.btn-admin-size-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-admin-size-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.admin-hotkey-hint {
  font-size: 0.66rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  margin-left: 5px;
  font-weight: 500;
}

/* Desktop Sidebar Admin Entry */
.admin-sidebar-btn {
  border-color: rgba(234, 179, 8, 0.4) !important;
  color: #fbbf24 !important;
  background: rgba(234, 179, 8, 0.08) !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.admin-sidebar-btn:hover {
  background: rgba(234, 179, 8, 0.16) !important;
  border-color: rgba(234, 179, 8, 0.7) !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.25) !important;
  color: #fef08a !important;
}

/* Inbound Webhook Event Terminal Log */
.admin-terminal-log {
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.76rem;
  color: #38bdf8;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.admin-hub-badge-icon {
  font-size: 1.8rem;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-admin-status {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.1));
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
}

.admin-hub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.btn-admin-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-admin-tab:hover {
  background: var(--bg-elevated);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-admin-tab.active {
  background: rgba(234, 179, 8, 0.12);
  color: #fbbf24;
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.15);
}

/* Tier Simulator Grid */
.tier-simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 14px 0 16px 0;
}

.tier-sim-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-sim-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  background: var(--bg-elevated);
}

.tier-sim-card.active {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.tier-sim-card.active.card-exec {
  border-color: #fbbf24;
  background: rgba(234, 179, 8, 0.08);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
}

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

.tier-sim-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-sim-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tier-sim-pill.pill-free {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tier-sim-pill.pill-pro {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.tier-sim-pill.pill-exec {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.tier-sim-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.tier-sim-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-sim-features li::before {
  content: "✓ ";
  color: var(--emerald);
  font-weight: bold;
}

/* Customer Management Table */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.admin-table th {
  background: var(--bg-card);
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  font-size: 0.78rem;
}

.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
  font-size: 0.8rem;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* User Provider & Delete Controls */
.btn-delete-user {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

.btn-delete-user:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #f87171;
  transform: scale(1.05);
}

.badge-provider {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-provider-google {
  background: rgba(66, 133, 244, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.badge-provider-email {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-weight: 500;
}

body[data-theme="light"] .badge-provider-google,
body.theme-light .badge-provider-google {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

body[data-theme="light"] .badge-provider-email,
body.theme-light .badge-provider-email {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

body[data-theme="light"] .btn-delete-user,
body.theme-light .btn-delete-user {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

body[data-theme="light"] .btn-delete-user:hover:not(:disabled),
body.theme-light .btn-delete-user:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}

/* Webhook Blueprint Box */
.webhook-blueprint-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.webhook-code-snippet {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: monospace;
  font-size: 0.78rem;
  color: #38bdf8;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* Admin Role Select Dropdown */
.admin-role-select {
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.admin-role-select.role-admin {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

.admin-role-select.role-member {
  background: rgba(148, 163, 184, 0.1) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

/* Navigation Tier Badges */
.nav-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.nav-tier-badge.badge-pro {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.nav-tier-badge.badge-exec {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.38);
}

.nav-tier-badge.badge-unlocked {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 0.62rem;
}

.btn-sidebar .nav-tier-badge {
  margin-left: auto;
}

.btn-topbar-cmd .nav-tier-badge {
  margin-left: 2px;
}

.sa-db-title-row .nav-tier-badge {
  margin-left: 0;
}

.cmd-item .nav-tier-badge {
  margin-left: auto;
  margin-right: 6px;
}

.shortcut-item .nav-tier-badge {
  margin-left: auto;
}

/* Centered Glassmorphism Upgrade Prompt Modal Overlay */
.upgrade-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10050 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

.upgrade-modal-overlay.active {
  display: flex !important;
  animation: modalFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.upgrade-modal-dialog {
  width: 100% !important;
  max-width: 490px !important;
  max-height: calc(100vh - 40px) !important;
  overflow-y: auto !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 45px rgba(56, 189, 248, 0.15) !important;
  padding: 24px !important;
  margin: auto !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.upgrade-modal-overlay[data-target-tier="executive"] .upgrade-modal-dialog {
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 50px rgba(251, 191, 36, 0.22) !important;
}

.upgrade-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.upgrade-badge-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.upgrade-badge-pill.pill-pro {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.upgrade-badge-pill.pill-exec {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.upgrade-icon-wrap {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 12px;
  text-align: center;
}

.upgrade-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  text-align: center;
  margin: 0 0 8px 0;
}

.upgrade-modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 14px;
}

.upgrade-limitation-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  margin-bottom: 16px;
  text-align: left;
}

.upgrade-limitation-notice .notice-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.upgrade-limitation-notice .notice-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upgrade-limitation-notice .notice-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.upgrade-limitation-notice .notice-msg {
  color: #f1f5f9;
  font-size: 0.79rem;
  line-height: 1.45;
}

.upgrade-plan-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.plan-highlight-left {
  display: flex;
  flex-direction: column;
}

.plan-highlight-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.plan-highlight-price {
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 600;
}

.plan-highlight-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.upgrade-perks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.upgrade-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.upgrade-perk-icon {
  color: var(--emerald);
  font-weight: bold;
}

.btn-upgrade-cta {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 11px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.2s ease !important;
}

.btn-upgrade-cta:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
}

.btn-upgrade-cta.exec-cta {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
}

.btn-upgrade-cta.exec-cta:hover {
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5) !important;
}

/* Payment Upgrade Buttons (Stripe / Checkout Placeholders) */
.btn-upgrade-pay {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 0.92rem !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
}

.btn-upgrade-pay:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5) !important;
}

.btn-upgrade-pay.exec-pay {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
}

.btn-upgrade-pay.exec-pay:hover {
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.5) !important;
}

.btn-upgrade-alt-pay {
  transition: all 0.2s ease !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.btn-upgrade-alt-pay:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.payment-placeholder-dialog {
  max-width: 440px !important;
  width: 90% !important;
  background: #0f172a !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(56, 189, 248, 0.15) !important;
}

/* ==========================================================================
   [FEAT-56] TIER-SPECIFIC AMBIENT STYLING & DISTINCTION SYSTEM (INDEPENDENT OF THEMES)
   Provides tailored premium feel for Free Core, Budget Pro, and Executive Wealth.
   ========================================================================== */

/* 1. Luminous Top Ambient Tier Aura Line (Fixed at top of viewport) */
.tier-ambient-aura {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  transition: all 0.4s ease;
}

body[data-tier="free"] .tier-ambient-aura,
.tier-style-free .tier-ambient-aura {
  height: 2px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  opacity: 0.45;
  box-shadow: 0 1px 6px rgba(16, 185, 129, 0.3);
}

body[data-tier="pro"] .tier-ambient-aura,
.tier-style-pro .tier-ambient-aura {
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #06b6d4);
  background-size: 200% 100%;
  animation: proPulseAura 4s ease infinite alternate;
  opacity: 0.95;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.7), 0 2px 8px rgba(59, 130, 246, 0.4);
}

@keyframes proPulseAura {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

body[data-tier="executive"] .tier-ambient-aura,
.tier-style-executive .tier-ambient-aura {
  height: 3.5px;
  background: linear-gradient(90deg, #d97706, #fbbf24, #fef08a, #f59e0b, #d97706);
  background-size: 200% 100%;
  animation: execShimmerAura 5s ease infinite alternate;
  opacity: 1;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.85), 0 2px 10px rgba(245, 158, 11, 0.5);
}

@keyframes execShimmerAura {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 2. Brand Icon Distinction */
body[data-tier="free"] .sidebar-brand .brand-icon,
.tier-style-free .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.35);
  transition: all 0.3s ease;
}

body[data-tier="pro"] .sidebar-brand .brand-icon,
.tier-style-pro .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.55), 0 0 12px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.6);
  transition: all 0.3s ease;
}

body[data-tier="executive"] .sidebar-brand .brand-icon,
.tier-style-executive .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 60%, #92400e 100%);
  box-shadow: 0 4px 22px rgba(245, 158, 11, 0.65), 0 0 14px rgba(251, 191, 36, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.75);
  transition: all 0.3s ease;
}

/* 3. Brand Title Heading Accent */
body[data-tier="free"] .brand-info h2,
.tier-style-free .brand-info h2 {
  color: var(--text-primary);
  transition: all 0.3s ease;
}

body[data-tier="pro"] .brand-info h2,
.tier-style-pro .brand-info h2 {
  background: linear-gradient(135deg, #ffffff 40%, #bae6fd 75%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.22));
  transition: all 0.3s ease;
}

body[data-tier="executive"] .brand-info h2,
.tier-style-executive .brand-info h2 {
  background: linear-gradient(135deg, #ffffff 35%, #fef08a 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.32));
  transition: all 0.3s ease;
}

/* ==========================================================================
   4. TOPBAR TIER STATUS PILL & USER PROFILE BADGE TIER ACCENTS
   ========================================================================== */
.topbar-tier-pill {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

.topbar-tier-pill:hover {
  transform: translateY(-1px) !important;
}

.topbar-tier-pill .tier-pill-icon {
  font-size: 0.88rem !important;
}

/* User Profile Badge Base */
.user-profile-badge {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 2px 8px 2px 4px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: 1px solid transparent !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

.user-profile-badge:hover {
  transform: translateY(-1px) !important;
}

.user-profile-badge .user-avatar {
  font-size: 0.9rem !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.user-profile-badge .user-info {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.15 !important;
}

.user-profile-badge .user-name {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  max-width: 110px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.user-profile-badge .user-role {
  font-size: 0.63rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  transition: color 0.2s ease !important;
}

.user-profile-badge .btn-logout {
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  padding: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
}

/* --- TIER 1: FREE CORE (Emerald & Mint Green Accent) --- */
body[data-tier="free"] .topbar-tier-pill,
.tier-style-free .topbar-tier-pill,
.topbar-tier-pill.pill-free {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.38) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.16) !important;
}
body[data-tier="free"] .topbar-tier-pill:hover,
.tier-style-free .topbar-tier-pill:hover,
.topbar-tier-pill.pill-free:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24) 0%, rgba(5, 150, 105, 0.14) 100%) !important;
  border-color: rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}

body[data-tier="free"] .user-profile-badge,
.tier-style-free .user-profile-badge,
.user-profile-badge.tier-profile-free {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.05) 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.32) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.12) !important;
}
body[data-tier="free"] .user-profile-badge:hover,
.tier-style-free .user-profile-badge:hover,
.user-profile-badge.tier-profile-free:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.20) 0%, rgba(5, 150, 105, 0.10) 100%) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25) !important;
}
body[data-tier="free"] .user-profile-badge .user-avatar,
.tier-style-free .user-profile-badge .user-avatar,
.user-profile-badge.tier-profile-free .user-avatar {
  background: rgba(16, 185, 129, 0.22) !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25) !important;
}
body[data-tier="free"] .user-profile-badge .user-role,
.tier-style-free .user-profile-badge .user-role,
.user-profile-badge.tier-profile-free .user-role {
  color: #34d399 !important;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.35) !important;
}
body[data-tier="free"] .user-profile-badge .btn-logout,
.tier-style-free .user-profile-badge .btn-logout,
.user-profile-badge.tier-profile-free .btn-logout {
  color: #34d399 !important;
  opacity: 0.8 !important;
}

/* --- TIER 2: BUDGET PRO (Cyan & Electric Blue Accent) --- */
body[data-tier="pro"] .topbar-tier-pill,
.tier-style-pro .topbar-tier-pill,
.topbar-tier-pill.pill-pro {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(37, 99, 235, 0.10) 100%) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.22) !important;
}
body[data-tier="pro"] .topbar-tier-pill:hover,
.tier-style-pro .topbar-tier-pill:hover,
.topbar-tier-pill.pill-pro:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.26) 0%, rgba(37, 99, 235, 0.16) 100%) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

body[data-tier="pro"] .user-profile-badge,
.tier-style-pro .user-profile-badge,
.user-profile-badge.tier-profile-pro {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.18) !important;
}
body[data-tier="pro"] .user-profile-badge:hover,
.tier-style-pro .user-profile-badge:hover,
.user-profile-badge.tier-profile-pro:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.20) 0%, rgba(37, 99, 235, 0.12) 100%) !important;
  border-color: rgba(56, 189, 248, 0.58) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}
body[data-tier="pro"] .user-profile-badge .user-avatar,
.tier-style-pro .user-profile-badge .user-avatar,
.user-profile-badge.tier-profile-pro .user-avatar {
  background: rgba(6, 182, 212, 0.22) !important;
  border: 1px solid rgba(56, 189, 248, 0.52) !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25) !important;
}
body[data-tier="pro"] .user-profile-badge .user-role,
.tier-style-pro .user-profile-badge .user-role,
.user-profile-badge.tier-profile-pro .user-role {
  color: #38bdf8 !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.35) !important;
}
body[data-tier="pro"] .user-profile-badge .btn-logout,
.tier-style-pro .user-profile-badge .btn-logout,
.user-profile-badge.tier-profile-pro .btn-logout {
  color: #38bdf8 !important;
  opacity: 0.8 !important;
}

/* --- TIER 3: EXECUTIVE WEALTH (Luxury Gold & Amber Accent) --- */
body[data-tier="executive"] .topbar-tier-pill,
.tier-style-executive .topbar-tier-pill,
.topbar-tier-pill.pill-executive {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.20) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.52) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.26) !important;
}
body[data-tier="executive"] .topbar-tier-pill:hover,
.tier-style-executive .topbar-tier-pill:hover,
.topbar-tier-pill.pill-executive:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.30) 0%, rgba(217, 119, 6, 0.18) 100%) !important;
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.42) !important;
}

body[data-tier="executive"] .user-profile-badge,
.tier-style-executive .user-profile-badge,
.user-profile-badge.tier-profile-executive {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(217, 119, 6, 0.08) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.42) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22) !important;
}
body[data-tier="executive"] .user-profile-badge:hover,
.tier-style-executive .user-profile-badge:hover,
.user-profile-badge.tier-profile-executive:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.14) 100%) !important;
  border-color: rgba(251, 191, 36, 0.65) !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.36) !important;
}
body[data-tier="executive"] .user-profile-badge .user-avatar,
.tier-style-executive .user-profile-badge .user-avatar,
.user-profile-badge.tier-profile-executive .user-avatar {
  background: rgba(251, 191, 36, 0.22) !important;
  border: 1px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3) !important;
}
body[data-tier="executive"] .user-profile-badge .user-role,
.tier-style-executive .user-profile-badge .user-role,
.user-profile-badge.tier-profile-executive .user-role {
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}
body[data-tier="executive"] .user-profile-badge .btn-logout,
.tier-style-executive .user-profile-badge .btn-logout,
.user-profile-badge.tier-profile-executive .btn-logout {
  color: #fbbf24 !important;
  opacity: 0.8 !important;
}

/* 5. Navigation Items Active Tier Accent */
body[data-tier="free"] .nav-item.active,
.tier-style-free .nav-item.active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  border-left: 3px solid #10b981 !important;
}

body[data-tier="pro"] .nav-item.active,
.tier-style-pro .nav-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.06) 100%) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  border-left: 3px solid #06b6d4 !important;
}

body[data-tier="executive"] .nav-item.active,
.tier-style-executive .nav-item.active {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.18) 0%, rgba(217, 119, 6, 0.06) 100%) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.42) !important;
  border-left: 3px solid #fbbf24 !important;
}

/* 6. Subtle Card & Widget Tier Framing Accents */
body[data-tier="pro"] .kpi-card,
.tier-style-pro .kpi-card {
  border-color: rgba(56, 189, 248, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-tier="pro"] .kpi-card:hover,
.tier-style-pro .kpi-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 16px rgba(6, 182, 212, 0.14);
}

body[data-tier="executive"] .kpi-card,
.tier-style-executive .kpi-card {
  position: relative;
  border-color: rgba(251, 191, 36, 0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-tier="executive"] .kpi-card::before,
.tier-style-executive .kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.75), transparent);
  border-radius: 999px;
  pointer-events: none;
}

body[data-tier="executive"] .kpi-card:hover,
.tier-style-executive .kpi-card:hover {
  border-color: rgba(251, 191, 36, 0.52);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 22px rgba(251, 191, 36, 0.18);
}

/* 7. Sidebar Filter Pill, Drawer, and Secondary Action Buttons Tier Accents */

/* --- TIER 1: FREE CORE (Emerald & Mint Green) --- */
body[data-tier="free"] .sidebar-filter-pill:hover,
body[data-tier="free"] .sidebar-filter-pill.active,
.tier-style-free .sidebar-filter-pill:hover,
.tier-style-free .sidebar-filter-pill.active {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.22) !important;
}

body[data-tier="free"] .sidebar-filter-pill .pill-period-label,
.tier-style-free .sidebar-filter-pill .pill-period-label,
body[data-tier="free"] .sidebar-filter-pill.active .pill-caret,
.tier-style-free .sidebar-filter-pill.active .pill-caret {
  color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover,
.tier-style-free .sidebar-filter-popover {
  border-color: rgba(52, 211, 153, 0.32) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body[data-tier="free"] .sidebar-filter-popover .popover-title,
.tier-style-free .sidebar-filter-popover .popover-title {
  color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover .sidebar-ws-tag,
.tier-style-free .sidebar-filter-popover .sidebar-ws-tag {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

body[data-tier="free"] .sidebar-filter-popover .sidebar-ws-select:hover,
body[data-tier="free"] .sidebar-filter-popover .sidebar-ws-select:focus,
.tier-style-free .sidebar-filter-popover .sidebar-ws-select:hover,
.tier-style-free .sidebar-filter-popover .sidebar-ws-select:focus {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

body[data-tier="free"] .sidebar-filter-popover .btn-ws-quick.primary,
.tier-style-free .sidebar-filter-popover .btn-ws-quick.primary {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover .btn-ws-quick:hover,
.tier-style-free .sidebar-filter-popover .btn-ws-quick:hover {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  color: #ffffff !important;
}

body[data-tier="free"] .sidebar-filter-popover .btn-text-tiny,
.tier-style-free .sidebar-filter-popover .btn-text-tiny {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
  color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover .btn-text-tiny:hover,
.tier-style-free .sidebar-filter-popover .btn-text-tiny:hover {
  background: rgba(16, 185, 129, 0.24) !important;
  border-color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover .preset-pill.active,
.tier-style-free .sidebar-filter-popover .preset-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
}

body[data-tier="free"] .sidebar-filter-popover .period-control .btn-icon:hover,
.tier-style-free .sidebar-filter-popover .period-control .btn-icon:hover {
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #34d399 !important;
}

body[data-tier="free"] .sidebar-filter-popover .period-control .input-month:focus,
.tier-style-free .sidebar-filter-popover .period-control .input-month:focus {
  border-color: #34d399 !important;
}

body[data-tier="free"] .multi-month-status-badge,
.tier-style-free .multi-month-status-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.38) !important;
  color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.16) !important;
}

body[data-tier="free"] .multi-month-status-badge .status-dot,
.tier-style-free .multi-month-status-badge .status-dot {
  background: #34d399 !important;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6) !important;
}

body[data-tier="free"] .multi-month-status-badge .btn-clear-multi,
.tier-style-free .multi-month-status-badge .btn-clear-multi {
  color: rgba(52, 211, 153, 0.75) !important;
}

body[data-tier="free"] .multi-month-status-badge .btn-clear-multi:hover,
.tier-style-free .multi-month-status-badge .btn-clear-multi:hover {
  color: #ffffff !important;
}

body[data-tier="free"] .btn-sidebar.secondary,
.tier-style-free .btn-sidebar.secondary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.05) 100%) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.32) !important;
}

body[data-tier="free"] .btn-sidebar.secondary svg,
.tier-style-free .btn-sidebar.secondary svg {
  stroke: #34d399 !important;
}

body[data-tier="free"] .btn-sidebar.secondary:hover,
.tier-style-free .btn-sidebar.secondary:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.22) !important;
}

/* Free Tier Confirmation Dialog & Drawer Accents */
body[data-tier="free"] #confirmModal .modal-card,
.tier-style-free #confirmModal .modal-card,
#confirmModal[data-tier="free"] .modal-card {
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.88), 0 0 28px rgba(52, 211, 153, 0.2) !important;
}

body[data-tier="free"] #confirmModal #confirmTitle,
.tier-style-free #confirmModal #confirmTitle,
#confirmModal[data-tier="free"] #confirmTitle {
  color: #34d399 !important;
}

body[data-tier="free"] #confirmModal .btn-confirm-tier,
.tier-style-free #confirmModal .btn-confirm-tier,
#confirmModal[data-tier="free"] .btn-confirm-tier {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.4) !important;
}

body[data-tier="free"] .ws-drawer-icon-badge,
.tier-style-free .ws-drawer-icon-badge {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2) !important;
}

body[data-tier="free"] .ws-drawer-header h3,
.tier-style-free .ws-drawer-header h3 {
  color: #34d399 !important;
}

body[data-tier="free"] .ws-count-pill,
.tier-style-free .ws-count-pill {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

body[data-tier="free"] .btn-layout-pill.active,
.tier-style-free .btn-layout-pill.active {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25) !important;
}

body[data-tier="free"] .ws-drawer-panel,
.tier-style-free .ws-drawer-panel {
  border-left-color: rgba(52, 211, 153, 0.25) !important;
}

body[data-tier="free"] .ws-drawer-panel .btn-primary,
.tier-style-free .ws-drawer-panel .btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Free Tier - Shortcuts Guide HUD */
body[data-tier="free"] .shortcuts-hud-card,
.tier-style-free .shortcuts-hud-card {
  border-color: rgba(52, 211, 153, 0.4) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(52, 211, 153, 0.18) !important;
}

body[data-tier="free"] .shortcuts-hud-header,
.tier-style-free .shortcuts-hud-header {
  border-bottom-color: rgba(52, 211, 153, 0.2) !important;
}

body[data-tier="free"] .shortcuts-hud-title,
.tier-style-free .shortcuts-hud-title {
  color: #34d399 !important;
}

body[data-tier="free"] .btn-hud-link,
.tier-style-free .btn-hud-link {
  color: #34d399 !important;
}

body[data-tier="free"] .btn-hud-link:hover,
.tier-style-free .btn-hud-link:hover {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
}

body[data-tier="free"] .shortcuts-hud-pill:hover,
.tier-style-free .shortcuts-hud-pill:hover {
  border-color: rgba(52, 211, 153, 0.5) !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

body[data-tier="free"] .shortcuts-hud-pill .hud-pill-badge,
.tier-style-free .shortcuts-hud-pill .hud-pill-badge {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

body[data-tier="free"] .shortcut-item:hover,
.tier-style-free .shortcut-item:hover {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
}

body[data-tier="free"] .shortcut-item.is-pressed,
.tier-style-free .shortcut-item.is-pressed {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
}

body[data-tier="free"] .shortcut-item.is-pressed .shortcut-kbd,
.tier-style-free .shortcut-item.is-pressed .shortcut-kbd {
  border-color: #34d399 !important;
  background: rgba(16, 185, 129, 0.4) !important;
  color: #ffffff !important;
}

body[data-tier="free"] .shortcut-item .nav-tier-badge.badge-unlocked,
.tier-style-free .shortcut-item .nav-tier-badge.badge-unlocked {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

body[data-tier="free"] .btn-hud-collapse-text:hover,
.tier-style-free .btn-hud-collapse-text:hover {
  color: #34d399 !important;
}

/* Free Tier - Command Palette Popup */
body[data-tier="free"] .command-palette-card,
.tier-style-free .command-palette-card {
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(52, 211, 153, 0.22) !important;
}

body[data-tier="free"] .cmd-search-icon,
.tier-style-free .cmd-search-icon {
  color: #34d399 !important;
}

body[data-tier="free"] .command-palette-input,
.tier-style-free .command-palette-input {
  caret-color: #34d399 !important;
}

body[data-tier="free"] .cmd-item:hover,
body[data-tier="free"] .cmd-item.selected,
.tier-style-free .cmd-item:hover,
.tier-style-free .cmd-item.selected {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

body[data-tier="free"] .cmd-item.selected .cmd-item-title,
.tier-style-free .cmd-item.selected .cmd-item-title {
  color: #34d399 !important;
}

body[data-tier="free"] .cmd-item-kbd,
.tier-style-free .cmd-item-kbd {
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

body[data-tier="free"] .cmd-group-title,
.tier-style-free .cmd-group-title {
  color: rgba(52, 211, 153, 0.75) !important;
}

body[data-tier="free"] .cmd-footer-brand,
.tier-style-free .cmd-footer-brand {
  color: #34d399 !important;
}

/* --- TIER 2: BUDGET PRO (Cyan & Electric Blue) --- */
body[data-tier="pro"] .sidebar-filter-pill:hover,
body[data-tier="pro"] .sidebar-filter-pill.active,
.tier-style-pro .sidebar-filter-pill:hover,
.tier-style-pro .sidebar-filter-pill.active {
  background: rgba(6, 182, 212, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25) !important;
}

body[data-tier="pro"] .sidebar-filter-pill .pill-period-label,
.tier-style-pro .sidebar-filter-pill .pill-period-label,
body[data-tier="pro"] .sidebar-filter-pill.active .pill-caret,
.tier-style-pro .sidebar-filter-pill.active .pill-caret {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover,
.tier-style-pro .sidebar-filter-popover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body[data-tier="pro"] .sidebar-filter-popover .popover-title,
.tier-style-pro .sidebar-filter-popover .popover-title {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover .sidebar-ws-tag,
.tier-style-pro .sidebar-filter-popover .sidebar-ws-tag {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body[data-tier="pro"] .sidebar-filter-popover .sidebar-ws-select:hover,
body[data-tier="pro"] .sidebar-filter-popover .sidebar-ws-select:focus,
.tier-style-pro .sidebar-filter-popover .sidebar-ws-select:hover,
.tier-style-pro .sidebar-filter-popover .sidebar-ws-select:focus {
  border-color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.08) !important;
}

body[data-tier="pro"] .sidebar-filter-popover .btn-ws-quick.primary,
.tier-style-pro .sidebar-filter-popover .btn-ws-quick.primary {
  background: rgba(6, 182, 212, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover .btn-ws-quick:hover,
.tier-style-pro .sidebar-filter-popover .btn-ws-quick:hover {
  border-color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.14) !important;
  color: #ffffff !important;
}

body[data-tier="pro"] .sidebar-filter-popover .btn-text-tiny,
.tier-style-pro .sidebar-filter-popover .btn-text-tiny {
  background: rgba(6, 182, 212, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover .btn-text-tiny:hover,
.tier-style-pro .sidebar-filter-popover .btn-text-tiny:hover {
  background: rgba(6, 182, 212, 0.28) !important;
  border-color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover .preset-pill.active,
.tier-style-pro .sidebar-filter-popover .preset-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(37, 99, 235, 0.22) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
}

body[data-tier="pro"] .sidebar-filter-popover .period-control .btn-icon:hover,
.tier-style-pro .sidebar-filter-popover .period-control .btn-icon:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

body[data-tier="pro"] .sidebar-filter-popover .period-control .input-month:focus,
.tier-style-pro .sidebar-filter-popover .period-control .input-month:focus {
  border-color: #38bdf8 !important;
}

body[data-tier="pro"] .multi-month-status-badge,
.tier-style-pro .multi-month-status-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.42) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.16) !important;
}

body[data-tier="pro"] .multi-month-status-badge .status-dot,
.tier-style-pro .multi-month-status-badge .status-dot {
  background: #38bdf8 !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6) !important;
}

body[data-tier="pro"] .multi-month-status-badge .btn-clear-multi,
.tier-style-pro .multi-month-status-badge .btn-clear-multi {
  color: rgba(56, 189, 248, 0.75) !important;
}

body[data-tier="pro"] .multi-month-status-badge .btn-clear-multi:hover,
.tier-style-pro .multi-month-status-badge .btn-clear-multi:hover {
  color: #ffffff !important;
}

body[data-tier="pro"] .btn-sidebar.secondary,
.tier-style-pro .btn-sidebar.secondary {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(37, 99, 235, 0.05) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

body[data-tier="pro"] .btn-sidebar.secondary svg,
.tier-style-pro .btn-sidebar.secondary svg {
  stroke: #38bdf8 !important;
}

body[data-tier="pro"] .btn-sidebar.secondary:hover,
.tier-style-pro .btn-sidebar.secondary:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22) 0%, rgba(37, 99, 235, 0.12) 100%) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25) !important;
}

/* Pro Tier Confirmation Dialog & Drawer Accents */
body[data-tier="pro"] #confirmModal .modal-card,
.tier-style-pro #confirmModal .modal-card,
#confirmModal[data-tier="pro"] .modal-card {
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.88), 0 0 28px rgba(56, 189, 248, 0.2) !important;
}

body[data-tier="pro"] #confirmModal #confirmTitle,
.tier-style-pro #confirmModal #confirmTitle,
#confirmModal[data-tier="pro"] #confirmTitle {
  color: #38bdf8 !important;
}

body[data-tier="pro"] #confirmModal .btn-confirm-tier,
.tier-style-pro #confirmModal .btn-confirm-tier,
#confirmModal[data-tier="pro"] .btn-confirm-tier {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
}

body[data-tier="pro"] .ws-drawer-icon-badge,
.tier-style-pro .ws-drawer-icon-badge {
  background: rgba(6, 182, 212, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2) !important;
}

body[data-tier="pro"] .ws-drawer-header h3,
.tier-style-pro .ws-drawer-header h3 {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .ws-count-pill,
.tier-style-pro .ws-count-pill {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body[data-tier="pro"] .btn-layout-pill.active,
.tier-style-pro .btn-layout-pill.active {
  background: rgba(6, 182, 212, 0.18) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

body[data-tier="pro"] .ws-drawer-panel,
.tier-style-pro .ws-drawer-panel {
  border-left-color: rgba(56, 189, 248, 0.25) !important;
}

body[data-tier="pro"] .ws-drawer-panel .btn-primary,
.tier-style-pro .ws-drawer-panel .btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Pro Tier - Shortcuts Guide HUD */
body[data-tier="pro"] .shortcuts-hud-card,
.tier-style-pro .shortcuts-hud-card {
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(56, 189, 248, 0.18) !important;
}

body[data-tier="pro"] .shortcuts-hud-header,
.tier-style-pro .shortcuts-hud-header {
  border-bottom-color: rgba(56, 189, 248, 0.2) !important;
}

body[data-tier="pro"] .shortcuts-hud-title,
.tier-style-pro .shortcuts-hud-title {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .btn-hud-link,
.tier-style-pro .btn-hud-link {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .btn-hud-link:hover,
.tier-style-pro .btn-hud-link:hover {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #7dd3fc !important;
}

body[data-tier="pro"] .shortcuts-hud-pill:hover,
.tier-style-pro .shortcuts-hud-pill:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  background: rgba(6, 182, 212, 0.08) !important;
}

body[data-tier="pro"] .shortcuts-hud-pill .hud-pill-badge,
.tier-style-pro .shortcuts-hud-pill .hud-pill-badge {
  color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.14) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

body[data-tier="pro"] .shortcut-item:hover,
.tier-style-pro .shortcut-item:hover {
  background: rgba(6, 182, 212, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

body[data-tier="pro"] .shortcut-item.is-pressed,
.tier-style-pro .shortcut-item.is-pressed {
  background: rgba(6, 182, 212, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

body[data-tier="pro"] .shortcut-item.is-pressed .shortcut-kbd,
.tier-style-pro .shortcut-item.is-pressed .shortcut-kbd {
  border-color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.4) !important;
  color: #ffffff !important;
}

body[data-tier="pro"] .shortcut-item .nav-tier-badge.badge-unlocked,
.tier-style-pro .shortcut-item .nav-tier-badge.badge-unlocked {
  color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body[data-tier="pro"] .btn-hud-collapse-text:hover,
.tier-style-pro .btn-hud-collapse-text:hover {
  color: #38bdf8 !important;
}

/* Pro Tier - Command Palette Popup */
body[data-tier="pro"] .command-palette-card,
.tier-style-pro .command-palette-card {
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.22) !important;
}

body[data-tier="pro"] .cmd-search-icon,
.tier-style-pro .cmd-search-icon {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .command-palette-input,
.tier-style-pro .command-palette-input {
  caret-color: #38bdf8 !important;
}

body[data-tier="pro"] .cmd-item:hover,
body[data-tier="pro"] .cmd-item.selected,
.tier-style-pro .cmd-item:hover,
.tier-style-pro .cmd-item.selected {
  background: rgba(6, 182, 212, 0.14) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body[data-tier="pro"] .cmd-item.selected .cmd-item-title,
.tier-style-pro .cmd-item.selected .cmd-item-title {
  color: #38bdf8 !important;
}

body[data-tier="pro"] .cmd-item-kbd,
.tier-style-pro .cmd-item-kbd {
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

body[data-tier="pro"] .cmd-group-title,
.tier-style-pro .cmd-group-title {
  color: rgba(56, 189, 248, 0.75) !important;
}

body[data-tier="pro"] .cmd-footer-brand,
.tier-style-pro .cmd-footer-brand {
  color: #38bdf8 !important;
}

/* --- TIER 3: EXECUTIVE WEALTH (Luxury Gold & Amber) --- */
body[data-tier="executive"] .sidebar-filter-pill:hover,
body[data-tier="executive"] .sidebar-filter-pill.active,
.tier-style-executive .sidebar-filter-pill:hover,
.tier-style-executive .sidebar-filter-pill.active {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.25) !important;
}

body[data-tier="executive"] .sidebar-filter-pill .pill-period-label,
.tier-style-executive .sidebar-filter-pill .pill-period-label,
body[data-tier="executive"] .sidebar-filter-pill.active .pill-caret,
.tier-style-executive .sidebar-filter-pill.active .pill-caret {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover,
.tier-style-executive .sidebar-filter-popover {
  border-color: rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(251, 191, 36, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body[data-tier="executive"] .sidebar-filter-popover .popover-title,
.tier-style-executive .sidebar-filter-popover .popover-title {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover .sidebar-ws-tag,
.tier-style-executive .sidebar-filter-popover .sidebar-ws-tag {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

body[data-tier="executive"] .sidebar-filter-popover .sidebar-ws-select:hover,
body[data-tier="executive"] .sidebar-filter-popover .sidebar-ws-select:focus,
.tier-style-executive .sidebar-filter-popover .sidebar-ws-select:hover,
.tier-style-executive .sidebar-filter-popover .sidebar-ws-select:focus {
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.08) !important;
}

body[data-tier="executive"] .sidebar-filter-popover .btn-ws-quick.primary,
.tier-style-executive .sidebar-filter-popover .btn-ws-quick.primary {
  background: rgba(251, 191, 36, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover .btn-ws-quick:hover,
.tier-style-executive .sidebar-filter-popover .btn-ws-quick:hover {
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.14) !important;
  color: #ffffff !important;
}

body[data-tier="executive"] .sidebar-filter-popover .btn-text-tiny,
.tier-style-executive .sidebar-filter-popover .btn-text-tiny {
  background: rgba(251, 191, 36, 0.15) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover .btn-text-tiny:hover,
.tier-style-executive .sidebar-filter-popover .btn-text-tiny:hover {
  background: rgba(251, 191, 36, 0.28) !important;
  border-color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover .preset-pill.active,
.tier-style-executive .sidebar-filter-popover .preset-pill.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(217, 119, 6, 0.22) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
}

body[data-tier="executive"] .sidebar-filter-popover .period-control .btn-icon:hover,
.tier-style-executive .sidebar-filter-popover .period-control .btn-icon:hover {
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fbbf24 !important;
}

body[data-tier="executive"] .sidebar-filter-popover .period-control .input-month:focus,
.tier-style-executive .sidebar-filter-popover .period-control .input-month:focus {
  border-color: #fbbf24 !important;
}

body[data-tier="executive"] .multi-month-status-badge,
.tier-style-executive .multi-month-status-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(217, 119, 6, 0.08) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.18) !important;
}

body[data-tier="executive"] .multi-month-status-badge .status-dot,
.tier-style-executive .multi-month-status-badge .status-dot {
  background: #fbbf24 !important;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6) !important;
}

body[data-tier="executive"] .multi-month-status-badge .btn-clear-multi,
.tier-style-executive .multi-month-status-badge .btn-clear-multi {
  color: rgba(251, 191, 36, 0.75) !important;
}

body[data-tier="executive"] .multi-month-status-badge .btn-clear-multi:hover,
.tier-style-executive .multi-month-status-badge .btn-clear-multi:hover {
  color: #ffffff !important;
}

body[data-tier="executive"] .btn-sidebar.secondary,
.tier-style-executive .btn-sidebar.secondary {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(217, 119, 6, 0.05) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.38) !important;
}

body[data-tier="executive"] .btn-sidebar.secondary svg,
.tier-style-executive .btn-sidebar.secondary svg {
  stroke: #fbbf24 !important;
}

body[data-tier="executive"] .btn-sidebar.secondary:hover,
.tier-style-executive .btn-sidebar.secondary:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border-color: rgba(251, 191, 36, 0.65) !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25) !important;
}

body[data-tier="executive"] #btnSidebarWorkspaces .nav-tier-badge.badge-unlocked,
.tier-style-executive #btnSidebarWorkspaces .nav-tier-badge.badge-unlocked {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

/* Executive Tier Confirmation Dialog & Drawer Accents */
body[data-tier="executive"] #confirmModal .modal-card,
.tier-style-executive #confirmModal .modal-card,
#confirmModal[data-tier="executive"] .modal-card {
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.88), 0 0 28px rgba(251, 191, 36, 0.22) !important;
}

body[data-tier="executive"] #confirmModal #confirmTitle,
.tier-style-executive #confirmModal #confirmTitle,
#confirmModal[data-tier="executive"] #confirmTitle {
  color: #fbbf24 !important;
}

body[data-tier="executive"] #confirmModal .btn-confirm-tier,
.tier-style-executive #confirmModal .btn-confirm-tier,
#confirmModal[data-tier="executive"] .btn-confirm-tier {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  border-color: #fbbf24 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4) !important;
}

body[data-tier="executive"] .ws-drawer-icon-badge,
.tier-style-executive .ws-drawer-icon-badge {
  background: rgba(251, 191, 36, 0.15) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2) !important;
}

body[data-tier="executive"] .ws-drawer-header h3,
.tier-style-executive .ws-drawer-header h3 {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .ws-count-pill,
.tier-style-executive .ws-count-pill {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

body[data-tier="executive"] .btn-layout-pill.active,
.tier-style-executive .btn-layout-pill.active {
  background: rgba(251, 191, 36, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25) !important;
}

body[data-tier="executive"] .ws-drawer-panel,
.tier-style-executive .ws-drawer-panel {
  border-left-color: rgba(251, 191, 36, 0.25) !important;
}

body[data-tier="executive"] .ws-drawer-panel .btn-primary,
.tier-style-executive .ws-drawer-panel .btn-primary {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  border-color: #fbbf24 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* Executive Tier - Shortcuts Guide HUD */
body[data-tier="executive"] .shortcuts-hud-card,
.tier-style-executive .shortcuts-hud-card {
  border-color: rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(251, 191, 36, 0.18) !important;
}

body[data-tier="executive"] .shortcuts-hud-header,
.tier-style-executive .shortcuts-hud-header {
  border-bottom-color: rgba(251, 191, 36, 0.2) !important;
}

body[data-tier="executive"] .shortcuts-hud-title,
.tier-style-executive .shortcuts-hud-title {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .btn-hud-link,
.tier-style-executive .btn-hud-link {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .btn-hud-link:hover,
.tier-style-executive .btn-hud-link:hover {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fde68a !important;
}

body[data-tier="executive"] .shortcuts-hud-pill:hover,
.tier-style-executive .shortcuts-hud-pill:hover {
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: rgba(251, 191, 36, 0.08) !important;
}

body[data-tier="executive"] .shortcuts-hud-pill .hud-pill-badge,
.tier-style-executive .shortcuts-hud-pill .hud-pill-badge {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.14) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
}

body[data-tier="executive"] .shortcut-item:hover,
.tier-style-executive .shortcut-item:hover {
  background: rgba(251, 191, 36, 0.08) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

body[data-tier="executive"] .shortcut-item.is-pressed,
.tier-style-executive .shortcut-item.is-pressed {
  background: rgba(251, 191, 36, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
}

body[data-tier="executive"] .shortcut-item.is-pressed .shortcut-kbd,
.tier-style-executive .shortcut-item.is-pressed .shortcut-kbd {
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.4) !important;
  color: #ffffff !important;
}

body[data-tier="executive"] .shortcut-item .nav-tier-badge.badge-unlocked,
.tier-style-executive .shortcut-item .nav-tier-badge.badge-unlocked {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

body[data-tier="executive"] .btn-hud-collapse-text:hover,
.tier-style-executive .btn-hud-collapse-text:hover {
  color: #fbbf24 !important;
}

/* Executive Tier - Command Palette Popup */
body[data-tier="executive"] .command-palette-card,
.tier-style-executive .command-palette-card {
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(251, 191, 36, 0.22) !important;
}

body[data-tier="executive"] .cmd-search-icon,
.tier-style-executive .cmd-search-icon {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .command-palette-input,
.tier-style-executive .command-palette-input {
  caret-color: #fbbf24 !important;
}

body[data-tier="executive"] .cmd-item:hover,
body[data-tier="executive"] .cmd-item.selected,
.tier-style-executive .cmd-item:hover,
.tier-style-executive .cmd-item.selected {
  background: rgba(251, 191, 36, 0.14) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

body[data-tier="executive"] .cmd-item.selected .cmd-item-title,
.tier-style-executive .cmd-item.selected .cmd-item-title {
  color: #fbbf24 !important;
}

body[data-tier="executive"] .cmd-item-kbd,
.tier-style-executive .cmd-item-kbd {
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

body[data-tier="executive"] .cmd-group-title,
.tier-style-executive .cmd-group-title {
  color: rgba(251, 191, 36, 0.75) !important;
}

body[data-tier="executive"] .cmd-footer-brand,
.tier-style-executive .cmd-footer-brand {
  color: #fbbf24 !important;
}

/* ===================================================================
   👑 ENTERPRISE FINTECH WORKSTATION DESIGN SYSTEM (Ramp / Linear / Stripe Capital)
   =================================================================== */

:root {
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 1. Global Tabular Numbers & Zero-Wrap Containment */
.kpi-value,
.safe-spend-amount,
.safe-stat-val,
.dash-cat-amount,
.gauge-percentage,
.amount-cell,
.data-table td.amount,
.table-amount,
.transaction-amount,
.bill-amount,
.goal-pct,
.goal-amount,
.sa-db-stat-val,
.stat-value,
.tabular-num {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  letter-spacing: -0.015em !important;
}

/* 2. Topbar Layout Ergonomics & No-Overlap Flex Clusters */
.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px 16px !important;
  min-height: 60px !important;
  padding: 8px 24px !important;
  background: rgba(11, 15, 25, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  position: sticky !important;
  top: 3px !important;
  z-index: 100 !important;
}

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

.topbar-title-block {
  min-width: 0 !important;
}

.topbar-period-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.topbar-right .btn,
.topbar-right .btn-alert-toggle,
.topbar-right .btn-privacy-toggle,
.topbar-right .btn-layout-toggle,
.topbar-right .btn-topbar-faq,
.topbar-right .btn-topbar-cmd {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  border-radius: var(--radius-sm) !important;
}

/* 3. KPI Cards Precision Deck */
.kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 22px !important;
}

.kpi-card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

.kpi-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
}

.kpi-card .kpi-title {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.kpi-card .kpi-value {
  font-size: clamp(1.15rem, 1.35vw, 1.45rem) !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
}

.kpi-card .kpi-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 6px !important;
}

.kpi-card .kpi-tag {
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.kpi-card .kpi-trend {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* 4. Canvas Shield Box & Chart Panels */
.chart-panel {
  position: relative !important;
  overflow: hidden !important;
  min-width: 0 !important;
  background: var(--bg-card) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  padding: 22px !important;
}

.chart-panel .panel-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 16px !important;
  flex-shrink: 0 !important;
  gap: 12px !important;
}

.chart-panel .panel-title {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  color: #f1f5f9 !important;
}

.chart-panel .panel-subtitle {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
}

.chart-panel .panel-tools {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  padding: 3px 8px !important;
}

.chart-wrapper {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 280px !important;
  overflow: hidden !important;
}

/* 5. Safe-to-Spend Widget Polish */
.safe-spend-widget {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.06) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-radius: var(--radius-lg) !important;
  padding: 18px 24px !important;
  margin-bottom: 22px !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 1.6fr) minmax(200px, 1.2fr) !important;
  gap: 24px !important;
  align-items: center !important;
  backdrop-filter: blur(14px) !important;
}

.safe-spend-amount {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  margin-top: 4px !important;
}

/* 6. Savings Analyst Banner Polish */
.sa-dashboard-banner {
  background: var(--bg-card) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-left: 4px solid #10b981 !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 20px !important;
  margin-bottom: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  cursor: pointer !important;
  backdrop-filter: blur(14px) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sa-dashboard-banner:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15) !important;
}

/* 7. Bottom Grid & Ledger Cards */
.dashboard-bottom-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
}

.dashboard-bottom-grid .panel {
  background: var(--bg-card) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  padding: 22px !important;
}

/* 8. Table & Ledger Alignments */
.data-table,
.table-container table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.data-table th,
.table-container th {
  padding: 12px 16px !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--text-muted) !important;
  background: rgba(15, 23, 42, 0.4) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

.data-table td,
.table-container td {
  padding: 12px 16px !important;
  font-size: 0.86rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  vertical-align: middle !important;
}

.data-table tr:hover td,
.table-container tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* ==========================================================================
   9. NEAT TAB BAR & NAVIGATION WORKSTATION ARCHITECTURE
   ========================================================================== */

/* --- Primary Sidebar Navigation Tabs Rail --- */
.nav-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 8px 0 !important;
}

.nav-item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  color: var(--text-secondary, #94a3b8) !important;
  font-size: 0.86rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nav-item svg {
  flex-shrink: 0 !important;
  opacity: 0.75 !important;
  transition: all 0.16s ease !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.nav-item:hover svg {
  opacity: 1 !important;
  transform: scale(1.05) !important;
}

.nav-item.active {
  background: rgba(245, 158, 11, 0.09) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(245, 158, 11, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.nav-item.active::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  bottom: 8px !important;
  width: 3px !important;
  border-radius: 0 4px 4px 0 !important;
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7) !important;
}

.nav-item.active svg {
  color: #f59e0b !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4)) !important;
}

/* Nav Item Tier Badges & Status Indicators */
.nav-item .nav-tier-badge {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

.nav-item .nav-tier-badge.badge-unlocked {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.15) !important;
}

.nav-item .nav-tier-badge.badge-pro {
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

.nav-item .nav-tier-badge.badge-exec {
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.nav-item .nav-badge {
  margin-left: auto !important;
  margin-right: 4px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4) !important;
}

/* --- Topbar Neat Ergonomics & Unified Controls --- */
.topbar {
  min-height: 56px !important;
  padding: 6px 20px !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

/* Unified 32px height and rounded ergonomics */
.topbar-right .btn-topbar-cmd,
.topbar-right .btn-topbar-faq,
.topbar-right .btn-alert-toggle,
.topbar-right .btn-privacy-toggle,
.topbar-right .btn-layout-toggle,
.topbar-right .ui-mode-wrapper,
.topbar-right .theme-wrapper,
.topbar-right .currency-wrapper {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-secondary, #94a3b8) !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

/* Logo-Only Icon Selects (UI Mode & Theme) - Expanded to comfortably fit logo & chevron */
.topbar-right .ui-mode-wrapper,
.topbar-right .theme-wrapper {
  width: auto !important;
  min-width: 48px !important;
  max-width: 56px !important;
  padding: 0 6px 0 8px !important;
  justify-content: center !important;
}

.topbar-right select.select-clean {
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-main, #f1f5f9) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  padding: 0 2px !important;
  cursor: pointer !important;
  outline: none !important;
}

.topbar-right select.topbar-icon-select {
  font-size: 1rem !important;
  text-align: left !important;
  text-align-last: left !important;
  width: 100% !important;
  padding: 0 2px 0 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Logo-Only Icon Toggle Buttons (Alerts, Privacy & Custom Layout) */
.topbar-right .btn-alert-toggle,
.topbar-right .btn-privacy-toggle,
.topbar-right .btn-layout-toggle {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  justify-content: center !important;
  display: inline-flex !important;
  align-items: center !important;
}

.topbar-right .btn-alert-toggle .alert-label,
.topbar-right .btn-privacy-toggle .privacy-label,
.topbar-right .btn-layout-toggle .layout-label {
  display: none !important;
}

.topbar-right .btn-alert-toggle .alert-icon,
.topbar-right .btn-privacy-toggle .privacy-icon,
.topbar-right .btn-layout-toggle .layout-icon {
  font-size: 0.95rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Elegant Group Divider between Topbar Semantic Clusters */
.topbar-group-divider {
  width: 1px !important;
  height: 18px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  margin: 0 4px !important;
  flex-shrink: 0 !important;
}

/* Hover & Active states */
.topbar-right .btn-topbar-cmd:hover,
.topbar-right .btn-topbar-faq:hover,
.topbar-right .btn-alert-toggle:hover,
.topbar-right .btn-privacy-toggle:hover,
.topbar-right .btn-layout-toggle:hover,
.topbar-right .ui-mode-wrapper:hover,
.topbar-right .theme-wrapper:hover,
.topbar-right .currency-wrapper:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

/* Toggle Buttons Active State */
.btn-alert-toggle[aria-pressed="true"],
.btn-alert-toggle.active {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.btn-privacy-toggle[aria-pressed="true"],
.btn-privacy-toggle.active {
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  color: #a78bfa !important;
}

.btn-layout-toggle[aria-pressed="true"],
.btn-layout-toggle.active {
  background: rgba(6, 182, 212, 0.15) !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
  color: #22d3ee !important;
}


/* --- In-Page Filter Tabs --- */
.cat-filter-tabs,
.period-presets-bar {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 2px !important;
  gap: 2px !important;
}

.btn-cat-filter,
.preset-pill {
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--text-secondary, #94a3b8) !important;
  font-size: 0.76rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.btn-cat-filter:hover,
.preset-pill:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.btn-cat-filter.active,
.preset-pill.active {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* --- Mobile Bottom Navigation Tab Bar --- */
.mobile-bottom-nav {
  position: fixed !important;
  bottom: 12px !important;
  left: 12px !important;
  right: 12px !important;
  border-radius: 16px !important;
  background: rgba(11, 15, 25, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  padding: 6px 8px !important;
  z-index: 999 !important;
}

.mobile-nav-item {
  border-radius: 10px !important;
  padding: 6px 4px !important;
  color: var(--text-secondary, #94a3b8) !important;
  transition: all 0.15s ease !important;
}

.mobile-nav-item.active {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

/* ==========================================================================
   10. HUB HEADER BAR ARCHITECTURE (OUTSIDE TOPBAR, TOP OF KPIS)
   ========================================================================== */
.topbar {
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}

.topbar-left {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
}

.topbar-right {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
}

.content-scrollable {
  padding-top: 14px !important;
}

.hub-header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 0 14px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  flex-wrap: wrap !important;
  gap: 10px 18px !important;
}

.hub-title-block {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.hub-title-block .page-title {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  transition: all 0.25s ease;
}

/* [TIER-STYLE] Page Hub Title per User Tier */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .hub-title-block .page-title {
  background: linear-gradient(135deg, #ffffff 15%, #fef08a 55%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 14px rgba(251, 191, 36, 0.35)) !important;
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .hub-title-block .page-title {
  background: linear-gradient(135deg, #ffffff 15%, #7dd3fc 55%, #0284c7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.35)) !important;
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .hub-title-block .page-title {
  background: linear-gradient(135deg, #ffffff 20%, #6ee7b7 60%, #059669 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 14px rgba(52, 211, 153, 0.3)) !important;
}

/* Light Theme Title Support */
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .hub-title-block .page-title {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .hub-title-block .page-title {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .hub-title-block .page-title {
  background: linear-gradient(135deg, #064e3b 0%, #059669 50%, #047857 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.hub-title-block .topbar-period-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

.hub-title-block .page-subtitle {
  font-size: 0.84rem !important;
  color: var(--text-secondary, #94a3b8) !important;
  margin: 0 !important;
}

.hub-title-block .topbar-period-nav {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.hub-title-block .btn-topbar-period {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-secondary, #94a3b8) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 0.65rem !important;
  transition: all 0.15s ease !important;
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .hub-title-block .btn-topbar-period:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .hub-title-block .btn-topbar-period:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .hub-title-block .btn-topbar-period:hover {
  background: rgba(52, 211, 153, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #34d399 !important;
}

.hub-title-block .topbar-workspace-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-main, #f1f5f9) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.hub-title-block .topbar-workspace-pill:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.hub-title-block .topbar-ws-add-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-secondary, #94a3b8) !important;
  cursor: pointer !important;
  font-size: 0.82rem !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
}

.hub-title-block .topbar-ws-add-btn:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}

/* ==========================================================================
   11. EXPENSE MODE SWITCHER & SPLIT DROPDOWN ACTIONS
   ========================================================================== */
.modal-expense-type-switcher {
  display: flex !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 9px !important;
  padding: 4px !important;
  gap: 6px !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}

body.theme-light .modal-expense-type-switcher {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.modal-expense-type-switcher .btn-type-pill {
  flex: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--text-secondary, #94a3b8) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.modal-expense-type-switcher .btn-type-pill:hover {
  color: var(--text-primary, #f8fafc) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.theme-light .modal-expense-type-switcher .btn-type-pill:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

.modal-expense-type-switcher .btn-type-pill.active {
  background: rgba(14, 165, 233, 0.18) !important;
  border-color: rgba(14, 165, 233, 0.5) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.25) !important;
}

body.theme-light .modal-expense-type-switcher .btn-type-pill.active {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15) !important;
}

/* Split Button Dropdown on + Add Expense */
.split-btn-group {
  position: relative !important;
  display: inline-flex !important;
  align-items: stretch !important;
  vertical-align: middle !important;
}

.split-btn-group .btn-primary:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
}

.split-btn-dropdown-toggle {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding: 0 8px !important;
  min-width: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.split-btn-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  background: var(--bg-card, #1e293b) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  min-width: 220px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6) !important;
  z-index: 1050 !important;
  display: none;
  flex-direction: column !important;
  gap: 4px !important;
  backdrop-filter: blur(16px) !important;
}

.split-btn-menu.open {
  display: flex !important;
}

.split-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  border-radius: 7px !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-main, #f1f5f9) !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.15s ease !important;
  width: 100% !important;
}

.split-menu-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.split-menu-item .menu-item-icon {
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.split-menu-item .menu-item-info {
  display: flex !important;
  flex-direction: column !important;
}

.split-menu-item .menu-item-title {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
}

/* ==========================================================================
   12. UNIFIED SYSTEM & DATA TOOLS DRAWER & SIDEBAR CLEANUP
   ========================================================================== */
.sidebar-tools-block {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.theme-light .sidebar-tools-block {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

body[data-ui-mode="minimal"] .sidebar-tools-block,
body.ui-mode-minimal .sidebar-tools-block {
  display: none !important;
}

.sidebar-footer-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.btn-system-tools {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

.admin-sidebar-btn {
  justify-content: flex-start !important;
  text-align: left !important;
}

.firestore-sync-badge {
  justify-content: flex-start !important;
  text-align: left !important;
}

.btn-system-tools:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

/* System Tools Drawer Interior */
.drawer-section {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
}

body.theme-light .drawer-section {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.drawer-section-title {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: var(--text-main, #f1f5f9) !important;
  margin: 0 0 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.drawer-section-desc {
  font-size: 0.74rem !important;
  color: var(--text-secondary, #94a3b8) !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.4 !important;
}

.drawer-actions-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.drawer-section.danger-section {
  border-color: rgba(248, 113, 113, 0.25) !important;
  background: rgba(248, 113, 113, 0.03) !important;
}

.drawer-section.danger-section .drawer-section-title {
  color: #f87171 !important;
}

.danger-btn:hover {
  background: rgba(248, 113, 113, 0.15) !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
}

/* ==========================================================================
   [PWA] Standalone App Installation Dialog Styles (YouTube-style PWA modal)
   ========================================================================== */
.pwa-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10065;
  animation: pwaFadeIn 0.22s ease-out;
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-install-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: pwaSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes pwaSlideUp {
  from { transform: translateY(18px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pwa-install-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pwa-install-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.pwa-install-body {
  padding: 22px 24px 24px 24px;
}

.pwa-app-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.pwa-app-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  padding: 4px;
  border: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pwa-app-icon-wrap:hover {
  transform: scale(1.04);
}

.pwa-app-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

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

.pwa-app-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 2px 0;
  letter-spacing: -0.02em;
}

.pwa-app-domain {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 6px 0;
}

.pwa-app-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
}

.pwa-install-description {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 18px;
}

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

.pwa-perk-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pwa-perk-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.pwa-perk-text strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 750;
  color: #f1f5f9;
}

.pwa-perk-text span {
  display: block;
  font-size: 0.67rem;
  color: #64748b;
  line-height: 1.3;
  margin-top: 2px;
}

.pwa-browser-guide {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: left;
}

.pwa-guide-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.pwa-guide-steps {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.55;
}

.pwa-guide-steps strong {
  color: #f8fafc;
}

.pwa-install-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  font-size: 0.95rem;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-pwa-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
  border-color: rgba(56, 189, 248, 0.7);
}

/* ==========================================================================
   Tier-reactive accent styles for PWA Install Dialog
   ========================================================================== */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .pwa-install-dialog {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 25px rgba(251, 191, 36, 0.12);
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .pwa-install-badge {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .pwa-app-icon-wrap {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.2);
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-pwa-install {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-pwa-install:hover {
  box-shadow: 0 6px 22px rgba(251, 191, 36, 0.45);
  border-color: rgba(251, 191, 36, 0.8);
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .pwa-browser-guide {
  border-color: rgba(251, 191, 36, 0.3);
}

/* Pro Tier */
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .pwa-install-dialog {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 25px rgba(56, 189, 248, 0.12);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .pwa-install-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .pwa-app-icon-wrap {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-pwa-install {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-pwa-install:hover {
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45);
  border-color: rgba(56, 189, 248, 0.8);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .pwa-browser-guide {
  border-color: rgba(56, 189, 248, 0.3);
}

/* Free Tier */
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .pwa-install-dialog {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 25px rgba(52, 211, 153, 0.12);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .pwa-install-badge {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .pwa-app-icon-wrap {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.2);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-pwa-install {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-pwa-install:hover {
  box-shadow: 0 6px 22px rgba(52, 211, 153, 0.45);
  border-color: rgba(52, 211, 153, 0.8);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .pwa-browser-guide {
  border-color: rgba(52, 211, 153, 0.3);
}

@media (max-width: 640px) {
  .pwa-perks-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pwa-perk-item {
    flex-direction: row;
    text-align: left;
    padding: 8px 12px;
  }
}

/* ==========================================================================
   [TIER-STYLE] FAQ / User Guide Modal Theming per Tier
   ========================================================================== */
/* Executive Tier FAQ */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-modal-card {
  border-color: rgba(251, 191, 36, 0.38) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 30px rgba(251, 191, 36, 0.12) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-badge-icon {
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-modal-title-wrap h3 {
  background: linear-gradient(135deg, #ffffff 30%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-search-input:focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-chip:hover {
  border-color: rgba(251, 191, 36, 0.6) !important;
  color: #fbbf24 !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-chip.active {
  background: rgba(251, 191, 36, 0.2) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.5) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb:hover {
  background: #fbbf24 !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-item:hover {
  border-color: rgba(251, 191, 36, 0.35) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-item.open {
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.12) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-item.open .faq-q-icon {
  color: #fbbf24 !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal .faq-badge-tag {
  background: rgba(251, 191, 36, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal #btnDoneFAQModal {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #faqModal #btnDoneFAQModal:hover {
  box-shadow: 0 6px 22px rgba(251, 191, 36, 0.5) !important;
}

/* Pro Tier FAQ */
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-modal-card {
  border-color: rgba(56, 189, 248, 0.38) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.12) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-badge-icon {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.22) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-modal-title-wrap h3 {
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-search-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-chip:hover {
  border-color: rgba(56, 189, 248, 0.6) !important;
  color: #38bdf8 !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-chip.active {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.5) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb:hover {
  background: #38bdf8 !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-item:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-item.open {
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.12) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-item.open .faq-q-icon {
  color: #38bdf8 !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal .faq-badge-tag {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal #btnDoneFAQModal {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #faqModal #btnDoneFAQModal:hover {
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5) !important;
}

/* Free Tier FAQ */
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-modal-card {
  border-color: rgba(52, 211, 153, 0.38) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 30px rgba(52, 211, 153, 0.12) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-badge-icon {
  background: rgba(52, 211, 153, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.22) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-modal-title-wrap h3 {
  background: linear-gradient(135deg, #ffffff 30%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-search-input:focus {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-chip:hover {
  border-color: rgba(52, 211, 153, 0.6) !important;
  color: #34d399 !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-chip.active {
  background: rgba(52, 211, 153, 0.2) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.3) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.5) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-accordion-list::-webkit-scrollbar-thumb:hover {
  background: #34d399 !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-item:hover {
  border-color: rgba(52, 211, 153, 0.35) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-item.open {
  border-color: rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.12) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-item.open .faq-q-icon {
  color: #34d399 !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal .faq-badge-tag {
  background: rgba(52, 211, 153, 0.18) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal #btnDoneFAQModal {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #faqModal #btnDoneFAQModal:hover {
  box-shadow: 0 6px 22px rgba(52, 211, 153, 0.5) !important;
}

/* ==========================================================================
   [TIER-STYLE] Normal Expense & Recurring Expense Modals (Pop-entries)
   ========================================================================== */
/* Executive Tier Expense & Bill Modals */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .modal-card,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .modal-card {
  border-color: rgba(251, 191, 36, 0.38) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 28px rgba(251, 191, 36, 0.12) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModalTitle,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModalTitle {
  background: linear-gradient(135deg, #ffffff 30%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .modal-expense-type-switcher,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .modal-expense-type-switcher {
  border-color: rgba(251, 191, 36, 0.3) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .btn-type-pill.active,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .btn-type-pill.active {
  background: rgba(251, 191, 36, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.28) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .form-control:focus,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .form-control:focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.22) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .input-addon-wrap:focus-within,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .input-addon-wrap:focus-within {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.22) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .currency-addon,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .currency-addon {
  color: #fbbf24 !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal .btn-budget-pill.active,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal .btn-budget-pill.active {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal #btnSubmitExpense,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal #btnSubmitBill {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35) !important;
}
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #expenseModal #btnSubmitExpense:hover,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #billModal #btnSubmitBill:hover {
  box-shadow: 0 6px 22px rgba(251, 191, 36, 0.5) !important;
}

/* Pro Tier Expense & Bill Modals */
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .modal-card,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .modal-card {
  border-color: rgba(56, 189, 248, 0.38) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 28px rgba(56, 189, 248, 0.12) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModalTitle,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModalTitle {
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .modal-expense-type-switcher,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .modal-expense-type-switcher {
  border-color: rgba(56, 189, 248, 0.3) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .btn-type-pill.active,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .btn-type-pill.active {
  background: rgba(14, 165, 233, 0.18) !important;
  border-color: rgba(14, 165, 233, 0.55) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.28) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .form-control:focus,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .form-control:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .input-addon-wrap:focus-within,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .input-addon-wrap:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .currency-addon,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .currency-addon {
  color: #38bdf8 !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal .btn-budget-pill.active,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal .btn-budget-pill.active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal #btnSubmitExpense,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal #btnSubmitBill {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #expenseModal #btnSubmitExpense:hover,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) #billModal #btnSubmitBill:hover {
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5) !important;
}

/* Free Tier Expense & Bill Modals */
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .modal-card,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .modal-card {
  border-color: rgba(52, 211, 153, 0.38) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 28px rgba(52, 211, 153, 0.12) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModalTitle,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModalTitle {
  background: linear-gradient(135deg, #ffffff 30%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .modal-expense-type-switcher,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .modal-expense-type-switcher {
  border-color: rgba(52, 211, 153, 0.3) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .btn-type-pill.active,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .btn-type-pill.active {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  color: #34d399 !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.28) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .form-control:focus,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .form-control:focus {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.22) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .input-addon-wrap:focus-within,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .input-addon-wrap:focus-within {
  border-color: #34d399 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.22) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .currency-addon,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .currency-addon {
  color: #34d399 !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal .btn-budget-pill.active,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal .btn-budget-pill.active {
  border-color: #34d399 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal #btnSubmitExpense,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal #btnSubmitBill {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35) !important;
}
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #expenseModal #btnSubmitExpense:hover,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) #billModal #btnSubmitBill:hover {
  box-shadow: 0 6px 22px rgba(52, 211, 153, 0.5) !important;
}

/* ==========================================================================
   [TIER-STYLE] Custom Mouse Cursors & Interactive Aura Follower
   ========================================================================== */
/* Executive Tier Cursors */
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive),
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z' fill='%230f172a' stroke='%23fbbf24' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.5' fill='%23fbbf24'/%3E%3C/svg%3E") 3 3, auto !important;
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) a,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) button,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) [role="button"],
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-type-pill,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .faq-chip,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .faq-question-btn,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) select,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) input[type="checkbox"],
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) input[type="radio"],
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-icon,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .sidebar-nav-item,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .shortcut-item,
:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-topbar-period {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 3v9.5l-3.2-3.2a1.8 1.8 0 0 0-2.5 2.5l5.8 5.8a5 5 0 0 0 3.5 1.4H17a4 4 0 0 0 4-4v-4.5a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V3a1.8 1.8 0 0 0-3.6 0z' fill='%230f172a' stroke='%23fbbf24' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='10.8' cy='4' r='1.3' fill='%23fbbf24'/%3E%3C/svg%3E") 9 3, pointer !important;
}

/* Pro Tier Cursors */
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro),
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z' fill='%230f172a' stroke='%2338bdf8' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.5' fill='%2338bdf8'/%3E%3C/svg%3E") 3 3, auto !important;
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) a,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) button,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) [role="button"],
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-type-pill,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .faq-chip,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .faq-question-btn,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) select,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) input[type="checkbox"],
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) input[type="radio"],
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-icon,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .sidebar-nav-item,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .shortcut-item,
:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-topbar-period {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 3v9.5l-3.2-3.2a1.8 1.8 0 0 0-2.5 2.5l5.8 5.8a5 5 0 0 0 3.5 1.4H17a4 4 0 0 0 4-4v-4.5a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V3a1.8 1.8 0 0 0-3.6 0z' fill='%230f172a' stroke='%2338bdf8' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='10.8' cy='4' r='1.3' fill='%2338bdf8'/%3E%3C/svg%3E") 9 3, pointer !important;
}

/* Free Tier Cursors */
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free),
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z' fill='%230f172a' stroke='%2334d399' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='1.5' fill='%2334d399'/%3E%3C/svg%3E") 3 3, auto !important;
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) a,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) button,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) [role="button"],
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-type-pill,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .faq-chip,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .faq-question-btn,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) select,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) input[type="checkbox"],
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) input[type="radio"],
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-icon,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .sidebar-nav-item,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .shortcut-item,
:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-topbar-period {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M9 3v9.5l-3.2-3.2a1.8 1.8 0 0 0-2.5 2.5l5.8 5.8a5 5 0 0 0 3.5 1.4H17a4 4 0 0 0 4-4v-4.5a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V11a1.8 1.8 0 0 0-3.6 0V3a1.8 1.8 0 0 0-3.6 0z' fill='%230f172a' stroke='%2334d399' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='10.8' cy='4' r='1.3' fill='%2334d399'/%3E%3C/svg%3E") 9 3, pointer !important;
}
.tier-cursor-aura {
  display: none !important;
}

/* Interactive Click Micro-Ripple */
.tier-click-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%) scale(0);
  animation: tierRippleFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tierRippleFade {
  0% {
    width: 0px;
    height: 0px;
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    width: 56px;
    height: 56px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .tier-click-ripple {
  border: 2px solid #fbbf24;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.32) 0%, transparent 70%);
}

:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .tier-click-ripple {
  border: 2px solid #38bdf8;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.32) 0%, transparent 70%);
}

:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .tier-click-ripple {
  border: 2px solid #34d399;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.32) 0%, transparent 70%);
}

/* ===================================================================
   [LIGHT-THEME-REFINED] EXECUTIVE CLEAN LIGHT + USER TIER HARMONY
   =================================================================== */

/* 1. Pristine Clean Topbar & Controls in Light Mode */
body[data-theme="light"] .topbar,
body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

body[data-theme="light"] .topbar-group-divider,
body.theme-light .topbar-group-divider {
  background: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .topbar-right .btn-topbar-cmd,
body[data-theme="light"] .topbar-right .btn-topbar-faq,
body[data-theme="light"] .topbar-right .btn-alert-toggle,
body[data-theme="light"] .topbar-right .btn-privacy-toggle,
body[data-theme="light"] .topbar-right .btn-layout-toggle,
body[data-theme="light"] .topbar-right .ui-mode-wrapper,
body[data-theme="light"] .topbar-right .theme-wrapper,
body[data-theme="light"] .topbar-right .currency-wrapper,
body.theme-light .topbar-right .btn-topbar-cmd,
body.theme-light .topbar-right .btn-topbar-faq,
body.theme-light .topbar-right .btn-alert-toggle,
body.theme-light .topbar-right .btn-privacy-toggle,
body.theme-light .topbar-right .btn-layout-toggle,
body.theme-light .topbar-right .ui-mode-wrapper,
body.theme-light .topbar-right .theme-wrapper,
body.theme-light .topbar-right .currency-wrapper {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body[data-theme="light"] .topbar-right .btn-topbar-cmd:hover,
body[data-theme="light"] .topbar-right .btn-topbar-faq:hover,
body[data-theme="light"] .topbar-right .btn-alert-toggle:hover,
body[data-theme="light"] .topbar-right .btn-privacy-toggle:hover,
body[data-theme="light"] .topbar-right .btn-layout-toggle:hover,
body[data-theme="light"] .topbar-right .ui-mode-wrapper:hover,
body[data-theme="light"] .topbar-right .theme-wrapper:hover,
body[data-theme="light"] .topbar-right .currency-wrapper:hover,
body.theme-light .topbar-right .btn-topbar-cmd:hover,
body.theme-light .topbar-right .btn-topbar-faq:hover,
body.theme-light .topbar-right .btn-alert-toggle:hover,
body.theme-light .topbar-right .btn-privacy-toggle:hover,
body.theme-light .topbar-right .btn-layout-toggle:hover,
body.theme-light .topbar-right .ui-mode-wrapper:hover,
body.theme-light .topbar-right .theme-wrapper:hover,
body.theme-light .topbar-right .currency-wrapper:hover {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

body[data-theme="light"] .topbar-right select.select-clean,
body.theme-light .topbar-right select.select-clean {
  color: #0f172a !important;
}

body[data-theme="light"] .topbar-right select.select-clean option,
body.theme-light .topbar-right select.select-clean option {
  background: #ffffff !important;
  color: #0f172a !important;
}

body[data-theme="light"] .topbar-kbd,
body.theme-light .topbar-kbd {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

body[data-theme="light"] #btnEditBudget,
body.theme-light #btnEditBudget {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
body[data-theme="light"] #btnEditBudget:hover,
body.theme-light #btnEditBudget:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* 2. Executive Tier in Light Mode (Warm Gold & Amber Harmony) */
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .tier-ambient-aura,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .tier-ambient-aura {
  height: 3px !important;
  background: linear-gradient(90deg, #b45309, #d97706, #f59e0b, #fbbf24, #d97706, #b45309) !important;
  background-size: 200% 100% !important;
  animation: execShimmerAura 5s ease infinite alternate !important;
  opacity: 1 !important;
  box-shadow: 0 1px 8px rgba(217, 119, 6, 0.45) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .sidebar-brand .brand-icon,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%) !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
  border: 1px solid rgba(217, 119, 6, 0.5) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-info h2,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-info h2 {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: none !important;
  font-weight: 800 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-tier-badge,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .brand-tier-badge,
body.theme-light .brand-tier-badge.badge-tier-executive,
body[data-theme="light"] .brand-tier-badge.badge-tier-executive {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.12) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .topbar-tier-pill,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .topbar-tier-pill,
body.theme-light .topbar-tier-pill.pill-executive,
body[data-theme="light"] .topbar-tier-pill.pill-executive {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.15) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .topbar-tier-pill:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .topbar-tier-pill:hover,
body.theme-light .topbar-tier-pill.pill-executive:hover,
body[data-theme="light"] .topbar-tier-pill.pill-executive:hover {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .user-profile-badge,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .user-profile-badge,
body.theme-light .user-profile-badge.tier-profile-executive,
body[data-theme="light"] .user-profile-badge.tier-profile-executive {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.1) !important;
}

body.theme-light .user-profile-badge.tier-profile-executive .user-name,
body[data-theme="light"] .user-profile-badge.tier-profile-executive .user-name {
  color: #0f172a !important;
}

body.theme-light .user-profile-badge.tier-profile-executive .user-role,
body[data-theme="light"] .user-profile-badge.tier-profile-executive .user-role {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.theme-light .user-profile-badge.tier-profile-executive .btn-logout,
body[data-theme="light"] .user-profile-badge.tier-profile-executive .btn-logout {
  color: #b45309 !important;
}

body.theme-light .user-profile-badge.tier-profile-executive .user-avatar,
body[data-theme="light"] .user-profile-badge.tier-profile-executive .user-avatar {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(217, 119, 6, 0.4) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .nav-item.active,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .nav-item.active {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  border-left: 3px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary svg,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces svg,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer svg,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary svg,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces svg,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer svg {
  stroke: #b45309 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary:hover,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces:hover,
body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .btn-sidebar.secondary:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnSidebarWorkspaces:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) #btnOpenToolsDrawer:hover {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .admin-sidebar-btn,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .admin-sidebar-btn {
  background: #fffbeb !important;
  border: 1px solid rgba(217, 119, 6, 0.45) !important;
  color: #92400e !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .admin-sidebar-btn:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .admin-sidebar-btn:hover {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #78350f !important;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card::before,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card::before {
  background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.65), transparent) !important;
}

body.theme-light:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card:hover,
body[data-theme="light"]:is([data-tier="executive"], [data-user-tier="executive"], .tier-style-executive) .kpi-card:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.12) !important;
}

/* 3. Pro Tier in Light Mode (Electric Sapphire & Sky Harmony) */
body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .tier-ambient-aura,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .tier-ambient-aura {
  height: 3px !important;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #0369a1) !important;
  background-size: 200% 100% !important;
  animation: proPulseAura 4s ease infinite alternate !important;
  opacity: 1 !important;
  box-shadow: 0 1px 8px rgba(2, 132, 199, 0.4) !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .sidebar-brand .brand-icon,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
  border: 1px solid rgba(2, 132, 199, 0.5) !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-info h2,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-info h2 {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 60%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: none !important;
  font-weight: 800 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-tier-badge,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .brand-tier-badge,
body.theme-light .brand-tier-badge.badge-tier-pro,
body[data-theme="light"] .brand-tier-badge.badge-tier-pro {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.12) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .topbar-tier-pill,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .topbar-tier-pill,
body.theme-light .topbar-tier-pill.pill-pro,
body[data-theme="light"] .topbar-tier-pill.pill-pro {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15) !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .topbar-tier-pill:hover,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .topbar-tier-pill:hover,
body.theme-light .topbar-tier-pill.pill-pro:hover,
body[data-theme="light"] .topbar-tier-pill.pill-pro:hover {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0c4a6e !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .user-profile-badge,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .user-profile-badge,
body.theme-light .user-profile-badge.tier-profile-pro,
body[data-theme="light"] .user-profile-badge.tier-profile-pro {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1) !important;
}

body.theme-light .user-profile-badge.tier-profile-pro .user-name,
body[data-theme="light"] .user-profile-badge.tier-profile-pro .user-name {
  color: #0f172a !important;
}

body.theme-light .user-profile-badge.tier-profile-pro .user-role,
body[data-theme="light"] .user-profile-badge.tier-profile-pro .user-role {
  color: #0284c7 !important;
  text-shadow: none !important;
}

body.theme-light .user-profile-badge.tier-profile-pro .btn-logout,
body[data-theme="light"] .user-profile-badge.tier-profile-pro .btn-logout {
  color: #0284c7 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .nav-item.active,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .nav-item.active {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
  border-left: 3px solid #0284c7 !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.08) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-sidebar.secondary,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-sidebar.secondary {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-sidebar.secondary:hover,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .btn-sidebar.secondary:hover {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .kpi-card,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .kpi-card:hover,
body[data-theme="light"]:is([data-tier="pro"], [data-user-tier="pro"], .tier-style-pro) .kpi-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12) !important;
}

/* 4. Free Tier in Light Mode (Deep Emerald & Sage Harmony) */
body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .tier-ambient-aura,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .tier-ambient-aura {
  height: 2.5px !important;
  background: linear-gradient(90deg, #059669, #10b981) !important;
  opacity: 0.8 !important;
  box-shadow: 0 1px 6px rgba(16, 185, 129, 0.3) !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .sidebar-brand .brand-icon,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-info h2,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-info h2 {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  filter: none !important;
  font-weight: 800 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-tier-badge,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .brand-tier-badge,
body.theme-light .brand-tier-badge.badge-tier-free,
body[data-theme="light"] .brand-tier-badge.badge-tier-free {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .topbar-tier-pill,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .topbar-tier-pill,
body.theme-light .topbar-tier-pill.pill-free,
body[data-theme="light"] .topbar-tier-pill.pill-free {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #6ee7b7 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12) !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .topbar-tier-pill:hover,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .topbar-tier-pill:hover,
body.theme-light .topbar-tier-pill.pill-free:hover,
body[data-theme="light"] .topbar-tier-pill.pill-free:hover {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .user-profile-badge,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .user-profile-badge,
body.theme-light .user-profile-badge.tier-profile-free,
body[data-theme="light"] .user-profile-badge.tier-profile-free {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08) !important;
}

body.theme-light .user-profile-badge.tier-profile-free .user-name,
body[data-theme="light"] .user-profile-badge.tier-profile-free .user-name {
  color: #0f172a !important;
}

body.theme-light .user-profile-badge.tier-profile-free .user-role,
body[data-theme="light"] .user-profile-badge.tier-profile-free .user-role {
  color: #059669 !important;
  text-shadow: none !important;
}

body.theme-light .user-profile-badge.tier-profile-free .btn-logout,
body[data-theme="light"] .user-profile-badge.tier-profile-free .btn-logout {
  color: #059669 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .nav-item.active,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .nav-item.active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  border-left: 3px solid #059669 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08) !important;
  font-weight: 700 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-sidebar.secondary,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-sidebar.secondary {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-sidebar.secondary:hover,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .btn-sidebar.secondary:hover {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .kpi-card,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .kpi-card:hover,
body[data-theme="light"]:is([data-tier="free"], [data-user-tier="free"], .tier-style-free) .kpi-card:hover {
  border-color: #10b981 !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12) !important;
}

/* 5. Clean Dashboard Widgets & Panels in Light Mode */
body.theme-light .upcoming-bills-strip,
body[data-theme="light"] .upcoming-bills-strip {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .upcoming-bills-title,
body[data-theme="light"] .upcoming-bills-title {
  color: #475569 !important;
  font-weight: 800 !important;
}

body.theme-light .upcoming-bill-chip,
body[data-theme="light"] .upcoming-bill-chip {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
  font-weight: 600 !important;
}

body.theme-light .upcoming-bill-chip.warn,
body[data-theme="light"] .upcoming-bill-chip.warn {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

body.theme-light .upcoming-bill-chip.danger,
body[data-theme="light"] .upcoming-bill-chip.danger {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}

body.theme-light .safe-spend-widget,
body[data-theme="light"] .safe-spend-widget {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .safe-spend-amount,
body[data-theme="light"] .safe-spend-amount {
  color: #059669 !important;
}

body.theme-light .safe-spend-label,
body.theme-light .safe-spend-caption,
body[data-theme="light"] .safe-spend-label,
body[data-theme="light"] .safe-spend-caption {
  color: #475569 !important;
}

body.theme-light .safe-spend-stat-label,
body[data-theme="light"] .safe-spend-stat-label {
  color: #64748b !important;
}

body.theme-light .safe-spend-stat strong,
body[data-theme="light"] .safe-spend-stat strong {
  color: #0f172a !important;
}

body.theme-light .safe-spend-bar,
body[data-theme="light"] .safe-spend-bar {
  background: #e2e8f0 !important;
}

body.theme-light .dashboard-goals-strip,
body[data-theme="light"] .dashboard-goals-strip {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .dash-goals-title,
body[data-theme="light"] .dash-goals-title {
  color: #0f172a !important;
}

body.theme-light .dash-goal-card,
body[data-theme="light"] .dash-goal-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-light .dash-goal-name,
body[data-theme="light"] .dash-goal-name {
  color: #0f172a !important;
}

body.theme-light .dash-goal-ratio,
body[data-theme="light"] .dash-goal-ratio {
  color: #64748b !important;
}

body.theme-light .btn-dash-goals-link,
body[data-theme="light"] .btn-dash-goals-link {
  color: #0284c7 !important;
}

body.theme-light .sa-dashboard-banner,
body[data-theme="light"] .sa-dashboard-banner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .sa-dashboard-banner:hover,
body[data-theme="light"] .sa-dashboard-banner:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  border-left-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .sa-db-title,
body[data-theme="light"] .sa-db-title {
  color: #0f172a !important;
}

body.theme-light .sa-db-subtitle,
body[data-theme="light"] .sa-db-subtitle {
  color: #475569 !important;
}

body.theme-light .sa-db-metric-label,
body[data-theme="light"] .sa-db-metric-label {
  color: #64748b !important;
}

body.theme-light .sa-db-metric-val,
body[data-theme="light"] .sa-db-metric-val {
  color: #0f172a !important;
}

body.theme-light .sa-db-btn,
body[data-theme="light"] .sa-db-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
}

body.theme-light .sa-db-btn:hover,
body[data-theme="light"] .sa-db-btn:hover {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

body.theme-light .dashboard-bottom-grid .panel,
body.theme-light .chart-panel,
body[data-theme="light"] .dashboard-bottom-grid .panel,
body[data-theme="light"] .chart-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .panel-title,
body[data-theme="light"] .panel-title {
  color: #0f172a !important;
}

body.theme-light .panel-subtitle,
body[data-theme="light"] .panel-subtitle {
  color: #64748b !important;
}

body.theme-light .chart-pill,
body[data-theme="light"] .chart-pill {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

body.theme-light .chart-pill.active,
body[data-theme="light"] .chart-pill.active {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

body.theme-light .kpi-card .kpi-title,
body[data-theme="light"] .kpi-card .kpi-title {
  color: #475569 !important;
  font-weight: 700 !important;
}

body.theme-light .kpi-card .kpi-value,
body[data-theme="light"] .kpi-card .kpi-value {
  color: #0f172a !important;
}

body.theme-light .kpi-meta,
body[data-theme="light"] .kpi-meta {
  color: #64748b !important;
}

body.theme-light .text-green,
body.theme-light .text-emerald,
body[data-theme="light"] .text-green,
body[data-theme="light"] .text-emerald {
  color: #059669 !important;
}

body.theme-light .text-amber,
body[data-theme="light"] .text-amber {
  color: #d97706 !important;
}

body.theme-light .text-rose,
body[data-theme="light"] .text-rose {
  color: #dc2626 !important;
}

body.theme-light .kpi-tag,
body[data-theme="light"] .kpi-tag {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-light .shortcuts-hud-pill,
body[data-theme="light"] .shortcuts-hud-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .shortcuts-hud-card,
body[data-theme="light"] .shortcuts-hud-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

body.theme-light .shortcut-item,
body[data-theme="light"] .shortcut-item {
  color: #334155 !important;
}

body.theme-light .shortcut-kbd,
body[data-theme="light"] .shortcut-kbd {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

/* 6. Clean Modals & Drawers in Light Mode */
body.theme-light .modal,
body[data-theme="light"] .modal {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-light .modal-card,
body.theme-light .faq-modal-card,
body[data-theme="light"] .modal-card,
body[data-theme="light"] .faq-modal-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
}

body.theme-light .modal-header h3,
body.theme-light .faq-modal-header h3,
body[data-theme="light"] .modal-header h3,
body[data-theme="light"] .faq-modal-header h3 {
  color: #0f172a !important;
}

body.theme-light .modal-subtitle,
body[data-theme="light"] .modal-subtitle {
  color: #64748b !important;
}

body.theme-light .form-group label,
body[data-theme="light"] .form-group label {
  color: #334155 !important;
  font-weight: 600 !important;
}

body.theme-light .form-control,
body[data-theme="light"] .form-control {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light .form-control:focus,
body[data-theme="light"] .form-control:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

body.theme-light .btn-close-modal,
body[data-theme="light"] .btn-close-modal {
  color: #64748b !important;
}

body.theme-light .btn-close-modal:hover,
body[data-theme="light"] .btn-close-modal:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

body.theme-light .sidebar-tools-drawer,
body[data-theme="light"] .sidebar-tools-drawer {
  background: #ffffff !important;
  border-left: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .data-table th,
body[data-theme="light"] .data-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

body.theme-light .data-table td,
body[data-theme="light"] .data-table td {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

body.theme-light .data-table tr:hover td,
body[data-theme="light"] .data-table tr:hover td {
  background: #f8fafc !important;
}

body.theme-light .table-container,
body[data-theme="light"] .table-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .input-amount,
body.theme-light .input-clean,
body[data-theme="light"] .input-amount,
body[data-theme="light"] .input-clean {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* 7. Mobile Bottom Navigation in Light Mode */
body.theme-light .mobile-bottom-nav,
body[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .mobile-nav-item,
body[data-theme="light"] .mobile-nav-item {
  color: #64748b !important;
}

body.theme-light .mobile-nav-item:hover,
body[data-theme="light"] .mobile-nav-item:hover {
  color: #0f172a !important;
}

body.theme-light .mobile-nav-item.active,
body[data-theme="light"] .mobile-nav-item.active {
  color: #0284c7 !important;
}

/* ==========================================================================
   [FEAT-61] AI-POWERED FAQ COPILOT (BYOK GOOGLE GEMINI)
   [FEAT-62] AI FEATURE RECOMMENDATION COLLECTOR & ADMIN WISHLIST RANKING HUB
   ========================================================================== */

/* Segmented Mode Switcher inside FAQ Modal */
.faq-mode-switcher {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.faq-mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.faq-mode-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.14));
  border-color: rgba(6, 182, 212, 0.45);
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.15);
}

.faq-ai-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.faq-ai-status-pill.connected {
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
}

/* Header Window Controls (Bottom-Right Dock & Expand Toggles) */
.faq-header-window-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-faq-win-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-faq-win-ctrl:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  transform: translateY(-1px);
}

.btn-faq-win-ctrl.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.18));
  border-color: rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

/* Default Wide Modal Card Upgrade */
#faqModal .faq-modal-card {
  width: 94vw;
  max-width: 980px;
  height: 90vh;
  max-height: 90vh;
  padding: 20px 22px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hide redundant modal footer when in AI Chat mode so the Chat Input Bar sits flush at the bottom */
#faqModal[data-active-mode="ai"] .faq-modal-card .modal-footer {
  display: none !important;
}

/* Bottom-Right Docked Chat Mode ("Move Chat Below Right") */
#faqModal.faq-docked-right {
  align-items: flex-end !important;
  justify-content: flex-end !important;
  padding: 16px 20px !important;
  background: rgba(2, 6, 23, 0.22) !important;
  backdrop-filter: none !important;
  pointer-events: none;
}

#faqModal.faq-docked-right .faq-modal-card {
  pointer-events: auto;
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  height: min(86vh, 840px);
  max-height: 86vh;
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(56, 189, 248, 0.32) !important;
  margin: 0 !important;
}

#faqModal.faq-docked-right .faq-modal-header {
  margin-bottom: 8px;
}

#faqModal.faq-docked-right .faq-badge-icon {
  width: 38px;
  height: 38px;
  font-size: 1.35rem;
}

#faqModal.faq-docked-right .faq-modal-title-wrap h3 {
  font-size: 1.02rem;
}

#faqModal.faq-docked-right .faq-modal-title-wrap .panel-subtitle {
  font-size: 0.74rem;
}

#faqModal.faq-docked-right .faq-mode-switcher {
  margin-bottom: 10px;
  padding: 4px;
}

#faqModal.faq-docked-right .faq-mode-btn {
  padding: 7px 10px;
  font-size: 0.79rem;
}

/* Expanded / Maximized Space Mode */
#faqModal.faq-docked-right.faq-expanded-wide .faq-modal-card {
  width: min(1020px, calc(100vw - 32px)) !important;
  max-width: 1020px !important;
  height: 93vh !important;
  max-height: 93vh !important;
}

#faqModal.faq-expanded-wide:not(.faq-docked-right) .faq-modal-card {
  width: 96vw !important;
  max-width: 1320px !important;
  height: 93vh !important;
  max-height: 93vh !important;
}

/* Bottom-Right Floating AI Copilot Pill alongside Shortcuts Pill */
.bottom-right-dock-pills {
  display: none;
  align-items: center;
  gap: 8px;
}

.shortcuts-hud.is-minimized .bottom-right-dock-pills {
  display: inline-flex;
}

.shortcuts-hud-pill.ai-copilot-fab-pill {
  display: inline-flex !important;
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.92));
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25), 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.shortcuts-hud-pill.ai-copilot-fab-pill:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(6, 182, 212, 0.38), 0 0 0 1px rgba(56, 189, 248, 0.45);
}

.ai-live-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* AI Copilot Panel Layout — Expands to 100% of Available Vertical & Horizontal Space */
.faq-ai-copilot-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 9px;
  margin-bottom: 0;
}

.faq-ai-setup-card {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.faq-ai-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.faq-ai-get-key-btn {
  white-space: nowrap;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  text-decoration: none;
}

.faq-ai-key-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.faq-ai-key-input {
  padding-right: 36px !important;
  font-family: monospace;
  font-size: 0.82rem !important;
}

.btn-toggle-key-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.75;
}

.btn-toggle-key-eye:hover {
  opacity: 1;
}

.faq-ai-model-select {
  width: auto !important;
  min-width: 210px;
  font-size: 0.8rem !important;
}

/* Sleek Single-Line Connected Status Bar */
.faq-ai-connected-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0.65) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.faq-ai-connected-bar::-webkit-scrollbar {
  display: none;
}

.faq-ai-conn-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
}

.faq-ai-conn-title {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  line-height: 1;
  color: #34d399;
  letter-spacing: 0.01em;
}

.faq-ai-conn-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  font-size: 0.71rem;
  line-height: 1;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.faq-ai-conn-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-faq-conn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0 9px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-faq-conn-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-faq-conn-pill.danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.2);
}

.btn-faq-conn-pill.danger:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
}

.faq-ai-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  flex-shrink: 0;
}

.faq-ai-inline-model-select {
  display: inline-flex;
  align-items: center;
  height: 24px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 0.73rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
}

/* Quick Starter Prompts — Centered Horizontal Action Strip */
.faq-ai-quick-prompts {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 2px 4px;
  text-align: center;
}

.faq-ai-quick-prompts::-webkit-scrollbar {
  display: none;
}

.quick-prompt-label {
  display: inline-flex;
  align-items: center;
  height: 26px;
  font-size: 0.73rem;
  line-height: 1;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.faq-ai-prompt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.73rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.faq-ai-prompt-chip:hover {
  border-color: var(--cyan);
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
}

/* Chat Stream — Dynamic Flex-Grow to Fill 100% of Available Space + Sleek Custom Scrollbar */
.faq-ai-chat-stream {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(9, 14, 26, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.35);
}

.faq-ai-chat-stream::-webkit-scrollbar {
  width: 6px;
}

.faq-ai-chat-stream::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

.faq-ai-chat-stream::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.42);
  border-radius: 999px;
}

.faq-ai-chat-stream::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

.faq-ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.52;
  font-size: 0.85rem;
  width: 100%;
}

.faq-ai-msg.user {
  flex-direction: row-reverse;
}

.faq-ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.faq-ai-msg.user .faq-ai-avatar {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
}

/* Assistant bubbles expand to 100% of available width — zero wasted right-side space! */
.faq-ai-bubble {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.faq-ai-msg.user .faq-ai-bubble {
  flex: 0 1 auto;
  width: auto;
  max-width: 84%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.24), rgba(37, 99, 235, 0.22));
  border-color: rgba(56, 189, 248, 0.42);
}

.faq-ai-bubble p {
  margin: 0 0 6px 0;
}

.faq-ai-bubble p:last-child {
  margin-bottom: 0;
}

.faq-ai-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

/* AI Feature Recommendation Card inside Chat */
.faq-ai-rec-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(251, 191, 36, 0.42);
}

.faq-ai-rec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.faq-ai-rec-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.faq-ai-input-bar {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  padding: 5px 6px 5px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.faq-ai-input-bar:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.faq-ai-question-input {
  flex: 1;
  font-size: 0.86rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 6px 4px !important;
}

.faq-ai-send-btn {
  white-space: nowrap;
  padding: 8px 18px !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, #06b6d4, #2563eb) !important;
  font-weight: 700 !important;
}

/* [FEAT-62] Feature Request Panel & User Wishlist List */
.faq-feature-request-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.faq-req-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.faq-user-wishlist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-wish-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* Admin Wishlist Tab Badge & KPI Cards */
.admin-wishlist-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  margin-left: 4px;
}

.admin-wishlist-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wishlist-kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.wishlist-kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.admin-rank-select,
.admin-status-select {
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.admin-rank-select.rank-1 {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.admin-rank-select.rank-2 {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.admin-rank-select.rank-3 {
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

/* Light Mode Overrides for [FEAT-61] & [FEAT-62] */
body.theme-light .faq-mode-switcher,
body[data-theme="light"] .faq-mode-switcher {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.theme-light .faq-mode-btn,
body[data-theme="light"] .faq-mode-btn {
  color: #475569 !important;
}

body.theme-light .faq-mode-btn.active,
body[data-theme="light"] .faq-mode-btn.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .faq-ai-setup-card,
body[data-theme="light"] .faq-ai-setup-card {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
}

body.theme-light .faq-ai-connected-bar,
body[data-theme="light"] .faq-ai-connected-bar {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

body.theme-light .faq-ai-conn-actions,
body[data-theme="light"] .faq-ai-conn-actions {
  border-left-color: rgba(0, 0, 0, 0.12) !important;
}

body.theme-light .faq-ai-conn-title,
body[data-theme="light"] .faq-ai-conn-title {
  color: #059669 !important;
}

body.theme-light .faq-ai-conn-key,
body[data-theme="light"] .faq-ai-conn-key {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .faq-ai-inline-model-select,
body[data-theme="light"] .faq-ai-inline-model-select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light .btn-faq-conn-pill,
body[data-theme="light"] .btn-faq-conn-pill,
body.theme-light .btn-faq-win-ctrl,
body[data-theme="light"] .btn-faq-win-ctrl {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .faq-ai-chat-stream,
body[data-theme="light"] .faq-ai-chat-stream,
body.theme-light .faq-req-card,
body[data-theme="light"] .faq-req-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-light .faq-ai-bubble,
body[data-theme="light"] .faq-ai-bubble {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .faq-ai-msg.user .faq-ai-bubble,
body[data-theme="light"] .faq-ai-msg.user .faq-ai-bubble {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0c4a6e !important;
}

body.theme-light .faq-ai-input-bar,
body[data-theme="light"] .faq-ai-input-bar {
  background: #ffffff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .shortcuts-hud-pill.ai-copilot-fab-pill,
body[data-theme="light"] .shortcuts-hud-pill.ai-copilot-fab-pill {
  background: #ffffff !important;
  border-color: #38bdf8 !important;
  color: #0284c7 !important;
}

.faq-ai-auto-fetch-btn {
  background: linear-gradient(135deg, #0ea5e9, #6366f1) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28) !important;
}

.faq-ai-auto-fetch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4) !important;
}

.faq-ai-radar-banner {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px dashed rgba(56, 189, 248, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.faq-ai-radar-pulse {
  font-size: 1.25rem;
  display: inline-block;
  animation: faqRadarPulse 1.4s infinite ease-in-out;
}

@keyframes faqRadarPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.7; }
}

body.theme-light .faq-ai-radar-banner,
body[data-theme="light"] .faq-ai-radar-banner {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
}

/* ==========================================================================
   [FEAT-61] AI STREAMING TEXT ANIMATION & NEW-RESPONSE HIGHLIGHT
   ========================================================================== */
.faq-ai-msg.assistant.newly-arrived .faq-ai-bubble {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.16), 0 0 0 1px rgba(56, 189, 248, 0.22);
  animation: faqAiNewBubblePop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes faqAiNewBubblePop {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-ai-new-response-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.faq-ai-stream-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.85);
  animation: faqAiCursorBlink 0.65s infinite ease-in-out;
}

@keyframes faqAiCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.faq-ai-thinking-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.faq-ai-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.faq-ai-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  animation: faqAiDotBounce 1.2s infinite ease-in-out;
}

.faq-ai-thinking-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.faq-ai-thinking-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes faqAiDotBounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
  40% { transform: scale(1.15); opacity: 1; }
}

.faq-ai-post-stream {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-ai-post-stream.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   AI SMART ACTION CHIPS, INLINE QUICK-ADD DRAWER & EXECUTED CARDS
   ============================================================ */
.faq-ai-smart-action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.38);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.faq-ai-smart-action-chip:hover,
.faq-ai-smart-action-chip.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(37, 99, 235, 0.28));
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.faq-ai-smart-action-chip.ai-magic {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(251, 191, 36, 0.42);
}

.faq-ai-smart-action-chip.ai-magic:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.28));
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.faq-ai-quick-add-drawer {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  animation: faqAiNewBubblePop 0.2s ease-out;
}

.faq-ai-qa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: #38bdf8;
}

.btn-faq-qa-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.btn-faq-qa-close:hover {
  color: var(--text-primary);
}

.faq-ai-qa-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.faq-ai-qa-input,
.faq-ai-qa-select {
  height: 32px !important;
  padding: 4px 8px !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
  min-width: 90px;
}

.faq-ai-qa-submit {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

.faq-ai-executed-card {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.10));
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.faq-ai-suggest-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.faq-ai-suggest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.79rem;
}

body.theme-light .faq-ai-quick-add-drawer,
body[data-theme="light"] .faq-ai-quick-add-drawer {
  background: #f8fafc !important;
  border-color: #93c5fd !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .faq-ai-smart-action-chip,
body[data-theme="light"] .faq-ai-smart-action-chip {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

body.theme-light .faq-ai-smart-action-chip.ai-magic,
body[data-theme="light"] .faq-ai-smart-action-chip.ai-magic {
  color: #b45309;
  background: #fef3c7;
  border-color: #fcd34d;
}

body.theme-light .faq-ai-suggest-row,
body[data-theme="light"] .faq-ai-suggest-row {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* ============================================================
   NEAT AI CHAT TYPOGRAPHY, METRIC GRIDS & AMOUNT HIGHLIGHTS
   ============================================================ */
.faq-ai-bubble .ai-neat-paragraph {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 10px 0;
  color: var(--text-primary);
}

.faq-ai-bubble ul.ai-neat-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 8px 0 10px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.faq-ai-bubble li.ai-neat-list-item {
  background: transparent;
  border: none;
  padding: 2px 0 2px 18px;
  position: relative;
  line-height: 1.6;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.faq-ai-bubble li.ai-neat-list-item::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: -1px;
  color: #38bdf8;
  font-size: 1.15rem;
  line-height: 1.4;
}

.faq-ai-bubble li.ai-neat-list-item.has-emoji-lead {
  padding-left: 0;
}

.faq-ai-bubble li.ai-neat-list-item.has-emoji-lead::before {
  display: none;
}

.faq-ai-bubble .ai-bullet-lead {
  font-weight: 700;
  color: #f8fafc;
  display: inline;
  margin-right: 4px;
}

.faq-ai-bubble .ai-bullet-body {
  color: var(--text-secondary);
  display: inline;
}

.faq-ai-bubble p.ai-neat-paragraph {
  margin: 0 0 8px 0;
  line-height: 1.62;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.faq-ai-bubble p.ai-neat-paragraph:last-child {
  margin-bottom: 0;
}

.faq-ai-bubble p.ai-neat-paragraph.is-tip {
  color: var(--text-secondary);
  font-size: 0.84rem;
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--cyan);
  border-radius: 4px;
  font-style: italic;
}

.faq-ai-bubble .ai-metric-inline-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 4px;
  vertical-align: middle;
}

.faq-ai-bubble .ai-metric-kv-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.faq-ai-bubble .ai-structured-sublist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.faq-ai-bubble .ai-structured-subrow {
  padding: 2px 0 2px 14px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Highlighted Key Amounts (Currency Pills) */
.faq-ai-bubble .ai-amt-pill {
  display: inline-block;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 1px 7px;
  border-radius: 6px;
  margin: 0 2px;
  white-space: nowrap;
}

.faq-ai-bubble .ai-amt-pill.positive {
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.faq-ai-bubble .ai-amt-pill.muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.faq-ai-bubble .ai-amt-pill.danger {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.38);
}

/* Highlighted Key Percentages */
.faq-ai-bubble .ai-pct-pill {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 6px;
  margin: 0 2px;
}

/* Highlighted Workspace & Status Tags ([Personal], [ACTIVE], [OVER BUDGET]) */
.faq-ai-bubble .ai-tag-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1px 6px;
  border-radius: 5px;
  margin: 0 3px;
}

.faq-ai-bubble .ai-tag-pill.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
}

.faq-ai-bubble .ai-tag-pill.danger {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(251, 113, 133, 0.45);
}

.faq-ai-bubble .ai-kw-strong {
  color: #f8fafc;
  font-weight: 700;
}

.faq-ai-bubble .ai-code-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.79rem;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 1px 6px;
  border-radius: 5px;
}

/* Modern Suggestion Chips Action Bar */
.faq-ai-action-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-ai-action-bar-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.faq-ai-action-chip {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.faq-ai-action-chip:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}

/* Light Mode Support for Clean AI Chat */
body.theme-light .faq-ai-bubble li.ai-neat-list-item,
body[data-theme="light"] .faq-ai-bubble li.ai-neat-list-item {
  color: #334155 !important;
}

body.theme-light .faq-ai-bubble .ai-bullet-lead,
body[data-theme="light"] .faq-ai-bubble .ai-bullet-lead,
body.theme-light .faq-ai-bubble .ai-kw-strong,
body[data-theme="light"] .faq-ai-bubble .ai-kw-strong {
  color: #0f172a !important;
}

body.theme-light .faq-ai-bubble .ai-metric-kv-chip,
body[data-theme="light"] .faq-ai-bubble .ai-metric-kv-chip {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .faq-ai-action-chip,
body[data-theme="light"] .faq-ai-action-chip {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0284c7 !important;
}

body.theme-light .faq-ai-bubble .ai-pct-pill,
body[data-theme="light"] .faq-ai-bubble .ai-pct-pill {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

/* ==========================================================
   [FEAT-64] GMAIL TRANSACTION INBOX & VETTING STAGING STYLES
   ========================================================== */
.gmail-inbox-modal-dialog {
  max-width: 1260px !important;
  width: 95vw !important;
  max-height: 94vh !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.22s ease;
}

.gmail-inbox-modal-dialog.is-maximized {
  max-width: 98vw !important;
  width: 98vw !important;
  height: 97vh !important;
  max-height: 97vh !important;
  border-radius: var(--radius-md) !important;
}

.gmail-inbox-modal-dialog.is-maximized .gmail-staging-scroll-area {
  max-height: calc(97vh - 270px) !important;
}

.gmail-inbox-modal-dialog .modal-header {
  padding: 16px 24px 14px 24px;
}

.gmail-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.gmail-tab-btn:hover {
  color: var(--text-primary);
}

.gmail-tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.gmail-staging-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.gmail-staging-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-light .gmail-staging-table td,
body[data-theme="light"] .gmail-staging-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.gmail-staging-row:hover {
  background: rgba(6, 182, 212, 0.05);
}

.gmail-staging-row.is-selected {
  background: rgba(6, 182, 212, 0.1);
}

.gmail-staging-input {
  width: 100%;
  padding: 7px 11px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.theme-light .gmail-staging-input,
body[data-theme="light"] .gmail-staging-input {
  background: #ffffff;
  color: #0f172a;
}

.gmail-staging-input:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.03);
}

.gmail-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.gmail-source-pill.gcash {
  background: rgba(0, 114, 206, 0.15);
  border-color: rgba(0, 114, 206, 0.35);
  color: #38bdf8;
}

.gmail-source-pill.maya {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.gmail-source-pill.bpi,
.gmail-source-pill.bdo,
.gmail-source-pill.bank {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.gmail-source-pill.shopee,
.gmail-source-pill.grab {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

@media (max-width: 640px) {
  .gmail-inbox-modal-dialog {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }
}


