/* ============================================================
   Beier Bautagesbuch — App-Stylesheet
   1:1 uebernommen aus Beier_Bautagesbuch_App_v2.html (Prototyp)
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Dark Theme (Default) */
  --ink: #0b1622;
  --navy: #0f2236;
  --steel: #1a3a5c;
  --mid: #1e5799;
  --accent: #2e86de;
  --bright: #4fa3f7;
  --silver: #8faabf;
  --frost: #d4e4f4;
  --white: #fff;
  --grn: #27ae60;
  --grn-bg: rgba(39, 174, 96, .12);
  --red: #e74c3c;
  --red-bg: rgba(231, 76, 60, .12);
  --ylw: #f0b429;
  --ylw-bg: rgba(240, 180, 41, .12);
  --orange: #e07020;

  /* Surface-Overlays (helle Stellen auf dunklem Grund) */
  --overlay-04: rgba(255, 255, 255, 0.04);
  --overlay-06: rgba(255, 255, 255, 0.06);
  --overlay-07: rgba(255, 255, 255, 0.07);
  --overlay-08: rgba(255, 255, 255, 0.08);
  --overlay-10: rgba(255, 255, 255, 0.10);
  --overlay-12: rgba(255, 255, 255, 0.12);

  /* Text-Tinten */
  --text-50: rgba(255, 255, 255, 0.5);
  --text-60: rgba(255, 255, 255, 0.6);
  --text-65: rgba(255, 255, 255, 0.65);
  --text-70: rgba(255, 255, 255, 0.7);
  --text-75: rgba(255, 255, 255, 0.75);
  --text-80: rgba(255, 255, 255, 0.8);
  --text-85: rgba(255, 255, 255, 0.85);

  /* Schatten */
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ─────────────  LIGHT THEME  ───────────── */
[data-theme="light"] {
  --ink: #eef2f7;        /* Page-Hintergrund (hell) */
  --navy: #ffffff;       /* Card / Topbar / Sidebar */
  --steel: #d4e4f4;      /* hellblauer Akzent (Gradients) */
  --mid: #2e86de;        /* Akzent bleibt */
  --accent: #2e86de;
  --bright: #1e5799;
  --silver: #5a7a96;     /* sekundärer Text */
  --frost: #1a3a5c;      /* Label-Text (dunkel) */
  --white: #1a3a5c;      /* Haupt-Textfarbe (jetzt dunkel) */
  --grn-bg: rgba(39, 174, 96, .15);
  --red-bg: rgba(231, 76, 60, .15);
  --ylw-bg: rgba(240, 180, 41, .18);

  --overlay-04: rgba(15, 34, 54, 0.04);
  --overlay-06: rgba(15, 34, 54, 0.06);
  --overlay-07: rgba(15, 34, 54, 0.07);
  --overlay-08: rgba(15, 34, 54, 0.08);
  --overlay-10: rgba(15, 34, 54, 0.10);
  --overlay-12: rgba(15, 34, 54, 0.12);

  --text-50: rgba(15, 34, 54, 0.50);
  --text-60: rgba(15, 34, 54, 0.60);
  --text-65: rgba(15, 34, 54, 0.65);
  --text-70: rgba(15, 34, 54, 0.70);
  --text-75: rgba(15, 34, 54, 0.75);
  --text-80: rgba(15, 34, 54, 0.80);
  --text-85: rgba(15, 34, 54, 0.85);

  --shadow-card: 0 2px 6px rgba(20, 50, 90, 0.08), 0 1px 2px rgba(20, 50, 90, 0.05);
}

/* Light-Theme: spezifische Anpassungen fuer Stellen die hartcodiert auf weiss sind */
[data-theme="light"] body { background: #eef2f7; }
[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.96); border-bottom-color: rgba(15, 34, 54, 0.10); }
[data-theme="light"] .sidebar { background: #ffffff; border-right-color: rgba(15, 34, 54, 0.08); }
[data-theme="light"] .card { background: #ffffff; border-color: rgba(15, 34, 54, 0.10); box-shadow: var(--shadow-card); }
[data-theme="light"] .bs-card { background: #ffffff; border-color: rgba(15, 34, 54, 0.10); box-shadow: var(--shadow-card); }
[data-theme="light"] .tb-entry { background: #ffffff; border-color: rgba(15, 34, 54, 0.08); }
[data-theme="light"] .info-box, [data-theme="light"] .kontakt-card { background: #f4f7fb; border-color: rgba(15, 34, 54, 0.08); }
[data-theme="light"] .fc { background: #ffffff; border-color: rgba(15, 34, 54, 0.15); color: #1a3a5c; }
[data-theme="light"] .fc:focus { background: #ffffff; border-color: var(--accent); }
[data-theme="light"] .fc::placeholder { color: #94aabc; }
[data-theme="light"] select.fc option { background: #ffffff; color: #1a3a5c; }
[data-theme="light"] .btn-out { background: #f4f7fb; color: #1a3a5c; border-color: rgba(15, 34, 54, 0.15); }
[data-theme="light"] .btn-out:hover { background: #e8eef5; }
[data-theme="light"] .btn-ghost { background: #f4f7fb; color: #1a3a5c; border-color: rgba(15, 34, 54, 0.15); }
[data-theme="light"] .btn-ghost:hover { background: #e8eef5; }
[data-theme="light"] .bs-btn { background: #ffffff; border-color: rgba(15, 34, 54, 0.15); color: #5a7a96; }
[data-theme="light"] .bs-btn.on { background: rgba(46, 134, 222, 0.12); border-color: var(--accent); color: var(--bright); }
[data-theme="light"] .ang-chip { background: #ffffff; border-color: rgba(15, 34, 54, 0.15); color: #5a7a96; }
[data-theme="light"] .ang-chip.on { background: rgba(46, 134, 222, 0.12); }
[data-theme="light"] .chk-item { background: #ffffff; border-color: rgba(15, 34, 54, 0.15); }
[data-theme="light"] .chk-item:hover { border-color: var(--accent); }
[data-theme="light"] .chk-box { border-color: rgba(15, 34, 54, 0.30); }
[data-theme="light"] .chk-lbl { color: #1a3a5c; }
[data-theme="light"] .dok-row { background: #f4f7fb; border-color: rgba(15, 34, 54, 0.08); }
[data-theme="light"] .dok-row:hover { background: #e8eef5; }
[data-theme="light"] .tbl th { background: #f4f7fb; color: #5a7a96; border-bottom-color: rgba(15, 34, 54, 0.10); }
[data-theme="light"] .tbl td { color: #1a3a5c; border-bottom-color: rgba(15, 34, 54, 0.06); }
[data-theme="light"] .tbl tr:hover td { background: #f8fafc; }
[data-theme="light"] .sb-item { color: rgba(15, 34, 54, 0.65); }
[data-theme="light"] .sb-item:hover { background: rgba(15, 34, 54, 0.04); color: #1a3a5c; }
[data-theme="light"] .sb-item.on { background: rgba(46, 134, 222, 0.10); color: var(--bright); }
[data-theme="light"] .det-hdr { background: linear-gradient(135deg, #e8eef5, #d4e4f4); color: #1a3a5c; border-color: rgba(15, 34, 54, 0.10); }
[data-theme="light"] .det-hdr-title, [data-theme="light"] .det-hdr-sub { color: #1a3a5c; }
[data-theme="light"] .kw-hdr { background: linear-gradient(135deg, #d4e4f4, #b5cee9); color: #1a3a5c; border-color: rgba(15, 34, 54, 0.10); }
[data-theme="light"] .kw-hdr h3, [data-theme="light"] .kw-hdr p { color: #1a3a5c; }
[data-theme="light"] .monat-card { background: #ffffff; border-color: rgba(15, 34, 54, 0.10); box-shadow: var(--shadow-card); }
[data-theme="light"] .tag-card { background: #ffffff; border-color: rgba(15, 34, 54, 0.08); }
[data-theme="light"] .alert-info { background: rgba(46, 134, 222, 0.08); color: #1e5799; }
[data-theme="light"] .alert-warn { background: rgba(240, 180, 41, 0.12); color: #8a6e0e; }
[data-theme="light"] .alert-success { background: rgba(39, 174, 96, 0.12); color: #1e7a48; }
[data-theme="light"] .alert-danger { background: rgba(231, 76, 60, 0.12); color: #a23226; }
[data-theme="light"] .login-pg { background: #eef2f7; }
[data-theme="light"] .login-pg::before { background-image: linear-gradient(rgba(46, 134, 222, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(46, 134, 222, .05) 1px, transparent 1px); }
[data-theme="light"] .login-box { background: #ffffff; border-color: rgba(15, 34, 54, 0.10); box-shadow: 0 10px 40px rgba(20, 50, 90, .12); }
[data-theme="light"] .logo-name { color: #1a3a5c; }
[data-theme="light"] .nav-right .badge-kol { background: rgba(46, 134, 222, .15); color: var(--bright); }
[data-theme="light"] .nav-right .badge-chef { background: rgba(224, 112, 32, .18); color: #b65912; }
[data-theme="light"] .hamburger { color: #1a3a5c; background: #f4f7fb; border-color: rgba(15, 34, 54, 0.15); }

/* ─────────────  THEME-TOGGLE-BUTTON  ───────────── */
.theme-toggle {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background .2s, transform .15s, border-color .2s;
  margin-right: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.05); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: rgba(20, 50, 90, 0.25);
  color: #1a3a5c;
  box-shadow: 0 2px 6px rgba(20, 50, 90, .15);
}
[data-theme="light"] .theme-toggle:hover { background: #f4f7fb; border-color: var(--accent); }
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--ink);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(11, 22, 34, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}
@media (max-width: 768px) {
  .topbar { height: 60px; }
  .sidebar { top: 60px; } /* Mobile-Drawer Top anpassen */
}
.logo { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.logo a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 9px; }
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--mid));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(46, 134, 222, .35),
              inset 0 1px 0 rgba(255, 255, 255, .15);
}

/* 3D-Geruest-Default in der Topbar */
.logo-3d-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(46, 134, 222, .35));
  transition: transform .3s ease, filter .3s ease;
}
.logo-3d-icon img { width: 100%; height: 100%; display: block; }
.logo:hover .logo-3d-icon {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 12px rgba(46, 134, 222, .55));
}
@media (max-width: 768px) {
  .logo-3d-icon { width: 40px; height: 40px; }
}

/* Hochgeladenes Firma-Logo — eleganter Container */
.logo-img-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #f0f6fc 100%);
  border-radius: 9px;
  padding: 5px 11px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, .25),
    0 0 0 1px rgba(46, 134, 222, .15),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .3s ease, box-shadow .3s ease;
}
.logo:hover .logo-img-wrap {
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(46, 134, 222, .35),
    0 0 0 1px rgba(46, 134, 222, .35),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}
.logo-img { height: 36px; width: auto; max-width: 240px; display: block; }

@media (max-width: 768px) {
  .logo-img-wrap { height: 40px; padding: 4px 9px; }
  .logo-img { height: 30px; max-width: 160px; }
}
.logo-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .92rem; line-height: 1.1; }
.logo-sub { font-size: .58rem; color: var(--silver); text-transform: uppercase; letter-spacing: .5px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.badge-kol { background: rgba(46, 134, 222, .2); color: var(--bright); border: 1px solid rgba(46, 134, 222, .3); }
.badge-chef { background: rgba(224, 112, 32, .2); color: var(--ylw); border: 1px solid rgba(224, 112, 32, .3); }
.btn-out {
  background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 5px 13px; border-radius: 7px; font-size: .76rem; cursor: pointer;
  font-family: 'Barlow', sans-serif; text-decoration: none; display: inline-block;
}
.btn-out:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 9px;
  font-family: 'Barlow', sans-serif; font-size: .88rem; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--mid); }
.btn-ghost { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .12); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-success { background: var(--grn); color: #fff; }
.btn-success:hover { background: #1f8c4d; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 6px 13px; font-size: .79rem; }
.btn-lg { padding: 13px 28px; font-size: .96rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── LAYOUT ── */
.app-wrap { display: flex; flex: 1; min-height: calc(100vh - 64px); }
.sidebar { width: 200px; flex-shrink: 0; background: var(--navy); border-right: 1px solid rgba(255, 255, 255, .07); padding: 18px 0; }
.sb-sec { padding: 5px 15px; font-size: .66rem; font-weight: 700; color: var(--silver); text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 17px; cursor: pointer; font-size: .84rem;
  color: rgba(255, 255, 255, .6); transition: all .18s;
  border-left: 3px solid transparent; font-weight: 500;
  text-decoration: none;
}
.sb-item:hover { background: rgba(255, 255, 255, .05); color: var(--white); }
.sb-item.on { background: rgba(46, 134, 222, .1); color: var(--bright); border-left-color: var(--accent); font-weight: 600; }
.main { flex: 1; padding: 24px 20px; overflow-y: auto; }

/* ── CARDS ── */
.card { background: var(--navy); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.card-hdr { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .98rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pg-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; }
.pg-sub { color: var(--silver); font-size: .83rem; margin-bottom: 20px; font-weight: 300; }

/* ── FORMS ── */
.fg { margin-bottom: 13px; }
.flbl { display: block; font-size: .77rem; font-weight: 600; color: var(--frost); margin-bottom: 5px; }
.fc {
  width: 100%; padding: 10px 12px;
  background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .1);
  border-radius: 8px; font-family: 'Barlow', sans-serif; font-size: .88rem;
  color: var(--white); transition: border-color .2s;
}
.fc:focus { outline: none; border-color: var(--accent); background: rgba(46, 134, 222, .08); }
.fc::placeholder { color: var(--silver); }
select.fc option { background: var(--navy); }
textarea.fc { resize: vertical; min-height: 70px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.field-error { color: #ff7070; font-size: .76rem; margin-top: 4px; }

/* ── TAGS ── */
.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.tag-grn { background: var(--grn-bg); color: #5dde8a; border: 1px solid rgba(39, 174, 96, .25); }
.tag-ylw { background: var(--ylw-bg); color: var(--ylw); border: 1px solid rgba(240, 180, 41, .25); }
.tag-blue { background: rgba(46, 134, 222, .15); color: var(--bright); border: 1px solid rgba(46, 134, 222, .3); }
.tag-red { background: var(--red-bg); color: #ff7070; border: 1px solid rgba(231, 76, 60, .25); }

/* ── ALERTS ── */
.alert { padding: 10px 13px; border-radius: 8px; font-size: .82rem; margin-bottom: 13px; display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.alert-info { background: rgba(46, 134, 222, .1); border: 1px solid rgba(46, 134, 222, .25); color: var(--bright); }
.alert-warn { background: rgba(240, 180, 41, .1); border: 1px solid rgba(240, 180, 41, .25); color: var(--ylw); }
.alert-success { background: var(--grn-bg); border: 1px solid rgba(39, 174, 96, .25); color: #5dde8a; }
.alert-danger { background: var(--red-bg); border: 1px solid rgba(231, 76, 60, .25); color: #ff7070; }

/* ── TABLES ── */
.tbl { width: 100%; border-collapse: collapse; font-size: .82rem; }
.tbl th { background: rgba(255, 255, 255, .05); color: var(--silver); padding: 8px 12px; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .85); }
.tbl tr:hover td { background: rgba(255, 255, 255, .03); }
.tbl tr:last-child td { border-bottom: none; }

/* ── BAUSTELLEN-LISTE ── */
.bs-list { display: flex; flex-direction: column; gap: 10px; }
.bs-card {
  background: var(--navy); border: 1.5px solid rgba(255, 255, 255, .09);
  border-radius: 13px; padding: 18px; cursor: pointer;
  transition: all .22s; position: relative; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
}
.bs-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.bs-card.s-aktiv::before { background: var(--grn); }
.bs-card.s-geplant::before { background: var(--ylw); }
.bs-card.s-fertig::before { background: var(--red); }
.bs-card:hover {
  border-color: var(--accent); background: rgba(46, 134, 222, .07);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46, 134, 222, .15);
}
.bs-nr { font-size: .68rem; font-weight: 700; color: var(--silver); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.bs-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; margin-bottom: 4px; font-size: 1.05rem; }
.bs-adresse { font-size: .77rem; color: var(--silver); margin-bottom: 8px; }
.bs-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .72rem; color: var(--silver); margin-top: 8px; }
.bs-meta span strong { color: var(--frost); font-weight: 600; }

/* ── KW-GROUP HEADER ── */
.kw-hdr {
  background: linear-gradient(135deg, var(--steel), var(--mid));
  border-radius: 11px; padding: 13px 16px; margin: 18px 0 10px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, .1);
}
.kw-hdr h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 700; }
.kw-hdr p { font-size: .73rem; color: rgba(255, 255, 255, .65); margin-top: 2px; }

/* ── BTB-EINTRAG ── */
.tb-entry {
  background: var(--navy); border: 1px solid rgba(255, 255, 255, .07);
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  padding: 14px 16px; margin-bottom: 9px;
}
.tb-date { font-size: .69rem; font-weight: 700; color: var(--silver); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.tb-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; margin-bottom: 4px; font-size: .95rem; }
.tb-body { font-size: .8rem; color: rgba(255, 255, 255, .7); line-height: 1.5; }
.tb-meta { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.tb-footer { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.btn-view {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 2px 3px 2px 0; line-height: 1;
  background: rgba(46, 134, 222, .15); color: var(--bright);
  border: 1px solid rgba(46, 134, 222, .25);
  padding: 4px 11px; border-radius: 6px; font-size: .73rem; font-weight: 700;
  cursor: pointer; font-family: 'Barlow', sans-serif; text-decoration: none;
}

/* ── MITARBEITER-CHIPS ── */
.ang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; margin-bottom: 6px; }
.ang-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 11px; border: 1.5px solid rgba(255, 255, 255, .1);
  border-radius: 8px; cursor: pointer; transition: all .18s;
  background: rgba(255, 255, 255, .04); font-size: .81rem; color: rgba(255, 255, 255, .75);
  position: relative;
}
.ang-chip .chip-name { flex: 1; min-width: 0; }
.ang-chip .chip-checkbox { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.ang-chip:hover { border-color: var(--accent); }
.ang-chip.on { border-color: var(--accent); background: rgba(46, 134, 222, .12); color: var(--bright); font-weight: 600; }
.ang-chip.kol { border-color: rgba(240, 180, 41, .25); }
.ang-chip.kol.on { border-color: var(--ylw); background: rgba(240, 180, 41, .12); color: var(--ylw); }
.ang-chip.chef { border-color: rgba(231, 76, 60, .25); }
.ang-chip.chef.on { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.ang-chip.has-custom { border-color: var(--ylw) !important; }
.ang-chip.has-custom .chip-cog { color: var(--ylw); }
.ang-chip.has-custom::after {
  content: ''; position: absolute; top: -4px; right: -4px;
  width: 10px; height: 10px; background: var(--ylw); border-radius: 50%;
  border: 2px solid var(--navy);
}
[data-theme="light"] .ang-chip.has-custom::after { border-color: #ffffff; }

/* Zahnrad-Button am Chip */
.chip-cog {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--silver);
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem;
  transition: all .15s;
  flex-shrink: 0;
  font-family: 'Barlow', sans-serif;
}
.chip-cog:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(45deg); }
[data-theme="light"] .chip-cog { background: #f4f7fb; border-color: rgba(15, 34, 54, .15); color: #5a7a96; }
.av {
  width: 24px; height: 24px;
  background: rgba(46, 134, 222, .2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700; color: var(--bright); flex-shrink: 0;
}
.av-kol { background: rgba(240, 180, 41, .2); color: var(--ylw); }
.av-chef { background: rgba(231, 76, 60, .2); color: var(--red); }

/* ── CHECKBOXEN ── */
.chk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.chk-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; background: rgba(255, 255, 255, .04);
  border: 1.5px solid rgba(255, 255, 255, .08); border-radius: 8px;
  cursor: pointer; transition: all .18s;
}
.chk-item:hover { border-color: var(--accent); }
.chk-item.on { border-color: var(--grn); background: var(--grn-bg); }
.chk-item.on .chk-box { background: var(--grn); border-color: var(--grn); }
.chk-item.on .chk-box::after { display: block; }
.chk-box {
  width: 17px; height: 17px; border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, .25); flex-shrink: 0;
  position: relative; transition: all .18s;
}
.chk-box::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); font-size: .65rem; color: #fff;
  display: none; font-weight: 700;
}
.chk-lbl { font-size: .81rem; color: rgba(255, 255, 255, .8); }
.chk-item.on .chk-lbl { color: #5dde8a; font-weight: 600; }

/* ── WIND-WARNUNG ── */
.wind-warn {
  background: rgba(231, 76, 60, .1); border: 1px solid rgba(231, 76, 60, .3);
  border-radius: 8px; padding: 9px 12px; font-size: .8rem;
  color: #ff7070; margin-top: 7px; align-items: center; gap: 7px;
  display: none;
}
.wind-warn.show { display: flex; }

/* ── FOTO-UPLOAD ── */
.foto-area {
  display: block; width: 100%;
  border: 2px dashed rgba(46, 134, 222, .35); border-radius: 10px;
  padding: 24px 18px; text-align: center; cursor: pointer;
  transition: all .25s; background: rgba(46, 134, 222, .04);
}
.foto-area:hover { border-color: var(--accent); background: rgba(46, 134, 222, .09); }
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; margin-top: 12px; }
.foto-thumb {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 1; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex; align-items: center; justify-content: center;
}
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; }
.foto-del {
  position: absolute; top: 3px; right: 3px;
  background: rgba(231, 76, 60, .85); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  font-size: .65rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; text-decoration: none;
}

/* ── DOKUMENTE ── */
.dok-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px;
  margin-bottom: 7px; transition: all .2s;
}
.dok-row:hover { background: rgba(255, 255, 255, .07); }
.dok-left { display: flex; align-items: center; gap: 11px; }
.dok-icon { font-size: 1.2rem; width: 32px; text-align: center; }
.dok-name { font-size: .83rem; font-weight: 600; margin-bottom: 2px; }
.dok-meta { font-size: .7rem; color: var(--silver); }
.dok-actions { display: flex; gap: 5px; }
.btn-del {
  background: var(--red-bg); color: #ff7070; border: 1px solid rgba(231, 76, 60, .2);
  padding: 4px 9px; border-radius: 6px; font-size: .73rem; font-weight: 700;
  cursor: pointer; font-family: 'Barlow', sans-serif; text-decoration: none;
}

/* ── INFO GRID ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.info-box { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; padding: 12px 14px; }
.info-lbl { font-size: .67rem; font-weight: 700; color: var(--silver); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.info-val { font-size: .86rem; font-weight: 500; }

/* ── KONTAKT-CARDS ── */
.kontakt-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px; padding: 12px 14px; margin-bottom: 8px;
}
.kontakt-icon {
  width: 36px; height: 36px;
  background: rgba(46, 134, 222, .15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.kontakt-name { font-weight: 600; font-size: .88rem; margin-bottom: 1px; }
.kontakt-role { font-size: .73rem; color: var(--silver); }
.kontakt-tel { font-size: .77rem; color: var(--bright); margin-top: 1px; }
.kontakt-tel a { color: inherit; text-decoration: none; }

/* ── FILTER-BUTTONS ── */
.bs-bar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.bs-btn {
  padding: 6px 13px; border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .65);
  font-family: 'Barlow', sans-serif; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .2s; text-decoration: none;
  display: inline-block;
}
.bs-btn:hover { border-color: var(--accent); color: var(--bright); }
.bs-btn.on { background: rgba(46, 134, 222, .15); border-color: var(--accent); color: var(--bright); }

/* ── TABS (Baustellen-Detail) ── */
.tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.tab {
  flex: 1; padding: 11px 6px;
  border: none; background: transparent;
  color: rgba(255, 255, 255, .5);
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: .82rem;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .2s; text-decoration: none; text-align: center;
}
.tab:hover { color: rgba(255, 255, 255, .8); }
.tab.on { color: var(--bright); border-bottom-color: var(--accent); font-weight: 700; }

/* ── DETAIL-HEADER (Baustelle) ── */
.det-hdr {
  background: linear-gradient(135deg, var(--steel), var(--mid));
  border-radius: 11px; padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 0;
}
.det-hdr-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.det-hdr-sub { font-size: .77rem; color: rgba(255, 255, 255, .65); }

/* ── DRILL-DOWN MONATSKARTEN ── */
.monat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.monat-card {
  background: var(--navy); border: 1.5px solid rgba(255, 255, 255, .09);
  border-radius: 10px; padding: 14px; cursor: pointer;
  transition: all .2s; text-decoration: none; color: inherit; display: block;
}
.monat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.monat-card.leer { opacity: .35; cursor: default; }
.monat-card.leer:hover { transform: none; border-color: rgba(255, 255, 255, .09); }
.monat-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.monat-std { font-size: 1.4rem; font-weight: 700; color: var(--bright); }
.monat-bs { font-size: .7rem; color: var(--silver); margin-top: 2px; }

.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.tag-card {
  background: var(--navy); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px; padding: 11px 13px;
}
.tag-card-date { font-size: .7rem; color: var(--silver); font-weight: 700; text-transform: uppercase; }
.tag-card-bs { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; margin: 3px 0; }
.tag-card-std { color: var(--bright); font-weight: 700; }

/* ── LOGIN ── */
.login-pg {
  background: var(--ink); min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.login-pg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30, 87, 153, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 87, 153, .08) 1px, transparent 1px);
  background-size: 44px 44px;
}
.login-box {
  background: var(--navy); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px; padding: 36px 28px; width: 100%; max-width: 380px;
  position: relative; z-index: 1; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-lic {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--mid));
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin: 0 auto 10px;
}
.login-logo h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.15rem; font-weight: 700; margin-top: 12px; }
.login-logo p { color: var(--silver); font-size: .77rem; margin-top: 8px; }

/* 3D-Geruest auf Login-Seite */
.login-3d-icon {
  width: 110px; height: 110px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 6px 20px rgba(46, 134, 222, .4));
  animation: login3dPulse 4s ease-in-out infinite;
}
.login-3d-icon img { width: 100%; height: 100%; display: block; }
@keyframes login3dPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.02); }
}

/* Hochgeladenes Logo — gross, leuchtend */
.login-logo-img-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #f0f6fc 100%);
  border-radius: 18px;
  padding: 22px 28px;
  margin: 0 auto 12px;
  display: inline-block;
  position: relative;
  box-shadow:
    0 12px 32px rgba(46, 134, 222, .35),
    0 0 0 1px rgba(46, 134, 222, .25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  animation: loginLogoPulse 3.5s ease-in-out infinite;
}
.login-logo-img-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 21px;
  background: linear-gradient(135deg, var(--accent), var(--mid));
  z-index: -1;
  filter: blur(14px);
  opacity: .35;
  animation: loginLogoGlow 3.5s ease-in-out infinite;
}
.login-logo-img { max-width: 260px; max-height: 110px; height: auto; display: block; }

@keyframes loginLogoPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
@keyframes loginLogoGlow {
  0%, 100% { opacity: .25; filter: blur(14px); }
  50%      { opacity: .5;  filter: blur(18px); }
}

@media (max-width: 768px) {
  .login-logo-img { max-width: 220px; max-height: 95px; }
}
.btn-sub {
  width: 100%; padding: 12px; background: var(--accent); color: #fff;
  border: none; border-radius: 9px; font-family: 'Barlow', sans-serif;
  font-weight: 700; font-size: .9rem; cursor: pointer; margin-top: 7px;
  transition: all .2s;
}
.btn-sub:hover { background: var(--mid); }

/* ── SUCCESS-PAGE ── */
.success { text-align: center; padding: 50px 20px; }
.success-icon { font-size: 3.2rem; margin-bottom: 14px; }
.success-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.7rem; font-weight: 700; color: #5dde8a; margin-bottom: 7px; }
.success-sub { color: var(--silver); margin-bottom: 24px; font-size: .88rem; }
.success-btns { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }

/* ── EMPTY-STATE ── */
.empty {
  text-align: center; padding: 60px 20px; color: var(--silver);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--frost); margin-bottom: 6px; }

/* ── HAMBURGER-BUTTON (nur Mobile) ── */
.hamburger {
  display: none;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--white);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  flex-shrink: 0;
}
.hamburger:hover { background: rgba(255, 255, 255, .12); }

/* Backdrop hinter dem Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 199;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-backdrop.show { display: block; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .topbar { padding: 0 13px; }
  .hamburger { display: inline-flex; }
  .main { padding: 16px 14px; }
  .frow, .frow3, .info-grid, .chk-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .tab { font-size: .76rem; }

  /* Sidebar wird Off-Canvas-Drawer */
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 240px;
    z-index: 250;
    transform: translateX(-100%);
    transition: transform .25s ease-out;
    box-shadow: 4px 0 20px rgba(0, 0, 0, .4);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .sb-item { font-size: .92rem; padding: 12px 17px; }
  .logo-name { font-size: .82rem; }
  .logo-sub { font-size: .55rem; }
  .badge { font-size: .65rem; padding: 3px 8px; }
}

@media (max-width: 400px) {
  .ang-grid { grid-template-columns: 1fr 1fr; }
}

/* ── UTILITIES ── */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end { display: flex; justify-content: flex-end; gap: 8px; }
.text-silver { color: var(--silver); }
.text-bright { color: var(--bright); }
.text-grn { color: #5dde8a; }
.text-red { color: #ff7070; }
.text-ylw { color: var(--ylw); }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.font-cond { font-family: 'Barlow Condensed', sans-serif; }

/* ─────────────  MONATS-AKKORDION (details/summary)  ───────────── */
.monat-akk {
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
[data-theme="light"] .monat-akk {
  background: #ffffff;
  border-color: rgba(15,34,54,.10);
  box-shadow: var(--shadow-card);
}
.monat-akk > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(46,134,222,.18), rgba(46,134,222,.05));
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  user-select: none;
  transition: background .15s;
}
.monat-akk > summary:hover { background: linear-gradient(90deg, rgba(46,134,222,.28), rgba(46,134,222,.10)); }
.monat-akk > summary::-webkit-details-marker { display: none; }
.monat-akk > summary::before {
  content: '▶';
  font-size: .7rem;
  color: var(--accent);
  transition: transform .2s;
  display: inline-block;
}
.monat-akk[open] > summary::before { transform: rotate(90deg); }
.monat-akk > summary .akk-meta {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-size: .85rem;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  color: var(--silver);
}
.monat-akk > summary .akk-meta strong { color: var(--bright); margin-left: 4px; }
.monat-akk[data-aktuell="true"] > summary {
  background: linear-gradient(90deg, rgba(39,174,96,.18), rgba(39,174,96,.05));
}
.monat-akk[data-aktuell="true"] > summary:hover {
  background: linear-gradient(90deg, rgba(39,174,96,.28), rgba(39,174,96,.10));
}
.monat-akk[data-aktuell="true"] > summary::before { color: var(--grn); }
.monat-akk > .akk-inhalt { padding: 0 6px 4px; }
.monat-akk > .akk-inhalt > table.tbl { border-radius: 0; }

/* ─────────────  KW-AKKORDION (Sub-Ebene unter Monat)  ───────────── */
.kw-akk {
  margin: 6px 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
[data-theme="light"] .kw-akk {
  background: #fafbfd;
  border-color: rgba(15,34,54,.08);
}
.kw-akk > summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(46,134,222,.14), rgba(46,134,222,.03));
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  user-select: none;
  transition: background .15s;
}
.kw-akk > summary:hover { background: linear-gradient(90deg, rgba(46,134,222,.22), rgba(46,134,222,.06)); }
.kw-akk > summary::-webkit-details-marker { display: none; }
.kw-akk > summary::before {
  content: '▶';
  font-size: .65rem;
  color: var(--accent);
  transition: transform .2s;
  display: inline-block;
}
.kw-akk[open] > summary::before { transform: rotate(90deg); }
.kw-akk > summary .kw-meta {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: .78rem;
  color: var(--silver);
  text-transform: none;
  letter-spacing: 0;
}
.kw-akk > summary .kw-meta strong { color: var(--bright); margin-left: 4px; }
.kw-akk[data-aktuell="true"] > summary {
  background: linear-gradient(90deg, rgba(39,174,96,.16), rgba(39,174,96,.04));
}
.kw-akk[data-aktuell="true"] > summary:hover {
  background: linear-gradient(90deg, rgba(39,174,96,.24), rgba(39,174,96,.08));
}
.kw-akk[data-aktuell="true"] > summary::before { color: var(--grn); }
.kw-akk > .kw-inhalt > table.tbl { border-radius: 0; margin: 0; }
.kw-akk > .kw-inhalt > table.tbl tr:last-child td { border-bottom: none; }
