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

/* Basic Variables & Reset */
:root {
  --bg-main: #0B0F1A;
  --bg-sidebar: #131A2C;
  --bg-card: rgba(19, 26, 44, 0.7);
  --bg-card-hover: rgba(27, 35, 56, 0.85);
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-glow-active: rgba(255, 255, 255, 0.16);
  
  /* Accent Colors (foundersflow Paletten-Mapping) */
  --accent-cyan: #38BDF8;
  --accent-indigo: #6366F1;
  --accent-violet: #8B5CF6;
  --accent-emerald: #10B981;
  --accent-rose: #EF4444;
  --accent-amber: #F5A623;
  
  /* Text Colors */
  --text-main: #F5F3EE;
  --text-muted: #8B93A7;
  --text-dark: #0B0F1A;
  
  /* Layout sizes */
  --sidebar-width: 260px;
  --mobile-nav-height: 64px;
  
  /* foundersflow Custom Properties */
  --ff-bg: #0B0F1A;
  --ff-surface: #131A2C;
  --ff-surface-2: #1B2338;
  --ff-border: rgba(255,255,255,0.08);
  --ff-border-strong: rgba(255,255,255,0.16);
  --ff-text: #F5F3EE;
  --ff-muted: #8B93A7;
  --ff-gold: #F5A623;
  --ff-cyan: #38BDF8;
  --ff-violet: #8B5CF6;
  --ff-gradient: linear-gradient(90deg, var(--ff-cyan), var(--ff-violet));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.02);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
}

/* Custom Scrollbars for Chrome/Edge/Safari */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
}

/* Confetti Canvas Overlay */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2500;
  pointer-events: none;
}

/* App Wrapper Layout */
.app-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Sidebar Styling (Desktop) */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.brand-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.brand-avatar-wrapper::after {
  content: '📷';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.brand-avatar-wrapper:hover::after {
  opacity: 1;
}

.brand-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.brand-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1e293b;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.1;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.brand-name-glow {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: slowNeonGlow 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 1px rgba(56, 189, 248, 0.3));
}

@keyframes slowNeonGlow {
  0% {
    filter: drop-shadow(0 0 1px rgba(56, 189, 248, 0.4)) drop-shadow(0 0 2px rgba(139, 92, 246, 0.2));
    opacity: 0.85;
  }
  50% {
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.8)) drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
    opacity: 1;
  }
  100% {
    filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.5)) drop-shadow(0 0 4px rgba(139, 92, 246, 0.3));
    opacity: 0.9;
  }
}

/* XP-Balken in Sidebar */
.xp-widget {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xp-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.xp-level-title {
  color: var(--accent-cyan);
}

.xp-bar-outer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 10px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.xp-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo), var(--accent-violet));
  width: 0%;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-details {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(56, 189, 248, 0.2);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(192, 132, 252, 0.1));
  border-color: rgba(192, 132, 252, 0.3);
  box-shadow: 0 4px 20px -5px rgba(192, 132, 252, 0.15);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Mobile Bottom Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--mobile-nav-height);
  background-color: var(--bg-sidebar);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  width: 16%;
  height: 100%;
  cursor: pointer;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.mobile-nav-item.active {
  color: var(--accent-cyan);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.05), transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(192, 132, 252, 0.05), transparent 40%);
}

.view-section {
  display: none;
  flex-direction: column;
  height: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-section.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Greeting Widget */
.greeting-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(192, 132, 252, 0.08));
  border: 1px solid rgba(192, 132, 252, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(5px);
}

.greeting-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.greeting-streak {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(251, 191, 36, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Toolbar & Filters */
.toolbar {
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

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

.search-input-wrapper {
  position: relative;
  width: 200px;
}

.search-input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px 8px 32px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
}

.search-input-wrapper input:focus {
  border-color: var(--accent-cyan);
}

.search-input-wrapper svg {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2.5;
}

.toolbar-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.toolbar-select:focus {
  border-color: var(--accent-cyan);
}

/* Glassmorphism Cards & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: var(--bg-main);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.08);
}

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

/* Kanban Board View */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  flex-grow: 1;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.kanban-column {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Einklappbare Spalten */
.kanban-column.collapsed {
  min-width: 60px;
  max-width: 60px;
  padding: 18px 8px;
}

.kanban-column.collapsed .cards-container,
.kanban-column.collapsed .column-header h3,
.kanban-column.collapsed .column-count {
  display: none !important;
}

.kanban-column.collapsed .column-header {
  border-bottom: none;
  margin-bottom: 0;
  justify-content: center;
}

.column-title-vertical {
  display: none;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 24px;
  height: 100%;
}

.kanban-column.collapsed .column-title-vertical {
  display: block;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.column-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

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

.column-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  transition: transform 0.3s;
}

.kanban-column.collapsed .column-toggle-btn svg {
  transform: rotate(180deg);
}

.column-count {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
  min-height: 100px;
}

/* Kanban Card Styling */
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 16px;
  cursor: grab;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow-active);
  box-shadow: 0 8px 20px rgba(192, 132, 252, 0.15);
  background: var(--bg-card-hover);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.tag-orga { background-color: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.tag-pricing { background-color: rgba(251, 191, 36, 0.15); color: var(--accent-amber); }
.tag-delivery { background-color: rgba(52, 211, 153, 0.15); color: var(--accent-emerald); }
.tag-marketing { background-color: rgba(192, 132, 252, 0.15); color: var(--accent-violet); }

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.card-meta-item.overdue {
  color: var(--accent-rose);
  font-weight: 700;
}

.card-checklist-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.card-checklist-progress svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* Roadmap (Accordion Week list) */
.roadmap-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.roadmap-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.roadmap-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  width: 0%;
  transition: width 0.5s ease-out;
}

.roadmap-week-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.roadmap-week-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.week-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
}

.week-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.week-num-badge {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  color: var(--bg-main);
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.95rem;
}

.week-headline {
  font-size: 1.1rem;
  font-weight: 600;
}

.week-chevron {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.roadmap-week-card.expanded .week-chevron {
  transform: rotate(180deg);
}

.week-content {
  display: none;
  padding: 0 20px 20px 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  animation: slideDown 0.3s ease-out forwards;
}

.roadmap-week-card.expanded .week-content {
  display: block;
}

.week-task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.week-task-item:last-child {
  border-bottom: none;
}

/* Custom Checkbox */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 28px;
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  color: var(--text-main);
  line-height: 1.4;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--bg-main);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ span.task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* CRM Lead-Tracker Board */
.crm-board {
  display: flex;
  gap: 20px;
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 16px;
}

.crm-column {
  min-width: var(--crm-col-width, 250px);
  width: var(--crm-col-width, 250px);
  max-width: var(--crm-col-width, 250px);
  flex-shrink: 0;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: min-width 0.1s ease, width 0.1s ease, max-width 0.1s ease, padding 0.3s ease;
}

.crm-column.collapsed {
  min-width: 60px !important;
  width: 60px !important;
  max-width: 60px !important;
  padding: 16px 8px;
}

.crm-column.collapsed .crm-cards-container,
.crm-column.collapsed .column-header h3 {
  display: none !important;
}

.crm-column.collapsed .column-header {
  border-bottom: none;
  margin-bottom: 0;
  justify-content: center;
}

.crm-column.collapsed .column-title-vertical {
  display: block;
}

.crm-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
}

.lead-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lead-card:hover {
  border-color: var(--accent-indigo);
  background: var(--bg-card-hover);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.lead-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.lead-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.lead-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lead-info-row svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.lead-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 8px;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: break-word;
}

/* CRM Expanded Styles */
.lead-value-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.lead-next-contact {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
}

.lead-next-contact.overdue {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.lead-next-contact.today {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.lead-next-contact.future {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.lead-preview-btn {
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lead-preview-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent-indigo);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.history-item.type-Anruf { border-left-color: var(--accent-cyan); }
.history-item.type-E-Mail { border-left-color: var(--accent-violet); }
.history-item.type-WhatsApp { border-left-color: var(--accent-emerald); }
.history-item.type-Persönlich { border-left-color: var(--accent-rose); }
.history-item.type-Meeting { border-left-color: var(--accent-amber); }
.history-item.type-Angebot { border-left-color: var(--accent-indigo); }
.history-item.type-Notiz { border-left-color: var(--text-muted); }

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
}

.history-item-badge {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.history-item.type-Anruf .history-item-badge { color: var(--accent-cyan); background: rgba(56, 189, 248, 0.1); }
.history-item.type-E-Mail .history-item-badge { color: var(--accent-violet); background: rgba(192, 132, 252, 0.1); }
.history-item.type-WhatsApp .history-item-badge { color: var(--accent-emerald); background: rgba(52, 211, 153, 0.1); }
.history-item.type-Persönlich .history-item-badge { color: var(--accent-rose); background: rgba(244, 63, 94, 0.1); }
.history-item.type-Meeting .history-item-badge { color: var(--accent-amber); background: rgba(251, 191, 36, 0.1); }
.history-item.type-Angebot .history-item-badge { color: var(--accent-indigo); background: rgba(129, 140, 248, 0.1); }
.history-item.type-Notiz .history-item-badge { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }

.history-item-date {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.history-item-text {
  color: var(--text-main);
  line-height: 1.4;
  font-size: 0.75rem;
}

/* Service Configurator Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  overflow-y: auto;
  align-content: start;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 8px 30px rgba(192, 132, 252, 0.08);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.service-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-features li svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-emerald);
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
}

/* Settings & Deadlines (Admin View) */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  overflow-y: auto;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card h3 svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-violet);
  fill: none;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
}

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

/* Achievements/Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

.badge-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0.25;
  transition: all 0.4s ease;
  filter: grayscale(1);
}

.badge-card.unlocked {
  opacity: 1;
  filter: grayscale(0);
  background: rgba(56, 189, 248, 0.04);
  border-color: var(--border-glow);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.08);
}

.badge-icon {
  font-size: 1.75rem;
}

.badge-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

/* Calendar View */
.calendar-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.calendar-ctrls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.calendar-month-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex-grow: 1;
  min-height: 450px;
}

.calendar-header-day {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 6px;
}

.calendar-day-cell {
  background: rgba(17, 24, 39, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 80px;
  overflow-y: auto;
}

.calendar-day-cell.today {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.03);
}

.calendar-day-cell.other-month {
  opacity: 0.25;
}

.calendar-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-end;
}

.calendar-day-cell.today .calendar-day-num {
  color: var(--accent-cyan);
  font-weight: 800;
}

.calendar-task-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
  max-width: 100%;
}

/* Form Layout Grid Utility */
.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Modals (Task Edit & Lead Add) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: #111827;
  border: 1px solid var(--border-glow-active);
  border-radius: 24px;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.95);
  transition: transform 0.2s ease-out;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.modal-close {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
  background: #1e293b; /* Solid dark background to prevent transparent dropdown issues */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

/* Global select option styling for dark mode visibility */
select option {
  background-color: #1f2937;
  color: #f3f4f6;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-cyan);
}

/* Checklist Styling inside Modal */
.checklist-wrapper {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 8px 12px;
  border-radius: 8px;
}

.checklist-item-delete {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.checklist-item-delete:hover {
  opacity: 1;
}

.checklist-item-delete svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* File Upload inside Modal */
.upload-wrapper {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-zone {
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.02);
}

.upload-zone svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  margin-bottom: 6px;
}

.upload-zone p {
  font-size: 0.8rem;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.attachment-item a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item a:hover {
  text-decoration: underline;
}

.attachment-item a svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.attachment-delete {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.attachment-delete:hover {
  opacity: 1;
}

.attachment-delete svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  flex-shrink: 0;
}

/* Level Up Overlay card */
.level-up-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.9);
  backdrop-filter: blur(12px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.level-up-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.level-up-card {
  background: linear-gradient(135deg, #1e293b, #111827);
  border: 2px solid var(--accent-amber);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.25);
  border-radius: 28px;
  padding: 40px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-up-overlay.active .level-up-card {
  transform: scale(1);
}

.level-up-badge {
  font-size: 4rem;
  animation: bounce 1s infinite alternate;
}

.level-up-num {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Responsive Rules */
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .main-content {
    padding: 20px;
    height: calc(100vh - var(--mobile-nav-height));
    padding-bottom: 24px;
  }
  
  .kanban-board {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .kanban-column.collapsed {
    min-width: 100%;
    max-width: 100%;
    height: 52px;
    padding: 14px 18px;
  }
  
  .kanban-column.collapsed .column-header {
    justify-content: space-between;
    width: 100%;
  }
  
  .kanban-column.collapsed .column-header h3 span:not(.column-toggle-btn) {
    display: inline !important;
  }
  
  .column-title-vertical {
    display: none !important;
  }
  
  .crm-board {
    padding-bottom: 24px;
  }
  
  .calendar-grid {
    min-height: 380px;
    gap: 4px;
  }
  
  .calendar-day-cell {
    min-height: 60px;
    padding: 4px;
  }
  
  .calendar-task-tag {
    font-size: 0.55rem;
    padding: 1px 3px;
  }
  
  .week-content {
    padding-left: 20px;
  }
  
  .week-chevron {
    width: 16px;
    height: 16px;
  }

  /* --- Mobile Layout & Styling Overrides --- */
  
  /* Mobile Toolbar Stacking */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }
  
  .toolbar-left {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }
  
  .search-input-wrapper {
    width: 100% !important;
  }
  
  .toolbar select {
    width: 100% !important;
  }
  
  /* Mobile CRM Board Layout (vertikal gestapelt wie Kanban) */
  .crm-board {
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    gap: 16px !important;
  }
  
  .crm-column {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  
  .crm-column.collapsed {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 52px !important;
    padding: 14px 18px !important;
  }
  
  .crm-column.collapsed .column-header {
    justify-content: space-between !important;
    width: 100% !important;
  }
  
  .crm-column.collapsed .column-header h3 {
    display: inline-block !important;
  }
  
  .crm-column.collapsed .column-title-vertical {
    display: none !important;
  }
  
  /* Services & Admin grids stacking */
  .services-grid, .admin-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Modal responsive spacing */
  .modal-content {
    padding: 16px !important;
    gap: 16px !important;
    border-radius: 16px !important;
    max-height: 92vh !important;
    width: 94% !important;
  }
  
  /* Stack 2-column grids inside forms */
  .form-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  /* Stack maps and auto-fill row */
  .modal-content div[style*="display: flex; gap: 8px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .modal-content div[style*="display: flex; gap: 8px"] button {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Verlauf & Aktivitäten Layout stacken */
  .checklist-wrapper div[style*="grid-template-columns: 120px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .checklist-wrapper div[style*="display: flex; gap: 8px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .checklist-wrapper div[style*="display: flex; gap: 8px"] button {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Responsive Lead Card header & items */
  .lead-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  
  .lead-header > div:last-child {
    flex-direction: row !important;
    align-items: center !important;
    margin-top: 4px !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  /* Wrap Kanban card metadata */
  .card-meta {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  
  /* Greeting Widget stacken */
  .greeting-card {
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  /* Safe Area / Bottom Navigation bar for iOS and standard virtual home buttons */
  .mobile-nav {
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}

/* Auth Overlay Styles */
.auth-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(15px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.auth-overlay.active {
  display: flex;
}

.auth-card {
  background: #111827;
  border: 1px solid var(--border-glow-active);
  border-radius: 28px;
  width: 90%;
  max-width: 420px;
  padding: 36px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.auth-error {
  color: var(--accent-rose);
  background-color: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  text-align: center;
  display: none;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  #mobile-logout-btn {
    display: flex !important;
  }
}

#new-checklist-item-input {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  color: var(--text-main) !important;
  outline: none !important;
}

#new-checklist-item-input:focus {
  border-color: var(--accent-cyan) !important;
}

/* ============================================================
   HELP SYSTEM – Tour Overlay & Help Modal
   ============================================================ */

/* --- Tour Overlay --- */
.tour-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}
.tour-overlay.active {
  display: block;
}
.tour-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.72);
  border: 2px solid rgba(56, 189, 248, 0.6);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.tour-tooltip {
  position: absolute;
  background: rgba(17, 24, 39, 0.97);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 22px 24px 18px;
  width: min(360px, 90vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 40px rgba(56,189,248,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideUp 0.35s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tour-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.tour-emoji {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.tour-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px;
}
.tour-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 18px;
}
.tour-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* --- Help Modal Overlay --- */
.help-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
  padding: 16px;
}
.help-modal-overlay.active {
  display: flex;
}
.help-modal-box {
  background: rgba(13, 18, 30, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  width: min(860px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 60px rgba(56,189,248,0.05);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}
.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.help-close-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.help-close-btn:hover {
  background: rgba(244,63,94,0.15);
  border-color: rgba(244,63,94,0.3);
  color: var(--accent-rose);
}

/* --- Help Tabs --- */
.help-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.help-tabs::-webkit-scrollbar { display: none; }
.help-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.help-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}
.help-tab.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* --- Tab Content --- */
.help-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56,189,248,0.2) transparent;
}
.help-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}
.help-panel.active {
  display: block;
}
.help-panel h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 10px;
}
.help-panel h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 18px 0 8px;
}
.help-panel p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 12px;
}

/* --- Feature Grid (Overview) --- */
.help-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.help-feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  cursor: default;
}
.help-feature-card:hover {
  background: rgba(56,189,248,0.05);
  border-color: rgba(56,189,248,0.2);
  transform: translateY(-2px);
}
.help-feature-icon {
  font-size: 1.5rem;
}
.help-feature-card strong {
  font-size: 0.85rem;
  color: var(--text-main);
}
.help-feature-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Steps (numbered) --- */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.help-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.help-step strong { color: var(--text-main); }
.help-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56,189,248,0.15);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Help List --- */
.help-list {
  padding-left: 0;
  list-style: none;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.help-list li {
  font-size: 0.87rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.help-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 0.8rem;
}
.help-list li strong { color: var(--text-main); }

/* --- Tip Box --- */
.help-tip {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}
.help-tip strong { color: var(--accent-cyan); }

/* --- Glossary Grid --- */
.glossary-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.glossary-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.glossary-item:hover {
  border-color: rgba(56,189,248,0.2);
}
.glossary-term {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1.4;
}
.glossary-def {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 600px) {
  .help-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .glossary-item { grid-template-columns: 1fr; gap: 4px; }
  .tour-tooltip { width: 92vw; }
  .help-modal-box {
    width: 94% !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
  }
}

/* ==================================================== */
/* 🖥️ Screensaver Overlay Styles */
/* ==================================================== */
.screensaver-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #05070c;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  animation: fadeIn 0.8s forwards;
}

/* Glowing floating background blobs */
.screensaver-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: screen;
}

.screensaver-glow.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  top: -10%;
  left: -10%;
  animation: floatBlob 25s infinite alternate ease-in-out;
}

.screensaver-glow.blob-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-violet);
  bottom: -15%;
  right: -10%;
  animation: floatBlob 30s infinite alternate-reverse ease-in-out;
}

.screensaver-glow.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-rose);
  top: 40%;
  left: 50%;
  animation: floatBlob2 20s infinite alternate ease-in-out;
}

.screensaver-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 650px;
  padding: 20px;
}

/* Avatar layout */
.screensaver-avatar-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 20px;
}

.screensaver-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.25);
  position: relative;
  z-index: 2;
}

.screensaver-avatar-pulse {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  opacity: 0;
  animation: pulseOuter 3s infinite ease-out;
  z-index: 1;
}

/* Typography & Clock */
.screensaver-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.screensaver-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.screensaver-clock {
  font-size: 5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
  line-height: 1.1;
  margin-bottom: 8px;
}

.screensaver-date {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 40px;
  text-transform: capitalize;
}

/* Stats Widget */
.screensaver-stats {
  display: flex;
  gap: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  padding: 14px 28px;
  border-radius: 16px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.screensaver-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  min-width: 90px;
}

.screensaver-stat-item .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.screensaver-stat-item .value {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

/* Quote Box */
.screensaver-quote-box {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.screensaver-quote {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  transition: opacity 0.5s ease;
  animation: pulseQuote 6s infinite;
}

.screensaver-dismiss {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: flashDismiss 2.5s infinite;
  margin-top: 10px;
}

/* Keyframe Animations */
@keyframes pulseOuter {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 80px) scale(1.1); }
  100% { transform: translate(-50px, 120px) scale(0.95); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(-80px, -60px) scale(1.05); }
  100% { transform: translate(60px, 80px) scale(0.95); }
}

@keyframes pulseQuote {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

@keyframes flashDismiss {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

@media (max-width: 600px) {
  .screensaver-clock { font-size: 3.5rem; }
  .screensaver-date { font-size: 1rem; margin-bottom: 25px; }
  .screensaver-stats { gap: 12px; padding: 10px 16px; margin-bottom: 25px; }
  .screensaver-stat-item { min-width: 70px; }
  .screensaver-stat-item .value { font-size: 0.85rem; }
  .screensaver-quote { font-size: 0.9rem; }
}

/* ==================================================== */
/* 🚀 foundersflow Custom CI Classes */
/* ==================================================== */
.ff-word-flow {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  background: var(--ff-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ff-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: 20px;
  padding: 20px;
}

.ff-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-block;
}
.ff-chip-web  { background: rgba(56,189,248,0.14);  color: var(--ff-cyan);  border: 1px solid rgba(56,189,248,0.3); }
.ff-chip-ki   { background: rgba(139,92,246,0.14);  color: #B79CFB;        border: 1px solid rgba(139,92,246,0.3); }
.ff-chip-auto { background: rgba(245,166,35,0.14);  color: var(--ff-gold); border: 1px solid rgba(245,166,35,0.3); }

.ff-cta {
  background: var(--ff-gradient);
  color: #0B0F1A;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 16px;
  border: none;
  box-shadow: 0 0 28px rgba(139,92,246,0.35);
  cursor: pointer;
}

.ff-icon-glow {
  border-radius: 18px;
  background: var(--ff-surface);
  border: 1px solid var(--ff-border-strong);
  box-shadow: 0 0 22px rgba(56,189,248,0.18);
}


