/* ============================================================
   Ariside Command Center — Midnight Luxe
   Warm dark. Visible depth. Premium surfaces.
   ============================================================ */

:root {
  /* Brand */
  --coral: #FE725C;
  --coral-dim: #c4553f;
  --coral-soft: #ff9b8a;
  --gold: #D4AF37;
  --gold-dim: #a68a2a;
  --gold-soft: #e8cc6e;
  --green: #3dd68c;
  --green-dim: #2a9e65;
  --blue: #5b9cf5;
  --blue-dim: #4078c4;
  --purple: #a78bfa;
  --red: #ef4444;

  /* Brand tinted backgrounds */
  --coral-bg: rgba(254,114,92,0.14);
  --blue-bg: rgba(91,156,245,0.14);
  --gold-bg: rgba(212,175,55,0.14);
  --green-bg: rgba(61,214,140,0.14);

  /* Surface system — warm, layered, visible separation */
  --bg-root: #2a2a2e;
  --bg-surface: #1e1e22;
  --bg-elevated: #262630;
  --bg-overlay: #303038;
  --bg-hover: #38383f;
  --bg-accent: #282832;

  /* Borders — visible but refined */
  --border: rgba(255,255,255,0.08);
  --border-subtle: rgba(255,255,255,0.05);
  --border-active: rgba(255,255,255,0.16);

  /* Text — high contrast for readability */
  --text-primary: #f0f0f4;
  --text-secondary: #9496a1;
  --text-tertiary: #5c5e6a;
  --text-inverse: #0c0c0f;

  /* Shadows — strong colored ambient light */
  --glow-coral:
    0 0 0 1px rgba(254,114,92,0.08),
    0 4px 20px -2px rgba(254,114,92,0.22),
    0 12px 40px -8px rgba(254,114,92,0.12);
  --glow-blue:
    0 0 0 1px rgba(91,156,245,0.08),
    0 4px 20px -2px rgba(91,156,245,0.22),
    0 12px 40px -8px rgba(91,156,245,0.12);
  --glow-gold:
    0 0 0 1px rgba(212,175,55,0.08),
    0 4px 20px -2px rgba(212,175,55,0.22),
    0 12px 40px -8px rgba(212,175,55,0.12);
  --glow-green:
    0 0 0 1px rgba(61,214,140,0.08),
    0 4px 20px -2px rgba(61,214,140,0.22),
    0 12px 40px -8px rgba(61,214,140,0.12);
  --shadow-card:
    0 1px 3px rgba(0,0,0,0.4),
    0 0 0 1px var(--border);
  --shadow-card-hover:
    0 8px 32px -8px rgba(0,0,0,0.6),
    0 0 0 1px var(--border-active);
  --shadow-modal:
    0 24px 80px -16px rgba(0,0,0,0.8),
    0 0 0 1px var(--border);

  /* Layout */
  --sidebar-w: 220px;
  --topbar-h: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.2s var(--ease);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Thin scrollbars */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ============================================================
   AMBIENT ANIMATED BACKGROUND — floating gradient orbs
   ============================================================ */

.ambient-bg {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform, opacity;
}

.ambient-orb--coral {
  width: 600px;
  height: 600px;
  top: -5%;
  right: 5%;
  background: radial-gradient(circle, rgba(254,114,92,0.28) 0%, rgba(254,114,92,0.1) 40%, transparent 70%);
  animation: orbFloat1 18s ease-in-out infinite, orbPulse 8s ease-in-out infinite;
}

.ambient-orb--gold {
  width: 500px;
  height: 500px;
  bottom: 0%;
  left: 10%;
  background: radial-gradient(circle, rgba(212,175,55,0.2) 0%, rgba(212,175,55,0.07) 40%, transparent 70%);
  animation: orbFloat2 22s ease-in-out infinite, orbPulse 10s ease-in-out infinite 3s;
}

.ambient-orb--blue {
  width: 450px;
  height: 450px;
  top: 35%;
  right: 25%;
  background: radial-gradient(circle, rgba(91,156,245,0.15) 0%, rgba(91,156,245,0.05) 40%, transparent 70%);
  animation: orbFloat3 25s ease-in-out infinite, orbPulse 12s ease-in-out infinite 6s;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, 60px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(30px, -40px) scale(1.02); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-50px, -30px) scale(1.08); }
  50% { transform: translate(30px, -50px) scale(0.92); }
  75% { transform: translate(-20px, 40px) scale(1.04); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.06); }
  66% { transform: translate(-40px, -30px) scale(0.96); }
}

@keyframes orbPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ambient-orb { animation: none; }
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 800px 500px at 50% 40%, rgba(254,114,92,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 60% 60%, rgba(212,175,55,0.04) 0%, transparent 70%),
    var(--bg-root);
}

.login-card {
  width: 100%;
  max-width: 360px;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 32px 80px -24px rgba(0,0,0,0.5);
  position: relative;
}

/* Top highlight edge */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,114,92,0.4), rgba(212,175,55,0.3), transparent);
  border-radius: 1px;
}

.login-logo {
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  margin-bottom: 0.15rem;
}

.login-subtitle {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

.login-form { display: flex; flex-direction: column; gap: 0.625rem; }

.login-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-form input:focus {
  border-color: rgba(254,114,92,0.45);
  box-shadow: 0 0 0 3px rgba(254,114,92,0.1);
}

.login-form input::placeholder { color: var(--text-tertiary); }

.login-error {
  color: var(--red);
  font-size: 0.78rem;
  min-height: 1.2em;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  padding: 0.65rem 1.5rem;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: #ff8570;
  box-shadow: 0 4px 20px -4px rgba(254,114,92,0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-active); }

.btn-danger {
  padding: 0.5rem 1rem;
  background: rgba(239,68,68,0.06);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); }

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--bg-hover); color: var(--coral); border-color: rgba(254,114,92,0.2); }

/* ============================================================
   APP SHELL
   ============================================================ */

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar — subtle gradient depth */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg-surface) 0%, #101014 100%);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
}

.sidebar-logo {
  padding: 1.25rem 1.125rem;
  border-bottom: 1px solid var(--border);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.sidebar-nav {
  flex: 1;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }

.nav-item.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px var(--border-active), inset 0 1px 0 rgba(255,255,255,0.04);
}

.nav-item svg { flex-shrink: 0; opacity: 0.45; }
.nav-item:hover svg { opacity: 0.75; }
.nav-item.active svg { opacity: 1; color: var(--coral); }

.sidebar-footer {
  padding: 0.625rem;
  border-top: 1px solid var(--border);
}

/* Main */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: transparent;
  position: relative;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: rgba(20,20,24,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.topbar-user {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Content */
.content {
  padding: 1.5rem 1.75rem 3rem;
  max-width: 1200px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   VIEWS
   ============================================================ */

.view { display: none; }
.view.active { display: block; }

/* ============================================================
   CARDS — glass with top highlight
   ============================================================ */

.card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  box-shadow: var(--shadow-card);
  position: relative;
  border: none;
}

/* Subtle top-edge highlight for depth */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  border-radius: 1px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   STATS ROW — colored ambient glow
   ============================================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

/* Colored gradient top edge per card */
.stat-card:nth-child(1)::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--coral), transparent 80%); }
.stat-card:nth-child(2)::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--blue), transparent 80%); }
.stat-card:nth-child(3)::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent 80%); }
.stat-card:nth-child(4)::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--green), transparent 80%); }

/* Inner glow */
.stat-card:nth-child(1)::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%; background: radial-gradient(ellipse at top left, rgba(254,114,92,0.06) 0%, transparent 70%); pointer-events: none; }
.stat-card:nth-child(2)::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%; background: radial-gradient(ellipse at top left, rgba(91,156,245,0.06) 0%, transparent 70%); pointer-events: none; }
.stat-card:nth-child(3)::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%; background: radial-gradient(ellipse at top left, rgba(212,175,55,0.06) 0%, transparent 70%); pointer-events: none; }
.stat-card:nth-child(4)::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 60%; background: radial-gradient(ellipse at top left, rgba(61,214,140,0.06) 0%, transparent 70%); pointer-events: none; }

.stat-card:nth-child(1) { box-shadow: var(--glow-coral); }
.stat-card:nth-child(2) { box-shadow: var(--glow-blue); }
.stat-card:nth-child(3) { box-shadow: var(--glow-gold); }
.stat-card:nth-child(4) { box-shadow: var(--glow-green); }

.stat-card:hover { transform: translateY(-2px); }
.stat-card:nth-child(1):hover { box-shadow: 0 0 0 1px rgba(254,114,92,0.12), 0 8px 36px -4px rgba(254,114,92,0.3), 0 16px 48px -12px rgba(254,114,92,0.15); }
.stat-card:nth-child(2):hover { box-shadow: 0 0 0 1px rgba(91,156,245,0.12), 0 8px 36px -4px rgba(91,156,245,0.3), 0 16px 48px -12px rgba(91,156,245,0.15); }
.stat-card:nth-child(3):hover { box-shadow: 0 0 0 1px rgba(212,175,55,0.12), 0 8px 36px -4px rgba(212,175,55,0.3), 0 16px 48px -12px rgba(212,175,55,0.15); }
.stat-card:nth-child(4):hover { box-shadow: 0 0 0 1px rgba(61,214,140,0.12), 0 8px 36px -4px rgba(61,214,140,0.3), 0 16px 48px -12px rgba(61,214,140,0.15); }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
}

.stat-card:nth-child(1) .stat-value { color: var(--coral); }
.stat-card:nth-child(2) .stat-value { color: var(--blue); }
.stat-card:nth-child(3) .stat-value { color: var(--gold); }
.stat-card:nth-child(4) .stat-value { color: var(--green); }

.stat-label {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   TODAY CARD — warm gradient, prominent
   ============================================================ */

.today-card {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.today-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--gold) 50%, transparent);
}

.today-card .card-title { color: var(--text-primary); font-size: 0.82rem; }

.today-theme {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  background: rgba(254,114,92,0.1);
  color: var(--coral);
  border: 1px solid rgba(254,114,92,0.15);
}

.today-time {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.today-tasks { display: flex; flex-direction: column; gap: 0.3rem; max-height: 320px; overflow-y: auto; }

.today-task {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.84rem;
}

.today-task-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.empty-state {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding: 0.5rem 0;
}

/* ============================================================
   GRID
   ============================================================ */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mini-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }

.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.mini-item:last-child { border-bottom: none; }

.mini-item-date {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   KANBAN
   ============================================================ */

.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  min-height: calc(100vh - var(--topbar-h) - 5rem);
}

.kanban-col {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition);
}

.kanban-col:hover { border-color: var(--border); }

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.25rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.kanban-count {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-overlay);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 60px;
}

.kanban-cards.drag-over {
  background: rgba(91,156,245,0.04);
  border-radius: var(--radius-sm);
  outline: 1px dashed rgba(91,156,245,0.25);
  outline-offset: -1px;
}

.kanban-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  cursor: grab;
  transition: all var(--transition);
}

.kanban-card:hover {
  border-color: var(--border-active);
  background: var(--bg-hover);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.3; }

.kanban-card-bar {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 0.45rem;
}

.kanban-card-title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.kanban-add {
  margin-top: 0.5rem;
  padding: 0.45rem;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.kanban-add:hover {
  border-color: rgba(254,114,92,0.3);
  color: var(--coral);
  background: rgba(254,114,92,0.04);
}

/* ============================================================
   WOCHENPLAN
   ============================================================ */

.week-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.week-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.week-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-active); }

.week-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
}

.week-day {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.week-day:hover { border-color: var(--border); box-shadow: 0 4px 16px -8px rgba(0,0,0,0.3); }

.week-day-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.week-day-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.week-day-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.week-day-theme {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: auto;
  opacity: 0.65;
}

.week-day-tasks { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }

.week-task {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

.week-task-check {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--text-tertiary);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.week-task-check:hover { border-color: var(--green); background: rgba(61,214,140,0.06); }

.week-task-check.checked {
  background: var(--green);
  border-color: var(--green);
}

.week-task-check.checked::after {
  content: '';
  width: 4px;
  height: 7px;
  border: 1.5px solid var(--bg-root);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  margin-top: -1px;
}

.week-task-text { flex: 1; color: var(--text-primary); }
.week-task.done .week-task-text { text-decoration: line-through; color: var(--text-tertiary); }

.week-task-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0.25rem;
  transition: all var(--transition);
}

.week-task:hover .week-task-delete { opacity: 1; }
.week-task-delete:hover { color: var(--red); }

.week-add {
  margin-top: auto;
  padding: 0.4rem;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition);
}

.week-add:hover { border-color: rgba(254,114,92,0.3); color: var(--coral); }

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--coral-dim), var(--border-active), var(--border-subtle));
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-root);
  cursor: pointer;
  transition: all var(--transition);
}

.timeline-dot.done { background: var(--green); box-shadow: 0 0 10px rgba(61,214,140,0.35); }
.timeline-dot.active { background: var(--coral); box-shadow: 0 0 10px rgba(254,114,92,0.35); animation: pulse 2.5s ease-in-out infinite; }
.timeline-dot.upcoming { background: var(--text-tertiary); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(254,114,92,0.35); }
  50% { box-shadow: 0 0 20px rgba(254,114,92,0.55); }
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.timeline-date {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.timeline-actions {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.625rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.timeline-item:hover .timeline-actions { opacity: 1; }

.timeline-action-btn {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  transition: color var(--transition);
}

.timeline-action-btn:hover { color: var(--coral); }

/* ============================================================
   DATA TABLE
   ============================================================ */

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.6rem 0.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.data-table .text-right { text-align: right; }

/* Clickable cost rows */
.cost-row { transition: background var(--transition); }
.cost-row:hover { background: var(--bg-hover); }

.total-row td {
  border-top: 1px solid var(--border-active);
  border-bottom: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding-top: 0.75rem;
  color: var(--text-primary);
}

.badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.175rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-coral { background: rgba(254,114,92,0.12); color: var(--coral); }
.badge-gold { background: rgba(212,175,55,0.12); color: var(--gold); }
.badge-green { background: rgba(61,214,140,0.12); color: var(--green); }
.badge-blue { background: rgba(91,156,245,0.12); color: var(--blue); }
.badge-purple { background: rgba(167,139,250,0.12); color: var(--purple); }
.badge-gray { background: rgba(255,255,255,0.06); color: var(--text-tertiary); }

.badge-Tools { background: rgba(167,139,250,0.12); color: var(--purple); }
.badge-Buchhaltung { background: rgba(212,175,55,0.12); color: var(--gold); }
.badge-Hosting { background: rgba(91,156,245,0.12); color: var(--blue); }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border);
  position: relative;
}

/* Top highlight */
.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-tertiary);
}

.form-group {
  margin-bottom: 0.875rem;
}

.form-group label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg-root);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(254,114,92,0.4);
  box-shadow: 0 0 0 3px rgba(254,114,92,0.08);
}

.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg-surface); color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.125rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.theme-toggle:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-active); }

/* Dark mode: show sun, hide moon */
.theme-icon--moon { display: none; }
.theme-icon--sun { display: block; }

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-icon--moon { display: block; }
[data-theme="light"] .theme-icon--sun { display: none; }

/* ============================================================
   LIGHT THEME
   ============================================================ */

[data-theme="light"] {
  /* Brand — slightly deeper for light bg */
  --coral: #e8624e;
  --coral-dim: #c4553f;
  --gold: #b8962e;
  --gold-dim: #96791e;
  --green: #2bae6e;
  --green-dim: #228f5a;
  --blue: #4580d4;
  --blue-dim: #3668b0;
  --purple: #7c5fcf;
  --red: #dc3545;

  /* Tinted backgrounds */
  --coral-bg: rgba(232,98,78,0.1);
  --blue-bg: rgba(69,128,212,0.1);
  --gold-bg: rgba(184,150,46,0.1);
  --green-bg: rgba(43,174,110,0.1);

  /* Surfaces */
  --bg-root: #eeeef2;
  --bg-surface: #ffffff;
  --bg-elevated: #f6f6f9;
  --bg-overlay: #eeeef2;
  --bg-hover: #e8e8ec;
  --bg-accent: #f0f0f5;

  /* Borders */
  --border: rgba(0,0,0,0.08);
  --border-subtle: rgba(0,0,0,0.04);
  --border-active: rgba(0,0,0,0.14);

  /* Text */
  --text-primary: #1a1a1f;
  --text-secondary: #6b6d7a;
  --text-tertiary: #9496a1;
  --text-inverse: #f0f0f4;

  /* Shadows — softer for light theme */
  --glow-coral:
    0 0 0 1px rgba(232,98,78,0.1),
    0 4px 20px -2px rgba(232,98,78,0.14),
    0 12px 40px -8px rgba(232,98,78,0.08);
  --glow-blue:
    0 0 0 1px rgba(69,128,212,0.1),
    0 4px 20px -2px rgba(69,128,212,0.14),
    0 12px 40px -8px rgba(69,128,212,0.08);
  --glow-gold:
    0 0 0 1px rgba(184,150,46,0.1),
    0 4px 20px -2px rgba(184,150,46,0.14),
    0 12px 40px -8px rgba(184,150,46,0.08);
  --glow-green:
    0 0 0 1px rgba(43,174,110,0.1),
    0 4px 20px -2px rgba(43,174,110,0.14),
    0 12px 40px -8px rgba(43,174,110,0.08);
  --shadow-card:
    0 1px 3px rgba(0,0,0,0.06),
    0 0 0 1px var(--border);
  --shadow-card-hover:
    0 8px 32px -8px rgba(0,0,0,0.12),
    0 0 0 1px var(--border-active);
  --shadow-modal:
    0 24px 80px -16px rgba(0,0,0,0.18),
    0 0 0 1px var(--border);
}

/* Light theme overrides for specific elements */
[data-theme="light"] body { background: var(--bg-root); }

[data-theme="light"] .login-screen {
  background:
    radial-gradient(ellipse 800px 500px at 50% 40%, rgba(232,98,78,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 60% 60%, rgba(184,150,46,0.04) 0%, transparent 70%),
    var(--bg-root);
}

[data-theme="light"] .login-card { background: var(--bg-surface); }
[data-theme="light"] .login-form input { background: var(--bg-elevated); }

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

[data-theme="light"] .topbar {
  background: rgba(255,255,255,0.85);
}

[data-theme="light"] .nav-item.active svg { color: var(--coral); }

/* Light mode stat card pseudo-elements */
[data-theme="light"] .stat-card:nth-child(1)::after { background: radial-gradient(ellipse at top left, rgba(232,98,78,0.05) 0%, transparent 70%); }
[data-theme="light"] .stat-card:nth-child(2)::after { background: radial-gradient(ellipse at top left, rgba(69,128,212,0.05) 0%, transparent 70%); }
[data-theme="light"] .stat-card:nth-child(3)::after { background: radial-gradient(ellipse at top left, rgba(184,150,46,0.05) 0%, transparent 70%); }
[data-theme="light"] .stat-card:nth-child(4)::after { background: radial-gradient(ellipse at top left, rgba(43,174,110,0.05) 0%, transparent 70%); }

/* Light orbs — warmer, subtler */
[data-theme="light"] .ambient-orb--coral {
  background: radial-gradient(circle, rgba(232,98,78,0.12) 0%, rgba(232,98,78,0.04) 40%, transparent 70%);
}
[data-theme="light"] .ambient-orb--gold {
  background: radial-gradient(circle, rgba(184,150,46,0.1) 0%, rgba(184,150,46,0.03) 40%, transparent 70%);
}
[data-theme="light"] .ambient-orb--blue {
  background: radial-gradient(circle, rgba(69,128,212,0.08) 0%, rgba(69,128,212,0.02) 40%, transparent 70%);
}

/* Grain — less visible on light */
[data-theme="light"] body::after { opacity: 0.012; }

/* Checkmark needs dark stroke on light bg */
[data-theme="light"] .week-task-check.checked::after {
  border-color: #fff;
}

/* Timeline dot borders match light bg */
[data-theme="light"] .timeline-dot { border-color: var(--bg-root); }

/* Card highlights invisible on white */
[data-theme="light"] .card::before { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent); }
[data-theme="light"] .modal-card::before { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent); }
[data-theme="light"] .login-card::before { background: linear-gradient(90deg, transparent, rgba(232,98,78,0.2), rgba(184,150,46,0.15), transparent); }

/* Today card gradient for light */
[data-theme="light"] .today-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(3, 1fr); }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .ambient-bg { left: 0; }
  .kanban { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
}
