@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Exo+2:wght@600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #d97706;
  --primary-dark:  #b45309;
  --primary-light: #f59e0b;
  --primary-glow:  rgba(217,119,6,0.16);

  --bg:            #0f0f0f;
  --surface:       #1a1a1a;
  --surface2:      #141414;
  --surface3:      #222222;
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  --text:          #f0f0f0;
  --text-muted:    #909090;
  --text-faint:    #959595;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow:        0 4px 16px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg:     0 20px 48px rgba(0,0,0,0.65), 0 8px 20px rgba(0,0,0,0.4);
  --shadow-glow:   0 4px 24px rgba(217,119,6,0.13);

  --radius:        10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --navbar-bg:     rgba(8,8,8,0.88);

  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #3b82f6;
}

/* ─── Light Mode ─────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:            #f0f2f5;
  --surface:       #ffffff;
  --surface2:      #f7f8fa;
  --surface3:      #eceef1;
  --border:        rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);
  --text:          #111111;
  --text-muted:    #5a5a6a;
  --text-faint:    #aaaaaa;
  --navbar-bg:     rgba(255,255,255,0.92);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.08);
  --shadow:        0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.07);
  --shadow-lg:     0 20px 48px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.09);
}
[data-theme="light"] body::after { opacity: 0.02; }
[data-theme="light"] .card, [data-theme="light"] .karte { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .form-input { background: #fff; border-color: rgba(0,0,0,0.15); color: var(--text); }
[data-theme="light"] .form-input::placeholder { color: #bbb; }
[data-theme="light"] .form-select { background-color: #fff; }
[data-theme="light"] .navbar { box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.06); }
[data-theme="light"] .nav-link { color: rgba(0,0,0,0.55); }
[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.9); }
[data-theme="light"] .navbar-brand { color: #111 !important; }
[data-theme="light"] .brand-sub { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #777; }
[data-theme="light"] .tabs { background: var(--surface); }
[data-theme="light"] .tab { color: var(--text-muted); }
[data-theme="light"] .tab:hover { background: var(--surface2); }
[data-theme="light"] .projekt-card { background: var(--surface); }
[data-theme="light"] .login-form-side { background: var(--bg); }
[data-theme="light"] .bg-b1 { background: rgba(217,119,6,0.06); }
[data-theme="light"] .bg-b2 { background: rgba(124,58,237,0.04); }
[data-theme="light"] .bg-b3 { background: rgba(217,119,6,0.03); }

/* ─── Background Blobs ───────────────────────────────────────────────────── */
@keyframes bgFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  25%      { transform: translate(28px,-38px) scale(1.04); }
  50%      { transform: translate(14px,22px) scale(0.97); }
  75%      { transform: translate(-22px,-16px) scale(1.02); }
}
#bg-blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-b { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.bg-b1 { width: 680px; height: 680px; background: rgba(217,119,6,0.07); top: -220px; left: -160px; animation: bgFloat 24s ease-in-out infinite; }
.bg-b2 { width: 540px; height: 540px; background: rgba(124,58,237,0.05); top: 28%; right: -180px; animation: bgFloat 32s ease-in-out infinite reverse; }
.bg-b3 { width: 420px; height: 420px; background: rgba(217,119,6,0.04); bottom: -100px; left: 32%; animation: bgFloat 20s ease-in-out infinite 8s; }

/* Grain-Textur */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.055;
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Exo 2', 'Inter', sans-serif;
  letter-spacing: -0.3px;
  color: var(--text);
}
p { color: var(--text-muted); }
strong { color: var(--text); font-weight: 600; }
.text-muted { color: var(--text-muted) !important; }
hr { border-color: var(--border); }

/* ─── Ladebalken ────────────────────────────────────────────────────────── */
#ladebalken {
  position: fixed; top: 0; left: 0; width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
  background-size: 200% 100%;
  animation: lade-anim 1.4s ease infinite;
  z-index: 9999; transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(217,119,6,0.5);
}
@keyframes lade-anim { 0% { background-position: 0%; } 100% { background-position: 200%; } }

/* ─── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.4);
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: 'Exo 2', sans-serif;
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.6px; color: white;
}
.brand-icon { font-size: 20px; }
.brand-name { color: white; }
.brand-name span { color: var(--primary); }
.brand-sub {
  font-size: 11px; font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--border);
}
.navbar-right { display: flex; align-items: center; gap: 4px; }
.nav-link {
  border: 1px solid transparent;
  color: rgba(255,255,255,0.55);
  border-radius: 7px; font-size: 13px; padding: 5px 10px;
  transition: all 0.18s ease;
  background: transparent;
  text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-link:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}
.nav-link-muted { color: rgba(255,255,255,0.35); }

/* ─── Main ──────────────────────────────────────────────────────────────── */
.main-content { max-width: 980px; margin: 0 auto; padding: 32px 20px 80px; }

/* ─── Flash ─────────────────────────────────────────────────────────────── */
.flash-container { margin-bottom: 20px; }
.flash {
  padding: 11px 16px; border-radius: var(--radius);
  margin-bottom: 8px; font-size: 13.5px; font-weight: 500;
  border: 1px solid;
}
.flash-success { background: rgba(217,119,6,0.12); color: #f59e0b; border-color: rgba(217,119,6,0.25); }
.flash-error   { background: rgba(239,68,68,0.12);  color: #f87171;  border-color: rgba(239,68,68,0.25);  }
.flash-info    { background: rgba(59,130,246,0.12); color: #60a5fa;  border-color: rgba(59,130,246,0.25); }

/* ─── Card / Karte ───────────────────────────────────────────────────────── */
.card, .karte {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.card::after, .karte::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}
.card-title { font-size: 19px; font-weight: 700; margin-bottom: 20px; color: var(--text); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  text-decoration: none; transition: all 0.18s;
  gap: 6px; white-space: nowrap;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.1px;
}
.btn-primary {
  background: var(--primary); color: #0a0a0a;
  box-shadow: 0 2px 8px rgba(217,119,6,0.3), 0 0 0 0 rgba(217,119,6,0);
}
.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 16px rgba(217,119,6,0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-success { background: var(--primary); color: #0a0a0a; box-shadow: 0 2px 8px rgba(217,119,6,0.25); }
.btn-success:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.4); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 6px; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; color: var(--text);
  background: var(--surface2);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: 'Inter', sans-serif;
}
.form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.12);
}
.form-input::placeholder { color: var(--text-faint); }
.form-textarea { min-height: 88px; resize: vertical; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23737373' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px; cursor: pointer;
  background-color: var(--surface2);
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ─── Page layouts ───────────────────────────────────────────────────────── */
.page-narrow { max-width: 480px; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }

/* ─── Startseite Split-Screen ────────────────────────────────────────────── */
.login-split {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px);
  margin: -32px -20px -80px;
}
.login-brand-side {
  background: linear-gradient(150deg, #78350f 0%, #92400e 40%, #b45309 80%, var(--primary) 100%);
  padding: 60px 48px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-brand-side::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.login-brand-side::after {
  content: ''; position: absolute; bottom: -120px; left: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.login-brand-inner { position: relative; z-index: 1; max-width: 380px; }
.login-brand-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.12);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 28px;
}
.login-brand-title {
  font-size: 38px; font-weight: 800; color: white;
  letter-spacing: -1px; line-height: 1.15; margin-bottom: 16px;
  font-family: 'Exo 2', sans-serif;
}
.login-brand-sub { font-size: 16px; color: rgba(255,255,255,0.78); line-height: 1.6; margin-bottom: 40px; }
.login-brand-features { display: flex; flex-direction: column; gap: 14px; }
.login-brand-feature {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.88); font-size: 14.5px; font-weight: 500;
}
.login-brand-feature-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.login-form-side {
  background: var(--bg); padding: 60px 48px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-form-inner { max-width: 360px; width: 100%; }
.login-form-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 6px; color: var(--text);
  font-family: 'Exo 2', sans-serif;
}
.login-form-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-faint); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: 20px; line-height: 1.6; text-align: center; }

/* ─── Hero (für Magic-Link-Seite etc.) ─────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #78350f 0%, #b45309 60%, var(--primary) 100%);
  color: white; border-radius: var(--radius-lg);
  padding: 44px 32px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero-inner { max-width: 500px; position: relative; z-index: 1; }
.hero-badge {
  font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.15);
  display: inline-block; padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}
.hero-title { font-size: 32px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.7px; font-family: 'Exo 2', sans-serif; }
.hero-subtitle { font-size: 15px; opacity: 0.88; margin-bottom: 22px; }
.hero-features { display: grid; gap: 8px; }
.hero-feature { font-size: 14px; opacity: 0.88; font-weight: 500; }

/* ─── Auth (Fallback) ────────────────────────────────────────────────────── */
.auth-section { max-width: 400px; margin: 0 auto; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 18px 0; }
.auth-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }
.success-icon { font-size: 52px; margin-bottom: 18px; }
.email-highlight {
  font-size: 15px; font-weight: 700; color: var(--primary);
  background: rgba(217,119,6,0.12);
  padding: 8px 16px; border-radius: var(--radius);
  display: inline-block; margin: 6px 0;
  border: 1px solid rgba(217,119,6,0.2);
}
.hint-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: 13px; color: var(--text-muted); margin-top: 20px;
}
.text-center { text-align: center; }

/* ─── Projekt-Grid ───────────────────────────────────────────────────────── */
.projekt-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.projekt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  text-decoration: none; color: var(--text); display: block;
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.projekt-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}
.projekt-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow), 0 0 0 1px rgba(217,119,6,0.2), var(--shadow-glow);
  transform: translateY(-3px);
}
.projekt-card-header { margin-bottom: 10px; }
.projekt-card-title { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.projekt-card-adresse { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.projekt-card-meta {
  display: flex; font-size: 11.5px; color: var(--text-muted);
  margin-bottom: 10px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.projekt-card-meta span {
  flex: 1; text-align: center; padding: 6px 4px;
  border-right: 1px solid var(--border); font-weight: 500;
}
.projekt-card-meta span:last-child { border-right: none; }
.projekt-card-datum { font-size: 12px; color: var(--text-faint); }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.projekt-status {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.status-aktiv { background: rgba(217,119,6,0.15); color: var(--primary); border: 1px solid rgba(217,119,6,0.25); }
.status-abgeschlossen { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
}
.badge-success  { background: rgba(217,119,6,0.15);  color: #f59e0b; border: 1px solid rgba(217,119,6,0.25); }
.badge-warning  { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-danger   { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-info     { background: rgba(59,130,246,0.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.badge-secondary{ background: rgba(255,255,255,0.07); color: var(--text-muted); border: 1px solid var(--border); }
.badge-rolle-handwerker { background: rgba(217,119,6,0.15); color: var(--primary); border: 1px solid rgba(217,119,6,0.25); }
.badge-rolle-partner    { background: rgba(124,58,237,0.15);  color: #a78bfa; border: 1px solid rgba(124,58,237,0.25); }
.badge-rolle-kunde      { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }

/* ─── Projekt-Detail ─────────────────────────────────────────────────────── */
.projekt-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 28px; padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.back-link {
  font-size: 13px; color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 8px; font-weight: 500; transition: color 0.15s;
}
.back-link:hover { color: var(--primary); }
.projekt-titel { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; color: var(--text); font-family: 'Exo 2', sans-serif; }
.projekt-adresse { font-size: 14px; color: var(--text-muted); margin-top: 5px; }
.projekt-beschreibung { font-size: 14px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }
.projekt-header-right { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px; margin-bottom: 24px;
  background: var(--surface); padding: 4px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  overflow-x: auto; box-shadow: var(--shadow-sm);
}
.tab {
  padding: 7px 16px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  white-space: nowrap; transition: all 0.15s;
  border: 1px solid transparent;
}
.tab:hover { background: var(--surface2); color: var(--text); }
.tab.active {
  background: rgba(217,119,6,0.15);
  color: var(--primary);
  border-color: rgba(217,119,6,0.25);
  box-shadow: 0 1px 4px rgba(217,119,6,0.15);
}
.tab-badge { border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.tab.active .tab-badge { background: rgba(217,119,6,0.2); }
.tab:not(.active) .tab-badge { background: rgba(255,255,255,0.07); color: var(--text-muted); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Feed ───────────────────────────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; min-height: 80px; }
.feed-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 16px;
  max-width: 72%; box-shadow: var(--shadow-sm);
}
.feed-item-own {
  align-self: flex-end;
  background: rgba(217,119,6,0.08);
  border-color: rgba(217,119,6,0.2);
}
.feed-meta { display: flex; gap: 8px; margin-bottom: 5px; align-items: center; }
.feed-meta strong { font-size: 13px; font-weight: 600; color: var(--text); }
.feed-datum { font-size: 11px; color: var(--text-faint); }
.feed-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.feed-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 4px; }
.feed-input { flex: 1; }
.empty-state-small { color: var(--text-muted); font-size: 14px; padding: 32px 0; text-align: center; }
.empty-state-small a { color: var(--primary); font-weight: 500; }

/* ─── Termine ────────────────────────────────────────────────────────────── */
.section-action { margin-bottom: 16px; }
.termin-liste { display: flex; flex-direction: column; gap: 10px; }
.termin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.termin-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.termin-bestaetigt  { border-left: 3px solid var(--primary); }
.termin-vorgeschlagen{ border-left: 3px solid var(--warning); }
.termin-abgesagt    { border-left: 3px solid var(--text-faint); opacity: 0.55; }
.termin-verschoben  { border-left: 3px solid var(--info); }
.termin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 7px; }
.termin-titel { font-weight: 700; font-size: 15px; color: var(--text); }
.termin-gewerk {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface2); padding: 2px 8px;
  border-radius: 20px; margin-left: 8px;
  border: 1px solid var(--border);
}
.termin-datum { font-size: 13.5px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.termin-notiz {
  font-size: 13px; color: var(--text-muted);
  background: var(--surface2); padding: 8px 12px;
  border-radius: var(--radius); margin: 8px 0;
  border: 1px solid var(--border);
}
.termin-by { font-size: 12px; color: var(--text-faint); }
.termin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.termin-info-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 24px; font-size: 14px; color: var(--text);
}

/* ─── Upload Zone ────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface2);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(217,119,6,0.06);
  box-shadow: 0 0 0 4px rgba(217,119,6,0.08);
}
.upload-zone.hat-dateien { border-style: solid; border-color: var(--primary); }
.upload-zone-inner { pointer-events: none; }
.upload-zone-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.7; }
.upload-zone-text { font-size: 14.5px; color: var(--text-muted); margin-bottom: 6px; }
.upload-zone-link { color: var(--primary); font-weight: 600; }
.upload-zone-hint { font-size: 12px; color: var(--text-faint); }
.upload-preview {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 16px;
}
.upload-preview-item {
  position: relative;
  width: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.upload-preview-img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}
.upload-preview-icon {
  width: 72px; height: 72px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.upload-preview-name {
  font-size: 10px; color: var(--text-muted);
  text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; width: 72px;
}
.upload-preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: white;
  border: none; cursor: pointer;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.upload-buttons {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.upload-oder { font-size: 12px; color: var(--text-faint); }
.upload-optionen {
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 20px; animation: fadeIn 0.2s;
}
.upload-optionen-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.upload-optionen-row .form-group { flex: 1; min-width: 140px; margin-bottom: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Dokumente ──────────────────────────────────────────────────────────── */
.upload-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.upload-submit { flex-shrink: 0; }
.dokument-liste { display: flex; flex-direction: column; gap: 8px; }
.dokument-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.dokument-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dokument-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.dokument-icon { font-size: 26px; flex-shrink: 0; }
.dokument-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.dokument-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.dokument-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tag {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px;
  background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border);
}
.tag-plan         { background: rgba(59,130,246,0.12);  color: #60a5fa; border-color: rgba(59,130,246,0.25); }
.tag-rechnung     { background: rgba(245,158,11,0.12);  color: #fbbf24; border-color: rgba(245,158,11,0.25); }
.tag-gewaehrleistung { background: rgba(124,58,237,0.12); color: #a78bfa; border-color: rgba(124,58,237,0.25); }

/* ─── Beteiligte ─────────────────────────────────────────────────────────── */
.beteiligte-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.beteiligter-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.beteiligter-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #0a0a0a; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(217,119,6,0.3);
}
.beteiligter-info { flex: 1; min-width: 0; }
.beteiligter-name { font-weight: 700; font-size: 14.5px; color: var(--text); }
.beteiligter-meta { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.einladen-form {
  background: rgba(217,119,6,0.06);
  border: 1px solid rgba(217,119,6,0.2);
  border-radius: var(--radius-lg); padding: 22px;
}
.einladen-form h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.einladen-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.einladen-submit { flex-shrink: 0; }

/* ─── Empty State ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 72px 20px; }
.empty-icon { font-size: 52px; margin-bottom: 18px; opacity: 0.5; }
.empty-state h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; max-width: 340px; margin-left: auto; margin-right: auto; }

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .login-split { grid-template-columns: 1fr; min-height: auto; margin: -32px -20px 0; }
  .login-brand-side { padding: 40px 24px; }
  .login-brand-title { font-size: 28px; }
  .login-form-side { padding: 36px 24px; }
  .login-form-inner { max-width: 100%; }
}
@media (max-width: 640px) {
  .navbar { padding: 0 16px; }
  .main-content { padding: 20px 14px 60px; }
  .projekt-header { flex-direction: column; }
  .projekt-header-right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .form-row { grid-template-columns: 1fr; }
  .upload-row, .einladen-row { flex-direction: column; }
  .upload-row .form-group, .einladen-row .form-group { flex: unset !important; width: 100%; }
  .dokument-item { flex-direction: column; align-items: flex-start; }
  .tabs { gap: 2px; }
  .tab { padding: 7px 10px; font-size: 13px; }
  .feed-item { max-width: 92%; }
  .card, .karte { padding: 20px; }
  .hero { padding: 32px 20px; }
  .hero-title { font-size: 26px; }
}

/* ─── Dropdowns ──────────────────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px; z-index: 500;
  overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.22,1,0.36,1);
}
.dropdown-menu.offen {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: all;
}
.dropdown-left .dropdown-menu { left: auto; right: 0; }
.dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  background: none; border: none; width: 100%;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.12s;
}
.dropdown-item:hover { background: var(--surface2); color: var(--text); }
.dropdown-item-success { color: var(--primary); }
.dropdown-item-success:hover { background: rgba(217,119,6,0.1); color: var(--primary-light); }
.dropdown-item-danger { color: #f87171; }
.dropdown-item-danger:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Navbar User Dropdown ───────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px;
  color: rgba(255,255,255,0.7); cursor: pointer;
  transition: all 0.18s; font-family: 'Inter', sans-serif;
}
.nav-dropdown-btn:hover { background: rgba(255,255,255,0.1); color: white; }
[data-theme="light"] .nav-dropdown-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.6); }
[data-theme="light"] .nav-dropdown-btn:hover { background: rgba(0,0,0,0.09); color: #111; }
.nav-user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #0a0a0a; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px; z-index: 500; overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.22,1,0.36,1);
}
.nav-dropdown-menu.offen { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.nav-dropdown-header { padding: 14px 16px; }
.nav-dropdown-name { font-size: 14px; font-weight: 700; color: var(--text); }
.nav-dropdown-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.nav-dropdown-divider { height: 1px; background: var(--border); }

/* ─── Toast Benachrichtigungen ───────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9998; pointer-events: none;
}
.toast-nachricht {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius-lg);
  font-size: 13.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px) scale(0.97);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  pointer-events: all; max-width: 340px;
  color: var(--text);
}
.toast-nachricht.sichtbar { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { border-color: rgba(217,119,6,0.3); background: rgba(217,119,6,0.1); color: var(--primary-light); }
.toast-error   { border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.1);  color: #f87171; }
.toast-warning { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.1); color: #fbbf24; }
.toast-info    { border-color: rgba(59,130,246,0.3);  background: rgba(59,130,246,0.1); color: #60a5fa; }

/* ─── Tooltips ───────────────────────────────────────────────────────────── */
.tooltip-box {
  position: absolute; z-index: 9999;
  background: var(--surface3); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: 12px; font-weight: 500;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.18s;
  box-shadow: var(--shadow);
}
.tooltip-box.sichtbar { opacity: 1; }

/* ─── Dark-Mode Button ───────────────────────────────────────────────────── */
#darkmode-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: rgba(255,255,255,0.6);
  border-radius: 7px; padding: 6px 9px;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center;
  font-size: 14px;
}
#darkmode-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border-color: var(--border-strong);
}
[data-theme="light"] #darkmode-btn {
  background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.6);
}
[data-theme="light"] #darkmode-btn:hover { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.9); }

/* ─── Formular Fehlerstatus ──────────────────────────────────────────────── */
.feld-fehler { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important; }

