/* © 2026 Dennis Andres */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
.hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hero-badge { position: relative; flex: none; width: 76px; height: 76px; color: var(--tan); }
.hero-badge .hero-star { display: block; width: 100%; height: 100%; }
.hero-badge b { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tan-ink); font-size: 17px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.hero-body { display: grid; gap: 8px; min-width: 0; }
.hero-day { margin: 0; color: var(--muted); font-size: 14px; }
.hero-title { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.4px; overflow-wrap: anywhere; }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-rank { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-chip); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.hero-sub .chip { height: 26px; padding: 0 10px; font-size: 13px; }
.hero-status { display: flex; align-items: baseline; gap: 10px; max-width: 58ch; margin: 2px 0 0; color: var(--ink); }
.hero-status .duty-dot { position: relative; top: -1px; }
.hero-on .duty-dot { background: var(--ok); }
.hero-leave .duty-dot { background: var(--warn-mark); }
.hero-clock { display: grid; min-width: 0; }
.hero-clock form { display: grid; }
.hero-clock .btn { min-height: 54px; padding: 14px 28px; border-radius: 8px; font-size: 17px; }
.hero-clock .btn-danger { border-width: 2px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.quick-link { padding: 4px 0; border-bottom: 2px solid transparent; color: var(--ink); font-size: 14.5px; font-weight: 600; transition: border-color var(--ease); }
.quick-link:hover { border-bottom-color: var(--tan); color: var(--ink); text-decoration: none; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; padding: 28px; }
  .hero-id { gap: 26px; }
  .hero-badge { width: 112px; height: 112px; }
  .hero-badge b { font-size: 24px; }
  .hero-title { font-size: 34px; }
  .hero-clock { min-width: 220px; }
  .quick-actions { grid-column: 1 / -1; gap: 6px 24px; padding-top: 18px; }
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.dash-col { display: contents; }
.dash-grid .todo-card { order: -1; }
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .dash-col { display: grid; gap: var(--gap); min-width: 0; }
  .dash-grid .todo-card { order: 0; }
}
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--line-strong); vertical-align: middle; }
.live-dot.is-live { background: var(--ok); }
.events li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px var(--pad); }
.events .list-time { min-width: 0; }
.loa-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.loa-list .loa-reason { grid-column: 2; }

.todo-list { display: grid; gap: 10px; margin: 0; padding: 16px var(--pad) var(--pad); list-style: none; }
.todo-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid var(--warn-line); border-left: 4px solid var(--warn-mark); border-radius: 6px; color: var(--ink); transition: border-color var(--ease); }
.todo-item:hover { border-color: var(--warn-mark); color: var(--ink); text-decoration: none; }
.todo-count { flex: none; min-width: 22px; color: var(--warn); font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.todo-text { display: grid; gap: 2px; flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.todo-text .muted { font-weight: 400; }

.podium { margin: 0; padding: 4px var(--pad) 0; list-style: none; }
.podium-item { display: grid; grid-template-columns: 24px auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.podium-item:last-child { border-bottom: 0; }
.podium-place { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.podium-item:not(:has(.callsign)) .podium-name { grid-column: span 2; }
.podium-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.podium-time { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.podium-item.is-me .podium-place { color: var(--olive); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid transparent; border-radius: var(--radius-control); color: var(--muted); font-weight: 600; transition: background-color var(--ease), color var(--ease); }
.tab:hover { background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
.tab.is-active, .tab.is-active:hover { border-color: var(--olive); background: var(--olive); color: #fff; }
.tab-count { padding: 1px 8px; border-radius: 999px; background: var(--surface-sunk); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.tab.is-active .tab-count { background: #fff; color: var(--olive); }
.ticket-no { color: var(--olive); font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-type { display: inline-flex; align-items: center; gap: 8px; }
.ticket-type-emoji { width: 20px; text-align: center; }
.ticket-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat { margin: 0; padding: 0; list-style: none; }
.chat-item { display: grid; gap: 4px; padding: 14px var(--pad); border-bottom: 1px solid var(--line-soft); }
.chat-item:last-child { border-bottom: 0; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.chat-author { font-weight: 600; }
.chat-item.is-opener { box-shadow: inset 3px 0 0 var(--tan); }
.chat-item.is-opener .chat-author { color: var(--olive); }
.chat-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chat-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-text:empty::before { content: 'Nachricht ohne Text, zum Beispiel ein Anhang oder Embed.'; color: var(--muted); font-style: italic; }
.chat-legend { display: inline-flex; align-items: center; gap: 6px; }
.chat-legend::before { content: ''; width: 3px; height: 14px; background: var(--tan); }

.type-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.type-emoji { display: inline-block; width: 24px; text-align: center; }
.roles-grid { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 12px; }
.fields-list { display: grid; gap: 12px; margin-bottom: 12px; }
.fields-list:empty { display: none; }
.fields-row { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.fields-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fields-row-title { color: var(--ink); font-size: 14px; font-weight: 600; }
.fields-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.fields-grid .check { align-self: end; min-height: 42px; align-items: center; }
@media (min-width: 760px) {
  .fields-grid { grid-template-columns: 2fr 1.2fr 1fr .8fr; }
  .fields-grid-2 { grid-template-columns: 2fr 1fr; }
}
.fields-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.field-empty { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }

.matrix th.mark, .matrix td.mark { text-align: center; }
.matrix td.mark .btn { min-width: 38px; padding-left: 8px; padding-right: 8px; }
.matrix .mark-empty { color: var(--line-strong); }

.doc { line-height: 1.7; overflow-wrap: anywhere; }
.doc > :first-child { margin-top: 0; }
.doc > :last-child { margin-bottom: 0; }
.doc h1 { margin: 0 0 12px; font-size: 24px; font-weight: 800; }
.doc h2 { margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); font-size: 19px; }
.doc h3 { margin: 22px 0 6px; font-size: 16px; }
.doc h4 { margin: 18px 0 4px; color: var(--muted); font-size: 15px; }
.doc p, .doc ul, .doc ol, .doc blockquote, .doc pre, .doc table { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li > p { margin: 0; }
.doc a { text-decoration: underline; }
.doc blockquote { padding: 10px 16px; border-left: 4px solid var(--tan); color: var(--ink-2); }
.doc blockquote > :last-child { margin-bottom: 0; }
.doc code { padding: 1px 6px; border-radius: 4px; background: var(--surface-sunk); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; }
.doc pre { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-sunk); overflow-x: auto; }
.doc pre code { padding: 0; background: none; }
.doc table { display: block; width: 100%; border-collapse: collapse; overflow-x: auto; }
.doc th, .doc td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.doc th { color: var(--muted); font-size: 13px; font-weight: 600; border-bottom-color: var(--line); }
.doc hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.doc-editor textarea { min-height: 480px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; line-height: 1.6; }

.embed-preview { display: flex; gap: 12px; padding: 16px; border-radius: 8px; background: #313338; color: #dbdee1; font-size: 14px; line-height: 1.375; }
.embed-preview-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--tan); }
.embed-preview-body { flex: 1; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.embed-preview-author { display: flex; align-items: center; gap: 6px; }
.embed-preview-name { color: #f2f3f5; font-weight: 600; }
.embed-preview-tag { padding: 0 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }
.embed-preview-card { display: grid; gap: 8px; width: 100%; max-width: 520px; padding: 12px 16px 12px 12px; border-left: 4px solid var(--tan); border-radius: 4px; background: #2b2d31; overflow-wrap: anywhere; }
.embed-preview-card--gold { border-left-color: var(--tan); }
.embed-preview-card--green { border-left-color: #248046; }
.embed-preview-title { color: #f2f3f5; font-size: 16px; font-weight: 600; white-space: pre-wrap; }
.embed-preview-text { white-space: pre-wrap; }
.embed-preview-field { display: grid; gap: 2px; }
.embed-preview-field-name { color: #f2f3f5; font-weight: 600; white-space: pre-wrap; }
.embed-preview strong { color: #f2f3f5; font-weight: 700; }
.embed-preview code { padding: 0 3px; border-radius: 3px; background: #1e1f22; color: #dbdee1; font: 12.5px/1.4 ui-monospace, Consolas, monospace; }
.embed-preview-footer { color: #b5bac1; font-size: 12px; }
.embed-preview-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 520px; min-height: 40px; padding: 8px 12px; border: 1px solid #1e1f22; border-radius: 4px; background: #1e1f22; color: #949ba4; }
.embed-preview-chevron { flex: none; width: 8px; height: 8px; border-right: 2px solid #b5bac1; border-bottom: 2px solid #b5bac1; transform: translateY(-2px) rotate(45deg); }
.embed-preview-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.embed-preview-button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 16px; border-radius: 3px; color: #fff; font-weight: 600; white-space: nowrap; }
.embed-preview-button--success { background: #248046; }
.embed-preview-button--danger { background: #da373c; }
.embed-preview-button--primary { background: #5865f2; }
.embed-preview-button--secondary { background: #4e5058; }
@media (max-width: 480px) {
  .embed-preview { padding: 12px; gap: 8px; }
  .embed-preview-avatar { width: 32px; height: 32px; }
  .embed-preview-button { white-space: normal; }
}

.cal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cal-day { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.cal-day.is-today { border-color: var(--olive); box-shadow: inset 0 3px 0 var(--tan); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.cal-day.is-empty .cal-day-head { border-bottom: 0; }
.cal-day-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.cal-day-name .chip { height: 20px; padding: 0 7px; font-size: 11.5px; }
.cal-day-date { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cal-day-sum { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-day.is-empty .cal-day-sum { color: var(--muted); font-weight: 400; }
.cal-empty { display: none; margin: 0; padding: 12px 14px; color: var(--muted); font-size: 13.5px; }
.cal-list { display: grid; gap: 8px; margin: 0; padding: 10px; list-style: none; }
.cal-shift { display: grid; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-soft); border-left: 4px solid var(--olive); border-radius: 6px; background: var(--surface-sunk); }
.cal-shift.is-live { border-left-color: var(--ok); background: #F0F6F0; }
.cal-shift-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cal-shift-top .callsign { min-width: 32px; height: 22px; font-size: 12px; }
.cal-shift-name { min-width: 0; color: var(--ink); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
a.cal-shift-name:hover { color: var(--olive); }
.cal-shift-time { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; color: var(--ink-2); font-size: 13.5px; }
.cal-shift-dur { font-weight: 600; white-space: nowrap; }
.cal-track { position: relative; height: 4px; overflow: hidden; border-radius: 2px; background: var(--line-soft); }
.cal-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--tan); }
.cal-shift.is-live .cal-fill { background: var(--ok); }
.cal-shift-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cal-shift-tags .chip { height: 20px; padding: 0 7px; font-size: 11.5px; }
.cal-tag { color: var(--muted); font-size: 12px; font-weight: 600; }
.cal-legend { margin: 0; }
.cal-filter .field { flex: 0 1 320px; }
@media (min-width: 1200px) {
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
  .cal-day { min-height: 240px; }
  .cal-day-head { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px; min-height: 76px; padding: 12px; }
  .cal-day.is-empty .cal-day-head { border-bottom: 1px solid var(--line-soft); }
  .cal-empty { display: block; padding: 12px; }
  .cal-list { padding: 8px; }
  .cal-shift { padding: 8px 10px; }
  .cal-shift-time { font-size: 12.5px; }
}

.chart-body { display: grid; gap: 12px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-axis { stroke: var(--line-strong); stroke-width: 1; }
.chart-tick, .chart-unit { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-unit { font-weight: 600; }
.chart-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart-value { fill: var(--ink); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-bar-olive { fill: var(--olive); }
.chart-bar-tan { fill: var(--tan); }
.chart-bar-muted { fill: var(--line-strong); }
.chart-item:hover .chart-bar { opacity: .82; }
.chart-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.chart-note { gap: 4px 14px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.chart-key-olive { background: var(--olive); }
.chart-key-tan { background: var(--tan); }
@media (max-width: 599px) {
  .chart-label, .chart-value, .chart-tick, .chart-unit { font-size: 14px; }
  .chart-dense .chart-item:nth-child(odd of .chart-item) .chart-label { display: none; }
  .chart-dense .chart-value { font-size: 12px; }
}
