:root {
  /* Farben wie whybefit.de: Marineblau, helles Blaugrau, Grün nur für Erledigt/Status */
  --bg: #eaeef4;
  --surface: #ffffff;
  --ink: #18212c;
  --muted: #5b6573;
  --line: #d8dee7;
  --accent: #18212c;
  --accent-ink: #ffffff;
  --soft: #f1f4f9;
  --ok: #2fa862;
  --ok-ink: #ffffff;
  --ok-soft: #e3f5ea;
  --display: "Montserrat", "Avenir Next", system-ui, sans-serif;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .05);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); line-height: 1.5; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 24px; background: var(--ink); color: #fff;
}
/* Offizielles Logo (logo-white.png für die dunkle Kopfzeile, logo.png für den Login) */
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; height: 28px; width: auto; }
.brand { text-decoration: none; gap: 10px; }
.brand-team { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 20px; letter-spacing: .02em; color: #fff; line-height: 1; }
.topbar .spacer { flex: 1; }
.search {
  width: min(320px, 40vw); padding: 8px 12px; border-radius: 8px;
  border: 1px solid #344458; background: #212c3a; color: #fff;
}
.user-badge { font-size: 13px; color: #aab4c2; white-space: nowrap; }
.role-pill {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px;
  background: #263345; color: #fff; font-size: 12px;
}
.role-pill.editor { background: var(--bg); color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; font-weight: 500;
}
.btn:hover { border-color: var(--ink); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.dark { background: #263345; border-color: #263345; color: #fff; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); }
.btn.primary:disabled:hover { border-color: var(--accent); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 60px); }
main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; min-width: 0; }

/* ---------- Menüleiste ---------- */
.sidebar {
  position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px);
  display: flex; flex-direction: column; gap: 4px; padding: 20px 12px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted);
}
.sidebar a:hover { background: var(--bg); color: var(--ink); }
.sidebar a.active { background: var(--ink); color: #fff; }
.sidebar .ico { width: 18px; text-align: center; }
.sidebar-admin { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.sidebar-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 12px 4px; }
.sidebar a.sidebar-download { font-size: 14px; }
.nav-count {
  margin-left: auto; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px;
  background: var(--bg); color: var(--muted);
}
.sidebar a.active .nav-count { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- Aufgaben-Filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 200px; }
.query-hint {
  display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 8px 12px;
  background: var(--soft); border-left: 3px solid var(--accent); border-radius: 6px; font-size: 14px;
}

/* ---------- Mitarbeiter ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.person-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.person-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.person-name { font-weight: 700; font-size: 16px; }
.person-stats { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.person-stats b { color: var(--ink); }
.avatar {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px;
}
.avatar.large { width: 64px; height: 64px; font-size: 22px; }
.person-head { display: flex; gap: 20px; align-items: flex-start; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg);
  font-size: 13px; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 8px; overflow-x: auto; }
.tab {
  padding: 10px 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab.active .nav-count { background: var(--accent); color: var(--accent-ink); }
.person-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.person-link:hover { text-decoration-color: var(--ink); }
.intro-box { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.intro-box summary { cursor: pointer; font-weight: 600; color: var(--ink); width: fit-content; }
.intro { max-width: 90ch; margin: 8px 0 0; white-space: pre-wrap; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-family: var(--display); font-size: 22px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .01em; }
.section-head h2 .meta { font-family: system-ui, sans-serif; font-style: normal; text-transform: none; letter-spacing: 0; }
.section-head .spacer { flex: 1; }
.meta { color: var(--muted); font-size: 13px; }

/* ---------- Organigramm (Baum) ---------- */
.chart-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow-x: auto; box-shadow: var(--shadow); margin-bottom: 28px;
}
.tree, .tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.tree { width: max-content; min-width: 100%; }
.tree ul { padding-top: 20px; position: relative; }
.tree li { position: relative; padding: 20px 4px 0; display: flex; flex-direction: column; align-items: center; }
.tree > li { padding-top: 0; }
/* Verbindungslinien */
.tree li::before, .tree li::after {
  content: ""; position: absolute; top: 0; width: 50%; height: 20px; border-top: 2px solid var(--line);
}
.tree li::before { right: 50%; }
.tree li::after { left: 50%; border-left: 2px solid var(--line); }
.tree li:only-child::before, .tree li:only-child::after { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 6px 0 0; }
.tree li:first-child::after { border-radius: 6px 0 0 0; }
.tree > li::before, .tree > li::after { display: none; }
.tree ul::before {
  content: ""; position: absolute; top: 0; left: 50%; height: 20px; border-left: 2px solid var(--line);
}

/* Reine Rollen-Ebenen untereinander statt nebeneinander */
.tree ul.stack { flex-direction: column; align-items: center; }
.tree ul.stack > li { padding: 10px 0 0; }
.tree ul.stack > li::before {
  display: block; top: 0; left: 50%; right: auto; width: 0; height: 10px;
  border: 0; border-left: 2px solid var(--line); border-radius: 0;
}
.tree ul.stack > li::after { display: none; }
.tree ul.stack .node { width: 170px; max-width: none; }

.node {
  min-width: 120px; max-width: 170px; padding: 8px 10px; text-align: center; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: 10px;
  transition: border-color .15s, transform .15s;
}
.node:hover { border-color: var(--ink); transform: translateY(-1px); }
.node.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.node.dim { opacity: .35; }
.node .name { font-weight: 700; font-size: 14px; }
.node .lead { color: var(--muted); font-size: 12px; }
.node.active .lead { color: #c3cbd6; }
.node .count { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Bereichs-Detail ---------- */
.unit-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.unit-card h2 { font-size: 24px; }
.people { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 12px; }
.people div { font-size: 14px; }
.people .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.task {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.task h3 { font-size: 17px; }
.task .row { display: grid; grid-template-columns: 128px 1fr; gap: 8px; font-size: 14px; }
.task .row .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.task ul.todos { margin: 0; padding-left: 0; list-style: none; }
.task ul.todos li { display: flex; gap: 8px; align-items: baseline; }
.task ul.todos li.done span { text-decoration: line-through; color: var(--muted); }
.task .notes { background: var(--soft); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; font-size: 14px; white-space: pre-wrap; }
.task .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); }
.pre { white-space: pre-wrap; }

.area-head { font-size: 15px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.area-head:first-of-type { margin-top: 8px; }
.task-top { display: flex; align-items: center; gap: 8px; }
.task-top .spacer { flex: 1; }
.code { white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #e9edf2; padding: 1px 6px; border-radius: 4px; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #e9edf2; color: var(--muted); font-weight: 600; }
.status-zugewiesen { background: #e3eefc; color: #1f5fae; }
.status-sop-erstellt { background: #fff1d6; color: #8a5a00; }
.status-etabliert { background: #e1f5e4; color: #1d7a34; }
.open { color: #b35c00; font-style: italic; }

/* ---------- Mein Tag ---------- */
.day-hero {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px;
}
.day-hero h2 { font-family: var(--display); font-size: 28px; font-weight: 900; font-style: italic; text-transform: uppercase; margin: 2px 0 6px; }
.day-hero .meta { color: #aab4c2; }
.day-summary { color: #d3d9e2; }
.day-summary b { color: #7fd8a0; }
.day-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.day-hero .progress-text { color: #fff; }
.day-hero .progress-bar { background: #263345; width: 180px; }
.day-picker { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day-hero .day-picker { color: #aab4c2; }
.day-picker select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 200px; }

.progress { display: inline-flex; align-items: center; gap: 8px; }
.progress-bar { display: inline-block; width: 110px; height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.progress-text { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.person-card .progress { margin-top: 6px; }

.day-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 16px;
}
.day-section.complete { border-color: var(--ok); }
.day-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.day-section-head h3 { font-size: 18px; flex: 1; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.todo:first-child { border-top: 0; }
.todo-check {
  appearance: none; flex: none; width: 26px; height: 26px; margin: 0; border-radius: 8px; cursor: pointer;
  border: 2px solid #c3cbd6; background: var(--surface); display: grid; place-items: center; transition: all .15s;
}
.todo-check:hover { border-color: var(--ink); }
.todo-check:checked { background: var(--ok); border-color: var(--ok); }
.todo-check:checked::after { content: "✓"; font-weight: 800; font-size: 15px; color: var(--ok-ink); }
.todo-check:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.todo-dot { flex: none; width: 8px; height: 8px; margin: 8px 9px; border-radius: 50%; background: var(--line); }
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; font-size: 16px; }
.todo.done .todo-title { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.todo-done-info { color: #1d7a44; font-weight: 600; }
.todo-details { margin-top: 6px; font-size: 14px; }
.todo-details summary { cursor: pointer; color: var(--muted); font-size: 13px; width: fit-content; }
.todo-details .row { display: grid; grid-template-columns: 128px 1fr; gap: 8px; margin-top: 6px; }
.todo-details .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.todo-details .notes { margin-top: 8px; background: var(--soft); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.todo-details .todos { list-style: none; padding: 0; margin: 8px 0 0; }
.day-extra {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 20px; margin-bottom: 16px;
}
.day-extra summary { cursor: pointer; font-weight: 700; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-extra summary .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.day-extra h4 { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.day-hero .role-pill { vertical-align: middle; font-size: 13px; font-weight: 600; }
.role-pill.small { font-size: 11px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; background: var(--bg); color: var(--muted); font-weight: 600; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.team-card {
  display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer; padding: 10px 12px;
  background: var(--bg); border: 2px solid transparent; border-radius: 10px;
}
.team-card:hover { border-color: var(--line); }
.team-card.active { border-color: var(--ink); background: var(--surface); }
.team-card .avatar { width: 36px; height: 36px; font-size: 13px; }
.team-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-main .progress-bar { width: 90px; }
.todo-check:disabled { cursor: not-allowed; opacity: .6; }

/* Eigene To-Dos */
.personal-section .day-section-head .hint { font-size: 13px; color: var(--muted); }
.ptodo-add, .ptodo-edit { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.ptodo-add input[name="text"], .ptodo-edit input[name="text"] { flex: 1 1 260px; }
.ptodo-add input, .ptodo-add select, .ptodo-edit input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.todo.personal { align-items: center; }
.todo.personal .list-actions { opacity: .45; }
.todo.personal:hover .list-actions { opacity: 1; }
.todo.personal.editing { display: block; }
.ptodo-add select[hidden] { display: none; }
/* Priorität bei To-Dos für andere: dringend rot, normal orange, nicht dringend gelb */
.todo.personal.prio-high, .todo.personal.prio-normal, .todo.personal.prio-low { border-left: 4px solid; padding-left: 10px; }
.todo.personal.prio-high { border-left-color: #d93025; }
.todo.personal.prio-normal { border-left-color: #f08c00; }
.todo.personal.prio-low { border-left-color: #f5c400; }
.todo.personal.done { border-left-color: var(--line); }
.prio-tag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.prio-tag.prio-high { background: #fde3e1; color: #b3261e; }
.prio-tag.prio-normal { background: #ffe8cc; color: #a35a00; }
.prio-tag.prio-low { background: #fff6c2; color: #7a6000; }
.due { font-weight: 600; }
.due.today { color: #8a5a00; }
.due.overdue { color: var(--danger); }
.ptodo-done { margin-top: 10px; }
.ptodo-done summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; width: fit-content; }
.ptodo-done .btn { margin-top: 8px; }

/* ---------- Einstellungen: Logins ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.users-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.users-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.users-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.users-table tr:last-child td { border-bottom: 0; }
.users-table select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.users-table .hint { font-size: 12px; color: var(--muted); }
.row-actions { white-space: nowrap; text-align: right; }
.user-add { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.user-add label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.user-add input, .user-add select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 180px; }
.password-box {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; padding: 14px 16px;
  background: var(--soft); border: 2px solid var(--accent); border-radius: var(--radius);
}
.password-box .hint { font-size: 13px; color: var(--muted); }
#users-box > .hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.password-box .btn { align-self: flex-start; }
code.big { font-size: 18px; padding: 3px 10px; background: #fff; border: 1px solid var(--line); letter-spacing: .04em; }
.period-select { font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-width: 150px; }

/* ---------- Einstellungen ---------- */
.settings-head { font-size: 17px; margin: 24px 0 6px; }
.intro-text { color: var(--muted); font-size: 14px; max-width: 90ch; margin: 0 0 14px; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.list-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.list-head { display: flex; align-items: baseline; gap: 8px; }
.list-head h3 { font-size: 16px; flex: 1; }
.list-card .hint { margin: 0; font-size: 13px; color: var(--muted); }
.list-card textarea, .list-filter, .list-add input, .list-edit-input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.list-card textarea { resize: vertical; }
.list-items { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line); }
.list-items li { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list-usage { font-size: 12px; font-weight: 600; min-width: 26px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.list-usage.unused { opacity: .5; }
.list-actions { display: flex; gap: 2px; opacity: .45; transition: opacity .15s; }
.list-items li:hover .list-actions, .list-actions:focus-within { opacity: 1; }
.icon-btn {
  width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px;
  background: none; cursor: pointer; font-size: 14px;
}
.icon-btn:hover:not(:disabled) { border-color: var(--line); background: var(--bg); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.danger:hover { color: var(--danger); }
.list-add { display: flex; gap: 8px; }
.list-add .btn { white-space: nowrap; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
@media (hover: none) { .list-actions { opacity: 1; } }

/* ---------- Dialog ---------- */
dialog {
  border: 0; border-radius: var(--radius); padding: 0; width: min(640px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
dialog::backdrop { background: rgba(10, 12, 16, .5); }
dialog { max-height: calc(100vh - 32px); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
dialog h3 { font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea, .field select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field textarea { min-height: 70px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dialog-actions .spacer { flex: 1; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); color: var(--ok-ink); font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }

/* Großer Toast: alle Tagesaufgaben erledigt */
.celebration {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 12, 16, .55); overflow: hidden; cursor: pointer; animation: fade-in .25s ease-out;
}
.celebration.closing { opacity: 0; transition: opacity .3s; }
.celebration-card {
  position: relative; z-index: 1; width: min(420px, 100%); text-align: center; padding: 32px 28px 26px;
  background: var(--surface); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1);
}
.celebration-card h2 { font-size: 26px; margin: 8px 0 6px; }
.celebration-card p { color: var(--muted); margin: 0 0 20px; }
.celebration-emoji { font-size: 64px; line-height: 1; }
.confetti {
  position: absolute; top: -12px; width: 9px; height: 15px; border-radius: 2px; opacity: .95;
  animation-name: confetti-fall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes confetti-fall { to { top: 105%; transform: translateX(60px) rotate(720deg); } }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .celebration, .celebration-card { animation: none; } }

/* ---------- Login ---------- */
/* Wie die Startseite von whybefit.de: dunkler Grund, Titel kursiv in Großbuchstaben */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 0%, #2c3c52 0%, var(--ink) 60%), var(--ink); }
.login-box { width: min(380px, 100%); background: var(--surface); border-radius: var(--radius); padding: 32px; }
.login-brand { gap: 12px; margin: 0 0 14px; }
@media (max-width: 420px) {
  .login-brand { gap: 10px; }
  .login-brand .login-title { font-size: 25px; }
  .login-box .login-brand img { height: 33px; }
}
.login-title { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: .02em; line-height: 1; }
.login-box .brand img { height: 40px; }
.login-box p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.login-box .btn { justify-content: center; padding: 11px; }
.error-msg { color: var(--danger); font-size: 14px; min-height: 20px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { position: static; }
  .sidebar {
    position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; overflow-x: auto;
    padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .sidebar a { flex: 1; justify-content: center; white-space: nowrap; padding: 8px 10px; font-size: 14px; }
  .sidebar .ico, .sidebar .nav-count { display: none; }
  .sidebar-admin { margin: 0; padding: 0; border: 0; flex-direction: row; }
  .sidebar-label { display: none; }
}
@media (max-width: 700px) {
  .day-hero { padding: 18px; }
  .day-hero h2 { font-size: 22px; }
  .day-hero-side { align-items: stretch; width: 100%; }
  .day-hero .progress-bar { width: 100%; }
  .day-section { padding: 12px 14px; }
  .todo-details .row { grid-template-columns: 1fr; gap: 0; }
  .person-head { flex-direction: column; gap: 12px; }
  .avatar.large { width: 52px; height: 52px; font-size: 18px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; }
  .search { order: 5; width: 100%; }
  main { padding: 16px; }
  .tasks { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .task .row { grid-template-columns: 1fr; gap: 0; }
}
@media print {
  .topbar, .sidebar, .btn, .actions, .filters, .tabs { display: none !important; }
  .layout { display: block; }
  .chart-wrap, .task, .unit-card { box-shadow: none; }
}

/* ---------- Stundenzettel ---------- */
.ts-head { flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.month-nav .btn.small[data-ts-month="-1"], .month-nav .btn.small[data-ts-month="1"] { font-size: 18px; line-height: 1; padding: 5px 12px; }
.month-label { font-size: 18px; min-width: 150px; text-align: center; }
.month-now { font-size: 12px; font-weight: 600; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; border-radius: 99px; }
.ts-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 14px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.ts-summary .spacer { flex: 1; }
.ts-summary .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ts-summary b { font-size: 20px; }
.ts-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ts-table th, .ts-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ts-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; }
.ts-table tbody th { font-weight: 600; width: 110px; }
.ts-table .num { text-align: right; }
.ts-table td:last-child { width: 100%; white-space: normal; }
.ts-table input { width: 100%; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.ts-table input[type="time"] { min-width: 96px; }
.ts-table input[type="number"] { min-width: 70px; text-align: right; }
.ts-table input:hover { border-color: var(--line); background: #fff; }
.ts-table input:focus { outline: none; border-color: var(--ink); background: #fff; }
.ts-table.readonly td { padding: 9px 8px; }
.ts-table tr.weekend { background: #f7f7f3; }
.ts-table tr.weekend th { color: var(--muted); }
.ts-table tr.ts-split td { background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; padding: 6px 8px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ts-table tr.today { box-shadow: inset 4px 0 0 var(--accent); }
.ts-table tr.today th::after { content: " · heute"; font-weight: 400; font-size: 12px; color: var(--muted); }
.ts-table tr.invalid .ts-hours { color: var(--danger); font-weight: 600; }
.ts-table tr.invalid input[name="end"] { border-color: var(--danger); }
.ts-hours { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 70px; }
.ts-table tfoot th, .ts-table tfoot td { border-bottom: 0; padding: 12px 8px; font-weight: 700; background: #f7f7f3; }
.ts-table tfoot .meta { font-weight: 400; }
.ts-team { margin: 0 0 16px; }
.ts-team-actions { margin: 12px 0; }
.ts-team-table .num { text-align: right; }
.ts-team-table tr.active td { background: #f3f6fb; }
.ts-team-table .row-actions { white-space: nowrap; text-align: right; }
@media (max-width: 700px) {
  .ts-summary { padding: 14px; gap: 10px 20px; }
  .ts-table tr.today th::after { content: ""; }
}
@media print {
  .month-nav, .ts-team, #ts-status { display: none !important; }
  .ts-table input { border: 0; padding: 0; }
}
.ts-payroll { margin: 0 0 16px; padding: 16px 20px; background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.ts-payroll-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 12px; }
.ts-payroll-head .spacer { flex: 1; }
.ts-payroll-head .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ts-payroll-head b { font-size: 18px; margin-right: 8px; }
.ts-payroll .table-wrap { box-shadow: none; }
.ts-payroll tfoot th, .ts-payroll tfoot td { padding: 10px 12px; background: #f7f7f3; }
.ts-payroll .hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Urlaub ---------- */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  margin-left: auto; border-radius: 99px; background: #e5383b; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.sidebar a .nav-badge { margin-left: auto; }
h3 .nav-badge { margin-left: 6px; vertical-align: 2px; }
.vac-card, .vac-pending {
  margin-bottom: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.vac-card h3, .vac-pending h3 { font-size: 17px; margin-bottom: 10px; }
.vac-pending { border: 2px solid #e5383b; }
.vac-list { list-style: none; margin: 0; padding: 0; }
.vac-list li { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.vac-list li:first-child { border-top: 0; }
.vac-main { flex: 1; min-width: 220px; }
.vac-actions { display: flex; gap: 8px; align-items: center; }
.vac-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 8px; }
.vac-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.vac-form label.grow { flex: 1; min-width: 200px; }
.vac-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 400; }
#vac-preview b { color: var(--ink); }
.vac-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 10px; }
.vac-card-head .spacer { flex: 1; }
.vac-card-head .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vac-card-head b { font-size: 18px; }
.vac-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.vac-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vac-legend i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.vac-cal-wrap { box-shadow: none; }
.vac-cal { border-collapse: collapse; font-size: 11px; width: 100%; table-layout: fixed; min-width: 720px; }
.vac-cal th { font-weight: 600; color: var(--muted); padding: 3px 0; text-align: center; }
.vac-cal thead th:first-child, .vac-cal tbody th { width: 110px; }
.vac-cal tbody th { text-align: left; padding: 0 8px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vac-cal td { height: 22px; border: 1px solid #e6eaf0; padding: 0; }
.vd.off { background: #eef1f5; }
.vd.hol { background: repeating-linear-gradient(45deg, #e1e6ec, #e1e6ec 3px, #eef1f5 3px, #eef1f5 6px); }
.vd.none { background: #d3dae3; }
.vd.ok { background: var(--ok); }
.vd.open { background: #ffdf8c; }
.vac-month { margin: 14px 0 6px; font-size: 14px; }
.vac-month:first-of-type { margin-top: 4px; }
.vac-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #e9edf2; color: var(--muted); }
.vac-status.vac-offen { background: #fff1d6; color: #8a5a00; }
.vac-status.vac-genehmigt { background: #e1f5e4; color: #1d7a34; }
.vac-status.vac-abgelehnt { background: #fde2e1; color: var(--danger); }
.vac-table tr.muted td { color: var(--muted); }
.vac-table .num { text-align: right; }
@media (max-width: 900px) {
  .sidebar a .nav-badge { margin-left: 4px; }
}
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vac-stats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 28px; margin: 4px 0 16px; }
.vac-stats .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vac-stats b { font-size: 20px; }
.vac-stats b.muted { color: var(--muted); font-size: 16px; }
.vac-stats .hint { font-size: 12px; color: var(--muted); }
.vac-rest b, .vac-rest { color: #1d7a34; }
.vac-rest.zero, .vac-rest.zero b { color: var(--muted); }
.vac-rest.neg, .vac-rest.neg b { color: var(--danger); }
.vac-meter { flex: 1 1 100%; display: flex; height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.vac-meter .ok { background: var(--ok); }
.vac-meter .open { background: #ffdf8c; }
.vac-balances { box-shadow: none; margin-bottom: 6px; }
.vac-card > .hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.neg-text, .vac-stats b.neg-text { color: var(--danger); }

/* ---------- Rhythmus: zuletzt erledigt / wieder fällig ---------- */
.todo-next { color: var(--muted); }
.deputy-tag { font-weight: 600; color: #1f5fae; }
.deputy-section { border-style: dashed; }
.deputy-section .day-section-head .hint { font-size: 13px; color: var(--muted); }
.backfill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.backfill input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; margin-left: 4px; }
.team-tag { font-weight: 600; color: #1d7a34; }
.site-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0; }
.kind-pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.kind-pill.kind-person { background: #e9edf2; color: var(--muted); }
.kind-pill.kind-each { background: #e3eefc; color: #1f5fae; }
.kind-pill.kind-team { background: #e1f5e4; color: #1d7a34; }
.kind-pill.unset { background: transparent; border: 1px dashed currentColor; }
.each-tag { font-weight: 600; color: #1f5fae; }
.reset-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.reset-actions .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ts-table tr.vacation { background: #e9eef6; }
.ts-vac { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--ok); color: var(--ok-ink); }

/* ---------- Mein Tag: Heute arbeite ich in … ---------- */
.site-switch { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.site-switch-label { font-size: 12px; font-weight: 600; color: #aab4c2; }
.site-btns { display: inline-flex; background: #263345; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.site-btn { border: 0; background: transparent; color: #d3d9e2; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.site-btn:hover { color: #fff; }
.site-btn.active { background: var(--bg); color: var(--ink); }
@media (max-width: 700px) { .site-switch { align-items: stretch; } .site-btns { display: flex; } .site-btn { flex: 1; } }
.rename-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; justify-content: space-between;
  margin-bottom: 12px; padding: 12px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.rename-all .hint { font-size: 13px; color: var(--muted); }
#person-name-hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.merge-field { border-top: 1px dashed var(--line); padding-top: 12px; }
.merge-row { display: flex; gap: 8px; }
.merge-row select { flex: 1; }
.vd.sick { background: #ffbdb8; }
.vd.uni { background: #bdd6ff; }
.vac-status.vac-type-krank { background: #fde2e1; color: var(--danger); }
.vac-status.vac-type-uni { background: #e3eefc; color: #1f5fae; }
.vac-form label select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 400; }
.day-section.deputy-urgent { border: 2px solid #e5383b; }
.deputy-urgent > .hint { margin: 0 0 6px; font-size: 14px; color: var(--danger); font-weight: 600; }
.ts-table tr.sick { background: #fff1f0; }
.ts-vac.ts-sick { background: #ffbdb8; color: #7a1d14; }
.ok-text { color: #1d7a34; }
#mail-month { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* Überstundenkonto (Stundenzettel oben und Erinnerung auf „Mein Tag“) */
.ot-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.ot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ot-head .label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ot-balance { font-size: 28px; line-height: 1.1; }
.ot-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; }
.ot-ok { color: #1e7a3c; font-weight: 600; }
.pos { color: #1e7a3c; }
.neg { color: var(--danger); }
.ot-diff { font-weight: 700; white-space: nowrap; }
.ot-weeks { list-style: none; margin: 8px 0 0; padding: 0; }
.ot-week { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ot-week:first-child { border-top: 0; }
.ot-week-main { flex: 1 1 260px; }
.ot-actions { display: flex; gap: 6px; }
.ot-form { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ot-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ot-form input[name="ist"] { width: 90px; }
.ot-form input[name="note"] { flex: 1 1 220px; }
.ot-current { margin: 10px 0 0; }
.ot-history { margin-top: 10px; }
.ot-history summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.ot-tag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #ffe8cc; color: #a35a00; }
.ot-reminder { border-left: 4px solid #f08c00; }
.ot-head b.muted { color: var(--muted); font-size: 16px; display: block; }

/* ---------- News ---------- */
.news-head { flex-wrap: wrap; }
.news-head .check-row { font-size: 13px; color: var(--muted); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.news-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.news-tile-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.news-tile-head h3 { font-size: 17px; }
.news-tile-head .hint { font-size: 12px; color: var(--muted); }
.news-tile-head .btn { font-size: 18px; line-height: 1; padding: 4px 11px; }
.grow { flex: 1; min-width: 0; }
.news-empty { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.news-post { padding: 12px 0; border-top: 1px solid var(--line); }
.news-tile-head + .news-post { border-top: 0; }
.news-post h4 { margin: 2px 0 2px; font-size: 15px; }
.news-post.unread h4::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #e5383b; vertical-align: 2px; }
.news-post.expired { opacity: .6; }
.news-post.planned { opacity: .75; }
.news-planned { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e3edfa; color: #1f5fae; }
.news-plan { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 0; margin: 0 0 12px; }
.news-plan legend { font-weight: 700; padding: 0 4px; }
.news-post-head { display: flex; flex-wrap: wrap; gap: 6px; }
.news-post-head:empty { display: none; }
.news-flag, .news-new, .news-tile-name { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.news-flag { background: #fde3e1; color: #b3261e; }
.news-new { background: #e5383b; color: #fff; }
.news-tile-name { background: var(--bg); color: var(--muted); }
.news-when { font-weight: 600; font-size: 14px; color: #1f5fae; }
.news-text { white-space: pre-wrap; font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.news-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.news-actions:empty { display: none; }
.news-reads { font-size: 13px; color: var(--muted); }
.news-reads summary { cursor: pointer; }
.news-reads div { margin-top: 4px; color: var(--ink); }
.news-reads .hint { color: var(--muted); }
.news-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 8px; }
.news-important { margin-bottom: 18px; padding: 14px 18px; background: var(--surface); border: 2px solid #e5383b; border-radius: var(--radius); box-shadow: var(--shadow); }
.news-important h3 { font-size: 17px; margin-bottom: 4px; }
.news-important-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.news-important .news-post { border-top: 0; }
.news-day .news-post:first-of-type { border-top: 0; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
.audience-box { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.audience-box.people { max-height: 180px; overflow-y: auto; }
#news-dialog, #shift-dialog { width: min(640px, calc(100vw - 32px)); }

/* ---------- Dienstplan ---------- */
.roster-head { flex-wrap: wrap; }
.site-btns.light { background: var(--surface); border: 1px solid var(--line); }
.site-btns.light .site-btn { color: var(--muted); }
.site-btns.light .site-btn:hover { color: var(--ink); }
.site-btns.light .site-btn.active { background: var(--ink); color: #fff; }
.month-nav .roster-step { font-size: 18px; line-height: 1; padding: 5px 12px; }
.roster-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid #f08c00; border-radius: var(--radius); }
.roster-status.published { border-left-color: #1d7a34; }
.roster-status.changed { border-left-color: #1f5fae; }
.roster-status .hint { font-size: 13px; color: var(--muted); }
.roster-status .grow { flex: 1 1 300px; }
.roster-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.roster-tools .check-row { font-size: 13px; }
.roster-quick, .tpl-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.roster-quick .hint { font-size: 13px; color: var(--muted); margin-right: 4px; }
.tpl-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tpl-chip small { font-weight: 400; color: var(--muted); }
.tpl-chip:hover { border-color: var(--ink); }
.tpl-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tpl-chip.active small { color: #d3d9e2; }
.shift-abs { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 99px; background: #d3dae3; color: var(--ink); font-size: 11px; font-weight: 700; }
.shift-abs.soft { background: #ffdf8c; }
.roster-hours { font-weight: 700; white-space: nowrap; }
.roster-hours .hint { font-weight: 400; color: var(--muted); }
.roster-hours.over { color: #a35a00; }
.roster-hours.ok { color: #1d7a34; }
.cov { display: grid; grid-template-columns: repeat(11, 1fr); gap: 1px; }
.cov i { height: 10px; border-radius: 2px; }
.cov-text { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: #1d7a44; }
.cov-text.gap { color: var(--danger); }
.cov-0 { background: #ffbdb8; color: #7a1d14; }
.cov-1 { background: #edf8f1; color: #1d7a44; }
.cov-2 { background: #bfe8cf; color: #1d6b3f; }
.cov-3 { background: var(--ok); color: var(--ok-ink); }
.roster-legend { margin: 6px 0 16px; }
.roster-legend .leg-conflict { background: #ffbdb8; }
.roster-sub { margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.roster-tpl summary { cursor: pointer; }
.roster-tpl summary .hint { font-size: 12px; color: var(--muted); margin-left: 6px; }
#roster-tpl-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tpl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl-row input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.tpl-row input[name="name"] { width: 140px; }
.tpl-row input[name="pause"] { width: 70px; }
.tpl-row .hint { font-size: 12px; color: var(--muted); }
.tpl-actions { display: flex; gap: 8px; }
.shift-list { list-style: none; margin: 0; padding: 0; }
.shift-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.shift-list li:first-child { border-top: 0; }
.shift-list li b { min-width: 80px; }
.shift-list li.today b { color: #1d7a44; }
#shift-preview { min-height: 18px; }
@media (max-width: 700px) {
  .grid3 { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .roster-status { flex-direction: column; align-items: stretch; }
  .roster-status .grow { flex: none; }
}
@media print {
  .roster-status, .roster-quick, .roster-tpl, #view-dienstplan .vac-card, .site-btns { display: none !important; }
}

/* ---------- Anleitungen ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .1s; }
.guide-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.guide-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg); display: block; }
.guide-cover.empty { display: grid; place-items: center; font-size: 34px; color: #c9cac2; }
.guide-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; align-items: flex-start; }
.guide-card-body b { font-size: 16px; }
.guide-summary { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide { max-width: 860px; }
.guide-head { align-items: flex-start; flex-wrap: wrap; }
.guide-head h2 { font-size: 26px; margin: 4px 0; }
.guide-intro { font-size: 16px; white-space: pre-wrap; margin: 0 0 18px; padding: 12px 16px; background: var(--soft); border-left: 3px solid var(--accent); border-radius: 6px; }
.guide-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.guide-step { counter-increment: step; position: relative; margin-bottom: 14px; padding: 16px 18px 16px 62px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.guide-step::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--display); font-style: italic; font-weight: 800; display: grid; place-items: center; }
.guide-step .news-text { font-size: 15px; margin: 0; }
.guide-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.guide-img, .guide-video { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #111; border-radius: 8px; }
.guide-img { background: var(--bg); cursor: zoom-in; }
.guide-editor { max-width: 860px; display: flex; flex-direction: column; gap: 0; }
.guide-editor .vac-card { display: flex; flex-direction: column; gap: 12px; }
.guide-editor .field input, .guide-editor textarea { width: 100%; }
.guide-editor textarea { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; }
.guide-step-head { display: flex; align-items: center; gap: 6px; }
.guide-step-head .spacer { flex: 1; }
.guide-media.edit { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-top: 0; }
.guide-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.guide-thumb img, .guide-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-thumb-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(22, 24, 29, .8);
  color: #fff; cursor: pointer; font-size: 13px; }
.guide-badge { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
.guide-thumb.uploading { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; color: var(--muted); }
.guide-thumb.uploading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-thumb.uploading progress { width: 100%; accent-color: var(--ok); }
.guide-add-media { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; }
.guide-add-media:hover, .guide-add-media:focus-within { border-color: var(--ink); color: var(--ink); }
.guide-add-media input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.guide-editor > .btn { align-self: flex-start; margin-bottom: 10px; }
.guide-limits { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.guide-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .guide-step { padding: 14px 14px 14px 52px; }
  .guide-step::before { left: 12px; width: 28px; height: 28px; }
  .guide-media { grid-template-columns: 1fr; }
  .guide-head .grow { flex: 1 1 100%; }
  .guide-head h2 { font-size: 22px; }
}
@media print {
  #view-anleitungen .back, .guide-head .btn { display: none !important; }
  .guide-step { box-shadow: none; break-inside: avoid; }
  .guide-video { display: none; }
}

/* Dienstplan als Wochenkalender (Zeitachse 10–21 Uhr) */
.roster-head .btn { margin-left: 4px; }
.roster-tip { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.roster-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: start; }
.cal-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal { display: grid; grid-template-columns: 52px repeat(7, minmax(130px, 1fr)); min-width: 960px; }
.cal-corner { border-bottom: 1px solid var(--line); background: #f7f9fb; position: sticky; left: 0; z-index: 3; }
.cal-day-head { padding: 8px 8px 6px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9fb; font-size: 13px; }
.cal-day-head b { display: block; font-size: 14px; }
.cal-day-head.today { background: #e9eef6; box-shadow: inset 0 3px 0 var(--accent); }
.cal-absent { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.cal-absent .shift-abs { margin: 0; font-weight: 600; }
.cal-axis { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.cal-axis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-axis span:first-child { transform: none; }
.cal-axis span:last-child { transform: translateY(-100%); }
.cal-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 28px); background-size: 100% 56px; }
.cal-col.today { background-color: #f3f6fb; }
.cal-col.addable { cursor: copy;
  background-image: linear-gradient(to left, #eef2f8 30px, transparent 30px), repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 28px);
  background-size: 100% 100%, 100% 56px; }
.cal-col.addable:hover { background-color: #f5f7fb;
  background-image: linear-gradient(to left, #dde5f0 30px, transparent 30px), repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 28px); }
/* "+" im freien Streifen: zeigt, wo man klicken kann (Klick landet auf der Spalte selbst) */
.cal-col.addable::before { content: "+"; position: absolute; top: 4px; right: 0; width: 30px; text-align: center; font-size: 18px; font-weight: 700;
  color: #2fa862; pointer-events: none; }
.shift-block { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden;
  padding: 4px 6px 4px 8px; border: 0; border-left: 4px solid #2fa862; border-radius: 6px; background: #e3f5ea; color: var(--ink);
  font: inherit; font-size: 12px; text-align: left; line-height: 1.25; cursor: pointer; }
div.shift-block { cursor: default; }
/* Drag & Drop im Dienstplan */
button.shift-block { cursor: grab; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.shift-block.dragging { z-index: 5; cursor: grabbing; overflow: visible; opacity: .92; box-shadow: 0 8px 24px rgba(24, 33, 44, .28); outline: 2px solid var(--ink); }
.shift-block.dragging::after { content: attr(data-drop-label); position: absolute; left: 4px; top: -22px; padding: 1px 8px; border-radius: 99px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.shift-block.drop-invalid { outline-color: var(--danger); }
.shift-block.drop-invalid::after { background: var(--danger); }
body.shift-dragging, body.shift-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.shift-block:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); z-index: 1; }
.shift-block.mine { background: #d6e0ee; border-left-color: var(--ink); }
.shift-block.unassigned { background: #fff6e6; border: 1px dashed #f08c00; border-left: 4px solid #f08c00; }
.shift-block.unassigned .shift-person { color: #a35a00; }
.shift-block.conflict { background: #ffd9d6; border-left-color: var(--danger); }
.shift-avatar { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 700;
  background: hsl(var(--h) 60% 85%); color: hsl(var(--h) 50% 25%); }
.shift-block .shift-avatar { margin-bottom: 2px; }
.shift-time { font-weight: 600; color: #1d6b3f; }
.shift-person { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.shift-note { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.shift-abs { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 99px; background: #d3dae3; color: var(--ink); font-size: 11px; font-weight: 700; }
.shift-abs.soft { background: #ffdf8c; }
.cal-cov { padding: 6px 6px 8px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: #f7f9fb; }
.cal-cov-label { border-top: 1px solid var(--line); border-bottom: 0; font-size: 10px; font-weight: 700; color: var(--muted); padding: 8px 4px; text-align: right; }
.roster-side { position: sticky; top: 76px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.roster-side h3 { font-size: 15px; margin-bottom: 8px; }
.roster-hours-list { list-style: none; margin: 0; padding: 0; }
.roster-hours-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.roster-hours-list li:first-child { border-top: 0; }
.roster-hours-list li.me b { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.roster-hours-list .hint { display: block; font-size: 11px; color: var(--muted); }
.roster-hours.under { color: var(--muted); }
.roster-side-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); font-size: 13px; }
.roster-side-open { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #fff6e6; color: #a35a00; font-size: 13px; font-weight: 600; }
.roster-legend .leg-shift { background: #e3f5ea; border-left: 3px solid #2fa862; }
.roster-legend .leg-mine { background: #d6e0ee; border-left: 3px solid var(--ink); }
.roster-legend .leg-open { background: #fff6e6; border: 1px dashed #f08c00; }
.roster-legend .leg-conflict { background: #ffd9d6; }
@media (max-width: 1100px) {
  .roster-layout { grid-template-columns: 1fr; }
  .roster-side { position: static; }
}
@media print {
  .roster-tip, .roster-side-open { display: none !important; }
  .cal { min-width: 0; }
  .roster-layout { grid-template-columns: 1fr 200px; }
}

/* Sa/So/Feiertage: nur 10–14 Uhr */
.cal-hours { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: #a35a00; }
.cal-closed { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10px; background: repeating-linear-gradient(45deg, #ecece6, #ecece6 6px, #f4f4ef 6px, #f4f4ef 12px); cursor: not-allowed; }
.cal-closed span { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 0 6px; }
.tpl-chip:disabled { opacity: .4; cursor: not-allowed; }

/* E-Mail-Versand: Protokoll im Dienstplan, Prüfung in den Einstellungen */
.roster-mail { margin-top: 6px; font-size: 13px; color: var(--muted); }
.roster-mail summary { cursor: pointer; }
.roster-mail div { margin-top: 3px; color: var(--ink); }
.roster-mail.has-errors summary { color: var(--danger); }
.roster-mail .neg { color: var(--danger); }
.mail-check { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.6; }

/* Dienstplan: bis wann veröffentlicht */
.roster-pubinfo { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 99px; background: #e1f5e4; color: #1d7a34; font-size: 13px; font-weight: 600; }
.roster-pubinfo b { color: #145c27; }
.roster-pubinfo.none { background: #fff1d6; color: #8a5a00; }
.roster-pubgap { color: #a35a00; font-weight: 600; }

/* Dienstplan: Warnung, wenn nicht 5 Wochen im Voraus veröffentlicht */
.roster-warning { margin-bottom: 14px; padding: 12px 16px; border: 2px solid #e5383b; border-left-width: 6px; border-radius: var(--radius);
  background: #fde3e1; color: #7a1d14; font-size: 14px; }
.roster-warning > b { display: block; font-size: 15px; color: #b3261e; margin-bottom: 2px; }
.roster-warning ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.roster-warning-week { border: 1px solid #e5383b; background: #fff; color: #b3261e; font: inherit; font-size: 13px; font-weight: 700;
  padding: 1px 9px; border-radius: 99px; cursor: pointer; margin: 0 2px 2px 0; }
.roster-warning-week:hover { background: #e5383b; color: #fff; }
.day-hero + .roster-warning, #view-heute .roster-warning { margin-top: 0; }

/* Mein Tag: Vertretung, weil die zuständige Person heute fehlt */
.deputy-today { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: #e5383b; color: #fff;
  text-transform: uppercase; letter-spacing: .03em; }

/* Überstundenkonto „nur Über- und Minusstunden“ */
.ot-days { display: block; font-size: 14px; font-weight: 600; margin-top: 2px; }
.overtime-only-row { align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; }
.overtime-only-row input { margin-top: 3px; }
.ts-table input[name="minus"] { width: 80px; }
.ts-hours.pos { color: #1e7a3c; font-weight: 600; }
.ts-hours.neg { color: var(--danger); font-weight: 600; }
.ot-mini .day-section-head { flex-wrap: wrap; }
.ot-mini .day-section-head h3 { flex: none; }

/* ---------- Zeiterfassung ---------- */
.clock-card { border-left: 5px solid var(--line); }
.clock-card.running { border-left-color: #1d7a34; background: var(--ok-soft); }
.clock-main { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.clock-main .spacer { flex: 1; }
.clock-main .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.clock-state { font-size: 20px; }
.clock-btn { font-size: 18px; font-weight: 800; padding: 14px 34px; border-radius: 12px; }
.clock-btn.in { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.clock-btn.out { background: var(--ink); border-color: var(--ink); color: #fff; }
.clock-today { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ts-clock { font-size: 12px; min-width: 150px; }
.ts-clock .btn { margin-top: 3px; font-size: 12px; padding: 2px 8px; }
.clock-issue { color: #a35a00; font-weight: 600; }
.clock-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; padding: 10px 14px;
  border: 2px solid var(--ok); border-radius: var(--radius); background: var(--ok-soft); font-size: 14px; }
.clock-missing-link { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; color: #a35a00; }
.clock-missing { margin-bottom: 12px; padding: 10px 14px; border: 2px solid #f08c00; border-radius: var(--radius); background: #fff6e6; font-size: 14px; }
.clock-missing-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.clock-missing-head .btn { margin-left: auto; }
.clock-missing ul { list-style: none; margin: 8px 0 0; padding: 0; }
.clock-missing li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0; border-top: 1px solid #f6d7a8; }
.clock-missing-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.clock-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.clock-pill.in { background: #e1f5e4; color: #1d7a34; }
.clock-pill.done { background: #e9edf2; color: var(--ink); }
.clock-pill.missing { background: #fde3e1; color: #b3261e; }
.clock-forgotten { margin-top: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.clock-devices { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.clock-devices li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
@media (max-width: 700px) { .clock-btn { width: 100%; } }

/* Login: Passwort mit Augen-Symbol anzeigen/verbergen */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 46px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); background: var(--bg); }
.pw-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-off, .pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
