/* Oxygen lokal gebündelt (kein CDN) — Dateien in modul_dashboard/static/fonts/ */
@font-face{ font-family:"Oxygen"; font-style:normal; font-weight:300; font-display:swap;
            src:url("/static/fonts/oxygen-300.woff2") format("woff2"); }
@font-face{ font-family:"Oxygen"; font-style:normal; font-weight:400; font-display:swap;
            src:url("/static/fonts/oxygen-400.woff2") format("woff2"); }
@font-face{ font-family:"Oxygen"; font-style:normal; font-weight:700; font-display:swap;
            src:url("/static/fonts/oxygen-700.woff2") format("woff2"); }
:root{
  --bg:#211b26; --bg2:#1a151e; --card:#322a3a; --cell:#3a3143;
  --ink:#efe9f2; --mut:#a99fb3; --line:rgba(255,255,255,.09);
  --gold:#f0bf57; --rot:#cf3425; --rot-h:#e46a5f;
  --gruen:#466624; --gruen-h:#8fbf5f; --priv:#b7a9d0;
  --prio1:#a889e0; --prio2:#f0bf57; --prio3:#8fbf5f;
}
*{ box-sizing:border-box; }
html,body{ overflow-x:hidden; max-width:100%; }
body{ margin:0; color:var(--ink);
      background:linear-gradient(180deg,var(--bg),var(--bg2)); background-attachment:fixed;
      font:15px/1.55 "Oxygen",system-ui,"Segoe UI",Roboto,sans-serif; }
.wrap{ max-width:900px; margin:0 auto; padding:30px 18px 80px; }

.top{ display:flex; align-items:baseline; gap:12px; margin:0 0 24px; }
h1{ font-size:32px; font-weight:700; margin:0; letter-spacing:-.01em; }
h1 .star{ color:var(--gold); margin-right:6px; }
.sub{ color:var(--mut); font-size:13px; }

.card{ background:var(--card); border:1px solid var(--line); border-radius:14px;
       padding:18px 20px; margin-bottom:16px; box-shadow:0 1px 2px rgba(0,0,0,.25); }
.card h2{ font-size:26px; font-weight:700; color:var(--ink); margin:0 0 16px;
          padding-left:14px; border-left:5px solid var(--gold); letter-spacing:-.01em; }

ul{ list-style:none; margin:0; padding:0; }
li{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); }
li:last-child{ border-bottom:0; }
.txt{ flex:0 1 auto; }
.tag{ font-size:12px; color:var(--mut); }
.frist{ font-size:12px; color:var(--mut); white-space:nowrap; }
.muted{ color:var(--mut); font-size:13px; }
code{ background:rgba(255,255,255,.06); padding:1px 5px; border-radius:4px; font-size:12px; }

button{ font:inherit; font-size:12px; border:1px solid var(--line);
        background:rgba(255,255,255,.04); border-radius:8px; padding:4px 11px;
        cursor:pointer; color:var(--ink); transition:.15s; }
button:hover{ border-color:var(--gold); color:var(--gold); background:rgba(240,191,87,.08); }
button.go:hover{ border-color:var(--gruen-h); color:var(--gruen-h); background:rgba(70,102,36,.20); }
form.inline{ margin:0; }
li .frist{ margin-left:auto; }
li:not(.warn) form.inline{ margin-left:auto; }
li .frist + form.inline{ margin-left:8px; }
li.done .txt{ text-decoration:line-through; color:var(--mut); }

/* --- Projekt-Gruppen (Breadcrumb) + Aufgaben --- */
.grp{ font-size:23px; font-weight:700; color:var(--ink);
      margin:26px 0 8px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.grp:first-of-type{ margin-top:4px; }
.grp .par{ color:var(--mut); font-weight:400; }
.grp .sep{ color:var(--mut); font-weight:400; opacity:.55; margin:0 5px; }
.task{ padding:9px 2px 9px 9px; border-bottom:1px solid var(--line);
       border-left:3px solid transparent; }
.task:last-child{ border-bottom:0; }
.task.p1{ border-left-color:var(--prio1); }
.task.p2{ border-left-color:var(--prio2); }
.task.p3{ border-left-color:var(--prio3); }
.task .row{ display:flex; align-items:center; gap:9px; }
.task .txt{ flex:1; }
.task.warn .txt, .task.warn .frist{ color:var(--rot-h); font-weight:700; }
.ic{ padding:2px 8px; line-height:1.2; }
/* Prio-Wähler (Lila/Gelb/Grün) + Heute-Schalter */
.prio{ display:inline-flex; gap:4px; }
.prio button{ width:14px; height:14px; padding:0; border-radius:50%; font-size:0;
              border:2px solid; background:transparent; cursor:pointer; }
.prio .d1{ border-color:var(--prio1); }
.prio .d2{ border-color:var(--prio2); }
.prio .d3{ border-color:var(--prio3); }
.prio .d1.on{ background:var(--prio1); }
.prio .d2.on{ background:var(--prio2); }
.prio .d3.on{ background:var(--prio3); }
.prio button:hover{ box-shadow:0 0 0 2px rgba(255,255,255,.16); }
.today.on{ border-color:var(--gold); color:var(--gold); background:rgba(240,191,87,.14); }
.sub-h{ font-size:15px; font-weight:700; color:var(--mut); letter-spacing:.02em;
        margin:22px 0 8px; padding-bottom:5px; border-bottom:1px solid var(--line); }
.sub-h:first-child{ margin-top:2px; }
.sub-h.warn{ color:var(--rot-h); }
.sub-h.ok{ color:var(--gruen-h); }
.body{ margin:7px 0 2px; }
.det{ font-size:13px; color:var(--ink); background:rgba(255,255,255,.03);
      border-left:3px solid var(--gold); border-radius:6px; padding:7px 11px; white-space:pre-wrap; }
.komm{ display:flex; flex-direction:column; gap:4px; margin-bottom:7px; }
.kmsg{ font-size:12px; color:var(--ink); background:rgba(255,255,255,.05);
       border-left:3px solid var(--gold); border-radius:6px; padding:4px 9px; }
.kform{ display:flex; gap:6px; }
.kform input{ flex:1; font:inherit; font-size:12px; padding:6px 10px; border:1px solid var(--line);
              border-radius:8px; background:rgba(0,0,0,.22); color:var(--ink); }
.kform input::placeholder{ color:var(--mut); }
.kform input:focus{ outline:none; border-color:var(--gold); }
.kform button{ padding:5px 12px; }

/* --- Offline-Puffer-Hinweis (Notiz wartet auf Verbindung) --- */
.offline-pending{ font-size:12px; color:var(--gold); margin-top:9px; }
.offline-pending:before{ content:"\23f3\a0"; }

/* --- Nachrichten an den Agent (board-weites Kommentarfeld / Notizen) --- */
.nform{ display:flex; gap:8px; align-items:flex-start; }
.nform textarea{ flex:1; font:inherit; font-size:13px; padding:8px 11px; border:1px solid var(--line);
                 border-radius:9px; background:rgba(0,0,0,.22); color:var(--ink); resize:vertical; }
.nform textarea::placeholder{ color:var(--mut); }
.nform textarea:focus{ outline:none; border-color:var(--gold); }
.nform button{ padding:8px 15px; }
.nmsg{ padding:9px 0; border-bottom:1px solid var(--line); }
.nmsg:last-child{ border-bottom:0; }
.nmsg .ntxt{ color:var(--mut); text-decoration:line-through; font-size:13px; }
.nans{ font-size:13px; color:var(--ink); background:rgba(70,102,36,.14);
       border-left:3px solid var(--gruen-h); border-radius:6px; padding:5px 10px; margin-top:5px; }

/* --- Tag-Buttons (Notizen-Erfassung: task/post/permanent) --- */
.tagbtns{ display:flex; gap:6px; margin-bottom:8px; }
.tagbtn{ display:inline-flex; align-items:center; gap:5px; font-size:12px; padding:5px 12px;
         border-radius:20px; border:1px solid var(--line); cursor:pointer; user-select:none;
         background:rgba(255,255,255,.04); transition:.15s; }
.tagbtn input{ position:absolute; opacity:0; width:0; height:0; }
.tagbtn:hover{ border-color:var(--gold); }
.tagbtn:has(input:checked){ border-color:var(--gold); color:var(--gold); background:rgba(240,191,87,.14); }
.tagbtn[data-tag="permanent"]:has(input:checked){ border-color:var(--priv); color:var(--priv); background:rgba(183,169,208,.14); }

/* --- Notizen-Liste (permanente Notizen, editierbar) --- */
.note{ padding:11px 2px; border-bottom:1px solid var(--line); }
.note:last-child{ border-bottom:0; }
.note .row{ display:flex; align-items:flex-start; gap:9px; }
.note .txt{ flex:1; white-space:pre-wrap; }
.note .chg{ font-size:11px; color:var(--rot-h); font-weight:700; border:1px solid var(--rot-h);
            border-radius:10px; padding:1px 8px; white-space:nowrap; }
.note .ntags span{ font-size:11px; color:var(--mut); background:rgba(255,255,255,.05);
                    border-radius:10px; padding:1px 8px; margin-right:4px; }
.note .edit-form{ display:none; margin-top:8px; }
.note .edit-form.open{ display:flex; gap:8px; align-items:flex-start; }
.note .edit-form textarea{ flex:1; font:inherit; font-size:13px; padding:8px 11px;
                            border:1px solid var(--line); border-radius:9px;
                            background:rgba(0,0,0,.22); color:var(--ink); resize:vertical; }
.note .meta{ font-size:11px; color:var(--mut); margin-top:4px; }

/* --- Termine-Raster --- */
.calwrap{ overflow-x:auto; }
.cal{ width:100%; min-width:640px; border-collapse:separate; border-spacing:5px; table-layout:fixed; }
.cal th{ font-size:11px; font-weight:700; color:var(--mut); text-transform:uppercase;
         letter-spacing:.06em; padding:0 2px 4px; text-align:left; }
.cal td{ vertical-align:top; background:var(--cell); border:1px solid var(--line);
         border-radius:9px; padding:6px 7px; height:72px; }
.cal td.vergangen{ opacity:.38; }
.cal td.we{ background:rgba(255,255,255,.02); }
.cal td.heute{ border-color:var(--gold); box-shadow:0 0 0 1px var(--gold) inset; }
.cal .dn{ font-size:11px; color:var(--mut); font-weight:700; display:block; margin-bottom:4px; }
.cal td.heute .dn{ color:var(--gold); }
.cal .ev{ font-size:11px; line-height:1.3; margin-bottom:3px; padding:2px 5px; border-radius:5px;
          background:rgba(240,191,87,.15); color:var(--ink);
          overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal .ev.privat{ background:rgba(183,169,208,.18); }
.cal .ev .z{ color:var(--mut); font-weight:700; margin-right:3px; }

/* --- Chips / Zähler --- */
.chips span{ display:inline-block; background:rgba(255,255,255,.05); color:var(--mut);
             border:1px solid var(--line); border-radius:20px; padding:3px 11px;
             margin:3px 5px 3px 0; font-size:12px; }
.chips span.privat{ color:var(--priv); background:rgba(183,169,208,.10); }
.count{ display:inline-block; min-width:20px; text-align:center; background:var(--gold);
        color:#211b26; border-radius:20px; padding:1px 8px; font-size:12px; font-weight:700; margin-right:6px; }

/* --- Sprungmarken + Karten-Anker --- */
html{ scroll-behavior:smooth; }
.card{ scroll-margin-top:14px; }

/* Tagesüberblick (Heute) — eigener, hellerer Grund (leichtes Grau), hebt den Tagesfokus ab */
.card.uebersicht{ background:linear-gradient(180deg,#453f4c,#3d3746);
                  border-color:rgba(240,191,87,.22); }

/* Einklappbare Karte (Erledigt) */
h2.clickable{ cursor:pointer; user-select:none; display:flex; align-items:center; gap:9px; }
h2 .caret{ font-size:15px; color:var(--mut); transition:transform .18s; }
h2.open .caret{ transform:rotate(90deg); }
.collapse[hidden]{ display:none; }

/* --- Hauptmenü (oben, sticky): Rubriken des gesamten Boards --- */
.mainnav{ position:sticky; top:0; z-index:60; display:flex; gap:4px; align-items:center;
          padding:10px 18px; background:rgba(28,22,32,.92);
          -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
          border-bottom:1px solid var(--line); }
.mainnav a{ font-size:13px; font-weight:700; color:var(--mut); text-decoration:none;
            padding:6px 14px; border-radius:8px; transition:.15s; }
.mainnav a:hover{ color:var(--gold); background:rgba(240,191,87,.08); }
.mainnav a.cur{ color:var(--gold); background:rgba(240,191,87,.14); }

/* --- Floating Anker-Menü (links): Sprungmarken der aktuellen Unterseite --- */
.toc{ position:fixed; left:14px; top:50%; transform:translateY(-50%); z-index:40;
      display:flex; flex-direction:column; gap:2px;
      background:rgba(28,22,32,.82); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
      border:1px solid var(--line); border-radius:12px; padding:8px 7px;
      box-shadow:0 4px 18px rgba(0,0,0,.35); }
.toc:empty{ display:none; }
.toc a{ display:block; width:100%; text-align:left; white-space:nowrap;
      font:inherit; font-size:12px; color:var(--mut); text-decoration:none;
      padding:5px 11px; border:0; border-radius:8px; background:transparent;
      transition:.15s; }
.toc a:hover{ color:var(--gold); background:rgba(240,191,87,.10); }
.toc a.cur{ color:var(--gold); }
@media (max-width:1180px){ .toc{ display:none; } }

/* --- Floating „An Agent"-Widget (rechts unten) --- */
.ana-fab{ position:fixed; right:20px; bottom:20px; z-index:50;
          display:inline-flex; align-items:center; gap:8px;
          background:var(--gold); color:#211b26; border:0; border-radius:26px;
          padding:11px 18px; font-size:14px; font-weight:700; cursor:pointer;
          box-shadow:0 5px 20px rgba(0,0,0,.45); transition:.15s; }
.ana-fab:hover{ background:#f4cd77; color:#211b26; }
.ana-fab .badge{ background:var(--rot); color:#fff; border-radius:12px; font-size:11px;
                 padding:1px 7px; font-weight:700; }
.ana-panel{ position:fixed; right:20px; bottom:76px; z-index:50;
            width:min(390px,calc(100vw - 40px)); max-height:min(72vh,600px); overflow-y:auto;
            background:var(--card); border:1px solid var(--line); border-radius:14px;
            padding:15px 17px 17px; box-shadow:0 10px 38px rgba(0,0,0,.55); }
.ana-panel[hidden]{ display:none; }
.ana-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.ana-head h3{ font-size:18px; font-weight:700; margin:0; padding-left:11px; border-left:4px solid var(--gold); }
.ana-panel .nform{ flex-direction:column; }
.ana-panel .nform textarea{ width:100%; }
.ana-panel .nform button{ align-self:flex-end; }

/* --- Mobil (<=640px): Zeilen dürfen umbrechen statt die Seite zu sprengen --- */
@media (max-width:640px){
  .wrap{ padding:18px 12px 90px; }
  h1{ font-size:24px; }
  .card{ padding:14px 14px; }
  .card h2{ font-size:20px; margin-bottom:12px; }
  .grp{ font-size:19px; }
  .sub-h{ font-size:13px; }

  /* Aufgaben-/Listenzeilen: umbrechen statt horizontal zu überlaufen */
  li, .task .row{ flex-wrap:wrap; row-gap:6px; }
  li .frist, .task .frist{ margin-left:0; }
  li:not(.warn) form.inline{ margin-left:0; }
  li .frist + form.inline{ margin-left:0; }
  .task .txt{ flex-basis:100%; }

  /* Icon-/Aktionsknöpfe kompakter, damit mehr in eine Zeile passt */
  button{ padding:4px 9px; font-size:12px; }
  .ic{ padding:2px 7px; }

  /* Hauptmenü: darf bei wenig Platz umbrechen statt Buttons abzuschneiden */
  .mainnav{ flex-wrap:wrap; row-gap:6px; padding:8px 12px; }
  .mainnav a{ padding:5px 10px; font-size:12px; }

  /* Kommentar-/Notiz-Formulare: Button unter das Eingabefeld statt daneben */
  .kform{ flex-wrap:wrap; }
  .kform input{ flex-basis:100%; }

  /* Floating „An Agent"-Widget etwas kompakter */
  .ana-fab{ right:12px; bottom:12px; padding:9px 14px; font-size:13px; }
  .ana-panel{ right:12px; bottom:66px; width:calc(100vw - 24px); }
}
