:root {
  --forest: #183d2b;
  --forest-soft: #246246;
  --lime: #91c76f;
  --lime-soft: #e8f3e2;
  --ink: #15211b;
  --muted: #657169;
  --line: #dce6df;
  --surface: #ffffff;
  --canvas: #f4f7f4;
  --warning: #8a5b12;
  --warning-soft: #fff4d8;
  --danger: #a73b31;
  --danger-soft: #fce9e7;
  --shadow: 0 8px 30px rgba(24, 61, 43, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; }
body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: var(--forest-soft); }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(145, 199, 111, .52);
  outline-offset: 2px;
}

/* Gemeinsamer Rahmen */
.shell { max-width: 1160px; margin: 0 auto; padding: 0 22px 44px; }
.topbar { background: var(--forest); color: #fff; border-bottom: 4px solid var(--lime); }
.topbar-inner { max-width: 1160px; min-width: 0; margin: 0 auto; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); color: var(--forest); display: grid; place-items: center; font-weight: 900; font-size: 22px; }
.brand-title { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .01em; }
.brand-subtitle { margin: 1px 0 0; color: #d8e8dc; font-size: .78rem; }
.top-status { margin: 0; color: #d8e8dc; text-align: right; font-size: .8rem; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--lime); }
.dot.off { background: #dfbd65; }
.page-head { padding: 30px 0 20px; }
.compact-head { padding-bottom: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--forest-soft); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.72rem, 4vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; }
h2, h3 { overflow-wrap: anywhere; }
.lead { max-width: 780px; margin: 9px 0 0; color: var(--muted); }
.footer { max-width: 1160px; margin: 0 auto; padding: 20px 22px 32px; color: var(--muted); font-size: .78rem; }

/* Karten, Eingaben und Aktionsflächen */
.grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h2 { margin: 0 0 4px; color: var(--forest); font-size: 1.2rem; letter-spacing: -.02em; }
.card h3 { margin: 0 0 8px; color: var(--forest); font-size: 1rem; }
.card-intro { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.card-note { margin: 16px 0 0; padding: 11px 12px; border-left: 3px solid var(--lime); border-radius: 7px; color: #285239; background: var(--lime-soft); font-size: .85rem; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-head h2 { margin: 2px 0 0; }

form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 5px; color: var(--forest); font-size: .82rem; font-weight: 750; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid #bccdc1; border-radius: 9px; color: var(--ink); background: #fff; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--forest-soft); outline: 3px solid rgba(145, 199, 111, .32); outline-offset: 0; }
button { min-height: 40px; border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 800; cursor: pointer; }
.button-primary, .button-secondary, .button-approve, .button-reject { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; text-align: center; text-decoration: none; }
.button-primary { margin-top: 15px; color: #fff; background: var(--forest); }
.button-primary:hover { background: #102e20; }
.button-secondary { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: #fff; font-weight: 800; line-height: 1.15; }
.button-approve { padding: 7px 10px; color: #164427; background: #dff0d4; font-size: .8rem; }
.button-reject { padding: 7px 10px; color: #8b2f27; background: var(--danger-soft); font-size: .8rem; }
.button-text { min-height: auto; padding: 4px; border: 0; border-radius: 5px; color: #9b302c; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
.button-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.form-topspace { margin-top: 16px; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; line-height: 1.4; }

/* Tabellen und Status */
.table-wrap { max-width: 100%; margin: 14px -3px 0; overflow: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .87rem; }
th { padding: 9px 8px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: .73rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
td { padding: 11px 8px; border-bottom: 1px solid #eef2ef; vertical-align: top; }
td small { display: block; margin-top: 2px; color: var(--muted); }
.status, .pill { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: .74rem; font-weight: 800; }
.status.offen, .pill.klaerung { color: #7a4a00; background: var(--warning-soft); }
.status.genehmigt, .status.bestaetigt, .status.eingetragen, .pill.bereit, .pill.abgeschlossen { color: #206033; background: var(--lime-soft); }
.status.gemeldet { color: #1f5579; background: #e4f1fa; }
.status.abgelehnt, .status.storniert { color: #8b2f27; background: var(--danger-soft); }
.empty { padding: 20px 0 6px; color: var(--muted); text-align: center; }
.flash { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: .9rem; font-weight: 650; }
.flash.success { color: #285239; background: var(--lime-soft); }
.flash.error { color: #85352d; background: var(--danger-soft); }

/* Kleine Listen */
.note-list, .task-list { display: grid; gap: 10px; }
.note { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.note p { margin: 0; overflow-wrap: anywhere; font-size: .9rem; white-space: pre-wrap; }
.note-meta { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 5px; color: var(--muted); font-size: .74rem; }
.task-row, .completion-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eef2ef; }
.task-row:last-child, .completion-row:last-child { border-bottom: 0; }
.task-row > div, .completion-row > span:first-child { min-width: 0; }
.task-row small, .completion-row small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; }

/* Persönlicher Stundenzettel */
.pwa-timesheet {
  min-height: 100vh;
  --forest: #236548;
  --forest-soft: #2e7959;
  --lime: #e75f9d;
  --lime-soft: #fde5ef;
  --canvas: #f5faf6;
}
.pwa-timesheet .topbar { border-bottom-color: #e75f9d; }
.datev-shell { max-width: 1240px; }
.team-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-bottom: 18px; }
.month-close-card { border-top: 4px solid #e75f9d; }
.month-close-issues { margin: 10px 0 0; padding-left: 18px; color: var(--warning); font-size: .84rem; }
.delegation-dashboard-link { display: inline-flex; margin-top: 13px; padding: 8px 11px; border-radius: 9px; color: var(--forest); background: var(--lime-soft); font-size: .86rem; font-weight: 800; text-decoration: none; }
.delegation-help { display: block; margin-top: 6px; color: var(--muted); font-size: .76rem; }
.month-navigation { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px; margin-bottom: 16px; text-align: center; }
.month-navigation h2 { margin: 0; }
.month-navigation .button-secondary { width: 42px; height: 42px; padding: 0; border-radius: 11px; font-size: 1.6rem; }
.current-month-link { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 750; }
.datev-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; margin: 16px 0; }
.datev-meta > div { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 9px; align-items: center; font-size: .86rem; }
.datev-meta span { color: var(--muted); font-weight: 750; }
.datev-meta strong { display: flex; align-items: center; min-height: 34px; padding: 5px 9px; border: 1px solid #526158; color: var(--ink); background: #fff; font-weight: 650; overflow-wrap: anywhere; }
.timesheet-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf7; }
.timesheet-total span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.timesheet-total strong { color: var(--forest); font-size: 1.1rem; white-space: nowrap; }
.timesheet-total.limit-exceeded { border-color: #d99b95; background: var(--danger-soft); }
.timesheet-total.limit-exceeded strong { color: var(--danger); }
.monthly-limit-help { margin: -7px 0 14px; }
.entry-guide { margin: 12px 0; padding: 11px 13px; border-left: 4px solid var(--forest); border-radius: 0 8px 8px 0; color: var(--ink); background: #f3f7f1; font-size: .84rem; line-height: 1.48; }
.datev-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border: 1px solid #49554c; border-radius: 10px; touch-action: pan-x; }
.datev-grid { display: grid; min-width: 850px; grid-template-columns: 90px 104px 90px 104px 104px 52px minmax(220px, 1fr); align-items: stretch; }
.datev-grid > * { min-width: 0; border-right: 1px solid #49554c; border-bottom: 1px solid #49554c; }
.datev-grid > *:last-child { border-right: 0; }
.datev-head { color: #111; background: #d9ddda; font-size: .73rem; font-weight: 800; line-height: 1.15; text-align: center; }
.datev-head > span { display: grid; min-height: 49px; place-items: center; padding: 5px; }
.datev-row { min-height: 48px; background: #fff; }
.datev-row.weekend { background: #fafafa; }
.datev-row.future { opacity: .62; }
.datev-row.paid-leave-row { background: #edf6e9; }
.datev-day-cell { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; color: var(--ink); font-size: .8rem; }
.datev-day-cell strong { font-weight: 700; }
.datev-day-cell small { color: var(--muted); font-size: .7rem; }
.datev-row input, .datev-row select { min-height: 46px; height: 100%; border: 0; border-radius: 0; padding: 7px; background: transparent; font-size: .85rem; }
.datev-row input:focus, .datev-row select:focus { outline: 3px solid rgba(145, 199, 111, .48); outline-offset: -3px; }
.datev-row select { text-align: center; font-weight: 750; }
.duration-cell { display: grid; min-height: 46px; }
.duration-input { width: 100%; }
.manual-direct-duration .worktime-field { visibility: hidden; pointer-events: none; }
.manual-direct-duration .duration-cell { background: #fffdf0; }
.note-cell { display: flex; align-items: stretch; gap: 5px; padding: 5px; }
.note-cell input { min-width: 0; flex: 1; }
.apply-last-worktime, .delete-day-entry { align-self: stretch; min-height: 34px; padding: 5px 7px; font-size: .72rem; white-space: nowrap; }
.apply-last-worktime { border: 1px solid #b9cfbb; border-radius: 7px; color: var(--forest); background: #edf6e9; font-weight: 800; }
.day-correction-note { display: block; color: var(--warning); font-size: .68rem; }
.datev-legend { margin: 12px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.datev-signatures { display: grid; grid-template-columns: 100px 1fr 100px 1fr; gap: 10px; margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: .7rem; }
.datev-signatures span { padding-top: 4px; border-top: 1px solid #5b645e; text-align: center; }
.kilometer-card { margin-top: 18px; }
.kilometer-total { color: var(--forest); font-size: 1.2rem; white-space: nowrap; }
.quick-actions { display: grid; gap: 12px; margin-top: 18px; }
.action-card { padding: 0; overflow: hidden; }
.action-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px; color: var(--forest); cursor: pointer; list-style: none; }
.action-card summary::-webkit-details-marker { display: none; }
.action-card summary strong, .action-card summary small { display: block; }
.action-card summary small { margin-top: 2px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.action-card[open] summary { border-bottom: 1px solid var(--line); background: #fbfdfb; }
.action-card form { padding: 0 19px 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Chef- und Kati-Arbeitsansicht */
.dashboard-shell { max-width: 1320px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.75fr) minmax(280px, .65fr); }
.dashboard-aside { position: sticky; top: 18px; }
.focus-card { border-top: 4px solid var(--lime); }
.focus-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 18px 0 4px; }
.focus-grid > div { min-width: 0; padding: 10px; border-radius: 10px; background: #f5f8f5; }
.focus-grid strong { display: block; color: var(--forest); font-size: 1.22rem; }
.work-count { display: inline-grid; flex: 0 0 auto; min-width: 34px; height: 34px; place-items: center; padding: 0 9px; border-radius: 99px; color: #fff; background: var(--forest-soft); font-size: .94rem; font-weight: 900; }
.work-queue-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.work-queue-section h3 { margin-bottom: 10px; }
.all-clear { margin: 16px 0 4px; padding: 13px 14px; border: 1px solid #c7e5cf; border-radius: 11px; color: #155f37; background: #eef9f0; }
.decision-list { display: grid; gap: 9px; margin-top: 10px; }
.decision-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-left: 4px solid #e3c969; }
.decision-item > div:first-child { min-width: 0; }
.material-product-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.material-product-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #f7faf7; color: var(--forest); font-size: .78rem; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.material-product-link span { color: var(--muted); font-weight: 650; }
.mail-preview { max-width: 100%; overflow: auto; padding: 10px; border-radius: 8px; background: #f5f7f5; white-space: pre-wrap; font: .78rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.collapsible-card { padding: 0; overflow: hidden; }
.collapsible-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; }
.collapsible-card > summary::-webkit-details-marker { display: none; }
.collapsible-card > summary > span:first-child { display: grid; gap: 2px; min-width: 0; }
.collapsible-card > summary strong { color: var(--forest); font-size: 1.03rem; }
.collapsible-card > summary small { color: var(--muted); font-size: .77rem; }
.details-toggle { display: inline-flex; align-items: center; min-height: 30px; flex: 0 0 auto; padding: 4px 9px; border-radius: 99px; color: var(--forest); background: #edf5ee; font-size: .72rem; font-weight: 800; }
.collapsible-card[open] > summary { border-bottom: 1px solid var(--line); background: #fbfdfb; }
.collapsible-card[open] > summary .details-toggle { font-size: 0; }
.collapsible-card[open] > summary .details-toggle::after { content: 'Schließen'; font-size: .72rem; }
.details-content { padding: 18px 20px 20px; }
.details-content > section + section { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e2ece4; }
.compact-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.compact-tools > section + section { margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid #e2ece4; }
.note-history { margin-top: 16px; }
.stacked-details { display: grid; gap: 0; }
.month-status-filter { display: flex; align-items: end; gap: 10px; max-width: 390px; }
.month-status-filter .field { flex: 1; }
.month-status-filter .button-primary { margin: 0; white-space: nowrap; }
.monthly-issues-detail { margin-top: 8px; }
.monthly-issues-detail summary { color: var(--warning); cursor: pointer; font-size: .8rem; font-weight: 800; }
.monthly-issues-detail .month-close-issues { margin-top: 7px; }
.delegation-banner { margin: 14px 0 0; padding: 11px 13px; border-left: 4px solid #5b7da0; border-radius: 0 9px 9px 0; color: #1f405e; background: #eaf3fb; }

/* Persönliche Farbwelten */
.theme-bianca-rose {
  --forest: #7a1f50;
  --forest-soft: #a63c70;
  --lime: #f3b6cd;
  --lime-soft: #fbe5ed;
  --canvas: #fff7fa;
  --line: #ebcad8;
  --ink: #3c1728;
  --muted: #785865;
}
.theme-bianca-rose .topbar { background: #7a1f50; border-bottom-color: #f3b6cd; }
.theme-bianca-rose .datev-head { background: #f2d9e4; color: #3c1728; }
.theme-bianca-rose .apply-last-worktime { border-color: #e7b4c7; color: #702047; background: #fff0f6; }
.theme-bianca-rose .button-primary { background: #7a1f50; }
.theme-bianca-rose .button-primary:hover { background: #5e153c; }
.theme-bianca-rose .status.genehmigt { color: #702047; background: #fbe5ed; }
.theme-bianca-rose .month-close-card { border-top-color: #e75f9d; }
.theme-kati-colorful {
  --forest: #1f3446;
  --forest-soft: #265f8d;
  --lime: #79c9b6;
  --lime-soft: #dff3ee;
  --canvas: #f4f8fb;
  --line: #c9dce7;
  --ink: #1f3446;
  --muted: #5b7182;
}
.theme-kati-colorful .topbar { background: #265f8d; border-bottom-color: #79c9b6; }
.theme-kati-colorful .week-confirm-card, .theme-kati-colorful .datev-timesheet-card { border-top: 4px solid #79c9b6; }
.theme-kati-colorful .kilometer-card { border-top: 4px solid #7ca9d3; }
.theme-kati-colorful .quick-actions .action-card:nth-child(1) summary { background: #e7f1fb; }
.theme-kati-colorful .quick-actions .action-card:nth-child(4) summary { background: #fff3df; }
.theme-kati-colorful .button-primary { background: #265f8d; }
.theme-kati-colorful .status.genehmigt { color: #1e6863; background: #dff3ee; }

/* Tablet: klare Zweispaltenansicht ohne gequetschte Nebenleiste */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .datev-meta { gap: 8px 14px; }
}
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .datev-meta { grid-template-columns: 1fr; }
  .datev-meta > div { grid-template-columns: 145px minmax(0, 1fr); }
  .compact-tools { grid-template-columns: 1fr; }
  .compact-tools > section + section { margin-top: 18px; padding: 18px 0 0; border-top: 1px solid #e2ece4; border-left: 0; }
}

/* Smartphone: einspaltig, große Touchflächen und nur Tabellen mit horizontalem Scrollen */
@media (max-width: 700px) {
  .shell { padding: 0 14px 32px; }
  .topbar-inner { padding: 14px; gap: 12px; }
  .top-status { display: none; }
  .brand-subtitle { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head { padding: 24px 0 16px; }
  .lead { font-size: .94rem; }
  .card { padding: 16px; border-radius: 14px; }
  .card h2 { font-size: 1.08rem; }
  .section-head { gap: 12px; }
  .team-quick-grid { grid-template-columns: 1fr; gap: 12px; }
  .task-row, .completion-row { flex-direction: column; gap: 10px; }
  .task-row .button-row, .task-row > form, .task-row > a { width: 100%; }
  .task-row .button-row form, .task-row .button-row a, .task-row > form .button-approve, .task-row > a.button-secondary { width: 100%; }
  .button-row { width: 100%; }
  .button-row form { flex: 1 1 min(100%, 150px); }
  .button-row button, .button-row .button-primary, .button-row .button-secondary, .button-row .button-approve, .button-row .button-reject { width: 100%; }
  form .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  textarea { min-height: 96px; }
  .button-primary, .button-secondary, .button-approve, .button-reject { min-height: 44px; }
  .month-navigation { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .month-navigation .button-secondary { width: 44px; height: 44px; }
  .datev-timesheet-card { padding: 12px; }
  .datev-meta { margin: 14px 0; }
  .datev-meta > div { grid-template-columns: 104px minmax(0, 1fr); gap: 7px; font-size: .8rem; }
  .datev-meta strong { min-height: 36px; padding: 6px 8px; }
  .timesheet-total { padding: 11px 12px; }
  .entry-guide { margin: 10px 0; padding: 10px 11px; font-size: .8rem; }
  .datev-table-wrap { border-radius: 8px; }
  .datev-grid { min-width: 730px; grid-template-columns: 78px 88px 76px 88px 90px 48px minmax(162px, 1fr); }
  .datev-head { font-size: .64rem; }
  .datev-head > span { min-height: 44px; padding: 4px; }
  .datev-row { min-height: 50px; }
  .datev-row input, .datev-row select { min-height: 48px; padding: 6px; font-size: 16px; }
  .datev-day-cell { padding: 6px; font-size: .76rem; }
  .datev-day-cell small { font-size: .66rem; }
  .note-cell { flex-wrap: wrap; }
  .note-cell input { min-width: 100%; }
  .apply-last-worktime, .delete-day-entry { min-height: 36px; font-size: .7rem; }
  .datev-signatures { grid-template-columns: 1fr 1fr; row-gap: 18px; margin-top: 24px; }
  .kilometer-total { font-size: 1.05rem; }
  .action-card summary { padding: 15px 16px; }
  .action-card form { padding: 0 16px 16px; }
  .focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .focus-grid > div { padding: 9px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .decision-item { flex-direction: column; gap: 12px; }
  .decision-item .button-row { width: 100%; }
  .collapsible-card > summary { padding: 15px; }
  .details-content { padding: 15px; }
  .month-status-filter { display: grid; grid-template-columns: 1fr; max-width: none; }
  .month-status-filter .button-primary { width: 100%; }
  .details-content > section + section { margin-top: 18px; padding-top: 18px; }
  .note-meta { flex-direction: column; gap: 1px; }
  .table-wrap { margin-top: 12px; }
}

@media (max-width: 390px) {
  .brand-mark { width: 38px; height: 38px; font-size: 20px; }
  .brand-title { font-size: 1rem; }
  .brand-subtitle { max-width: 190px; }
  .shell { padding-right: 12px; padding-left: 12px; }
  .topbar-inner { padding-right: 12px; padding-left: 12px; }
  .page-head { padding-top: 20px; }
  .card { padding: 14px; }
  .focus-grid { gap: 7px; }
  .focus-grid > div { padding: 8px; }
  .status-label { font-size: .67rem; }
}

@media (display-mode: standalone) {
  .pwa-timesheet .topbar { padding-top: env(safe-area-inset-top); }
  .pwa-timesheet .footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

@media print {
  .topbar, .page-head, .team-quick-grid, .quick-actions, .month-navigation, .footer, .flash, .apply-last-worktime, .delete-day-entry { display: none !important; }
  html, body { background: #fff; }
  .shell { max-width: none; padding: 0; }
  .card { padding: 0; border: 0; box-shadow: none; }
  .datev-row.future { opacity: 1; }
  .datev-table-wrap { overflow: visible; }
}
