/* Amalun – Oberfläche
   Farben und Schrift nach dem Brand Voice & Tonality Guide:
   Deep Mauve #9B6A6C, Pistachio Fog #A9C1A3, Ocean Slate #4C6B7F, Lumen Yellow #FFD764,
   Ivory Mist #F8F6F2, Pistachio Wash #DDE8DE, Slate Light #E5EBEF,
   Ink Charcoal #2A2A2A, Mauve Dark #7C4F52, Deep Berry #80364C, Lilac Bloom #C9A6D8, Citrus Mint #B9E4C9
   Schrift: Montserrat (Fließtext, Buttons, Menü). */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/montserrat-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/montserrat-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/montserrat-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/montserrat-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/montserrat-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/montserrat-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/montserrat-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/montserrat-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* Neue Montreal (Pangram Pangram, lizenziert für Amalun) – für Überschriften */
@font-face { font-family: "Neue Montreal"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/NeueMontreal-Medium.woff2) format("woff2"); }
@font-face { font-family: "Neue Montreal"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/NeueMontreal-Bold.woff2) format("woff2"); }

:root {
  --ivory: #F8F6F2;
  --mauve: #9B6A6C;
  --mauve-dark: #7C4F52;
  --mauve-tint: #F3ECEB;
  --berry: #80364C;
  --berry-tint: #F6E7EB;
  --pistachio: #A9C1A3;
  --pistachio-wash: #DDE8DE;
  --green-ink: #3E6644;
  --ocean: #4C6B7F;
  --ocean-dark: #3B5667;
  --slate-light: #E5EBEF;
  --yellow: #FFD764;
  --yellow-tint: #FFF4CC;
  --yellow-ink: #7A5A00;
  --lilac: #C9A6D8;
  --mint: #B9E4C9;
  --ink: #2A2A2A;
  --muted: #6E6862;
  --line: #E8E2D9;
  --card: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(42, 42, 42, .04), 0 6px 20px rgba(42, 42, 42, .05);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; }
a { color: var(--ocean); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-family: "Neue Montreal", var(--font); font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .6em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: -3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
:focus-visible { outline: 3px solid rgba(76, 107, 127, .45); outline-offset: 2px; border-radius: 6px; }

/* Layout ------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.nav-toggle { display: none; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 40px; }
.sidebar .brand img { height: 34px; width: auto; }
.nav-group { margin: 6px 0 14px; }
.nav-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6F6862; /* 1.9: Kontrast über 4,5:1 (jetzt ein Knopf) */
  padding: 0 12px 6px; }
/* 1.9: Gruppen zum Auf- und Zuklappen */
details.nav-group > summary.nav-title { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
  border-radius: 8px; padding-top: 4px; min-height: 24px; }
details.nav-group > summary.nav-title::-webkit-details-marker { display: none; }
details.nav-group > summary.nav-title:hover { color: var(--ink); }
details.nav-group > summary.nav-title:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }
details.nav-group > summary .nav-zu-hinweis { margin-left: auto; display: inline-flex; transition: transform .15s; }
details.nav-group[open] > summary .nav-zu-hinweis { transform: rotate(90deg); }
details.nav-group:not([open]) { margin-bottom: 6px; }
.nav-punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--berry); }
details.nav-group[open] > summary .nav-punkt { display: none; }
@media (prefers-reduced-motion: reduce) { details.nav-group > summary .nav-zu-hinweis { transition: none; } }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: #3d3a37;
  font-weight: 500; font-size: 14px; position: relative; }
.nav a:hover { background: var(--ivory); text-decoration: none; }
.nav a.active { background: var(--mauve-tint); color: var(--berry); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--berry); }
.nav a.locked { color: #A9A29A; }
.nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pistachio-wash); color: var(--green-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user-chip .who { line-height: 1.2; min-width: 0; }
.user-chip .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 28px 40px 8px;
  flex-wrap: wrap; }
.topbar .sub { color: var(--muted); margin-top: 4px; }
.content { padding: 16px 40px 60px; max-width: 1320px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Karten & Raster ---------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.card.flat { box-shadow: none; }
.card.tint-yellow { background: var(--yellow-tint); border-color: #F3DE95; }
.card.tint-green { background: #F1F6F1; border-color: #D3E2D4; }
.card.tint-berry { background: var(--berry-tint); border-color: #EBCBD4; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); color: inherit; }
.kpi:hover { text-decoration: none; border-color: #D9CFC3; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .value { font-family: "Neue Montreal", var(--font); font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.kpi.accent { background: var(--yellow); border-color: #F0C843; }
.kpi.accent .label { color: #5f4a00; }

/* Tabellen ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; max-width: 100%; position: relative; } /* 1.8: versteckte Beschriftungen (sr-only) bleiben im Rahmen */
.main, .settings > * { min-width: 0; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #8A8279;
  font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid #F0EBE4; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FCFBF8; }
.table .title-cell b { display: block; }
.table .title-cell span { color: var(--muted); font-size: 13px; }

/* Buttons ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 11px;
  padding: 9px 15px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; line-height: 1.2;
  background: #fff; color: var(--ink); border-color: var(--line); white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #D2C8BC; }
.btn-primary { background: var(--ocean); color: #fff; border-color: var(--ocean); }
.btn-primary:hover { background: var(--ocean-dark); border-color: var(--ocean-dark); }
.btn-accent { background: var(--yellow); color: #2A2A2A; border-color: #F0C843; }
.btn-accent:hover { background: #FFCF3F; border-color: #E8BB27; }
.btn-berry { background: var(--berry); color: #fff; border-color: var(--berry); }
.btn-danger { background: #fff; color: var(--berry); border-color: #E6C4CE; }
.btn-danger:hover { background: var(--berry-tint); border-color: var(--berry); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ocean); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--slate-light); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; justify-content: center; }
.htmx-request .btn-busy, .btn.htmx-request { opacity: .6; pointer-events: none; }

/* Chips / Badges ----------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12.5px;
  font-weight: 600; white-space: nowrap; background: var(--slate-light); color: var(--ocean-dark); line-height: 1.5; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.green { background: var(--pistachio-wash); color: var(--green-ink); }
.chip.yellow { background: var(--yellow-tint); color: var(--yellow-ink); }
.chip.berry { background: var(--berry-tint); color: var(--berry); }
.chip.grey { background: #EFEDEA; color: #77706A; }
.chip.lilac { background: #F1E8F6; color: #6B4880; }
.chip.mint { background: #E3F5EA; color: #2F6B47; }
.chip.outline { background: #fff; border: 1px solid var(--line); color: #5b5550; font-weight: 500; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--yellow); color: #2A2A2A;
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.badge.berry { background: var(--berry); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Formulare ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 600; font-size: 13px; color: #3B3733; }
.field .help { font-size: 12.5px; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number],
input[type=time], input[type=date], input[type=search], input[type=file], select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid #DCD5CB; border-radius: 10px;
  padding: 9px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.post-edit { min-height: 340px; font-size: 13.5px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(76, 107, 127, .15); }
input[readonly] { background: var(--ivory); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--ocean); flex: none; }
.check .t b { display: block; font-weight: 600; font-size: 14px; }
.check .t span { font-size: 12.5px; color: var(--muted); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 999px; background: #D7D0C6; position: relative;
  cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ocean); }
.switch input:checked::after { transform: translateX(17px); }
.inline-form { display: inline; }
.segmented { display: inline-flex; background: #EFEBE5; border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented a, .segmented button { padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: #5d5650;
  border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.days { display: flex; gap: 4px; }
.days label { position: relative; }
.days input { position: absolute; opacity: 0; }
.days span { display: inline-grid; place-items: center; width: 34px; height: 30px; border-radius: 8px; border: 1px solid #DCD5CB;
  font-size: 12.5px; font-weight: 600; cursor: pointer; background: #fff; color: #6d665f; }
.days input:checked + span { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.days input:focus-visible + span { outline: 3px solid rgba(76,107,127,.45); }

/* Hinweise ----------------------------------------------------------------- */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
  background: var(--slate-light); color: #2f4553; }
.notice .icon { margin-top: 2px; }
.notice.yellow { background: var(--yellow-tint); color: #5c4500; }
.notice.berry { background: var(--berry-tint); color: #6b2a3d; }
.notice.green { background: #EDF4EE; color: #2f5535; }
.notice b { font-weight: 700; }
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 50; max-width: 420px; }
.toast { background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px; animation: toast-in .25s ease-out; }
.toast.error { background: var(--berry); }
.toast.warn { background: #6B5300; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { color: var(--pistachio); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* Freigabe-Karten ----------------------------------------------------------- */
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; box-shadow: var(--shadow); }
.review:hover { border-color: #D8CEC2; }
.review .meta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 3px; }
.review .meta span { display: inline-flex; gap: 5px; align-items: center; }
.review h3 a { color: var(--ink); }
.review .chips { margin-top: 9px; }
.review .side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* Post-Vorschau ------------------------------------------------------------ */
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.phone { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #EFEAE2; display: flex; flex-direction: column; }
.phone-head { background: #075E54; color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; }
.phone-head img { width: 28px; height: 28px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain; }
.phone-head small { display: block; font-weight: 400; opacity: .8; font-size: 11.5px; }
.phone.tg { background: #DCE8D2; }
.phone.tg .phone-head { background: #517DA2; }
.phone-body { padding: 14px; max-height: 560px; overflow-y: auto; }
.bubble { background: #fff; border-radius: 10px; padding: 9px 11px 6px; box-shadow: 0 1px .5px rgba(0,0,0,.13);
  white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; line-height: 1.45; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif; }
.bubble .time { display: block; text-align: right; font-size: 11px; color: #8a8a8a; margin-top: 2px; }
.phone-foot { padding: 8px 14px 12px; font-size: 12px; color: #5a5a5a; }

/* AGG-Hinweise ------------------------------------------------------------- */
.flag { border-left: 4px solid var(--yellow); background: #FFFBEC; border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; font-size: 13.5px; }
.flag.warnung { border-color: var(--berry); background: var(--berry-tint); }
.flag .q { font-weight: 700; }
.flag .s { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* Plan --------------------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; }
.tl-day { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mauve-dark);
  padding: 16px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tl-item { display: grid; grid-template-columns: 64px 200px 1fr auto; gap: 14px; padding: 10px 4px; border-bottom: 1px solid #F2EDE6; align-items: center; }
.tl-item .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-item .ch { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.pf { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; flex: none; }
.pf.whatsapp { background: #25A35A; }
.pf.telegram { background: #2F8BCB; }
.pf.facebook { background: #1877F2; }
.pf.instagram { background: #C13584; }
.empty-slot { color: #A39A90; font-style: italic; }

/* Login -------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--ivory); padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFE08A 0%, var(--yellow) 45%, rgba(255,215,100,0) 70%); opacity: .55; }
.auth-art .claim { font-family: "Neue Montreal", var(--font); font-size: 50px; line-height: 1.05; font-weight: 700; color: var(--mauve); letter-spacing: -.02em; text-transform: uppercase; }
.auth-art .claim span { color: var(--ink); }
.auth-art p { max-width: 420px; color: #4c4741; font-size: 15px; }
.auth-form { display: grid; place-items: center; padding: 40px; background: #fff; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 24px; }
.code-input { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: inline-block; }
.qr svg { display: block; width: 210px; height: 210px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-family: ui-monospace, Menlo, monospace; font-size: 15px;
  background: var(--ivory); border-radius: 12px; padding: 14px 18px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--pistachio-wash); color: var(--green-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }

/* Einstellungen ------------------------------------------------------------ */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.subnav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.subnav a { padding: 8px 12px; border-radius: 9px; color: #4a4540; font-weight: 500; display: flex; gap: 9px; align-items: center; font-size: 13.5px; }
.subnav a:hover { background: #fff; text-decoration: none; }
.subnav a.on { background: #fff; color: var(--berry); font-weight: 600; box-shadow: var(--shadow); }
.channel { padding: 14px 4px; border-bottom: 1px solid #F0EBE4; }
.channel:last-child { border-bottom: 0; }
.channel.off .channel-sub { opacity: .55; }
.channel-main { display: grid; grid-template-columns: 48px minmax(150px, 1fr) minmax(220px, 1.5fr) auto; gap: 12px; align-items: start; }
.channel-flags { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.input-link { display: flex; gap: 4px; align-items: center; }
.input-link input { flex: 1; min-width: 0; }
.danger-text { color: var(--berry); }
.channel-main .switch { margin-top: 8px; }
.channel-main input.strong { font-weight: 600; }
.channel-sub { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 0 0 60px; }
.mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mini input { padding: 6px 9px !important; }
.days.langs { align-items: center; gap: 3px; color: var(--muted); }
.days.langs span { width: 32px; height: 26px; font-size: 11.5px; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8A7F74; background: #F2EEE8; border-radius: 999px; padding: 3px 10px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #F1ECE5; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ok { color: var(--green-ink); }
.checklist .todo { color: #C0B6AA; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) fit-content(45%); gap: 10px; padding: 9px 0; border-bottom: 1px solid #F1ECE5; font-size: 13.5px; }
.feed li > * { min-width: 0; overflow-wrap: break-word; }
.feed li:last-child { border-bottom: 0; }
.feed .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--ivory); display: grid; place-items: center; color: var(--mauve-dark); }

details.more summary { cursor: pointer; font-weight: 600; color: var(--ocean); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 10px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { max-width: 260px; }
.filters select { width: auto; min-width: 150px; }

[dir=rtl] { text-align: right; }
.hidden { display: none !important; }

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-main { grid-template-columns: 48px 1fr; }
  .channel-sub { padding-left: 0; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  /* Handy: Navigation als schmale Leiste oben, Menü klappt auf */
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; max-height: 100vh; padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidebar .brand img { height: 28px; }
  .nav-toggle { display: inline-flex; }
  .sidebar .nav, .sidebar .sidebar-foot { display: none; }
  .sidebar.open { overflow-y: auto; }
  .sidebar.open .nav, .sidebar.open .sidebar-foot { display: block; }
  .sidebar.open .nav { margin-top: 10px; }
  .sidebar.open .sidebar-foot { padding-bottom: 6px; }
  .nav a.active::before { display: none; }
  .topbar h1 { font-size: 26px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .subnav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .subnav a { white-space: nowrap; flex: none; background: #fff; border: 1px solid var(--line); }
  .subnav a.on { border-color: var(--berry); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .tl-item { grid-template-columns: 56px 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Wochenübersicht Redaktionsplan */
.table.week th, .table.week td { text-align: center; padding: 8px 6px; }
.table.week th:first-child, .table.week td:first-child { text-align: left; padding-left: 10px; }
.table.week .today { background: #FFFBEA; }
.slot { display: inline-grid; place-items: center; width: 30px; height: 24px; margin: 1px; border-radius: 7px; border: 1.5px dashed #CFC6BA;
  font-size: 11px; font-weight: 700; color: #A49A8F; text-decoration: none; background: #fff; vertical-align: middle; }
.slot:hover { text-decoration: none; border-color: var(--ocean); }
.slot.filled { background: var(--pistachio-wash); border: 1.5px solid #B9D1BC; color: var(--green-ink); }
.slot.auto { background: #F1E8F6; border: 1.5px solid #D9C3E6; color: #6B4880; }
span.slot { width: 18px; height: 14px; }


/* --- SharePics ------------------------------------------------------------- */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); }
.sp-card.off { opacity: .55; }
.sp-thumbs { display: flex; gap: 4px; padding: 10px 10px 0; background: var(--ivory); }
.sp-thumbs img { width: 100%; min-width: 0; flex: 1; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; display: block; }
.sp-card .sp-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sp-card .sp-body h3 { font-size: 15px; }
.sp-card .sp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.slides { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.slides figure { margin: 0; flex: 0 0 auto; }
.slides img { height: 420px; width: auto; aspect-ratio: auto; border-radius: 12px; display: block; box-shadow: var(--shadow); background: #eee; }
.slides.small img { height: 260px; }
.slides figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }
.photo-pick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.photo-pick label { flex: 0 0 auto; cursor: pointer; text-align: center; font-size: 11.5px; color: var(--muted); width: 92px; }
.photo-pick input { position: absolute; opacity: 0; pointer-events: none; }
.photo-pick .ph { width: 92px; height: 116px; border-radius: 10px; border: 2px solid transparent; overflow: hidden;
  display: grid; place-items: center; background: var(--ivory); color: var(--muted); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pick input:checked + .ph { border-color: var(--mauve); box-shadow: 0 0 0 3px var(--mauve-tint); }
.photo-pick input:focus-visible + .ph { outline: 2px solid var(--ocean); outline-offset: 2px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.lib .item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.lib .item img { width: 100%; height: 190px; object-fit: cover; display: block; background: var(--ivory); }
.lib .item .meta { padding: 8px 10px 10px; font-size: 12.5px; }
.lib .item .tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.lib .item .tags span { background: var(--ivory); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; }
.layer { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; background: #fff; }
.layer > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
.layer > summary::-webkit-details-marker { display: none; }
.layer .num { width: 24px; height: 24px; border-radius: 6px; background: #FF008C; color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; flex: none; }
.layer .lbody { padding: 4px 12px 12px; }
.layer .fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.layer .fgrid .field { margin: 0; }
.layer .fgrid .wide { grid-column: 1 / -1; }
.boxin { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.boxin.two { grid-template-columns: repeat(2, 1fr); }
.boxin input { padding: 6px 6px; }
.item-sub { border-left: 3px solid var(--yellow); padding: 6px 0 6px 10px; margin: 8px 0; }
.editor { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
.editor .sticky { position: sticky; top: 16px; }
.editor .slides img { height: auto; width: 100%; max-width: 380px; }
.editor .slides { flex-direction: column; overflow: visible; }
.fieldlist { font-size: 12.5px; columns: 2; column-gap: 16px; }
.fieldlist code { font-size: 12px; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .editor .sticky { position: static; } .editor .slides { flex-direction: row; overflow-x: auto; } .editor .slides img { width: 240px; } }
.sp-actions .inline-form { display: inline-flex; }

.connect { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.connect .card { margin: 0; }
.connect form .row input[type=password] { flex: 1; min-width: 220px; max-width: 460px; }
.connect .card > p { margin: 0 0 6px; }
.phone.fb .phone-head { background: #1877F2; }
.phone.fb { background: #F0F2F5; }
.phone.ig .phone-head { background: linear-gradient(90deg, #833AB4, #E1306C 60%, #F77737); }
.phone.ig { background: #FAFAFA; }

/* Website-Einbindung, Systemstatus */
pre.code { white-space: pre-wrap; word-break: break-all; background: var(--ivory); padding: 12px; border-radius: 10px; margin: 0 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); display: block; }
.checks { display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: 22px 170px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row .st { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; }
.check-row .st.ok { background: #3E9B5F; } .check-row .st.warnung { background: #E0A800; } .check-row .st.fehler { background: var(--berry); }
@media (max-width: 640px) { .check-row { grid-template-columns: 22px 1fr; } .check-row .txt { grid-column: 2; } }
dl.facts { display: grid; grid-template-columns: fit-content(45%) 1fr; gap: 4px 12px; margin: 0; }
dl.facts dt { color: var(--muted, #6b6b6b); min-width: 118px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* --- Etappe 4: Organisation (Kontakte, Aufgaben, Veranstaltungen, Kalender) --- */
.chip.ocean { background: var(--slate-light); color: var(--ocean-dark); }
.chip.slate { background: #EEF1F3; color: #4B5963; }
.avatar.small { width: 28px; height: 28px; font-size: 11.5px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; cursor: pointer; font-size: 14px; }
.inline-check input { width: 17px; height: 17px; accent-color: var(--ocean); margin: 0; }
.chips-check { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-check label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; font-size: 13px; cursor: pointer; background: #fff; }
.chips-check input { accent-color: var(--ocean); margin: 0; }
.chips-check label:has(input:checked) { background: var(--slate-light); border-color: #C8D3DA; }

/* Verlauf */
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid #F1ECE5; }
.history li:first-child { border-top: 0; }
.history-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--mauve-tint); color: var(--mauve-dark); display: grid; place-items: center; }
.history-text { white-space: pre-line; overflow-wrap: anywhere; margin-top: 2px; }

/* Aufgaben */
.task-check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #B9B1A7; background: #fff; cursor: pointer; padding: 0;
  display: inline-grid; place-items: center; flex: none; }
.task-check:hover { border-color: var(--ocean); background: var(--slate-light); }
.task-check.checked { background: #3E9B5F; border-color: #3E9B5F; color: #fff; cursor: default; }
.task-mini { list-style: none; margin: 0; padding: 0; }
.task-mini li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #F1ECE5; }
.task-mini li:first-child { border-top: 0; }
.task-mini li > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-mini li.done > a, .task-list li.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-group .card-head { margin-bottom: 4px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid #F1ECE5; }
.task-list li:first-child { border-top: 0; }
.task-list .task-check { margin-top: 1px; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.quick-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 12px; }
.quick-add input[name="title"] { flex: 1 1 260px; }
.quick-add input[type="date"], .quick-add select { width: auto; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.board-col { background: #F3EFE9; border-radius: var(--radius); padding: 12px; min-height: 160px; }
.board-col h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.board-col.drop-over { outline: 2px dashed var(--ocean); outline-offset: -4px; background: var(--slate-light); }
.board-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 11px; box-shadow: var(--shadow); cursor: grab; }
.board-card + .board-card { margin-top: 8px; }
.board-card.dragging { opacity: .5; }
.board-card.done .board-title { text-decoration: line-through; color: var(--muted); }
.board-title { font-weight: 600; color: var(--ink); display: block; overflow-wrap: anywhere; }
.board-empty { text-align: center; padding: 18px 0; margin: 0; }
.mini-select { width: auto; font-size: 12px; padding: 3px 24px 3px 8px; height: auto; }

/* Veranstaltungen */
.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-list .card + .card { margin-top: 0; }
.event-row { display: flex; gap: 16px; align-items: center; color: var(--ink); padding: 14px 16px; }
.event-row:hover { text-decoration: none; border-color: #D9CFC3; }
.event-row.cancelled .event-title { text-decoration: line-through; color: var(--muted); }
.date-block { width: 58px; flex: none; text-align: center; border-radius: 12px; background: var(--yellow-tint); padding: 6px 0; line-height: 1.1; }
.date-block .m { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--yellow-ink); font-weight: 700; }
.date-block .d { display: block; font-family: "Neue Montreal", var(--font); font-size: 26px; font-weight: 700; }
.date-block .w { display: block; font-size: 11.5px; color: var(--muted); }
.event-main { flex: 1; min-width: 0; }
.event-title { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.event-seats { text-align: right; display: flex; flex-direction: column; flex: none; }
.event-seats b { font-size: 18px; }

/* Kalender */
.cal-title { min-width: 150px; text-align: center; }
.cal-card { padding: 0; overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8A8279; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid #F0EBE4; border-bottom: 1px solid #F0EBE4; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.weekend { background: #FCFAF7; }
.cal-day.other { background: #F8F6F2; }
.cal-day.other .cal-num { color: #B9B1A7; }
.cal-num { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cal-num a { color: inherit; display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; }
.cal-num a:hover { background: var(--slate-light); text-decoration: none; }
.cal-day.today .cal-num a, .cal-day.today .cal-num { color: var(--berry); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--berry-tint); }
.cal-item { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; margin-bottom: 3px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.cal-item:hover { text-decoration: none; filter: brightness(.97); }
.cal-item.veranstaltung { background: var(--yellow-tint); border-color: #E9B800; }
.cal-item.termin { background: var(--slate-light); border-color: var(--ocean); }
.cal-item.aufgabe { background: var(--mauve-tint); border-color: var(--mauve); }
.cal-item.cancelled { text-decoration: line-through; opacity: .7; }
.cal-more { font-size: 12px; color: var(--muted); padding-left: 6px; }
.cal-legend { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; }
.cal-dot.veranstaltung { background: #E9B800; } .cal-dot.termin { background: var(--ocean); } .cal-dot.aufgabe { background: var(--mauve); }
.agenda-item { padding: 4px 0; }
.agenda-item .cal-item { white-space: normal; font-size: 14px; padding: 7px 10px; }
.abo-steps { margin-top: 12px; gap: 14px; }
.abo-steps > div { background: #FAF8F4; border-radius: var(--radius-sm); padding: 10px 12px; }
@media (max-width: 860px) {
  .board { grid-template-columns: repeat(4, minmax(240px, 82vw)); }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-item { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; margin: 2px 0; }
  .cal-item b, .cal-item svg { display: none; }
  .cal-more { font-size: 10.5px; padding: 0; }
  .cal-head { padding: 6px 4px; text-align: center; }
  .event-row { gap: 12px; padding: 12px; }
  .event-seats { display: none; }
  .dash-orga { grid-template-columns: minmax(0, 1fr); }
  .history li { grid-template-columns: 26px minmax(0, 1fr) auto; }
}
.dash-orga .card + .card, .grid > .card + .card { margin-top: 0; }
.board-card .chip, .task-list .chip.outline { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.edit-card > summary { list-style: none; cursor: pointer; }
.edit-card > summary::-webkit-details-marker { display: none; }
.edit-card > summary h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.edit-card > summary h2::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 14px; }
.edit-card[open] > summary h2::after { content: "▴"; }
.reg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.reg-stats > div { background: #FAF8F4; border-radius: var(--radius-sm); padding: 10px 12px; }
.reg-stats b { font-family: "Neue Montreal", var(--font); font-size: 26px; }
.reg-stats .small { display: block; }
.cal-num { display: flex; align-items: center; justify-content: space-between; }
.cal-add { visibility: hidden; color: var(--muted); font-weight: 600; min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; }
.cal-day:hover .cal-add, .cal-add:focus { visibility: visible; }
.cal-add:hover { background: var(--slate-light); text-decoration: none; }
@media (max-width: 860px) { .cal-add { display: none; } .abo-steps { grid-template-columns: minmax(0, 1fr); } }

/* 0.6: Suche, E-Mail, Dokumente ------------------------------------------ */
.nav-search { display: flex; align-items: center; gap: 8px; margin: 0 2px 14px; padding: 0 12px; height: 38px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--ivory); color: var(--muted); }
.nav-search:focus-within { border-color: var(--ocean); background: #fff; }
.nav-search input { border: 0; background: transparent; padding: 0; height: 36px; min-width: 0; flex: 1; font: inherit;
  font-size: 13.5px; box-shadow: none; outline: none; }
.search-jump { margin-bottom: 14px; flex-wrap: wrap; }
.search-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .search-groups { grid-template-columns: minmax(0, 1fr); } }

.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 10px 4px; border-bottom: 1px solid #F1ECE5; }
.mail-list li:last-child { border-bottom: 0; }
.mail-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; color: inherit; min-width: 0; }
.mail-row:hover { text-decoration: none; }
.mail-row:hover .mail-subject { text-decoration: underline; }
.mail-main { display: grid; gap: 1px; min-width: 0; }
.mail-top { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.mail-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mail-date { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mail-subject, .mail-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-snippet { font-size: 12.5px; color: var(--muted); }
.mail-list li.unread .mail-who, .mail-list li.unread .mail-subject { font-weight: 700; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ocean); margin-right: 6px;
  vertical-align: 1px; }
.mail-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mail-view .facts { margin-bottom: 10px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 14px;
  margin-top: 12px; font-size: 14px; line-height: 1.6; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 640px) {
  .mail-list li { grid-template-columns: minmax(0, 1fr); }
  .mail-tags { justify-content: flex-start; padding-left: 46px; }
}

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; font-size: 13.5px; }
.crumbs span { color: var(--muted); }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.folder-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--ivory); color: var(--ink); font-weight: 500; min-width: 0; }
.folder-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tile .icon { color: var(--mauve); }
.folder-tile:hover { border-color: var(--mauve); text-decoration: none; background: #fff; }
.file-ext { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--slate-light); color: var(--ocean-dark);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.doc-preview { padding: 10px; text-align: center; }
.doc-preview img { max-width: 100%; max-height: 520px; border-radius: 10px; }
.cal-ext { opacity: .9; border-style: dashed !important; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.dropzone { transition: box-shadow .15s, border-color .15s; }
.dropzone.drop-over { box-shadow: 0 0 0 3px var(--mauve), var(--shadow); }
p code, li code, dd code { overflow-wrap: anywhere; }
.search-groups > .card { margin: 0; }

/* 0.7: Zeiterfassung --------------------------------------------------------- */
.btn-lg { padding: 12px 20px; font-size: 15.5px; border-radius: 13px; }
.nowrap { white-space: nowrap; }
.label-like { font-weight: 600; font-size: 13.5px; }
.warn-text { color: var(--yellow-ink); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--berry); }
.kpi .value.neg { color: var(--berry); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #3FA34D; margin-left: auto; box-shadow: 0 0 0 3px rgba(63,163,77,.18); }
.stamp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: center; }
.stamp-main { display: flex; gap: 16px; align-items: center; min-width: 0; }
.stamp-dot { width: 16px; height: 16px; border-radius: 50%; background: #CFC6BA; flex: none; }
.stamp-an .stamp-dot { background: #3FA34D; box-shadow: 0 0 0 6px rgba(63,163,77,.16); }
.stamp-pause .stamp-dot { background: var(--yellow); box-shadow: 0 0 0 6px rgba(255,215,100,.3); }
.stamp-an { border-color: #BFD8BF; background: linear-gradient(0deg, #fff, #F4FAF3); }
.stamp-label { font-weight: 600; color: var(--muted); font-size: 13.5px; }
.stamp-time { font-family: "Neue Montreal", var(--font); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stamp-time small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stamp-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stamp-mini { padding: 12px 16px; }
.stamp-mini .stamp-time { font-size: 24px; }
.stamp-spans { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.week-table tr.today td, .month-table tr.today td { background: #FFFBEA; }
.month-table tr.weekend td { background: #FBF9F6; }
.week-table tr.muted td, .month-table tr.muted td { color: #A39A90; }
.month-table td { padding-top: 8px; padding-bottom: 8px; }
.time-span { display: inline-block; font-size: 13px; font-variant-numeric: tabular-nums; padding: 1px 7px; margin: 1px 4px 1px 0;
  border-radius: 6px; background: var(--slate-light); color: var(--ocean-dark); }
.time-span.manual { background: #F1E8F6; color: #6B4880; }
.time-span.edited { box-shadow: inset 0 0 0 1px #C9A6D8; }
.time-span:hover { text-decoration: none; filter: brightness(.96); }
.inline-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-fields select, .inline-fields input[type=date] { width: auto; }
.cal-item.abwesend { background: #EFEDEA; border-color: #B9B1A7; color: #5d5650; }
.cal-dot.abwesend { background: #B9B1A7; }
.cal-item.raum { background: #EEF6F0; border-color: var(--pistachio); }
.cal-dot.raum { background: var(--pistachio); }
@media (max-width: 640px) {
  .stamp { grid-template-columns: minmax(0, 1fr); }
  .stamp-buttons { justify-content: stretch; }
  .stamp-buttons form { flex: 1; }
  .stamp-buttons .btn { width: 100%; justify-content: center; }
}

/* 0.7: Chat -------------------------------------------------------------------- */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat > .card + .card { margin-top: 0; }
.chat-messages { position: relative; }
.chat-side { position: sticky; top: 16px; max-height: calc(100vh - 140px); overflow-y: auto; }
.chat-rooms { list-style: none; margin: 0 0 12px; padding: 0; }
.chat-rooms a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--ink); min-width: 0; }
.chat-rooms a:hover { background: var(--ivory); text-decoration: none; }
.chat-rooms a.active { background: var(--mauve-tint); }
.chat-rooms a.unread .chat-room-name { font-weight: 700; }
.chat-room-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--pistachio-wash); color: var(--green-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.chat-avatar.group { border-radius: 9px; background: var(--slate-light); color: var(--ocean-dark); }
.chat-new-dm { border-top: 1px solid var(--line); padding-top: 12px; }
.chat-main { display: flex; flex-direction: column; min-height: 420px; height: calc(100vh - 170px); padding: 0; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 4px; }
.chat-older { text-align: center; margin: 0 0 8px; font-size: 13px; }
.chat-day, .chat-new { text-align: center; margin: 10px 0 6px; font-size: 12px; color: var(--muted); position: relative; }
.chat-day span, .chat-new span { background: #fff; padding: 0 10px; position: relative; z-index: 1; }
.chat-day::before, .chat-new::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.chat-new { color: var(--berry); font-weight: 600; }
.chat-new::before { border-color: #EBCBD4; }
.chat-empty { text-align: center; padding: 40px 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-who { font-size: 12px; font-weight: 600; color: var(--mauve-dark); margin: 8px 0 2px 4px; }
.msg-bubble { background: #F3EFE9; border-radius: 14px 14px 14px 4px; padding: 7px 11px 5px; min-width: 0; max-width: 100%; }
.msg.mine .msg-bubble { background: #E3ECF1; border-radius: 14px 14px 4px 14px; }
.msg.mentioned .msg-bubble { box-shadow: inset 3px 0 0 var(--yellow); background: #FFF8DD; }
.msg.system .msg-bubble { background: var(--ivory); border: 1px dashed var(--line); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.msg-text .mention { color: var(--ocean-dark); font-weight: 700; }
.msg-image img { display: block; max-width: min(320px, 100%); max-height: 260px; border-radius: 10px; margin: 4px 0; }
.msg-file { margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.msg-meta { font-size: 11px; color: #8A8279; text-align: right; margin-top: 2px; display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.msg-actions { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.msg-actions a, .msg-actions button { border: 0; background: none; color: #8A8279; padding: 0 2px; cursor: pointer; display: inline-flex; }
.msg.deleted .msg-bubble { background: transparent; border: 1px dashed var(--line); }
.chat-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px 12px;
  border-top: 1px solid var(--line); background: #FCFBF9; }
.chat-compose textarea { resize: none; min-height: 42px; max-height: 180px; }
.chat-attach { display: grid; place-items: center; width: 40px; height: 42px; border-radius: 10px; cursor: pointer; color: var(--muted); position: relative; }
.chat-attach:hover { background: var(--ivory); color: var(--ink); }
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.chat-hints { grid-column: 1 / -1; display: flex; gap: 12px; min-height: 0; }
.chat-hints:empty { display: none; }
.chat-back { display: none; }
.chat-pane { padding: 20px 22px; overflow-y: auto; }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat.with-room .chat-side { display: none; }
  .chat.only-list .chat-main { display: none; }
  .chat-side { position: static; max-height: none; }
  .chat-back { display: inline-flex; }
  .chat-main { height: calc(100vh - 210px); }
  .msg { max-width: 90%; }
  .msg-actions { opacity: 1; }
}

/* 0.7: Klient*innen ------------------------------------------------------------ */
.match-list { list-style: none; margin: 0; padding: 0; }
.match-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #F0EBE4; }
.match-list li:last-child { border-bottom: 0; }
.match-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.match-act { flex: none; }
.note-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-bottom: 14px; }
.note-form select { width: auto; }
.demand { display: grid; gap: 6px; }
.demand-head, .demand-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 1fr 1fr; gap: 10px; align-items: center; }
.demand-name { font-size: 13.5px; overflow-wrap: anywhere; }
.demand-bar { position: relative; height: 22px; background: #F3EFE9; border-radius: 6px; overflow: hidden; }
.demand-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.demand-bar.want i { background: var(--lilac); }
.demand-bar.offer i { background: var(--pistachio); }
.demand-bar b { position: relative; font-size: 12px; padding-left: 8px; line-height: 22px; }
.demand-row.gap .demand-name { color: var(--berry); font-weight: 600; }
@media (max-width: 640px) { .note-form { grid-template-columns: minmax(0, 1fr); } .match-list li { flex-direction: column; } }

/* 0.7: Drucken ----------------------------------------------------------------- */
.print-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink);
  padding-bottom: 10px; margin-bottom: 14px; }
.print-table td, .print-table th { padding: 5px 8px; font-size: 12.5px; }
.print-table tfoot td { border-top: 2px solid var(--ink); }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 46px 0 16px; }
.signatures div { font-size: 12px; color: var(--muted); }
.signatures span { display: block; border-bottom: 1px solid var(--ink); height: 28px; margin-bottom: 4px; }
.consent-lines { display: grid; gap: 10px; margin-bottom: 14px; }
.consent-lines div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: end; }
.consent-lines span { font-size: 12.5px; color: var(--muted); }
.consent-lines b { border-bottom: 1px solid var(--ink); min-height: 24px; font-weight: 600; }
.consent-sheet { max-width: 820px; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .no-print, .toasts, .topbar .actions { display: none !important; }
  .app { display: block; }
  .topbar { padding: 0 0 8px; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-sheet .table td, .print-sheet .table th { border-color: #ccc; }
  .month-table tr.weekend td, .print-table tr.weekend td { background: #f4f4f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}
@media (max-width: 640px) {
  .week-table td:first-child, .month-table td:first-child { white-space: nowrap; }
  .week-table th:nth-child(3), .week-table td:nth-child(3) { display: none; }  /* Soll steht im Monat */
  .month-table th:nth-child(3), .month-table td:nth-child(3),
  .month-table th:nth-child(4), .month-table td:nth-child(4) { display: none; }  /* Pause, Soll */
  .table.week-table td, .table.month-table td, .table.week-table th, .table.month-table th { padding-left: 6px; padding-right: 6px; }
  .time-span { font-size: 12px; padding: 1px 5px; }
}

/* 0.8: Personal ------------------------------------------------------------------ */
.progress { height: 6px; border-radius: 999px; background: #EFEBE5; overflow: hidden; margin-bottom: 6px; }
.progress i { display: block; height: 100%; background: var(--pistachio); border-radius: 999px; }
.checklist-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8A8279; margin: 14px 0 4px; }
.checklist-items { list-style: none; margin: 0; padding: 0; }
.checklist-items li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #F2EDE6; }
.checklist-items li:last-child { border-bottom: 0; }
.checklist-items li.done .ci-title { color: var(--muted); text-decoration: line-through; text-decoration-color: #CFC6BA; }
.checklist-items li.late .ci-title { color: var(--berry); }
.ci-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.ci-title { font-weight: 500; }
.task-check { display: inline-grid; place-items: center; flex: none; color: #fff; margin-top: 2px; }
.task-check.checked { background: var(--pistachio); border-color: var(--pistachio); }
.task-check:disabled { cursor: default; opacity: .55; }
.tpl-table td { padding: 6px; vertical-align: middle; }
.tpl-table input, .tpl-table select { min-width: 0; }
.tpl-table { table-layout: fixed; min-width: 860px; }
.tpl-table input, .tpl-table select { width: 100%; }

/* 0.8: Organigramm --------------------------------------------------------------- */
.org-wrap { overflow-x: auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; position: relative; }
.org-tree ul { padding-left: 30px; }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -18px; top: 0; bottom: 0; border-left: 1.5px solid var(--line); }
.org-tree ul > li::after { content: ""; position: absolute; left: -18px; top: 30px; width: 16px; border-top: 1.5px solid var(--line); }
.org-tree ul > li:last-child::before { bottom: auto; height: 30px; }
.org-card { display: inline-flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; min-width: 240px; max-width: 100%; box-shadow: var(--shadow); }
.org-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.org-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--mauve-tint); color: var(--mauve-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.org-avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.org-teams { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.org-team { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: #fff; background: var(--team, var(--mauve)); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.team-grid > .card + .card { margin-top: 0; }
.team-card { border-top: 5px solid var(--team, var(--mauve)); }
.resp { display: inline-flex; align-items: center; gap: 4px; margin: 2px 12px 2px 0; }

/* 0.8: Büroplan ------------------------------------------------------------------- */
.plan-card { padding: 14px; }
.plan-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
@media (max-width: 640px) { .plan-scroll .plan { min-width: 640px; } }
.plan { position: relative; width: 100%; border-radius: 12px; border: 1px solid var(--line); overflow: hidden;
  background-color: #FBFAF7; background-repeat: no-repeat; background-size: 100% 100%; }
.plan.no-image { background-image: linear-gradient(#EFEAE2 1px, transparent 1px), linear-gradient(90deg, #EFEAE2 1px, transparent 1px);
  background-size: 40px 40px; }
.place { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; border: 2px solid #B9B1A7; white-space: nowrap;
  color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.12); max-width: 46%; overflow: hidden; text-overflow: ellipsis; z-index: 1; }
.place span { overflow: hidden; text-overflow: ellipsis; }
.place:hover { text-decoration: none; z-index: 3; }
.place.raum { border-radius: 8px; }
.place.frei { border-color: #3FA34D; background: #EAF6EC; }
.place.halb { border-color: #E9B800; background: var(--yellow-tint); }
.place.belegt { border-color: var(--berry); background: var(--berry-tint); }
.place.meins { border-color: var(--ocean); background: var(--ocean); color: #fff; }
.place.sel { outline: 3px solid rgba(76,107,127,.45); outline-offset: 2px; z-index: 2; }
.place.inactive { opacity: .55; border-style: dashed; }
[data-plan-edit] .place { cursor: grab; touch-action: none; user-select: none; border-color: var(--mauve); }
.place.dragging { cursor: grabbing; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.plan-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }
.plan-legend { margin-top: 10px; }
.plan-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 12px; border: 2px solid; }
.plan-legend .lg:first-child { margin-left: 0; }
.lg.frei { border-color: #3FA34D; background: #EAF6EC; } .lg.halb { border-color: #E9B800; background: var(--yellow-tint); }
.lg.belegt { border-color: var(--berry); background: var(--berry-tint); } .lg.meins { border-color: var(--ocean); background: var(--ocean); }
.plan-save { margin-top: 10px; justify-content: space-between; }
.plan-save.changed .btn-primary { box-shadow: 0 0 0 3px rgba(76,107,127,.3); }
@media (max-width: 640px) { .place { font-size: 11px; padding: 2px 6px; } .org-card { min-width: 0; } .org-tree ul { padding-left: 20px; } .org-tree ul > li::before, .org-tree ul > li::after { left: -12px; } .org-tree ul > li::after { width: 10px; } }

/* ---------------------------------------------------------------- Finanzen (0.9) */
.table.compact td, .table.compact th { padding-top: 7px; padding-bottom: 7px; }
.table tfoot th, .table tfoot td { border-top: 1px solid var(--line); }
.table tr.muted td { color: #A39A90; }
.fin-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px;
  padding: 8px 2px 0; border-bottom: 1px solid var(--line); }
.fin-month { display: flex; flex-direction: column; align-items: stretch; height: 100%; min-width: 0; }
.fin-cols { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.fin-cols span { width: 42%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 0; }
.fin-in, .lg.fin-in-dot { background: var(--ocean); border-color: var(--ocean) !important; }
.fin-out, .lg.fin-out-dot { background: var(--mauve); border-color: var(--mauve) !important; }
.fin-label { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0 2px; }
.inv-lines { table-layout: fixed; }
.inv-lines td { vertical-align: top; padding: 6px 4px; border-bottom: 0; }
.inv-lines td.inv-desc { padding-top: 0; padding-bottom: 12px; }
.inv-lines tbody.inv-line { border-bottom: 1px solid var(--line); }
.inv-lines input, .inv-lines select, .inv-lines textarea { width: 100%; min-width: 0; }
.inv-lines select { padding-left: 8px; padding-right: 22px; }
.inv-lines textarea { resize: vertical; min-height: 38px; font-size: 13px; }
.inv-lines input.num { text-align: right; }
.form-sub { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  margin: 8px 0 10px; }
.dunning { border-top: 1px dashed var(--line); padding-top: 10px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 6px 10px; align-items: center; }
.acct-grid input { padding: 6px 8px; }
.beleg-img { display: block; max-width: 100%; max-height: 520px; border-radius: 10px; border: 1px solid var(--line); }
.upload-card .inline-fields > span { color: var(--muted); display: flex; }
@media (max-width: 640px) {
  .fin-bars { height: 130px; gap: 3px; }
  .fin-label { font-size: 9.5px; }
  .inv-lines { min-width: 640px; }
}

/* WhatsApp-Assistent ---------------------------------------------------------- */
.wa-thread { display: flex; flex-direction: column; gap: 6px; }
.wa-thread .bubble { max-width: 82%; }
.wa-thread .bubble.in { align-self: flex-start; }
.wa-thread .bubble.out { align-self: flex-end; background: #D9FDD3; }
.wa-thread .bubble.out.team { background: #E3ECFA; }
.card .wa-thread .bubble.in { background: #F5F2EC; }
.wa-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.wa-choices span, .wa-choices button { border: 1px solid #C9DCC4; background: #fff; color: #0B6E54; border-radius: 16px;
  padding: 4px 10px; font-size: 12.5px; font-family: inherit; line-height: 1.3; }
.wa-choices button { cursor: pointer; }
.wa-choices button:hover { background: #F0FAF2; }
.wa-pick { color: #0B6E54; font-weight: 600; }
.wa-file { font-weight: 600; }
.wa-act { margin-top: 4px; white-space: normal; }
.wa-test { max-width: 520px; width: 100%; }
.wa-test .phone-body { min-height: 420px; max-height: 62vh; }
.wa-input { display: flex; gap: 6px; align-items: center; background: #F0F0F0; }
.wa-input input[name=text] { flex: 1; min-width: 0; border-radius: 20px; }
.wa-attach { cursor: pointer; }
.webhook-box { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--ivory); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.wa-thread .bubble { white-space: normal; }
.wa-thread .wa-text { white-space: pre-wrap; }
.wa-thread .bubble.in { min-width: 120px; }
.wa-thread .wa-text, .wa-thread .wa-pick { unicode-bidi: plaintext; text-align: start; }

/* 1.4: Piktogramme und Logos */
.pikto-zeile { display: flex; align-items: center; gap: 14px; }
.pikto-kachel { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 16px; background: #ECE7DF; color: var(--mauve-dark); }
.logo-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.logo-box img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logo-box.gross { width: 120px; height: 120px; padding: 12px; }

/* 1.6: nur für Vorleseprogramme */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* 1.8: Funde – Fehler im Formular, Feldgruppen */
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--berry); }
.field .error-text { color: var(--berry); font-weight: 600; font-size: 13px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }
.match-list .chip.lilac { font-size: 11.5px; }
