/* ========================================
   TIGA OS — Theme Variables
======================================== */
:root {
  --c-dark: 15 29 43;       /* #0F1D2B */
  --c-blue: 22 42 58;       /* #162A3A */
  --c-mid: 30 58 79;        /* #1E3A4F */
  --c-light: 69 120 160;    /* #4578A0 — brighter for better text contrast */
  --c-accent: 59 130 246;   /* #3B82F6 */
  --bg-body: #0F1D2B;
  --text-main: #e2e8f0;
  --text-bright: #ffffff;
  --shadow-card: rgba(0,0,0,.5);
  --scrollbar-track: #0F1D2B;
  --scrollbar-thumb: #1E3A4F;
  /* Premium glow tokens */
  --glow-accent: rgba(59,130,246,.35);
  --glow-success: rgba(52,211,153,.3);
  --glow-danger: rgba(248,113,113,.3);
  --premium-ease: cubic-bezier(.22,1,.36,1);
  --spring-ease: cubic-bezier(.34,1.56,.64,1);
}

body.theme-light {
  --c-dark: 245 245 245;    /* #f5f5f5 neutral-100 */
  --c-blue: 255 255 255;    /* #ffffff */
  --c-mid: 163 163 163;     /* #a3a3a3 neutral-400 */
  --c-light: 82 82 82;      /* #525252 neutral-600 */
  --bg-body: #f5f5f5;
  --text-main: #404040;
  --text-bright: #262626;
  --shadow-card: rgba(0,0,0,.08);
  --scrollbar-track: #f5f5f5;
  --scrollbar-thumb: #a3a3a3;
  --glow-accent: rgba(59,130,246,.2);
  --glow-success: rgba(34,197,94,.15);
  --glow-danger: rgba(239,68,68,.15);
}

/* ========================================
   BASE
======================================== */
* { font-family: 'Montserrat', sans-serif; }
body {
  background: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--c-light),.8); }

/* ========================================
   Focus & Accessibility
======================================== */
:focus-visible {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 2px;
}
body.theme-light :focus-visible {
  outline-color: #3B82F6;
}

/* ========================================
   Global Transitions (Premium)
======================================== */
button, a, .card, input, textarea, select {
  transition: all .25s var(--premium-ease);
}

/* ========================================
   Premium Button Effects
======================================== */
button.premium-hover {
  position: relative;
  overflow: hidden;
}
button.premium-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--premium-ease);
  pointer-events: none;
  border-radius: inherit;
}
button.premium-hover:hover::before { opacity: 1; }

/* Primary button glow */
.btn-glow {
  box-shadow: 0 0 0 0 var(--glow-accent);
  transition: all .25s var(--premium-ease), box-shadow .4s var(--premium-ease);
}
.btn-glow:hover {
  box-shadow: 0 4px 20px -4px var(--glow-accent), 0 0 0 1px rgba(59,130,246,.15);
  transform: translateY(-1px);
}
.btn-glow:active { transform: translateY(0) scale(.98); }

/* ========================================
   Cards (Premium)
======================================== */
.card {
  transition: transform .3s var(--premium-ease), box-shadow .3s var(--premium-ease), border-color .3s var(--premium-ease);
  cursor: pointer;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px -8px var(--shadow-card), 0 2px 8px -2px rgba(0,0,0,.2);
  border-color: rgba(var(--c-light),.3) !important;
}
.card:active {
  transform: translateY(-1px) scale(.995);
}

/* ========================================
   Glassmorphism Panels
======================================== */
.glass {
  background: rgba(var(--c-blue),.7);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(var(--c-light),.12);
}
.glass-strong {
  background: rgba(var(--c-blue),.85);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(var(--c-light),.15);
}
body.theme-light .glass {
  background: rgba(255,255,255,.75);
  border-color: rgba(212,212,212,.4);
}
body.theme-light .glass-strong {
  background: rgba(255,255,255,.9);
  border-color: rgba(212,212,212,.5);
}

/* ========================================
   Drag & Drop
======================================== */
.dragging { opacity:.4; }
.drop-zone { transition: background .15s, border .15s; min-height:460px; }
@media (max-width: 1023px) {
  .drop-zone { min-height: auto; }
}
.drag-active { background:rgba(59,130,246,.08); border:2px dashed rgba(59,130,246,.5); border-radius:.75rem; box-shadow:inset 0 0 20px rgba(59,130,246,.06); }
.drop-indicator { height:3px; background:linear-gradient(90deg,transparent,rgb(var(--c-accent)),transparent); border-radius:2px; margin:4px 0; transition:opacity .15s; animation:dropPulse 1s ease infinite; }
@keyframes dropPulse { 0%,100%{opacity:.6} 50%{opacity:1} }
.dragging ~ .drop-zone { border:2px dashed rgba(var(--c-light),.2); border-radius:.75rem; }

/* ========================================
   Skeleton Loader
======================================== */
.skeleton { position:relative; overflow:hidden; background:rgba(var(--c-mid),.5); border-radius:.75rem; }
.skeleton::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.04),transparent); animation:shimmer 1.5s infinite; }
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
body.theme-light .skeleton { background:rgba(0,0,0,.06); }
body.theme-light .skeleton::after { background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent); }

/* ========================================
   Inline field-save feedback (optimistic UI)
   Used by _fieldFeedback() in actions.js.
======================================== */
.field-saving, .field-saved, .field-error {
  position:relative;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.field-saving { box-shadow: 0 0 0 1px rgba(var(--c-accent), .35) inset; }
.field-saved  { box-shadow: 0 0 0 1px rgba(16,185,129,.55) inset; }
.field-error  { box-shadow: 0 0 0 1px rgba(220,38,38,.6) inset; }
.field-saving::after, .field-saved::after, .field-error::after {
  content:''; position:absolute; top:50%; right:.55rem; width:14px; height:14px;
  transform: translateY(-50%);
  background-repeat:no-repeat; background-position:center; background-size:contain;
  opacity:.85; pointer-events:none;
}
.field-saving::after {
  border:2px solid rgba(var(--c-accent),.35);
  border-top-color: rgb(var(--c-accent));
  border-radius:50%;
  animation: fieldSpin .7s linear infinite;
  background:none;
}
.field-saved::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  animation: fieldFade .3s ease;
}
.field-error::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
}
@keyframes fieldSpin { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes fieldFade { from { opacity:0; transform: translateY(-50%) scale(.6); } to { opacity:.85; transform: translateY(-50%) scale(1); } }
[contenteditable].field-saving, [contenteditable].field-saved, [contenteditable].field-error {
  border-radius:.375rem; padding-right:1.75rem;
}

/* ========================================
   Toast System (Enhanced with actions)
======================================== */
.toast-container { position:fixed; bottom:1.5rem; right:1.5rem; z-index:9999; display:flex; flex-direction:column-reverse; gap:.5rem; pointer-events:none; }
.toast { pointer-events:auto; display:flex; align-items:center; gap:.75rem; padding:.75rem 1.25rem; border-radius:.75rem; font-size:.875rem; font-weight:500; color:#fff; backdrop-filter:blur(12px); box-shadow:0 8px 24px -8px rgba(0,0,0,.4); animation:toastIn .3s var(--premium-ease); min-width:280px; }
.toast-success { background:rgba(16,185,129,.92); }
.toast-error { background:rgba(220,38,38,.92); }
.toast-warning { background:rgba(217,119,6,.92); }
.toast .toast-action { margin-left:auto; padding:.25rem .75rem; border-radius:.5rem; font-size:.75rem; font-weight:600; cursor:pointer; background:rgba(255,255,255,.2); transition:background .15s; flex-shrink:0; }
.toast .toast-action:hover { background:rgba(255,255,255,.35); }
.toast-exit { animation:toastOut .25s var(--premium-ease) forwards; }
@keyframes toastIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes toastOut { from{transform:translateX(0);opacity:1} to{transform:translateX(100%);opacity:0} }

/* ========================================
   Offline Banner
======================================== */
.offline-banner { position:fixed; top:0; left:0; right:0; z-index:9999; padding:.5rem 1rem; background:rgba(220,38,38,.95); color:#fff; text-align:center; font-size:.8125rem; font-weight:600; backdrop-filter:blur(8px); animation:slideDown .3s var(--premium-ease); }
.offline-banner.reconnected { background:rgba(16,185,129,.95); animation:slideDown .3s var(--premium-ease); }
@keyframes slideDown { from{transform:translateY(-100%)} to{transform:translateY(0)} }

/* ========================================
   Form Validation
======================================== */
.field-error { border-color:rgba(248,113,113,.6) !important; box-shadow:0 0 0 2px rgba(248,113,113,.15) !important; }
.field-error-msg { color:rgb(248,113,113); font-size:.75rem; margin-top:.25rem; animation:fadeIn .2s; }
.field-success { border-color:rgba(52,211,153,.5) !important; }

/* ========================================
   Empty State
======================================== */
.empty-state { text-align:center; padding:3rem 1.5rem; }
.empty-state-icon { width:3rem; height:3rem; margin:0 auto .75rem; opacity:.2; color:rgb(var(--c-light)); }
.empty-state p { color:rgba(var(--c-light),.3); font-size:.875rem; margin-bottom:.75rem; }
.empty-state .empty-cta { display:inline-flex; align-items:center; gap:.375rem; color:rgb(var(--c-accent)); font-size:.8125rem; font-weight:600; cursor:pointer; transition:opacity .15s; }
.empty-state .empty-cta:hover { opacity:.8; }

/* ========================================
   Bulk Select
======================================== */
.bulk-bar { position:sticky; top:0; z-index:20; background:rgba(var(--c-blue),.95); backdrop-filter:blur(12px); border:1px solid rgba(var(--c-accent),.3); border-radius:.75rem; padding:.625rem 1rem; margin-bottom:.75rem; display:flex; align-items:center; gap:.75rem; animation:fadeIn .2s var(--premium-ease); }
body.theme-light .bulk-bar { background:rgba(255,255,255,.95); }
.bulk-check { width:15px; height:15px; accent-color:rgb(var(--c-accent)); cursor:pointer; }

/* ========================================
   Checkbox (Premium)
======================================== */
.check-box {
  width:17px; height:17px; accent-color:rgb(var(--c-accent)); cursor:pointer; flex-shrink:0; margin-top:2px;
  transition: transform .2s var(--spring-ease);
}
.check-box:hover { transform: scale(1.15); }
.check-box:active { transform: scale(.9); }

/* ========================================
   Modal (Premium)
======================================== */
/* Modal appears instantly — no entry animation. Backdrop-filter is heavy
   and any transform/opacity transition was perceived as a bounce/flicker. */
.modal-bg { will-change: backdrop-filter; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Modal glass effect */
.modal-glass {
  background: rgba(var(--c-blue),.92);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
}
body.theme-light .modal-glass {
  background: rgba(255,255,255,.95);
}
.lead-cv-header {
  background: linear-gradient(to right, rgba(59,130,246,.12), rgba(100,116,139,.15)), rgba(var(--c-blue),1);
}
body.theme-light .lead-cv-header {
  background: linear-gradient(to right, rgba(59,130,246,.08), rgba(241,245,249,1));
}

/* PDF dropzone for lead attachments */
.lead-att-dropzone { transition: background-color .15s ease, border-color .15s ease; }
.lead-att-dropzone.lead-att-drop-active {
  border-color: rgba(59,130,246,.7) !important;
  background: rgba(59,130,246,.12) !important;
}
.lead-att-dropzone.lead-att-drop-active * { pointer-events: none; }

/* ========================================
   Sidebar slide (mobile drawer)
======================================== */
.sidebar-slide { animation:slideIn .25s var(--premium-ease); }
@keyframes slideIn { from{transform:translateX(-100%)} to{transform:translateX(0)} }

/* ========================================
   Badges (Premium)
======================================== */
.badge {
  display:inline-flex; align-items:center; padding:2px 9px; border-radius:999px;
  font-size:11px; font-weight:600;
  max-width:100%; word-break:break-word;
  transition: transform .2s var(--spring-ease), box-shadow .2s var(--premium-ease);
}
.badge:hover { transform: scale(1.05); }
.b-blue   { background:rgba(59,130,246,.15);  color:#93c5fd; }
.b-green  { background:rgba(52,211,153,.15);  color:#6ee7b7; }
.b-orange { background:rgba(251,146,60,.15);  color:#fbbf7a; }
.b-red    { background:rgba(248,113,113,.15); color:#fca5a5; }
.b-purple { background:rgba(167,139,250,.15); color:#c4b5fd; }
.b-gray   { background:rgba(156,163,175,.15); color:#9ca3af; }

/* ========================================
   Forms (Premium)
======================================== */
input,textarea,select { font-family:'Montserrat',sans-serif !important; }
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(var(--c-accent),.15), 0 2px 8px -2px rgba(var(--c-accent),.2);
}

/* ========================================
   Tabs (Premium)
======================================== */
.tab-active {
  background:rgba(59,130,246,.12); color:var(--text-bright);
  border-bottom:2px solid rgb(var(--c-accent));
  box-shadow: 0 2px 8px -4px var(--glow-accent);
}
.tab-inactive { color:rgba(148,178,204,.5); }
.tab-inactive:hover { color:rgba(148,178,204,.8); background:rgba(45,90,123,.15); }

/* ========================================
   Admin Dashboard
======================================== */
.admin-progress-bar { transition: width 0.5s var(--premium-ease); }
.activity-feed { scrollbar-width: thin; }

/* ========================================
   PORTAL LOGO
======================================== */
.portal-logo-preview svg { max-width:100%; max-height:100%; width:auto; height:auto; }
.portal-icon { border-radius: 4px; overflow: hidden; }
.portal-logo-preview svg { border-radius: 4px; overflow: hidden; }

/* ========================================
   NEW Badge (Premium)
======================================== */
.badge-new {
  display:inline-flex; align-items:center; padding:1px 7px; border-radius:999px;
  font-size:11px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
  background:linear-gradient(135deg, rgba(52,211,153,.25), rgba(56,189,248,.25));
  color:#6ee7b7; border:1px solid rgba(52,211,153,.3);
  animation: newPulse 2s ease-in-out infinite;
  flex-shrink:0;
  box-shadow: 0 0 12px -3px rgba(52,211,153,.4);
}
@keyframes newPulse {
  0%, 100% { opacity:1; box-shadow: 0 0 12px -3px rgba(52,211,153,.4); }
  50% { opacity:.7; box-shadow: 0 0 20px -3px rgba(52,211,153,.6); }
}

/* ========================================
   Staggered Entrance Animations
======================================== */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn2 {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(.95); }
  to   { opacity:1; transform:scale(1); }
}

.anim-fade-up {
  animation: fadeUp .4s var(--premium-ease) both;
}
.anim-fade-in {
  animation: fadeIn2 .3s var(--premium-ease) both;
}
.anim-scale-in {
  animation: scaleIn .35s var(--premium-ease) both;
}

/* Stagger delays */
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .2s; }
.delay-5 { animation-delay: .25s; }
.delay-6 { animation-delay: .3s; }

/* Auto-stagger — set inline style="--i:N" on each child */
.anim-stagger-item {
  opacity: 0;
  animation: fadeUp .45s var(--premium-ease) forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@media (prefers-reduced-motion: reduce) {
  .anim-stagger-item { animation: none; opacity: 1; }
  .anim-fade-up, .anim-fade-in, .anim-scale-in { animation: none; }
}

/* ========================================
   Premium Nav Items
======================================== */
.nav-item {
  position: relative;
  transition: all .25s var(--premium-ease);
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--c-accent));
  transition: transform .25s var(--spring-ease);
}
.nav-item.nav-active::before {
  transform: translateY(-50%) scaleY(1);
}
.nav-item:hover {
  transform: translateX(2px);
}
.nav-item.nav-active:hover {
  transform: translateX(0);
}

/* ========================================
   Premium Sidebar
======================================== */
.sidebar-premium {
  background: rgba(var(--c-blue),.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
body.theme-light .sidebar-premium {
  background: rgba(255,255,255,.9);
}

/* Sidebar user section glow */
.user-section {
  position: relative;
}
.user-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--c-accent),.3), transparent);
}

/* ========================================
   Premium Stats Cards
======================================== */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all .3s var(--premium-ease);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(var(--c-accent),.04));
  pointer-events: none;
  border-radius: inherit;
}
.stat-card:hover {
  border-color: rgba(var(--c-accent),.25) !important;
  box-shadow: 0 4px 16px -4px var(--glow-accent);
}

/* ========================================
   Premium Panel Headers
======================================== */
.panel-header {
  position: relative;
}
.panel-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--c-light),.2), transparent);
}

/* ========================================
   Premium Avatar
======================================== */
.avatar-premium {
  position: relative;
  box-shadow: 0 0 0 2px rgba(var(--c-accent),.2);
  transition: all .25s var(--premium-ease);
}
.avatar-premium:hover {
  box-shadow: 0 0 0 2px rgba(var(--c-accent),.4), 0 0 12px -2px var(--glow-accent);
}

/* ========================================
   Shimmer Loading Effect
======================================== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, rgba(var(--c-mid),.3) 25%, rgba(var(--c-mid),.5) 50%, rgba(var(--c-mid),.3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ========================================
   Completion Animation
======================================== */
@keyframes checkComplete {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.check-done {
  animation: checkComplete .4s var(--spring-ease);
}

/* ========================================
   Premium Tooltip
======================================== */
[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(var(--c-blue),.95);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--c-light),.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--premium-ease), transform .2s var(--premium-ease);
}
[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ========================================
   Page Transition
======================================== */
.page-enter {
  animation: pageEnter .4s var(--premium-ease) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   LIGHT THEME — Clean White & Gray
======================================== */

/* --- Theme transition for smooth switching --- */
body { transition: background-color .3s ease, color .3s ease; }

/* --- Core Tailwind color overrides: tiga-* → white/gray --- */
body.theme-light .bg-tiga-dark   { background-color: #f5f5f5 !important; }
body.theme-light .bg-tiga-blue   { background-color: #ffffff !important; }
body.theme-light .bg-tiga-mid    { background-color: #e5e5e5 !important; }
body.theme-light .bg-tiga-light  { background-color: #525252 !important; }
body.theme-light .bg-tiga-accent { background-color: #3B82F6 !important; }

/* Backgrounds with opacity */
body.theme-light [class*="bg-tiga-mid\/"]  { background-color: rgba(229,229,229,.5) !important; }
body.theme-light [class*="bg-tiga-blue\/"] { background-color: rgba(255,255,255,.5) !important; }
body.theme-light [class*="bg-tiga-dark\/"] { background-color: rgba(245,245,245,.5) !important; }
body.theme-light .bg-tiga-light\/80 { background-color: rgba(82,82,82,.8) !important; }
body.theme-light .bg-tiga-light\/20 { background-color: rgba(82,82,82,.12) !important; }
body.theme-light .bg-tiga-light\/25 { background-color: rgba(82,82,82,.15) !important; }
body.theme-light .bg-tiga-light\/15 { background-color: rgba(82,82,82,.08) !important; }
body.theme-light .bg-tiga-light\/10 { background-color: rgba(82,82,82,.06) !important; }
body.theme-light .bg-tiga-mid\/50   { background-color: rgba(229,229,229,.5) !important; }
body.theme-light .bg-tiga-mid\/60   { background-color: rgba(229,229,229,.6) !important; }
body.theme-light .bg-tiga-mid\/70   { background-color: rgba(229,229,229,.7) !important; }
body.theme-light .bg-tiga-mid\/40   { background-color: rgba(229,229,229,.4) !important; }
body.theme-light .bg-tiga-mid\/30   { background-color: rgba(229,229,229,.3) !important; }
body.theme-light .bg-tiga-mid\/20   { background-color: rgba(245,245,245,.6) !important; }
body.theme-light .bg-tiga-mid\/15   { background-color: rgba(245,245,245,.5) !important; }
body.theme-light .bg-tiga-mid\/10   { background-color: rgba(245,245,245,.3) !important; }

/* Borders → light gray */
body.theme-light [class*="border-tiga-light"] { border-color: rgba(212,212,212,.5) !important; }
body.theme-light [class*="border-tiga-mid"]   { border-color: rgba(212,212,212,.4) !important; }

/* Text colors: tiga-light → gray in light mode */
body.theme-light [class*="text-tiga-light"] { color: rgba(82,82,82,.6) !important; }

/* Dark mode: boost low-opacity tiga-light text for legibility */
.text-tiga-light\/25 { color: rgba(180,200,220,.55) !important; }
.text-tiga-light\/30 { color: rgba(180,200,220,.6) !important; }
.text-tiga-light\/35 { color: rgba(180,200,220,.65) !important; }
.text-tiga-light\/40 { color: rgba(180,200,220,.7) !important; }
.text-tiga-light\/50 { color: rgba(180,200,220,.78) !important; }
.text-tiga-light\/55 { color: rgba(180,200,220,.82) !important; }
.text-tiga-light\/60 { color: rgba(180,200,220,.85) !important; }
.text-tiga-light\/70 { color: rgba(180,200,220,.9) !important; }
body.theme-light .text-tiga-light\/25 { color: rgba(82,82,82,.55) !important; }
body.theme-light .text-tiga-light\/30 { color: rgba(82,82,82,.62) !important; }
body.theme-light .text-tiga-light\/35 { color: rgba(82,82,82,.65) !important; }
body.theme-light .text-tiga-light\/40 { color: rgba(82,82,82,.7) !important; }
body.theme-light .text-tiga-light\/50 { color: rgba(82,82,82,.78) !important; }
body.theme-light .text-tiga-light\/55 { color: rgba(82,82,82,.82) !important; }
body.theme-light .text-tiga-light\/60 { color: rgba(82,82,82,.85) !important; }
body.theme-light .text-tiga-light\/70 { color: rgba(82,82,82,.9) !important; }

/* --- All SVG logos: white → black in light mode (except portal icons) --- */
body.theme-light svg path[fill="#fff"],
body.theme-light svg path[fill="#ffffff"],
body.theme-light svg path[fill="white"],
body.theme-light svg path[fill="#FFF"],
body.theme-light svg path[fill="#FFFFFF"] { fill: #1a1a1a !important; }
body.theme-light .portal-icon svg path[fill="#fff"],
body.theme-light .portal-icon svg path[fill="#ffffff"],
body.theme-light .portal-icon svg path[fill="white"],
body.theme-light .portal-icon svg path[fill="#FFF"],
body.theme-light .portal-icon svg path[fill="#FFFFFF"],
body.theme-light .portal-logo-preview svg path[fill="#fff"],
body.theme-light .portal-logo-preview svg path[fill="#ffffff"],
body.theme-light .portal-logo-preview svg path[fill="white"],
body.theme-light .portal-logo-preview svg path[fill="#FFF"],
body.theme-light .portal-logo-preview svg path[fill="#FFFFFF"] { fill: #fff !important; }

/* --- Text: override text-white to dark --- */
body.theme-light .text-white { color: #1a1a1a !important; }
body.theme-light .text-white\/80 { color: rgba(26,26,26,.8) !important; }
body.theme-light .text-white\/70 { color: rgba(26,26,26,.7) !important; }
body.theme-light .text-white\/60 { color: rgba(26,26,26,.6) !important; }
body.theme-light .placeholder-white\/60::placeholder { color: rgba(26,26,26,.4) !important; }

/* Placeholder text in inputs */
body.theme-light [class*="placeholder-tiga-light"]::placeholder { color: rgba(82,82,82,.4) !important; }

/* Keep white text on primary action buttons */
body.theme-light .bg-tiga-light .text-white,
body.theme-light .bg-tiga-light.text-white,
body.theme-light [class*="bg-tiga-light"]:not([class*="bg-tiga-light/"]) > .text-white,
body.theme-light button.bg-tiga-light,
body.theme-light a.bg-tiga-light { color: #ffffff !important; }
body.theme-light .bg-tiga-light\/80 { color: #ffffff !important; }
body.theme-light button[class*="bg-red-"]:not([class*="bg-red-500/"]):not([class*="bg-red-600/"]):not([class*="bg-red-900/"]),
body.theme-light button[class*="bg-emerald-"]:not([class*="bg-emerald-500/"]):not([class*="bg-emerald-600/"]):not([class*="bg-emerald-900/"]),
body.theme-light button[class*="bg-blue-"]:not([class*="bg-blue-500/"]):not([class*="bg-blue-600/"]):not([class*="bg-blue-900/"]),
body.theme-light button[class*="bg-orange-"]:not([class*="bg-orange-500/"]):not([class*="bg-orange-600/"]):not([class*="bg-orange-900/"]) { color: #ffffff !important; }

/* Focus rings → gray */
body.theme-light [class*="ring-tiga-light"] { --tw-ring-color: rgba(82,82,82,.25) !important; }

/* --- Input/textarea/select backgrounds --- */
body.theme-light input, body.theme-light textarea, body.theme-light select {
  background-color: #f5f5f5 !important;
  border-color: #d4d4d4 !important;
  color: #1a1a1a !important;
}

/* --- Badges: stronger contrast --- */
body.theme-light .b-blue   { background:rgba(59,130,246,.1);  color:#2563eb; }
body.theme-light .b-green  { background:rgba(34,197,94,.1);   color:#16a34a; }
body.theme-light .b-orange { background:rgba(249,115,22,.1);  color:#ea580c; }
body.theme-light .b-red    { background:rgba(239,68,68,.1);   color:#dc2626; }
body.theme-light .b-purple { background:rgba(139,92,246,.1);  color:#7c3aed; }
body.theme-light .b-gray   { background:rgba(115,115,115,.1); color:#525252; }

/* --- Tabs --- */
body.theme-light .tab-active { background:rgba(82,82,82,.08); color:#1a1a1a; border-bottom-color:#525252; }
body.theme-light .tab-inactive { color:rgba(82,82,82,.4); }
body.theme-light .tab-inactive:hover { color:rgba(82,82,82,.7); background:rgba(82,82,82,.06); }

/* --- Card shadow --- */
body.theme-light .card { border-color: rgba(212,212,212,.5) !important; }
body.theme-light .card:hover { box-shadow:0 8px 24px rgba(0,0,0,.08); }

/* --- Modal overlay --- */
body.theme-light .bg-black\/65 { background-color: rgba(0,0,0,.35) !important; }
body.theme-light .bg-black\/50 { background-color: rgba(0,0,0,.25) !important; }
body.theme-light .bg-black\/60 { background-color: rgba(0,0,0,.3) !important; }

/* --- Badge-new --- */
body.theme-light .badge-new {
  background:linear-gradient(135deg, rgba(34,197,94,.12), rgba(14,165,233,.12));
  color:#16a34a; border-color:rgba(34,197,94,.2);
  box-shadow: 0 0 12px -3px rgba(34,197,94,.2);
}

/* --- Scrollbar --- */
body.theme-light { scrollbar-color: #d4d4d4 #fafafa; }
body.theme-light ::-webkit-scrollbar-track { background: #fafafa; }
body.theme-light ::-webkit-scrollbar-thumb { background: #d4d4d4; }

/* --- Select option backgrounds --- */
body.theme-light select option { background: #fff; color: #1a1a1a; }
body.theme-light .bg-tiga-dark { background-color: #f5f5f5 !important; }

/* --- Accent text colors (keep readable) --- */
body.theme-light .text-emerald-400 { color: #059669 !important; }
body.theme-light .text-emerald-300 { color: #10b981 !important; }
body.theme-light .text-red-400 { color: #dc2626 !important; }
body.theme-light .text-red-300 { color: #ef4444 !important; }
body.theme-light .text-orange-400 { color: #ea580c !important; }
body.theme-light .text-amber-400 { color: #d97706 !important; }
body.theme-light .text-blue-400 { color: #2563eb !important; }
body.theme-light .text-purple-400 { color: #7c3aed !important; }
body.theme-light .text-cyan-400 { color: #0891b2 !important; }
body.theme-light .text-rose-400 { color: #e11d48 !important; }

/* --- Status backgrounds --- */
body.theme-light .bg-emerald-900\/20 { background-color: rgba(5,150,105,.08) !important; }
body.theme-light .bg-emerald-900\/30 { background-color: rgba(5,150,105,.1) !important; }
body.theme-light .bg-red-900\/20 { background-color: rgba(220,38,38,.08) !important; }
body.theme-light .bg-red-900\/30 { background-color: rgba(220,38,38,.1) !important; }
body.theme-light .bg-red-900\/50 { background-color: rgba(220,38,38,.15) !important; }
body.theme-light .bg-orange-900\/20 { background-color: rgba(234,88,12,.08) !important; }
body.theme-light .bg-orange-900\/30 { background-color: rgba(234,88,12,.1) !important; }
body.theme-light .border-emerald-400\/20 { border-color: rgba(5,150,105,.15) !important; }
body.theme-light .border-red-400\/20 { border-color: rgba(220,38,38,.15) !important; }
body.theme-light .border-red-900\/30 { border-color: rgba(220,38,38,.15) !important; }

/* --- Sidebar: glass effect in light mode --- */
body.theme-light aside { background-color: rgba(255,255,255,.9) !important; border-color: #e5e5e5 !important; }
body.theme-light header { background-color: rgba(255,255,255,.9) !important; border-color: #e5e5e5 !important; }

/* --- Notification badge keeps red+white --- */
body.theme-light .notif-badge { color: #fff !important; }

/* --- Avatar circles --- */
body.theme-light [class*="bg-tiga-light\/25"] { background-color: rgba(82,82,82,.1) !important; }

/* ========================================
   Command Palette (Premium)
======================================== */
.cmd-palette-bg { animation: fadeIn .2s var(--premium-ease); }
.cmd-palette-box { animation: cmdSlideDown .25s var(--premium-ease); }
@keyframes cmdSlideDown {
  from { transform: translateY(-16px) scale(.96); opacity: 0; filter: blur(4px); }
  to   { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.cmd-item { transition: all .15s var(--premium-ease); }
.cmd-item:hover, .cmd-active { background: rgba(59,130,246,.12); }
.cmd-results-scroll { scrollbar-width: thin; }
.cmd-results-scroll::-webkit-scrollbar { width: 4px; }
.cmd-results-scroll::-webkit-scrollbar-thumb { background: rgba(45,90,123,.3); border-radius: 2px; }
body.theme-light .cmd-item:hover,
body.theme-light .cmd-active { background: rgba(82,82,82,.06); }
body.theme-light .cmd-palette-box { background: #ffffff; border-color: #e5e5e5; }
body.theme-light .cmd-results-scroll::-webkit-scrollbar-thumb { background: rgba(82,82,82,.15); }

/* ========================================
   Notification Panel (Premium)
======================================== */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #ef4444;
  border-radius: 9999px;
  animation: notifPulse 2s ease-in-out 3;
  box-shadow: 0 0 8px rgba(239,68,68,.4);
}
@keyframes notifPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(239,68,68,.4); }
  50% { transform: scale(1.2); box-shadow: 0 0 16px rgba(239,68,68,.6); }
}
.notif-panel {
  animation: notifSlide .2s var(--premium-ease);
}
@keyframes notifSlide {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-scroll { scrollbar-width: thin; }
.notif-scroll::-webkit-scrollbar { width: 4px; }
.notif-scroll::-webkit-scrollbar-thumb { background: rgba(45,90,123,.3); border-radius: 2px; }
body.theme-light .notif-panel { background: #ffffff !important; border-color: #e5e5e5 !important; }
body.theme-light .notif-scroll::-webkit-scrollbar-thumb { background: rgba(82,82,82,.15); }

/* ========================================
   Quick Nav FAB (Premium)
======================================== */
.quick-nav-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(59,130,246,.3);
  cursor: pointer;
  z-index: 40;
  border: none;
  transition: all .25s var(--premium-ease);
}
.quick-nav-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 20px -4px rgba(59,130,246,.5);
}
.quick-nav-fab:active {
  transform: scale(.95);
}
.quick-nav-fab svg { width: 20px; height: 20px; }
body.theme-light .quick-nav-fab {
  background: linear-gradient(135deg, #525252, #404040);
  box-shadow: 0 4px 16px rgba(0,0,0,.15), 0 0 0 0 rgba(82,82,82,.2);
}

/* ========================================
   Landing Page
======================================== */
html { scroll-behavior: smooth; }

/* ========================================
   Toast Animation (Premium)
======================================== */
@keyframes toastSlideIn {
  from { transform: translateY(16px) scale(.95); opacity: 0; filter: blur(2px); }
  to   { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.animate-toast { animation: toastSlideIn .3s var(--premium-ease); }

/* ========================================
   Subtle Background Gradient
======================================== */
.bg-premium-gradient {
  background: linear-gradient(135deg, rgba(var(--c-dark),1) 0%, rgba(var(--c-blue),.8) 50%, rgba(var(--c-dark),1) 100%);
}

/* ========================================
   Interactive Glow Ring on Focus
======================================== */
.glow-ring {
  transition: box-shadow .3s var(--premium-ease);
}
.glow-ring:focus-within {
  box-shadow: 0 0 0 3px var(--glow-accent), 0 4px 16px -4px var(--glow-accent);
}

/* ========================================
   Smooth Counter Transition
======================================== */
.counter-value {
  display: inline-block;
  transition: transform .3s var(--spring-ease);
}
.counter-value.bump {
  animation: counterBump .4s var(--spring-ease);
}
@keyframes counterBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ========================================
   MOBILE OPTIMIZATIONS
======================================== */

/* Prevent any accidental horizontal scroll globally on mobile */
@media (max-width: 1023px) {
  html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  /* Prevent iOS Safari auto-zoom on input focus (font-size < 16px) */
  input, select, textarea {
    font-size: 16px !important;
  }
  /* Body scroll lock when sidebar drawer is open */
  body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  /* Glass panels: flatten on mobile so content aligns with header */
  /* Only flatten page-level panels, not overlays/modals/header/notif */
  main .glass, main .glass-strong {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 639px) {
  /* ---- Mobile Typography: readable but compact ---- */
  /* Tiny labels (text-[9px], text-[10px]) → 11px minimum */
  [class*="text-\[9px\]"],
  [class*="text-\[10px\]"] {
    font-size: 11px !important;
  }
  /* text-[11px] → 12px */
  [class*="text-\[11px\]"] {
    font-size: 12px !important;
  }
  /* text-xs (12px) body text → 13px for readability */
  p.text-xs, span.text-xs, div.text-xs, a.text-xs, label.text-xs {
    font-size: 13px !important;
  }
  /* text-sm (14px) → 15px on mobile */
  p.text-sm, span.text-sm, div.text-sm, a.text-sm {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  /* Buttons: minimum readable size */
  button.text-xs, a.text-xs[download] {
    font-size: 13px !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  /* Headings: scale down slightly for mobile width */
  h1 { font-size: 1.375rem !important; } /* 22px instead of 24-30px */
  h2 { font-size: 1.125rem !important; } /* 18px */
  h3 { font-size: 1rem !important; }     /* 16px */

  /* Modals: full-width bottom sheet on small screens */
  /* Normal modals: bottom-sheet with rounded top */
  .modal-box {
    border-radius: 1.25rem 1.25rem 0 0 !important;
    max-height: 92vh !important;
  }
  /* xl modals (Lead-Detail): fullscreen, no radius */
  .items-stretch .modal-box {
    border-radius: 0 !important;
    max-height: none !important;
  }
  /* Cards: reduce hover effects on touch */
  .card:hover {
    transform: none;
    box-shadow: none;
  }
  /* Nav item: no hover translate on touch */
  .nav-item:hover {
    transform: none;
  }
  /* Quick Nav FAB: lift above bottom nav on mobile */
  .quick-nav-fab {
    width: 48px;
    height: 48px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 12px);
    right: 16px;
  }
  /* Touch-friendly: minimum 44px tap targets */
  .check-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }
  /* Badge: slightly bigger for touch */
  .badge {
    padding: 3px 10px;
    font-size: 12px;
  }
  /* Stat cards: compact on mobile */
  .stat-card {
    padding: 0.5rem 0.75rem !important;
  }
  /* Better card spacing on mobile */
  .card {
    padding: 0.875rem !important;
  }
  /* Mobile header: always visible, never scrolled away */
  header {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0 !important;
    min-height: 3.5rem !important;
  }
  /* Smooth scroll for main content */
  main {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  /* Command palette: closer to top on mobile */
  .cmd-palette-bg {
    align-items: flex-start !important;
    padding-top: 8vh !important;
  }
  /* Notification panel: full width on mobile, sit above bottom nav */
  .notif-panel {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 12px) !important;
  }
  /* Portal: lead cards bigger tap targets */
  .lead-card {
    padding: 14px !important;
    min-height: 48px;
  }
  /* Tables inside portal: prevent overflow */
  table { font-size: 13px; }
}

/* ----------------------------------------
   Portal-Auswertung — Banking-style light look
   (scoped via .aw-page wrapper, doesn't touch
   other portal pages)
---------------------------------------- */
.aw-page {
  padding: 16px 12px;
  background: #f4f6f9;
  min-height: 100%;
}
@media (min-width: 640px) { .aw-page { padding: 24px; } }
body.theme-light .aw-page { background: #f4f6f9; }

.aw-card {
  background: #ffffff !important;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 14px;
  border: 1px solid rgba(15, 29, 43, 0.05);
  box-shadow: 0 1px 3px rgba(15, 29, 43, 0.04);
}
@media (max-width: 639px) { .aw-card { padding: 20px 18px; border-radius: 18px; } }

/* Side-by-side card row — single column on tablet/mobile, two columns on desktop. */
.aw-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.aw-row > .aw-card { margin-bottom: 0; }
@media (min-width: 1024px) {
  .aw-row { grid-template-columns: 1fr 1fr; align-items: stretch; }
}

.aw-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f1d2b;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  line-height: 1.2;
}
.aw-section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
/* Tighten line-height so title's box height matches its font size; otherwise the
   1.2 line-height adds invisible padding above/below the glyphs and the 20px
   icon ends up sitting visually below the title's optical centre. */
.aw-section-title-row .aw-section-title {
  margin: 0;
  line-height: 1;
}

/* Info popover (click-to-toggle via <details>) */
.aw-info {
  position: relative;
  display: inline-block;
}
.aw-info > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 29, 43, 0.06);
  color: rgba(15, 29, 43, 0.55);
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.aw-info > summary:hover {
  background: rgba(15, 29, 43, 0.1);
  color: #0f1d2b;
}
.aw-info[open] > summary {
  background: #0f1d2b;
  color: #ffffff;
}
.aw-info > summary::-webkit-details-marker { display: none; }
.aw-info > summary::marker { content: ''; }
.aw-info > summary svg { width: 14px; height: 14px; display: block; }
.aw-info-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(300px, calc(100vw - 48px));
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(15, 29, 43, 0.08);
  box-shadow: 0 8px 28px rgba(15, 29, 43, 0.14);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(15, 29, 43, 0.72);
}
.aw-info-content p { margin: 0 0 8px; }
.aw-info-content p:last-child { margin: 0; }
.aw-info-content strong { color: #0f1d2b; font-weight: 700; }

/* Period picker — pills */
.aw-period-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}
.aw-period-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 29, 43, 0.45);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.aw-period-pill:hover { color: rgba(15, 29, 43, 0.75); }
.aw-period-pill.aw-active {
  background: #e9edf2;
  color: #0f1d2b;
}
.aw-period-pill.aw-gesamt {
  border: 1px solid rgba(15, 29, 43, 0.1);
}
.aw-period-pill.aw-gesamt.aw-active {
  background: #0f1d2b;
  color: #ffffff;
  border-color: #0f1d2b;
}

.aw-period-select {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1d2b;
  background: #ffffff;
  border: 1px solid rgba(15, 29, 43, 0.12);
  border-radius: 12px;
  font-family: inherit;
  margin-bottom: 18px;
}

/* Funnel rows */
.aw-funnel-row { margin-bottom: 20px; }
.aw-funnel-row:last-child { margin-bottom: 0; }
/* Bar-less rows (e.g. Ausspielungen) — sit visually above the funnel with a
   thin separator instead of a progress bar. */
.aw-funnel-row-nobar {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(15, 29, 43, 0.08);
}
.aw-funnel-row-nobar .aw-funnel-row-header { margin-bottom: 0; }
.aw-funnel-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.aw-funnel-label {
  font-size: 14px;
  color: rgba(15, 29, 43, 0.6);
  font-weight: 500;
}
.aw-funnel-value {
  font-size: 18px;
  color: #0f1d2b;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.aw-funnel-value-empty {
  font-size: 13px;
  color: rgba(15, 29, 43, 0.32);
  font-weight: 500;
  font-style: italic;
}
.aw-funnel-bar {
  height: 8px;
  background: rgba(15, 29, 43, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.aw-funnel-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(.22, 1, .36, 1);
}

/* KPI rows (Ihre Aufgabe) — label left, big value right */
.aw-kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15, 29, 43, 0.06);
}
.aw-kpi-row:first-of-type { padding-top: 4px; }
.aw-kpi-row:last-of-type { padding-bottom: 4px; border-bottom: 0; }
.aw-kpi-label {
  font-size: 15px;
  color: #0f1d2b;
  font-weight: 600;
}
.aw-kpi-sub {
  font-size: 12px;
  color: rgba(15, 29, 43, 0.4);
  margin-top: 3px;
  font-weight: 500;
}
.aw-kpi-value-stack {
  text-align: right;
  flex-shrink: 0;
}
.aw-kpi-value {
  font-size: 24px;
  color: #0f1d2b;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.aw-kpi-value.aw-mono { font-variant-numeric: tabular-nums; }
.aw-kpi-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.01em;
}
.aw-kpi-pill.aw-pill-green { background: #00c853; }
.aw-kpi-pill.aw-pill-amber { background: #f59e0b; }
.aw-kpi-pill.aw-pill-red { background: #ef4444; }

/* Budget rows */
.aw-budget-list { margin-top: 4px; }
.aw-budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 29, 43, 0.06);
}
.aw-budget-row:last-child { border-bottom: 0; }
.aw-budget-row-total {
  border-bottom: 0;
  padding-top: 18px;
  margin-top: 6px;
  border-top: 1.5px solid #0f1d2b;
}
.aw-budget-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: rgba(15, 29, 43, 0.7);
  font-weight: 500;
}
.aw-budget-row-total .aw-budget-label { color: #0f1d2b; font-weight: 700; }
.aw-budget-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aw-budget-value {
  font-size: 16px;
  color: #0f1d2b;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.aw-budget-row-total .aw-budget-value { font-size: 22px; }
.aw-budget-empty {
  font-size: 13px;
  color: rgba(15, 29, 43, 0.4);
  margin: 12px 0 0;
}

/* Donut */
.aw-donut-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 20px;
}
.aw-donut-wrap svg { display: block; }

/* Empty state card */
.aw-empty {
  background: #ffffff;
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  color: rgba(15, 29, 43, 0.4);
  font-size: 14px;
  border: 1px solid rgba(15, 29, 43, 0.05);
}

/* ----------------------------------------
   Mobile bottom navigation
---------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: stretch;
  background: rgba(10, 22, 35, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(120, 160, 200, 0.15);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}
body.theme-light .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  border-top-color: rgba(0, 0, 0, 0.08);
}
.bot-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 10px;
  min-height: 60px;
  color: rgba(220, 232, 245, 0.55);
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
body.theme-light .bot-nav-btn {
  color: rgba(20, 30, 45, 0.55);
}
.bot-nav-btn:active {
  background: rgba(120, 160, 200, 0.08);
}
.bot-nav-btn.bot-nav-active {
  color: #fff;
}
body.theme-light .bot-nav-btn.bot-nav-active {
  color: var(--c-blue, #0f1d2b);
}
.bot-nav-btn.bot-nav-active .bot-nav-icon {
  transform: translateY(-1px);
}
.bot-nav-btn.bot-nav-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--c-accent, #4a90e2);
}
.bot-nav-btn { position: relative; }
.bot-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.bot-nav-icon svg {
  width: 22px !important;
  height: 22px !important;
}
.bot-nav-label {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Bottom spacer inside <main> so content isn't hidden behind the nav */
.mobile-bottom-spacer {
  height: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* ----------------------------------------
   Mobile "Mehr" bottom sheet
---------------------------------------- */
.more-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 40;
  animation: moreFade 0.18s ease-out;
}
.more-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  background: rgba(12, 24, 38, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(120, 160, 200, 0.15);
  border-radius: 20px 20px 0 0;
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  max-height: 85vh;
  overflow-y: auto;
  animation: moreSlide 0.24s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.45);
}
body.theme-light .more-sheet {
  background: rgba(255, 255, 255, 0.98);
  border-top-color: rgba(0, 0, 0, 0.08);
}
@keyframes moreSlide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes moreFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.more-sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 6px;
  cursor: pointer;
  margin: 0 -16px;
}
.more-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(220, 232, 245, 0.25);
}
body.theme-light .more-sheet-handle { background: rgba(0, 0, 0, 0.18); }
.more-sheet-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 14px;
  border-bottom: 1px solid rgba(120, 160, 200, 0.1);
  margin-bottom: 12px;
}
body.theme-light .more-sheet-user { border-bottom-color: rgba(0, 0, 0, 0.06); }
.more-sheet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(74, 144, 226, 0.2);
  color: #4a90e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.more-sheet-userinfo { flex: 1; min-width: 0; }
.more-sheet-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.more-sheet-role {
  font-size: 12px;
  color: rgba(220, 232, 245, 0.5);
  margin: 2px 0 0;
}
body.theme-light .more-sheet-name { color: #0f1d2b; }
body.theme-light .more-sheet-role { color: rgba(20, 30, 45, 0.55); }
.more-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.more-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 6px;
  border-radius: 14px;
  background: rgba(120, 160, 200, 0.06);
  border: 0;
  color: rgba(220, 232, 245, 0.82);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.more-cell:active { background: rgba(120, 160, 200, 0.14); transform: scale(0.97); }
.more-cell.more-cell-active { color: #fff; background: rgba(74, 144, 226, 0.14); }
body.theme-light .more-cell { background: rgba(0, 0, 0, 0.04); color: rgba(20, 30, 45, 0.82); }
body.theme-light .more-cell.more-cell-active { color: #0f1d2b; background: rgba(74, 144, 226, 0.14); }
.more-cell-icon { display: flex; align-items: center; justify-content: center; }
.more-cell-icon svg { width: 22px !important; height: 22px !important; }
.more-cell-label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more-cell-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  min-width: 16px;
  text-align: center;
}
.more-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(120, 160, 200, 0.1);
  padding-top: 8px;
}
body.theme-light .more-sheet-actions { border-top-color: rgba(0, 0, 0, 0.06); }
.more-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  color: rgba(220, 232, 245, 0.85);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.more-action-row:active { background: rgba(120, 160, 200, 0.1); }
body.theme-light .more-action-row { color: rgba(20, 30, 45, 0.85); }
.more-action-row-danger { color: rgba(239, 68, 68, 0.9); }
.more-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}
.more-action-icon svg { width: 20px !important; height: 20px !important; }
.more-action-label { flex: 1; }
.more-action-badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
