/* Laski Sans (lizenziert, self-hosted; Freigabe Thomas 04.11.2026) */
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-Thin.woff2") format("woff2"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-ThinItalic.woff2") format("woff2"); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Laski Sans"; src: url("/assets/fonts/laski-sans/LaskiSans-BlackItalic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }

/* Agentur Schröder – Look der Website (context/design.md): dunkel, Off-White, Cyan als einziger Akzent.
   Tokens auf :root, damit ein späterer Hellmodus nur Werte tauscht. Schrift: Laski Sans erst nach Lizenzfreigabe, bis dahin System-Sans. */
:root {
  --bg: #001625;            /* blue-dark-01 */
  --surface: #0B2535;       /* blue-dark-02 */
  --surface-2: #12354A;     /* blue-dark-03 */
  --text: #F6F5F4;          /* off-white */
  --muted: rgba(246, 245, 244, .5);
  --line: rgba(246, 245, 244, .1);
  --line-strong: rgba(246, 245, 244, .25);
  --accent: #009FE3;        /* cyan-01 */
  --accent-hover: #0E8FCB;  /* cyan-02 */
  --ok: #2FF550;
  --ok-text: #ACFBB9;
  --ok-bg: #0B282B;
  --warn: #F27B1F;
  --warn-text: #F9BBA5;
  --warn-bg: #1E1F27;
  --info: #8D8FFC;
  --info-bg: #0D2137;
  --radius: 16px;
  --radius-sm: 8px;
  --font: "Laski Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --caps: 700 .8rem/1 var(--font);
  --row-hover: rgba(18, 53, 74, .5);
  --header-bg: rgba(0, 22, 37, .92);
  --header-text: #F6F5F4;
  --header-muted: rgba(246, 245, 244, .55);
  --header-surface: #12354A;
}

/* Hellmodus (context/design.md, Entscheidung 04.11.2026): gleiche Tokens, andere Werte. Header bleibt dunkel. */
:root[data-theme="light"] {
  --bg: #F6F5F4; --surface: #FFFFFF; --surface-2: #EDEBE8; --text: #001625;
  --muted: rgba(0, 22, 37, .55); --line: rgba(0, 22, 37, .12); --line-strong: rgba(0, 22, 37, .3);
  --accent: #0084BE; --accent-hover: #006E9E;
  --ok: #1E9E3A; --ok-text: #166B2A; --ok-bg: #DDF5E3;
  --warn: #C65A0A; --warn-text: #8F3F05; --warn-bg: #FBE7D8;
  --info: #5A5DD9; --info-bg: #E3E3FA;
  --row-hover: rgba(0, 22, 37, .04);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F5F4; --surface: #FFFFFF; --surface-2: #EDEBE8; --text: #001625;
    --muted: rgba(0, 22, 37, .55); --line: rgba(0, 22, 37, .12); --line-strong: rgba(0, 22, 37, .3);
    --accent: #0084BE; --accent-hover: #006E9E;
    --ok: #1E9E3A; --ok-text: #166B2A; --ok-bg: #DDF5E3;
    --warn: #C65A0A; --warn-text: #8F3F05; --warn-bg: #FBE7D8;
    --info: #5A5DD9; --info-bg: #E3E3FA;
    --row-hover: rgba(0, 22, 37, .04);
  }
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--text); margin: 0 0 .5rem; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow, th { text-transform: uppercase; letter-spacing: .08em; }

/* App-Shell: schlanke Top-Leiste (Marke, Mandant, Nutzer) + Seitenleiste nach Themen. */
.topbar { background: var(--header-bg); border-bottom: 1px solid rgba(246,245,244,.1); color: var(--header-text); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(6px); }
.topbar-inner { padding: 0 20px; display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { color: var(--header-text); text-decoration: none; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-sub { font: 700 .72rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--header-muted); padding-left: 12px; border-left: 1px solid rgba(246,245,244,.2); }
.logo { height: 19px; width: auto; display: block; }
.topbar-context { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.context-label { font: 700 .66rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--header-muted); }
.context-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-switch { position: relative; }
.client-switch summary { list-style: none; cursor: pointer; font-weight: 700; font-size: .95rem; padding: 6px 30px 6px 10px; border-radius: 10px; border: 1px solid rgba(246,245,244,.18); position: relative; white-space: nowrap; }
.client-switch summary::-webkit-details-marker { display: none; }
.client-switch summary::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--header-muted); border-bottom: 2px solid var(--header-muted); transform: translateY(-70%) rotate(45deg); }
.client-switch summary:hover { background: var(--header-surface); }
.client-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; z-index: 40; box-shadow: 0 16px 40px rgba(0, 10, 20, .35); }
.client-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 600; }
.client-menu a:hover { background: var(--surface-2); text-decoration: none; }
.client-menu a.current { color: var(--accent); }
.userbox { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--header-muted); margin-left: auto; }
.userbox form { margin: 0; }
.user-name { color: var(--header-text); font-weight: 600; }
.userbox .btn-ghost { color: var(--header-text); border-color: rgba(246,245,244,.25); }
.userbox .btn-ghost:hover { background: var(--header-surface); border-color: rgba(246,245,244,.4); }
.theme-toggle { background: none; border: 1px solid rgba(246,245,244,.25); color: var(--header-text); border-radius: 999px; width: 32px; height: 32px; cursor: pointer; font-size: .95rem; line-height: 1; display: grid; place-items: center; transition: background .15s; }
.theme-toggle:hover { background: var(--header-surface); }
.bell { color: var(--header-muted); font: 700 .72rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.bell:hover { color: var(--header-text); text-decoration: none; }
.bell.has-unread { color: var(--header-text); }
.badge { display: inline-block; min-width: 20px; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #F6F5F4; font-size: .72rem; text-align: center; }

.nav-toggle { display: none; width: 38px; height: 38px; border: 1px solid rgba(246,245,244,.25); background: none; border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 4px; align-items: center; }
.nav-toggle span { width: 16px; height: 2px; background: var(--header-text); border-radius: 2px; display: block; }

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px 28px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.nav-group { margin-bottom: 18px; }
.nav-label { font: 700 .64rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .92rem; position: relative; transition: background .15s, color .15s; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.active { background: rgba(0, 159, 227, .14); color: var(--accent); }
.sidebar a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-group-agency { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-backdrop { display: none; }

/* Layout */
.page { padding: 26px 32px 40px; max-width: 1320px; width: 100%; }
.page-plain { max-width: none; padding: 0; }
.crumb { font: 700 .66rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.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)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .shell { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 40px; }
  .nav-toggle { display: flex; }
  .brand-sub, .context-label, .user-name, .topbar-context { display: none; }
  .topbar-inner { gap: 10px; padding: 0 12px; }
  .userbox { gap: 8px; }
  .logo { height: 16px; }
  .sidebar { position: fixed; top: 58px; left: 0; bottom: 0; width: 272px; height: auto; transform: translateX(-105%); transition: transform .2s ease; z-index: 25; box-shadow: 0 0 0 rgba(0,0,0,0); }
  body.nav-open .sidebar { transform: none; box-shadow: 12px 0 40px rgba(0, 10, 20, .4); }
  .nav-backdrop { display: block; position: fixed; inset: 58px 0 0 0; background: rgba(0, 10, 20, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sidebar, .nav-backdrop, .btn, .sidebar a { transition: none; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; overflow-x: auto; }
.card + .card { margin-top: 16px; }
a.card { color: var(--text); }
a.card:hover { text-decoration: none; background: var(--surface-2); }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .value { font-size: 2.2rem; font-weight: 900; color: var(--text); line-height: 1.05; letter-spacing: -.02em; }
.kpi .label { color: var(--muted); font-size: .9rem; }

.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .75rem; }
tbody tr:hover td { background: var(--row-hover); }
tr:last-child td { border-bottom: 0; }
td a.row-link { color: var(--text); font-weight: 700; }
td a.row-link:hover { color: var(--accent); }

/* Pills */
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.pill-todo { background: var(--surface-2); color: var(--muted); }
.pill-wip { background: rgba(0, 159, 227, .18); color: var(--accent); }
.pill-wait { background: var(--info-bg); color: var(--info); }
.pill-done { background: var(--ok-bg); color: var(--ok-text); }
.pill-high { background: var(--warn-bg); color: var(--warn-text); }
.pill-medium { background: var(--surface-2); color: var(--text); }
.pill-low { background: var(--surface-2); color: var(--muted); }
.pill-internal { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }
.pill-client { background: var(--ok-bg); color: var(--ok-text); }
.pill-agency { background: rgba(0, 159, 227, .18); color: var(--accent); }

/* Forms: ruhige Felder, klarer Fokus. */
label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 6px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: .95rem;
  background: var(--bg); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s;
}
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); background: var(--surface-2); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 159, 227, .28); background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23009FE3' stroke-width='2' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
select option { background: var(--surface); color: var(--text); }
textarea { line-height: 1.5; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); background: var(--surface-2); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); vertical-align: -2px; margin-right: 6px; }
.field { margin-bottom: 14px; }
.field label input[type=radio] { width: auto; margin-right: 6px; }
.field .hint { display: block; margin-top: 5px; font-size: .8rem; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* Buttons: Pill-Form der Marke, ruhiger gesetzt. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: #F6F5F4;
  font: 700 .76rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: #F6F5F4; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, .sidebar a:focus-visible, .theme-toggle:focus-visible, .nav-toggle:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(0, 159, 227, .4); }
.btn-secondary, .btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover, .btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-amber { background: var(--accent); border-color: var(--accent); }
.btn-link { background: none; border: 0; color: var(--warn); padding: 4px 6px; cursor: pointer; font: inherit; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: .68rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; background: var(--surface-2); }
.alert-success { background: var(--ok-bg); color: var(--ok-text); border-color: rgba(47, 245, 80, .25); }
.alert-error { background: var(--warn-bg); color: var(--warn-text); border-color: rgba(242, 123, 31, .35); }
.alert-info { background: var(--info-bg); color: var(--text); border-color: rgba(141, 143, 252, .3); }
.alert code { word-break: break-all; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 58px); display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px; right: -20vw; top: -20vw; background: var(--surface); border-radius: 80px; transform: rotate(-12deg); z-index: 0; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.auth-card .brand { margin-bottom: 20px; color: var(--text); }
.auth-card .logo { height: 26px; }
:root[data-theme="light"] .auth-card .logo, .light-logo { filter: invert(1) brightness(.2); }

/* Task detail */
.detail-block { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; }
.detail-block h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.before-after .before { color: var(--muted); text-decoration: line-through; }
.before-after .after { color: var(--ok-text); font-weight: 700; }
ol.guide { padding-left: 1.3rem; margin: 0; }
ol.guide li { margin-bottom: 4px; }
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filterbar .btn { min-height: 40px; }
.filterbar .field { margin: 0; min-width: 180px; }
.phase-list { display: flex; gap: 8px; flex-wrap: wrap; }
.phase { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: .85rem; font-weight: 700; }
.phase.active { border-color: var(--accent); background: rgba(0, 159, 227, .18); }
.phase.done { color: var(--ok-text); border-color: rgba(47, 245, 80, .3); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
footer.page-foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }

/* Kommentare, Hinweise, Onboarding */
.comment { padding: 10px 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: 0; }
.comment-internal { background: var(--surface-2); margin: 0 -24px; padding: 10px 24px; border-left: 3px solid var(--line-strong); }
.comment-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.comment p { margin: 0; }
tr.unread td { font-weight: 700; }
.onboarding { border-left: 4px solid var(--accent); }
.onboarding ol { margin: 8px 0 12px; padding-left: 1.3rem; }

/* Kennzahlen */
.spark { display: block; margin-top: 6px; }
.delta { font-size: .82rem; font-weight: 700; }
.delta-up { color: var(--ok); }
.delta-down { color: var(--warn); }
.delta-flat, .delta-none { color: var(--muted); }
.kpi .small { margin-top: 2px; }

/* Audits & Inhalte */
pre.code { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .82rem; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
ul.guide { padding-left: 1.3rem; margin: 0; }
.filterbar input[type=text] { min-width: 220px; }
input[type=file] { color: var(--text); }
td form input[type=text], td form textarea { min-width: 220px; }

/* Zeitstrahl */
.timeline { overflow-x: auto; }
.tl-head, .tl-row { display: grid; grid-template-columns: 180px 1fr; border-top: 1px solid var(--line); }
.tl-head { border-top: 0; }
.tl-label { padding: 10px 12px 10px 0; display: flex; flex-direction: column; gap: 2px; }
.tl-track { position: relative; min-height: 46px; }
.tl-head .tl-track { min-height: 28px; }
.tl-month { position: absolute; top: 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 6px; white-space: nowrap; overflow: hidden; }
.tl-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tl-block { position: absolute; height: 24px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .78rem; font-weight: 700; padding: 0 10px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; border: 1px solid var(--line-strong); box-sizing: border-box; transition: border-color .15s; }
.tl-block:hover { border-color: var(--accent); text-decoration: none; }
.tl-block .tl-text { position: relative; }
.tl-progress { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0, 159, 227, .35); }
.tl-active { border-color: var(--accent); }
.tl-done { opacity: .6; }
.tl-done .tl-progress { background: rgba(47, 245, 80, .3); }
.tl-selected { box-shadow: 0 0 0 2px var(--accent); }
.tl-internal { border-style: dashed; }
.tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--warn); pointer-events: none; }
.tl-today span { position: absolute; top: -2px; left: 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); }
.btn-secondary.active { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) { .tl-head, .tl-row { grid-template-columns: 110px 1fr; } }
.userbox > span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Viele Bereiche: Navigation scrollt horizontal statt abzuschneiden */
.nav { overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 10px; font-size: .74rem; flex: 0 0 auto; }
.topbar-inner { gap: 16px; }

/* Jira board */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.board-col { flex: 0 0 260px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; }
.board-col h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; color: var(--muted); }
.board-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.board-card:hover { border-color: var(--accent); }

/* Reports (screen) */
.report .rep-section { margin-bottom: 22px; }
.report h2 { border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; }
.report td.num { text-align: right; }
.report .trend-up { color: var(--ok-text); } .report .trend-down { color: var(--warn-text); }
.report .internal-only { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; }

/* Dashboards */
.dash { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.dash .widget { margin: 0; grid-column: span 3; }
.dash .widget.w-third { grid-column: span 2; } .dash .widget.w-full { grid-column: span 6; }
.widget-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.widget-head h2 { font-size: 1rem; margin: 0; }
.widget-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 0; }
.widget-tools .mini { width: auto; min-height: 32px; padding: 4px 28px 4px 8px; font-size: .8rem; }
.widget-body .kpi .delta { font-weight: 700; font-size: .9rem; }
.widget-explain { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.widget.is-empty { opacity: .75; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis.label { fill: var(--text); }
.chart .marker { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker-dot { fill: var(--warn); }
.chart .bar { fill: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: .8rem; font-weight: 700; }
.tabs a.active, .tabs a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.trend-up { color: var(--ok-text); } .trend-down { color: var(--warn-text); }
@media (max-width: 1100px) { .dash .widget, .dash .widget.w-third { grid-column: span 3; } }
@media (max-width: 760px) { .dash .widget, .dash .widget.w-third, .dash .widget.w-full { grid-column: span 6; } }

/* Jira attachments */
.attachment { margin-bottom: 12px; }
.attachment img { max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 4px; }
.board-card[draggable="true"] { cursor: grab; }
.board-card.dragging { opacity: .5; }
.board-card.pending { opacity: .6; pointer-events: none; }
.board-col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.board-toast { margin-bottom: 10px; }
.edit-block summary { list-style: none; display: inline-flex; }
.edit-block summary::-webkit-details-marker { display: none; }
.light { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; }
.light-green { background: var(--ok); } .light-amber { background: var(--warn); } .light-red { background: #E0303A; }
select.mini { width: auto; min-height: 30px; padding: 3px 26px 3px 8px; font-size: .78rem; margin-left: 6px; background-size: 10px; }
.three-questions { margin-bottom: 16px; }
.three-questions .kpi { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.loading { text-align: center; padding: 40px 22px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); margin: 0 auto 14px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Global search + tour */
.topsearch { flex: 0 1 300px; margin-left: auto; }
.topsearch input { min-height: 34px; padding: 6px 12px; border-radius: 999px; background: rgba(246,245,244,.08); border-color: rgba(246,245,244,.2); color: var(--header-text); font-size: .85rem; }
.topsearch input::placeholder { color: var(--header-muted); }
.topsearch input:focus { background: rgba(246,245,244,.12); box-shadow: 0 0 0 3px rgba(0,159,227,.35); }
.userbox { margin-left: 0; }
.help-btn { width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(246,245,244,.25); background: none; color: var(--header-text); font-weight: 700; cursor: pointer; }
.help-btn:hover { background: var(--header-surface); }
.tour { position: fixed; inset: 0; background: rgba(0, 10, 20, .6); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tour[hidden] { display: none; }
.tour-box { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px; padding: 26px 28px; max-width: 520px; width: 100%; box-shadow: 0 24px 60px rgba(0,10,20,.5); }
.tour-box h2 { margin: 4px 0 10px; }
.tour-box .btn-row { margin-top: 16px; }
@media (max-width: 860px) { .topsearch { display: none; } }
.tabs-areas { margin-bottom: 16px; } .tabs-areas a { padding: 8px 14px; }
/* Schnellsuche (Palette unter dem Suchfeld) – nutzt Oberflächen-Tokens, damit sie hell und dunkel lesbar ist. */
.topsearch { position: relative; }
.topsearch input { background: rgba(246,245,244,.14); border-color: rgba(246,245,244,.35); }
.qs { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 48px rgba(0,10,20,.35); z-index: 50; max-height: 70vh; overflow: auto; padding: 6px; }
.qs[hidden] { display: none; }
.qs-group { padding: 8px 10px 2px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.qs a.qs-item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .9rem; }
.qs a.qs-item:hover, .qs a.qs-item.active { background: var(--surface-2); }
.qs a.qs-item .meta { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.qs .qs-note { padding: 8px 10px; font-size: .85rem; color: var(--muted); }
.qs .qs-note a { font-weight: 600; }
.qs kbd { font-family: inherit; font-size: .7rem; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; color: var(--muted); }
/* Texteditor (data-editor): Toolbar + bearbeitbarer Bereich; gespeichert wird weiterhin Markdown. */
.ed { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); overflow: hidden; }
:root[data-theme="light"] .ed { background: #fff; }
.ed:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,159,227,.25); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ed-bar button { font: inherit; font-size: .8rem; min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; }
.ed-bar button:hover, .ed-bar button.on { background: var(--surface); color: var(--accent); }
.ed-bar .sep { width: 1px; background: var(--line-strong); margin: 4px 4px; }
.ed-area { min-height: 140px; max-height: 60vh; overflow: auto; padding: 10px 14px; outline: none; line-height: 1.5; }
.ed-area[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--muted); }
.ed-area h3, .ed-area h4, .ed-area h5 { margin: 10px 0 4px; } .ed-area p { margin: 0 0 8px; } .ed-area ul, .ed-area ol { margin: 0 0 8px 20px; }
.ed-area pre { background: var(--surface-2); padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; }
.ed-hint { font-size: .72rem; color: var(--muted); padding: 4px 10px; border-top: 1px solid var(--line); }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid rgba(0,0,0,.08); font-size: .9rem; }
/* Suchfeld im Kopf bleibt dunkel, auch im hellen Modus (der Kopf ist immer dunkel). */
:root[data-theme="light"] .topsearch input, :root:not([data-theme="dark"]) .topsearch input { background: rgba(246,245,244,.14); color: var(--header-text); border-color: rgba(246,245,244,.35); }
:root[data-theme="light"] .topsearch input::placeholder, :root:not([data-theme="dark"]) .topsearch input::placeholder { color: var(--header-muted); }
:root[data-theme="light"] .topsearch input:focus, :root:not([data-theme="dark"]) .topsearch input:focus { background: rgba(246,245,244,.2); }
table.bl td, table.bl th { vertical-align: top; }
table.bl td:first-child { max-width: 320px; overflow-wrap: anywhere; }
table.bl select { min-height: 32px; padding: 4px 28px 4px 8px; font-size: .8rem; width: auto; }
table.bl .pill { white-space: nowrap; cursor: help; }
.up { color: var(--ok); } .down { color: var(--warn); } .light-grey { background: var(--line-strong); }
/* Dashboards: Chart.js-Kacheln, Kennzahlen-Reihe, Editor */
.chart-wrap { position: relative; width: 100%; }
.scorecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.scorecards .sc { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.scorecards .value { font-size: 1.4rem; font-weight: 700; } .scorecards .label { font-size: .78rem; color: var(--muted); } .scorecards .delta { font-size: .8rem; font-weight: 600; }
.series-row[hidden], .live-metric-row[hidden] { display: none; }
.widget-preview { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; }
#widget-editor [data-for][hidden] { display: none; }
/* Dashboard-Raster: 12 Spalten, Zeilenhöhe 120px; Kacheln per Drag & Drop (Bearbeiten-Modus) */
.dash.dash-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 120px; }
.dash.dash-grid .widget { grid-column: span 6; display: flex; flex-direction: column; min-height: 0; overflow: hidden; position: relative; }
.dash.dash-grid .widget .widget-body { flex: 1; min-height: 0; overflow: auto; }
.dash.dash-grid .widget .chart-wrap { height: 100% !important; min-height: 120px; }
.dash.editing .widget { cursor: grab; }
.dash.editing .widget.dragging { opacity: .5; }
.dash.editing .widget.drop-before { box-shadow: -4px 0 0 var(--accent); }
.dash.editing .widget.drop-after { box-shadow: 4px 0 0 var(--accent); }
.drag-handle { color: var(--muted); cursor: grab; font-size: .9rem; letter-spacing: -2px; margin-right: 2px; }
.resize-handle { touch-action: none; position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; cursor: nwse-resize; border-right: 3px solid var(--line-strong); border-bottom: 3px solid var(--line-strong); border-radius: 0 0 4px 0; }
.resize-handle:hover { border-color: var(--accent); }
.widget.resizing { outline: 2px dashed var(--accent); }
.dash-saved { position: fixed; bottom: 18px; right: 18px; z-index: 40; }
@media (max-width: 1100px) { .dash.dash-grid .widget { grid-column: span 12 !important; } .resize-handle, .drag-handle { display: none; } }
@media (max-width: 760px) { .dash.dash-grid { grid-auto-rows: auto; } .dash.dash-grid .widget { grid-row: span 1 !important; } .dash.dash-grid .widget .chart-wrap { height: 240px !important; } }
.card.tpl { display: flex; flex-direction: column; gap: 6px; } .card.tpl h3 { margin: 0; } .card.tpl .filterbar { margin-top: auto; }
.dash-card.dragging { opacity: .5; } .dash-card.drop-before { box-shadow: -4px 0 0 var(--accent); } .dash-card.drop-after { box-shadow: 4px 0 0 var(--accent); } .dash-card .card-title h2 a { color: inherit; }
/* Bearbeiten-Modus: Editor als Seitenleiste rechts, das Raster bleibt die Bühne */
.drawer { position: fixed; top: 59px; right: 0; bottom: 0; width: 440px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -18px 0 40px rgba(0,10,20,.35); z-index: 45; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s ease; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tabs-drawer { margin: 0; } .tabs-drawer button { font: inherit; font-size: .85rem; padding: 6px 12px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.tabs-drawer button.active { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.drawer-body { overflow: auto; padding: 14px 16px 24px; flex: 1; }
.drawer-body h2 { font-size: 1rem; margin: 0 0 10px; }
.drawer-body .form-row { grid-template-columns: 1fr 1fr; }
.drawer-body .series-row, .drawer-body .live-metric-row { grid-template-columns: 1fr; }
.drawer-body .widget-preview { margin-top: 10px; }
.drawer-body #felder table { font-size: .82rem; }
.drawer-body #felder form.form-row { grid-template-columns: 1fr; }
body.drawer-open .page { padding-right: 464px; max-width: none; }
.widget-tools .kb-only { display: none; }
.widget-tools:focus-within .kb-only, .dash.editing:focus-within .widget-tools .kb-only { display: inline-flex; }
.empty-state { text-align: center; padding: 40px 20px; } .empty-state h2 { margin: 0 0 6px; } .empty-state .btn { margin-top: 12px; }
.dash.editing .widget.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1100px) { .drawer { width: 100vw; top: 0; } body.drawer-open .page { padding-right: 32px; } }
.rangebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-bottom: 16px; }
.rangebar .field { margin: 0; display: flex; align-items: center; gap: 6px; } .rangebar .field input { width: auto; min-height: 34px; padding: 4px 10px; }
.tabs-range { margin: 0; } .tabs-range a { padding: 5px 11px; font-size: .8rem; }
/* Status direkt wechseln: Auswahl sieht aus wie die Status-Pille */
.status-select { width: auto; min-height: 30px; padding: 3px 28px 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid var(--line-strong); background-color: var(--surface-2); }
.status-select.status-done { color: var(--ok-text); background-color: var(--ok-bg); } .status-select.status-wip { color: var(--accent); } .status-select.status-wait { color: var(--warn-text); background-color: var(--warn-bg); }
/* Ablagefläche für Dateien (Drag & Drop um jedes input[type=file]) */
.dropzone { position: relative; border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 14px 16px; background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
:root[data-theme="light"] .dropzone { background: #fff; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }
.dropzone.over { border-color: var(--accent); background: rgba(0,159,227,.08); }
.dropzone.has-files { border-style: solid; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; min-height: 0; padding: 0; }
.dz-hint { display: block; font-size: .85rem; color: var(--muted); pointer-events: none; }
.dz-list { margin: 6px 0 0; padding: 0 0 0 18px; font-size: .85rem; pointer-events: none; } .dz-list:empty { display: none; }
.attachment { display: inline-flex; gap: 6px; align-items: center; margin: 4px 8px 0 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.attachment:hover { border-color: var(--accent); text-decoration: none; }
