/* FENIBS CRM — Bundled Stylesheet */
/* All CSS inlined for Propshaft compatibility (no @import digest issues) */

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  --fenibs-dark:    #0A4F7E;
  --fenibs-blue:    #5A9BC4;
  --fenibs-teal:    #5FB8C0;
  --fenibs-navy:    #4A6AAE;
  --fenibs-coral:   #F47D89;
  --fenibs-orange:  #FF9A7D;
  --fenibs-green:   #72D494;

  --canvas:          #0B100E;
  --canvas-deep:     #080D0B;
  --surface:         #141C18;
  --surface-raised:  #1A2420;
  --surface-sunken:  #101714;
  --surface-overlay: rgba(20,28,24,0.88);

  --accent:         #5FB8C0;
  --accent-deep:    #4DA3AB;
  --accent-light:   #7ECDD4;
  --accent-subtle:  rgba(95,184,192,0.12);
  --accent-muted:   rgba(95,184,192,0.20);

  --secondary:        #5A9BC4;
  --secondary-deep:   #4A88B3;
  --secondary-subtle: rgba(90,155,196,0.12);

  --warm:        #F47D89;
  --warm-deep:   #E06A77;
  --warm-subtle: rgba(244,125,137,0.12);

  --success:        #72D494;
  --success-subtle: rgba(114,212,148,0.14);
  --warning:        #EAA832;
  --warning-subtle: rgba(234,168,50,0.14);
  --error:          #E85C5C;
  --error-subtle:   rgba(232,92,92,0.14);
  --info:           #5A9BC4;
  --info-subtle:    rgba(90,155,196,0.14);

  --text-primary:    #E8F0EC;
  --text-secondary:  #9AABA2;
  --text-tertiary:   #647870;
  --text-quaternary: #3D4E46;
  --text-inverse:    #0B100E;

  --border:        rgba(232,240,236,0.10);
  --border-strong: rgba(232,240,236,0.22);
  --border-accent: rgba(95,184,192,0.35);

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  32px;
  --text-4xl:  40px;
  --text-5xl:  52px;

  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-2xl:  36px;
  --r-full: 9999px;

  --sh-xs:    0 1px 2px rgba(0,0,0,0.20);
  --sh-sm:    0 2px 8px rgba(0,0,0,0.25);
  --sh-md:    0 4px 20px rgba(0,0,0,0.30);
  --sh-lg:    0 8px 40px rgba(0,0,0,0.35);
  --sh-xl:    0 20px 60px rgba(0,0,0,0.45);
  --sh-teal:  0 4px 24px rgba(95,184,192,0.25);
  --sh-blue:  0 4px 24px rgba(90,155,196,0.22);
  --sh-coral: 0 4px 24px rgba(244,125,137,0.22);
  --sh-green: 0 4px 24px rgba(114,212,148,0.20);

  /* Glow effects */
  --glow-accent:  0 0 20px rgba(95,184,192,0.15), 0 0 40px rgba(95,184,192,0.05);
  --glow-success: 0 0 20px rgba(114,212,148,0.15);
  --glow-error:   0 0 20px rgba(232,92,92,0.15);
  --glow-warning: 0 0 20px rgba(234,168,50,0.15);

  /* Gradient accents */
  --grad-accent: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  --grad-warm:   linear-gradient(135deg, var(--warm) 0%, var(--fenibs-orange) 100%);
  --grad-surface: linear-gradient(180deg, var(--surface-raised) 0%, var(--surface) 100%);

  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 500ms;
  --dur-5: 800ms;

  --sidebar-width: 240px;
  --topbar-height: 56px;
}

[data-theme="light"] {
  --canvas:         #F5F8F6;
  --canvas-deep:    #EDF1EE;
  --surface:        #FFFFFF;
  --surface-raised: #F9FBF9;
  --surface-sunken: #EDF1EE;
  --surface-overlay: rgba(255,255,255,0.92);

  --text-primary:    #0D1A12;
  --text-secondary:  #4E6357;
  --text-tertiary:   #7A9187;
  --text-quaternary: #A8BDB5;
  --text-inverse:    #FFFFFF;

  --border:        rgba(13,26,18,0.08);
  --border-strong: rgba(13,26,18,0.16);

  --sh-xs:  0 1px 2px rgba(0,0,0,0.06);
  --sh-sm:  0 2px 8px rgba(0,0,0,0.08);
  --sh-md:  0 4px 20px rgba(0,0,0,0.10);
  --sh-lg:  0 8px 40px rgba(0,0,0,0.12);

  --glow-accent:  0 0 20px rgba(95,184,192,0.10), 0 0 40px rgba(95,184,192,0.03);
  --glow-success: 0 0 20px rgba(114,212,148,0.10);
  --glow-error:   0 0 20px rgba(232,92,92,0.10);
  --glow-warning: 0 0 20px rgba(234,168,50,0.10);
}

/* ============================================================
   RESET
   ============================================================ */

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

html { font-size: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
p { max-width: 72ch; }
code, pre { font-family: var(--mono); }
hr { border: none; border-top: 1px solid var(--border); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-error     { color: var(--error); }

.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.fade-in       { animation: fade-in var(--dur-2) var(--ease) both; }
.slide-in-left { animation: slide-in-left var(--dur-3) var(--ease) both; }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-raised) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
}

/* ============================================================
   APP SHELL
   ============================================================ */

.app-body {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}

.app-sidebar {
  position: fixed;
  left: 0; top: var(--topbar-height);
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  background: var(--surface-overlay);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  z-index: 250;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--dur-3) var(--ease);
}

.app-sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: -1px; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(95,184,192,0.2) 0%, transparent 50%, rgba(95,184,192,0.1) 100%);
  pointer-events: none;
}

.app-sidebar.collapsed { width: 64px; overflow: visible; }
.app-sidebar.collapsed .sidebar-nav-divider { display: none; }

.app-sidebar.collapsed .sidebar-section-label {
  height: 1px;
  background: var(--border);
  margin: var(--sp-2) var(--sp-2);
  padding: 0;
  font-size: 0;
  overflow: hidden;
}

.app-sidebar.collapsed .nav-item-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-1) var(--ease);
  z-index: 300;
  box-shadow: var(--sh-sm);
}

.app-sidebar.collapsed .nav-item:hover .nav-item-label {
  opacity: 1;
}

.app-sidebar.collapsed .nav-item {
  position: relative;
  overflow: visible;
}
.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: var(--sp-2);
}
.app-sidebar.collapsed .sidebar-nav { padding: var(--sp-4) var(--sp-2); }
.app-sidebar.collapsed .sidebar-footer { padding: var(--sp-4) var(--sp-2); }
.app-sidebar.collapsed .sidebar-footer .nav-item {
  justify-content: center;
  padding: var(--sp-2);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-height);
}

.sidebar-logo-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-sm);
  color: var(--text-inverse);
}

.sidebar-logo-text {
  font-weight: 700; font-size: var(--text-base);
  color: var(--text-primary); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-4) var(--sp-3);
  display: flex; flex-direction: column;
  gap: var(--sp-1);
}

.sidebar-section-label {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
  padding: var(--sp-3) var(--sp-2) var(--sp-1);
  white-space: nowrap; overflow: hidden;
}

.nav-item {
  display: flex; align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
  white-space: nowrap; overflow: hidden;
}

.nav-item:hover {
  background: var(--surface-raised);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
  position: relative;
  box-shadow: inset 0 0 12px rgba(95,184,192,0.06);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(95,184,192,0.4);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item-label { white-space: nowrap; overflow: hidden; }

.nav-item-danger { color: var(--text-tertiary); }
.nav-item-danger:hover { background: var(--error-subtle); color: var(--error); }

.sidebar-footer {
  padding: var(--sp-4) var(--sp-3);
  border-top: 1px solid var(--border);
}

.sidebar-collapse-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  margin: 0 auto;
}

.sidebar-collapse-btn:hover { background: var(--surface); color: var(--text-primary); }

.sidebar-nav-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-1) var(--sp-2);
}

.sidebar-toggle-btn {
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.sidebar-toggle-icon {
  flex-shrink: 0;
  transition: transform var(--dur-3) var(--ease);
}

.app-sidebar.collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

.app-main {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left var(--dur-3) var(--ease);
}

.app-body.sidebar-collapsed .app-main { margin-left: 64px; }

.app-topbar {
  height: var(--topbar-height);
  position: fixed; top: 0; left: 0; right: 0; z-index: 250;
  display: flex; align-items: center;
  background: var(--surface-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.app-topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(95,184,192,0.3) 30%, rgba(90,155,196,0.3) 70%, transparent 100%);
  pointer-events: none;
}

.topbar-brand {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4);
  border-right: 1px solid var(--border);
  height: 100%;
  transition: width var(--dur-3) var(--ease);
}

.topbar-brand-text {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--dur-2) var(--ease), width var(--dur-2) var(--ease);
}

.topbar-logo-full { display: block; }
.topbar-logo-short { display: none; }

.app-body.sidebar-collapsed .topbar-brand {
  width: 64px;
  justify-content: center;
}

.app-body.sidebar-collapsed .topbar-logo-full { display: none; }
.app-body.sidebar-collapsed .topbar-logo-short { display: block; }

.topbar-left  { flex: 1; display: flex; align-items: center; gap: var(--sp-4); padding: 0 var(--sp-6); }
.topbar-right { display: flex; align-items: center; gap: var(--sp-3); padding-right: var(--sp-6); }

.topbar-user { width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid var(--border); background: transparent; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 700; text-decoration: none; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); flex-shrink: 0; }
.topbar-user:hover { background: var(--surface-raised); color: var(--text-primary); text-decoration: none; }

.topbar-title { font-size: var(--text-md); font-weight: 600; color: var(--text-primary); }

.mode-toggle {
  display: flex; align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px; gap: 2px;
}

.mode-btn {
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  border: none; background: none;
}

.mode-btn.active { background: var(--accent-subtle); color: var(--accent); }

.page-content {
  padding: var(--sp-6); flex: 1; min-height: 0;
  animation: page-fade-in var(--dur-2) var(--ease) both;
}

.page-content--no-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.app-body--no-scroll {
  height: 100vh;
  overflow: hidden;
}

.app-body--no-scroll .app-main {
  height: calc(100vh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.page-title {
  font-size: var(--text-2xl); font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-primary);
}

.page-subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--sp-1); }

.flash {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}

.flash-notice {
  background: var(--success-subtle); color: var(--success);
  border: 1px solid rgba(114,212,148,0.2);
  border-left: 3px solid var(--success);
  box-shadow: var(--glow-success);
}
.flash-alert {
  background: var(--error-subtle); color: var(--error);
  border: 1px solid rgba(232,92,92,0.2);
  border-left: 3px solid var(--error);
  box-shadow: var(--glow-error);
}

/* ============================================================
   BENTO GRID
   ============================================================ */

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

.bento-1  { grid-column: span 1; }
.bento-2  { grid-column: span 2; }
.bento-3  { grid-column: span 3; }
.bento-4  { grid-column: span 4; }
.bento-5  { grid-column: span 5; }
.bento-6  { grid-column: span 6; }
.bento-7  { grid-column: span 7; }
.bento-8  { grid-column: span 8; }
.bento-9  { grid-column: span 9; }
.bento-10 { grid-column: span 10; }
.bento-11 { grid-column: span 11; }
.bento-12 { grid-column: span 12; }

@media (max-width: 1200px) {
  .bento-3  { grid-column: span 6; }
  .bento-4  { grid-column: span 6; }
  .bento-8  { grid-column: span 12; }
  .bento-9  { grid-column: span 12; }
}

@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  [class^="bento-"] { grid-column: span 1; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600;
  line-height: 1; cursor: pointer;
  border: none; text-decoration: none;
  transition: all var(--dur-1) var(--ease);
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--grad-accent); color: var(--text-inverse); box-shadow: var(--sh-teal); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(95,184,192,0.4), var(--glow-accent); }

.btn-secondary { background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-subtle); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-raised); color: var(--text-primary); }

.btn-danger { background: var(--error-subtle); color: var(--error); border: 1px solid rgba(232,92,92,0.2); }
.btn-danger:hover { background: var(--error); color: white; box-shadow: var(--glow-error); }

.btn-sm { padding: 5px 12px; font-size: var(--text-xs); height: 32px; }
.btn-lg { padding: 12px 24px; font-size: var(--text-md); }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-icon-sm { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  position: relative;
}

.card:hover {
  box-shadow: var(--sh-md), var(--glow-accent);
  border-color: var(--border-strong);
}

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }

.card-title {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em; text-transform: uppercase;
}

.card-footer { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }

.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  position: relative;
  overflow: hidden;
}

.kpi-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}

.kpi-tile:hover {
  box-shadow: var(--sh-teal);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.kpi-tile:hover::before { opacity: 1; }

/* KPI color groups — left accent border */
.kpi-tile--income   { border-left: 3px solid var(--success); }
.kpi-tile--expense  { border-left: 3px solid var(--error); }
.kpi-tile--debt     { border-left: 3px solid var(--warning); }
.kpi-tile--pipeline { border-left: 3px solid var(--info); }
.kpi-tile--metric   { border-left: 3px solid #A78BFA; }

.kpi-tile--income:hover   { box-shadow: var(--sh-green); }
.kpi-tile--expense:hover  { box-shadow: var(--glow-error); }
.kpi-tile--debt:hover     { box-shadow: var(--glow-warning); }
.kpi-tile--pipeline:hover { box-shadow: var(--sh-blue); }
.kpi-tile--metric:hover   { box-shadow: 0 4px 24px rgba(167,139,250,0.22); }

.kpi-tile--income::before   { background: linear-gradient(90deg, var(--success), transparent); }
.kpi-tile--expense::before  { background: linear-gradient(90deg, var(--error), transparent); }
.kpi-tile--debt::before     { background: linear-gradient(90deg, var(--warning), transparent); }
.kpi-tile--pipeline::before { background: linear-gradient(90deg, var(--info), transparent); }
.kpi-tile--metric::before   { background: linear-gradient(90deg, #A78BFA, transparent); }

.kpi-label {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: var(--sp-2);
}

.kpi-value {
  font-size: var(--text-2xl); font-weight: 700;
  letter-spacing: -0.03em; color: var(--text-primary);
  font-family: var(--mono); line-height: 1;
  white-space: nowrap;
}

.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 600; margin-top: var(--sp-2); }
.kpi-delta.positive { color: var(--success); }
.kpi-delta.negative { color: var(--error); }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex; align-items: center;
  gap: 4px; padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.02em; white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform var(--dur-1) var(--ease);
}

.badge-default { background: var(--surface-raised); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-accent  { background: var(--accent-subtle);  color: var(--accent); }
.badge-success { background: var(--success-subtle); color: var(--success); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-error   { background: var(--error-subtle);   color: var(--error); }
.badge-info    { background: var(--info-subtle);     color: var(--info); }
.badge-open    { background: var(--accent-subtle);  color: var(--accent); }
.badge-won     { background: var(--success-subtle); color: var(--success); }
.badge-lost    { background: var(--error-subtle);   color: var(--error); }
.badge-paused  { background: var(--warning-subtle); color: var(--warning); }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); }
.form-label.required::after { content: ' *'; color: var(--error); }

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-sm); font-family: var(--font);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  outline: none;
}

.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle), var(--glow-accent); }
.form-control::placeholder { color: var(--text-tertiary); }
.form-control.is-invalid { border-color: var(--error); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--error-subtle); }
.form-control-editable { color: #fff !important; border-color: var(--accent) !important; }
.form-control-editable::placeholder { color: rgba(255,255,255,0.4) !important; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239AABA2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 100px; }
.field-error { font-size: var(--text-xs); color: var(--error); }
.form-hint   { font-size: var(--text-xs); color: var(--text-tertiary); }

.form-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* Toggle switch */
.form-toggle { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; user-select: none; }
.form-toggle input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.form-toggle-track {
  position: relative; width: 40px; height: 22px;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: var(--r-full); transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  flex-shrink: 0;
}
.form-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-tertiary); transition: transform var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.form-toggle input:checked + .form-toggle-track { background: var(--accent); border-color: var(--accent); }
.form-toggle input:checked + .form-toggle-track::after { transform: translateX(18px); background: white; }
.form-toggle-label { font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); }
.form-toggle-field {
  height: 40px; padding: 0 14px;
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--r-md);
}

/* ============================================================
   TABLES
   ============================================================ */

.table-container { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.table thead th {
  padding: 10px 16px;
  background: var(--surface-raised);
  color: var(--text-tertiary);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: relative;
}

.table thead th:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--grad-accent);
  border-radius: 0 2px 2px 0;
}

.table tbody td { padding: 12px 16px; color: var(--text-primary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--dur-1) var(--ease); }
.table tbody tr:hover { background: var(--accent-subtle); }
.table tbody tr:nth-child(even) { background: rgba(95,184,192,0.02); }
.table tbody tr:nth-child(even):hover { background: var(--accent-subtle); }
.table-actions { text-align: right; white-space: nowrap; }

/* ============================================================
   MODALS
   ============================================================ */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  z-index: 300;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--topbar-height) + var(--sp-6)) var(--sp-4) var(--sp-4);
  overflow-y: auto;
  animation: fade-in var(--dur-2) var(--ease) both;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-xl), var(--glow-accent);
  animation: modal-enter var(--dur-3) var(--ease) both;
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 0 0 2px 2px;
  z-index: 1;
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border); }
.modal-title  { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
  transition: all var(--dur-1) var(--ease);
}

.modal-close:hover { background: var(--surface); color: var(--text-primary); }
.modal-body   { padding: var(--sp-6); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); }

/* ============================================================
   COMPANY CARD POPUP
   ============================================================ */

/* Modal backdrop/modal classes removed — company card is now a full page */

.company-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.company-card-header-info {
  display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; flex: 1;
}

.company-card-header-title {
  font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.company-card-header-meta {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
}

.company-card-header-actions {
  display: flex; gap: var(--sp-2); align-items: center; flex-shrink: 0; margin-left: var(--sp-4);
}

.company-card-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-6);
  gap: 0;
  flex-shrink: 0;
  overflow-x: auto;
}

.company-card-tabs a {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.company-card-tabs a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.company-card-body {
  padding: var(--sp-5) var(--sp-6);
}

.company-card-section {
  margin-bottom: var(--sp-5);
}

.company-card-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
}

.company-card-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.company-card-info-item {
  display: flex; flex-direction: column; gap: 2px;
}

.company-card-info-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.company-card-info-value {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.company-card-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  transition: background var(--dur-1) var(--ease);
}

.company-card-list-item:hover {
  background: var(--surface);
}

.company-card-list-item-actions {
  display: flex; gap: var(--sp-1); align-items: center; flex-shrink: 0; margin-left: var(--sp-3);
}

.company-card-empty {
  text-align: center; padding: var(--sp-6);
  color: var(--text-tertiary); font-size: var(--text-sm);
}

/* Document upload zone */
.doc-upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.doc-upload-zone:hover {
  border-color: var(--accent);
  background: var(--surface);
}
.doc-upload-zone--drag {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.doc-upload-zone--has-file {
  border-color: var(--success);
  border-style: solid;
  background: var(--surface);
}
.doc-upload-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.doc-upload-zone--has-file .doc-upload-icon {
  background: var(--success-subtle, rgba(52,199,89,0.12));
  color: var(--success);
}
.doc-upload-filename {
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-primary);
}
.doc-upload-details {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.doc-upload-zone--has-file .doc-upload-icon svg {
  stroke: var(--success);
}

/* Clickable table rows */
tr.clickable-row { cursor: pointer; transition: background var(--dur-1) var(--ease); }
tr.clickable-row:hover { background: var(--surface-raised); }

.deal-card.clickable-card { cursor: pointer; }

/* Spinner animation for loading */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }

/* ============================================================
   KANBAN
   ============================================================ */

.kanban-wrap {
  position: relative;
  flex: 1; min-height: 0;
  overflow: hidden;
  margin-left: calc(-1 * var(--sp-6));
  margin-right: calc(-1 * var(--sp-6));
}
.kanban-wrap::before,
.kanban-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 40px;
  z-index: 10;
  pointer-events: none;
  transition: opacity .2s;
}
.kanban-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--canvas), transparent);
  opacity: 0;
}
.kanban-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--canvas), transparent);
  opacity: 1;
}
.kanban-wrap.scrolled-left::before { opacity: 1; }
.kanban-wrap.scrolled-right::after { opacity: 0; }

.kanban-board {
  display: flex; gap: var(--sp-4);
  overflow-x: auto;
  align-items: stretch;
  height: 100%; min-height: 0;
  padding: 0 var(--sp-6) 20px;
}

.kanban-column {
  flex-shrink: 0; width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.kanban-column:hover {
  border-color: var(--border-strong);
}

.kanban-column-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--border); position: relative; }

.kanban-column-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: var(--sp-4); right: var(--sp-4);
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0.3;
}

.kanban-column-name  { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.kanban-column-count { font-size: var(--text-xs); color: var(--text-tertiary); background: var(--surface-raised); padding: 2px 8px; border-radius: var(--r-full); font-family: var(--mono); }

.kanban-cards {
  flex: 1; overflow-y: auto; padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2); min-height: 60px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.kanban-cards.has-overflow {
  mask-image: linear-gradient(to bottom, black calc(100% - 48px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 48px), transparent);
}
.kanban-cards.has-overflow.scrolled-top {
  mask-image: linear-gradient(to bottom, transparent, black 40px, black calc(100% - 48px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40px, black calc(100% - 48px), transparent);
}
.kanban-cards.has-overflow.scrolled-bottom {
  mask-image: linear-gradient(to bottom, black 100%, black);
  -webkit-mask-image: linear-gradient(to bottom, black 100%, black);
}
.kanban-cards.has-overflow.scrolled-top.scrolled-bottom {
  mask-image: linear-gradient(to bottom, transparent, black 40px, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40px, black 100%);
}

.deal-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  cursor: grab;
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  animation: fade-in var(--dur-2) var(--ease) both;
  position: relative;
}

.deal-card:hover {
  box-shadow: var(--sh-sm), 0 0 0 1px var(--border-strong);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.deal-card.sortable-chosen {
  cursor: grabbing;
  box-shadow: var(--sh-lg), var(--glow-accent);
  transform: rotate(1deg) scale(1.03);
  border-color: var(--accent);
  z-index: 10;
}

.deal-card.sortable-ghost { opacity: 0.25; }

.deal-card-title   { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-2); }
.deal-card-company { font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: var(--sp-2); }
.deal-card-footer  { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.deal-card-amount  { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); font-family: var(--mono); }

.deal-card-avatar {
  width: 24px; height: 24px;
  border-radius: var(--r-full);
  background: var(--accent-subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}

.planfact-block {
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: var(--sp-1);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
}

.planfact-block:last-child { margin-bottom: 0; }

.planfact-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  padding: 3px 0;
  color: var(--text-tertiary);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.planfact-values {
  display: flex;
}

.planfact-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2) var(--sp-1);
}

.planfact-dash {
  font-size: var(--text-xs);
  color: var(--text-quaternary);
}

.deal-card-format-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: var(--r-full);
  line-height: 1.4;
}

.deal-card-format-badge.plan {
  background: var(--accent-subtle);
  color: var(--accent);
}

.deal-card-format-badge.fact {
  background: var(--success-subtle);
  color: var(--success);
}

/* ============================================================
   CHARTS
   ============================================================ */

.chart-container { background: transparent; border-radius: var(--r-md); }

.apexcharts-canvas text, .apexcharts-canvas tspan { font-family: "DM Sans", sans-serif !important; }
.apexcharts-tooltip { background: var(--surface-raised) !important; border: 1px solid var(--border-strong) !important; border-radius: var(--r-md) !important; box-shadow: var(--sh-lg) !important; color: var(--text-primary) !important; font-family: "DM Sans", sans-serif !important; font-size: var(--text-sm) !important; }
.apexcharts-tooltip * { font-family: "DM Sans", sans-serif !important; }
.apexcharts-tooltip-title { background: var(--surface) !important; border-bottom: 1px solid var(--border) !important; color: var(--text-secondary) !important; font-family: "DM Sans", sans-serif !important; font-size: var(--text-xs) !important; }
.apexcharts-tooltip.apexcharts-theme-light { background: var(--surface-raised) !important; border: 1px solid var(--border-strong) !important; color: var(--text-primary) !important; }
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-text { color: var(--text-primary) !important; }
.apexcharts-xaxistooltip { background: var(--surface-raised) !important; border: 1px solid var(--border) !important; color: var(--text-secondary) !important; }
.apexcharts-legend-text { color: var(--text-secondary) !important; font-family: "DM Sans", sans-serif !important; font-size: var(--text-xs) !important; }

/* ============================================================
   COMPANIES FILTER PANEL
   ============================================================ */

.filter-icon-btn { position: relative; padding: 0 var(--sp-3); height: 36px; display: flex; align-items: center; justify-content: center; }
.filter-icon-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.filter-icon-btn--active { border-color: var(--accent) !important; color: var(--accent) !important; }
.filter-badge {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
}

.filter-panel-backdrop {
  position: fixed;
  top: var(--topbar-height); left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-start; justify-content: flex-end;
}

.filter-panel {
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  width: 320px; height: 100%;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-xl);
  animation: slide-in-right var(--dur-2) var(--ease) both;
}

@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

.filter-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.filter-panel-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
  transition: all var(--dur-1) var(--ease);
}
.filter-panel-close:hover { background: var(--surface); color: var(--text-primary); }

.filter-panel-body {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: var(--sp-4) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-5);
}

.filter-panel-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex; gap: var(--sp-2);
  flex-shrink: 0;
}

.filter-panel-footer .btn {
  flex: 1;
  justify-content: center;
  text-align: center;
}

.filter-panel-footer .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.filter-section { display: flex; flex-direction: column; }

.filter-section-title {
  font-size: var(--text-xs); font-weight: 700;
  color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: var(--sp-2);
}

.filter-checkbox-label {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) 0; cursor: pointer;
  font-size: var(--text-sm); color: var(--text-primary);
  user-select: none;
}

.filter-checkbox-label input[type=checkbox] {
  width: 16px; height: 16px; flex-shrink: 0; cursor: pointer;
  accent-color: var(--accent);
}

.filter-show-more,
.filter-toggle-more {
  background: none; border: none; padding: var(--sp-1) 0;
  font-size: var(--text-sm); color: var(--accent);
  cursor: pointer; text-align: left; margin-top: var(--sp-1);
}
.filter-show-more:hover,
.filter-toggle-more:hover { text-decoration: underline; }

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000;
  overflow: hidden;
}

.autocomplete-list {
  list-style: none;
  margin: 0; padding: var(--sp-1) 0;
}

.autocomplete-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  transition: background 0.1s;
}

.autocomplete-item:hover {
  background: var(--surface-hover);
}

.autocomplete-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.autocomplete-uid {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--mono);
}

.dual-range-wrapper {
  position: relative;
  height: 20px;
  margin: var(--sp-2) 0;
}

.dual-range-track {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  pointer-events: none;
}

.dual-range-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
}

.dual-range-input {
  position: absolute;
  width: 100%;
  top: 0; left: 0;
  height: 20px;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  margin: 0;
}
.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  border: 2px solid var(--surface);
}
.dual-range-input::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.dual-range-input::-webkit-slider-runnable-track { background: none; }
.dual-range-input::-moz-range-track { background: none; }

/* ============================================================
   DASHBOARD
   ============================================================ */

.kpi-block {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.kpi-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.kpi-block-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.dashboard-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.dashboard-kpi-row--5 { grid-template-columns: repeat(5, 1fr); }
.dashboard-kpi-row--6 { grid-template-columns: repeat(6, 1fr); }
.dashboard-kpi-row--7 { grid-template-columns: repeat(7, 1fr); }
.dashboard-kpi-row--8 { grid-template-columns: repeat(8, 1fr); }

@media (max-width: 1400px) {
  .dashboard-kpi-row--7 { grid-template-columns: repeat(4, 1fr); }
  .dashboard-kpi-row--8 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1200px) {
  .dashboard-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-kpi-row--5 { grid-template-columns: repeat(3, 1fr); }
  .dashboard-kpi-row--6 { grid-template-columns: repeat(3, 1fr); }
  .dashboard-kpi-row--7 { grid-template-columns: repeat(4, 1fr); }
  .dashboard-kpi-row--8 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px)  { .dashboard-kpi-row { grid-template-columns: 1fr; } }

/* ── Analytics Nav ── */
.analytics-nav {
  display: flex;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.analytics-nav__tab {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.analytics-nav__tab:hover { color: var(--text-primary); }
.analytics-nav__tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── KPI Tile (analytics) ── */
.kpi-tile { padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-1); }
.kpi-label { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: var(--text-2xl); font-weight: 700; font-family: var(--mono); }
.kpi-value--sm { font-size: var(--text-md); }

.activity-feed { display: flex; flex-direction: column; gap: var(--sp-3); }

.activity-item {
  display: flex; align-items: flex-start;
  gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  animation: fade-in var(--dur-2) var(--ease) both;
}

.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: var(--text-sm); color: var(--text-primary); margin-bottom: 2px; }
.activity-meta { font-size: var(--text-xs); color: var(--text-tertiary); display: flex; gap: var(--sp-3); }

/* ── Toggle Pills ── */
.toggle-pills { display: flex; gap: 2px; background: var(--surface-sunken); border-radius: var(--r-full); padding: 2px; }
.toggle-pill {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  line-height: 1;
}
.toggle-pill:hover { color: var(--text-secondary); background: rgba(95,184,192,0.05); }
.toggle-pill--active { background: var(--surface-raised); color: var(--accent); box-shadow: var(--sh-xs), inset 0 0 8px rgba(95,184,192,0.08); }

/* ── Filter Select (compact) ── */
.filter-select {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-family: var(--font);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  appearance: none;
  padding-right: var(--sp-5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239AABA2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px;
  transition: border-color var(--dur-2) var(--ease);
}
.filter-select:hover { border-color: var(--border-strong); }
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ── Dashboard activity row ── */
.dash-activity-row { grid-template-rows: 420px; }
.dash-activity-row > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dash-activity-row .dash-chart-fill { flex: 1; min-height: 0; }
.dash-funnel-row { grid-template-rows: 620px; }
.dash-funnel-row > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dash-heatmap-row { grid-template-rows: 340px; }
.dash-heatmap-row > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dash-payment-row { grid-template-rows: 340px; }
.dash-payment-row > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.dash-tasks-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
}
.dash-tasks-scroll.scrolled-top {
  mask-image: linear-gradient(to bottom, transparent, black 20px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20px, black calc(100% - 24px), transparent);
  padding-bottom: 0;
}

.task-list { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ── Task Card ── */
.task-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  position: relative;
  overflow: visible;
}
.task-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
  border-color: var(--border-strong);
}
.task-card.overdue {
  border-color: rgba(232,92,92,0.35);
  background: linear-gradient(135deg, var(--surface-raised) 0%, rgba(232,92,92,0.18) 60%, rgba(232,92,92,0.25) 100%);
}
.task-card.completed {
  opacity: 0.6;
}
.task-card.completed:hover { opacity: 0.85; }

/* Card left accent stripe */
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
  box-shadow: 0 0 6px rgba(95,184,192,0.3);
}
.task-card:hover::before { opacity: 1; }
.task-card.overdue::before { background: linear-gradient(180deg, var(--error), var(--warm)); opacity: 1; box-shadow: 0 0 6px rgba(232,92,92,0.3); }

/* Header: checkbox + title + actions */
.task-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.task-card-title {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  min-width: 0;
}
.task-card.completed .task-card-title {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.task-card.irrelevant {
  opacity: 0.6;
}
.task-card.irrelevant:hover { opacity: 0.85; }

.task-card-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease);
}
.task-card:hover .task-card-actions { opacity: 1; }

/* Badges row */
.task-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.task-badge--uid {
  background: var(--surface-sunken);
  color: var(--text-tertiary);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.task-badge--kind {
  background: var(--secondary-subtle);
  color: var(--secondary);
}
.task-badge--project {
  background: var(--accent-subtle);
  color: var(--accent);
}
.task-badge--personal {
  background: var(--surface-sunken);
  color: var(--text-tertiary);
}
.task-badge--overdue {
  background: var(--error-subtle);
  color: var(--error);
  font-family: var(--mono);
}
.task-badge--due {
  color: var(--text-tertiary);
  font-family: var(--mono);
  padding: 2px 4px;
  font-size: 10px;
}
.task-badge--delegated {
  background: var(--accent-subtle);
  color: var(--accent);
}
.task-badge--assigned {
  background: var(--warning-subtle);
  color: var(--warning);
}

/* Detail rows */
.task-card-details {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.task-card-detail {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}
.task-card-detail svg {
  flex-shrink: 0;
  color: var(--text-quaternary);
}
.task-card-detail strong {
  color: var(--text-primary);
  font-weight: 500;
}
.task-card-detail .accent-link {
  color: var(--accent);
  font-weight: 500;
}

/* Comment block */
.task-card-comment {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--surface-sunken);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-xs);
  margin-top: var(--sp-3);
  line-height: 1.5;
  border-left: 2px solid var(--border-strong);
}

/* Status chip (replaces checkbox) */
.task-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.task-status-chip:hover {
  opacity: 0.8;
}
.task-status-option:hover {
  background: var(--surface-sunken) !important;
}

/* Legacy: task-item used in notifications */
.task-item {
  display: flex; align-items: center;
  gap: var(--sp-3); padding: var(--sp-3);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--dur-1) var(--ease);
}
.task-item:hover { border-color: var(--border-strong); }
.task-item.notification-unread { border-left: 3px solid var(--accent); }
.task-item.notification-read { opacity: 0.5; border-left: 3px solid transparent; }
.task-title { flex: 1; font-size: var(--text-sm); color: var(--text-primary); }
.task-due   { font-size: var(--text-xs); color: var(--text-tertiary); font-family: var(--mono); white-space: nowrap; }
.task-due.overdue { color: var(--error); }

.empty-state { text-align: center; padding: var(--sp-16) var(--sp-8); color: var(--text-secondary); }
.empty-state-icon  { font-size: 48px; margin-bottom: var(--sp-4); opacity: 0.3; }
.empty-state-title { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-2); }
.empty-state-desc  { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-5); }

/* ============================================================
   USER AVATAR & THEME TOGGLE
   ============================================================ */

.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--accent-subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700;
  border: 1px solid var(--border-accent);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}

.user-avatar:hover { background: var(--accent-muted); border-color: var(--accent); }

.theme-toggle {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  transition: all var(--dur-1) var(--ease);
}

.theme-toggle:hover { background: var(--surface); color: var(--text-primary); }

/* Dark theme: show sun, hide moon */
.theme-icon-sun  { display: block; }
.theme-icon-moon { display: none; }

/* Light theme: hide sun, show moon */
[data-theme="light"] .theme-icon-sun  { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* ============================================================
   TABLE FILTERS
   ============================================================ */

.table-filters { margin-bottom: var(--sp-3); }

.table-filters-row {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
}

.form-control-sm {
  height: 32px;
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-xs);
}

.filter-input { max-width: 200px; }
.filter-select { max-width: 200px; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagy { display: flex; align-items: center; gap: var(--sp-1); margin-top: var(--sp-4); flex-wrap: wrap; }

.pagy a, .pagy span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--text-sm); font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.pagy a:hover { background: var(--surface-raised); color: var(--text-primary); text-decoration: none; }
.pagy .current { background: var(--accent-subtle); color: var(--accent); border-color: var(--border-accent); }
.pagy .disabled { opacity: 0.3; cursor: default; }

/* ============================================================
   CHANGELOG / ANNOUNCEMENTS
   ============================================================ */

.changelog-timeline {
  position: relative;
  max-width: 720px;
}

.changelog-entry {
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-6);
}

.changelog-entry:last-child { padding-bottom: 0; }
.changelog-entry:last-child .changelog-line { display: none; }

.changelog-entry--draft { opacity: 0.6; }

.changelog-entry-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
  padding-top: 6px;
}

.changelog-dot {
  width: 12px; height: 12px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border-strong);
}

.changelog-dot--feature     { background: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 8px rgba(95,184,192,0.4); }
.changelog-dot--improvement { background: var(--info); box-shadow: 0 0 0 2px var(--info), 0 0 8px rgba(90,155,196,0.4); }
.changelog-dot--fix         { background: var(--warning); box-shadow: 0 0 0 2px var(--warning), 0 0 8px rgba(234,168,50,0.4); }
.changelog-dot--info        { background: var(--text-tertiary); box-shadow: 0 0 0 2px var(--text-tertiary); }

.changelog-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: var(--sp-2);
  border-radius: 1px;
}

.changelog-entry-content {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  transition: box-shadow var(--dur-2) var(--ease);
}

.changelog-entry-content:hover { box-shadow: var(--sh-sm); }

.changelog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.changelog-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--mono);
  white-space: nowrap;
}

.changelog-entry-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

.changelog-entry-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

.changelog-entry-body p { margin-bottom: var(--sp-2); }
.changelog-entry-body p:last-child { margin-bottom: 0; }

.changelog-entry-footer {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* ============================================================
   MOBILE GATE — viewport < 960px
   ============================================================ */

.mobile-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--canvas);
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.mobile-gate__card {
  text-align: center;
  max-width: 380px;
}

.mobile-gate__icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
  margin: 0 auto var(--sp-6);
  display: block;
}

.mobile-gate__title {
  font-family: var(--font);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-3);
}

.mobile-gate__text {
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-6);
}

.mobile-gate__url {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--accent);
  background: var(--accent-subtle);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
}

@media (max-width: 959px) {
  .mobile-gate {
    display: flex;
  }
  .app-body > *:not(.mobile-gate),
  body > *:not(.mobile-gate) {
    display: none !important;
  }
  body > .mobile-gate {
    display: flex !important;
  }
}

/* ============================================================
   DESIGN POLISH — Enhanced visual refinements
   ============================================================ */

/* Custom scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-quaternary); }

/* Mode toggle enhancement */
.mode-toggle {
  position: relative;
  overflow: hidden;
}

.mode-btn.active {
  position: relative;
}

.mode-btn.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 8px rgba(95,184,192,0.1);
  pointer-events: none;
}

/* Page title gradient accent — dark mode only */
:root .page-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .page-title {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-primary);
  background-clip: unset;
}

/* Topbar user avatar ring on hover */
.topbar-user:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

/* Pagination current — glow */
.pagy .current {
  box-shadow: 0 0 8px rgba(95,184,192,0.2);
}

/* Empty state improvement — dark mode only */
:root .empty-state-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .empty-state-title {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-primary);
  background-clip: unset;
}

/* Table container subtle accent */
.table-container {
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow var(--dur-2) var(--ease);
}

.table-container:hover {
  box-shadow: var(--sh-sm);
}

/* Company list item hover accent */
.company-card-list-item:hover {
  border-color: var(--border-strong);
  box-shadow: inset 2px 0 0 var(--accent);
}

/* Notification unread glow */
.task-item.notification-unread {
  box-shadow: inset 0 0 12px rgba(95,184,192,0.05);
}

/* Document upload zone glow */
.doc-upload-zone:hover {
  box-shadow: var(--glow-accent);
}

.doc-upload-zone--has-file {
  box-shadow: var(--glow-success);
}

/* Changelog entry hover glow */
.changelog-entry-content:hover {
  border-color: var(--border-strong);
}

/* Filter panel slide-in enhancement */
.filter-panel {
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--sh-xl), -4px 0 40px rgba(0,0,0,0.2);
}

/* Sidebar footer exit button red glow on hover */
.nav-item-danger:hover {
  box-shadow: inset 0 0 12px rgba(232,92,92,0.08);
}

/* Kanban column header count badge */
.kanban-column-count {
  transition: background var(--dur-1) var(--ease);
}

.kanban-column:hover .kanban-column-count {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* Smooth focus rings for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Clickable row subtle left accent on hover */
tr.clickable-row:hover {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Analytics nav active tab glow */
.analytics-nav__tab--active {
  text-shadow: 0 0 12px rgba(95,184,192,0.3);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
