:root {
  color-scheme: light;
  --ink: #173f45;
  --ink-soft: #607476;
  --accent: #1f6670;
  --accent-dark: #164c54;
  --surface: #f5f3ea;
  --card: #fcfdf9;
  --band: #dcebed;
  --band-strong: #c5dde1;
  --line: #d9dfd8;
  --danger: #a4473f;
  --danger-soft: #f6e7e3;
  --success: #148865;
  --success-soft: #e1f3eb;
  --warning: #9a6c24;
  --shadow: 0 10px 26px rgba(23, 63, 69, 0.065);
  --radius: 17px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--surface);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Aptos, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(55rem 36rem at 115% -12%, rgba(197, 221, 225, 0.58), transparent 65%),
    radial-gradient(46rem 30rem at -18% 4%, rgba(243, 236, 214, 0.82), transparent 60%),
    var(--surface);
  background-attachment: fixed;
}

button, input, select { font: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 650;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.04; }
h2 { font-size: clamp(1.35rem, 3vw, 1.72rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(197, 221, 225, 0.7);
  background: rgba(245, 243, 234, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: min(1080px, 100%);
  min-height: 60px;
  margin: 0 auto;
  padding: 8px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand, .account-actions, .user-pill {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}

.brand img { width: auto; height: 40px; mix-blend-mode: multiply; }
.brand span {
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.account-actions { gap: 8px; }
.user-pill {
  min-height: 34px;
  gap: 8px;
  padding: 3px 12px 3px 4px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  border: 1px solid rgba(197, 221, 225, 0.85);
  border-radius: 999px;
  background: var(--card);
}

.user-initial {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 50%;
  background: var(--band);
}

.brand:focus-visible, button:focus-visible, a.button:focus-visible,
input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  background: transparent;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.icon-button:hover { color: var(--ink); background: var(--band); }
.icon-button:active, .button:active { transform: translateY(1px); }
.icon-button svg { width: 21px; height: 21px; }

.shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.muted { color: var(--ink-soft); line-height: 1.5; }

.panel {
  border: 1px solid rgba(197, 221, 225, .85);
  border-radius: var(--radius);
  background: rgba(252, 253, 249, .95);
  box-shadow: var(--shadow);
}

.page-heading {
  display: flex;
  margin-bottom: 23px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading .muted { margin-top: 7px; }

.employee-picker {
  display: grid;
  width: min(280px, 100%);
  gap: 6px;
}

.employee-picker > span,
.form-stack label,
.create-row > label,
.report-toolbar > label:not(.check-row) {
  color: var(--ink);
  font-size: .81rem;
  font-weight: 700;
}

input, select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 102, 112, .1);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease;
}

.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--band-strong); background: var(--card); }
.button.secondary:hover { background: var(--band); }
.button.danger { color: #fff; background: var(--danger); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button svg { width: 17px; height: 17px; }
.compact-button { min-height: 38px; padding: 7px 12px; font-size: .82rem; }

.section-nav {
  display: grid;
  margin-bottom: 18px;
  padding: 5px;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.section-nav-item {
  display: grid;
  min-height: 62px;
  padding: 9px 11px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.section-nav-item:hover { background: var(--band); color: var(--ink); }
.section-nav-item.active { color: #fff; background: var(--ink); }
.section-nav-item svg { width: 21px; height: 21px; justify-self: center; }
.section-nav-item span { display: grid; gap: 2px; min-width: 0; }
.section-nav-item strong { font-size: .88rem; }
.section-nav-item small { overflow: hidden; font-size: .69rem; opacity: .72; text-overflow: ellipsis; white-space: nowrap; }

.overview-panel { overflow: hidden; }

.day-nav {
  display: grid;
  padding: 11px 14px;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.day-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.day-title strong {
  overflow: hidden;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  padding: 4px 8px;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--band);
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary-list > div {
  display: flex;
  min-height: 68px;
  padding: 13px 17px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-list > div + div { border-left: 1px solid var(--line); }
.summary-list span {
  color: var(--ink-soft);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.summary-list strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.clock-panel {
  display: grid;
  padding: 18px 20px 17px;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 22px;
}

.clock-status {
  display: flex;
  padding: 7px 10px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .81rem;
  border-radius: 10px;
  background: var(--band);
}

.clock-status.running { color: #0f624b; background: var(--success-soft); }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ink-soft); }
.running .status-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(20,136,101,.1); }

.clock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.clock-action { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.clock-button { min-height: 56px; justify-content: flex-start; padding: 10px 15px; text-align: left; }
.clock-button svg { width: 21px; height: 21px; flex: 0 0 auto; }
.clock-button span { display: grid; gap: 1px; }
.clock-button small { font-size: .64rem; font-weight: 600; letter-spacing: .05em; opacity: .74; text-transform: uppercase; }

.check-row {
  display: flex;
  min-height: 26px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .8rem;
  cursor: pointer;
}

.entries-panel, .list-panel, .settings-panel, .report-panel { margin-top: 18px; overflow: hidden; }

.list-header {
  display: flex;
  min-height: 82px;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.list-header .eyebrow { margin-bottom: 3px; }

.soft-badge, .status-badge {
  display: inline-flex;
  padding: 5px 9px;
  align-items: center;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--band);
}

.status-badge.active, .status-badge.billed { color: #0f624b; background: var(--success-soft); }
.status-badge.open { color: var(--warning); background: #f8efdd; }
.status-badge.inactive { color: var(--ink-soft); background: #edf0eb; }

.column-head {
  display: grid;
  min-height: 34px;
  padding: 0 16px;
  align-items: center;
  color: var(--ink-soft);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  background: #f2f5ef;
  border-bottom: 1px solid var(--line);
}

.entry-columns { grid-template-columns: minmax(190px, 1.5fr) .65fr .65fr .65fr .8fr 42px; gap: 12px; }
.employee-columns { grid-template-columns: minmax(220px, 1.5fr) .7fr .55fr 1.2fr; gap: 14px; }

.entry-list, .employee-list { display: grid; }
.empty-state {
  padding: 35px 22px;
  color: var(--ink-soft);
  text-align: center;
}

.entry-row {
  display: grid;
  min-height: 62px;
  padding: 10px 16px;
  grid-template-columns: minmax(190px, 1.5fr) .65fr .65fr .65fr .8fr 42px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.entry-row:last-child { border-bottom: 0; }
.entry-row:hover { background: #fafbf6; }

.entry-time { display: grid; gap: 2px; }
.entry-time strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}
.entry-time small, .list-primary small, .list-value small { color: var(--ink-soft); font-size: .72rem; }
.list-value { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.list-value strong { font-size: .84rem; }
.mobile-label { display: none; }

.row-details { display: contents; }
.edit-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  list-style: none;
}
.edit-toggle::-webkit-details-marker { display: none; }
.edit-toggle svg { width: 16px; height: 16px; }
.row-details[open] .edit-toggle { color: var(--accent); border-color: var(--band-strong); background: var(--band); }

.edit-form {
  grid-column: 1 / -1;
  display: grid;
  margin: 6px -16px -10px;
  padding: 15px 16px;
  grid-template-columns: 1fr 1fr 1.3fr auto;
  align-items: end;
  gap: 11px;
  border-top: 1px solid var(--line);
  background: #f7f8f3;
}
.edit-form > label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
}
.edit-checks { display: flex; min-height: 42px; align-items: center; gap: 15px; }

.create-row {
  display: grid;
  padding: 14px 20px;
  grid-template-columns: 1.4fr .8fr auto auto;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--band);
}
.create-row > label { display: grid; gap: 5px; }

.input-suffix { display: grid; grid-template-columns: 1fr auto; }
.input-suffix input { border-radius: 10px 0 0 10px; }
.input-suffix span {
  display: grid;
  min-width: 53px;
  padding: 0 10px;
  place-items: center;
  color: var(--ink-soft);
  font-size: .75rem;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #f0f3ee;
}

.employee-row {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.employee-row:last-child { border-bottom: 0; }

.employee-row-main {
  display: grid;
  min-height: 66px;
  padding: 10px 16px;
  grid-template-columns: minmax(220px, 1.5fr) .7fr .55fr 1.2fr;
  align-items: center;
  gap: 14px;
}
.employee-row:hover { background: #fafbf6; }
.danger-text { color: var(--danger) !important; }
.danger-text:hover { border-color: #e3b9b2 !important; background: #fff3f0 !important; }

.month-toolbar {
  display: grid;
  min-height: 64px;
  padding: 6px 12px;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, .65fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.month-nav { display: grid; grid-template-columns: 42px minmax(180px, 1fr) 42px; align-items: center; }
.month-filter { display: grid; gap: 2px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.month-filter select { min-height: 38px; height: 38px; }
.month-toolbar .compact-button { min-height: 38px; }
.month-summary { grid-template-columns: repeat(5, 1fr); }
.calendar-panel, .month-list-panel { margin-top: 18px; overflow: hidden; }
.calendar-legend { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .74rem; }
.calendar-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--band); }
.calendar-weekdays, .month-calendar { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { padding: 0 14px; color: var(--ink-soft); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; border-bottom: 1px solid var(--line); background: var(--band); }
.calendar-weekdays span { padding: 9px 4px; }
.month-calendar { padding: 8px 12px 12px; gap: 5px; background: var(--card); }
.calendar-day { position: relative; min-height: 76px; padding: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf8; }
.calendar-day.empty { border-color: transparent; background: transparent; }
.calendar-day.worked { border-color: #bfd7d8; background: linear-gradient(145deg, #eef7f5, #f9fbf5); }
.calendar-day.worked::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; content: ''; background: var(--accent); }
.calendar-number { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 800; }
.calendar-day strong { display: block; margin-top: 10px; color: var(--ink); font-size: 1rem; }
.calendar-day small { display: block; margin-top: 3px; overflow: hidden; color: var(--ink-soft); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.month-columns, .month-row { grid-template-columns: minmax(160px, 1.25fr) .6fr .8fr .45fr .45fr .45fr .6fr auto; }
.month-row { display: grid; min-height: 64px; padding: 9px 16px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.month-row:last-child { border-bottom: 0; }
.month-row:hover { background: #fafbf6; }

.option-guidance {
  display: grid;
  padding: 12px 16px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--band);
}
.option-info {
  display: grid;
  min-height: 82px;
  padding: 12px;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.option-info svg { width: 22px; height: 22px; margin-top: 1px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.option-info strong { display: block; font-size: .78rem; }
.option-info p { margin: 3px 0 2px; color: var(--ink); font-size: .76rem; line-height: 1.35; }
.option-info small { display: block; color: var(--ink-soft); font-size: .66rem; line-height: 1.3; }
.settings-panel .setting-row { min-height: 62px; padding-top: 10px; padding-bottom: 10px; }
.settings-panel .settings-actions { padding-top: 12px; padding-bottom: 12px; }
.list-primary { display: flex; min-width: 0; align-items: center; gap: 11px; }
.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  border-radius: 10px;
  background: var(--band);
}
.list-primary > span { display: grid; min-width: 0; gap: 2px; }
.list-primary strong { overflow: hidden; font-size: .91rem; text-overflow: ellipsis; white-space: nowrap; }

.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-action {
  min-height: 32px;
  padding: 5px 9px;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 750;
  cursor: pointer;
  border: 1px solid var(--band-strong);
  border-radius: 8px;
  background: #fff;
}
.row-action:hover { background: var(--band); }

.employee-edit {
  display: grid;
  padding: 15px 16px;
  grid-template-columns: 1.2fr .8fr 1.2fr auto;
  align-items: end;
  gap: 11px;
  border-top: 1px solid var(--line);
  background: #f7f8f3;
}
.employee-edit > label:not(.setting-row) {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
}

.settings-list { display: grid; }
.setting-row {
  display: flex;
  min-height: 76px;
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.setting-row > span { display: grid; gap: 3px; }
.setting-row strong { font-size: .9rem; }
.setting-row small { color: var(--ink-soft); font-size: .76rem; }
.compact-input { width: 145px; flex: 0 0 auto; }
.settings-actions { display: flex; padding: 15px 20px; justify-content: flex-end; }

input[role="switch"] {
  width: 42px;
  min-height: 24px;
  height: 24px;
  flex: 0 0 auto;
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: #b9c5c4;
  transition: background .18s ease;
}
input[role="switch"]::after {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(23,63,69,.25);
  transition: transform .18s ease;
}
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::after { transform: translateX(18px); }

.report-toolbar {
  display: grid;
  padding: 14px 20px;
  grid-template-columns: 1fr 1fr 1.3fr 1.25fr auto auto auto;
  align-items: end;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f3;
}
.report-toolbar > label:not(.check-row) { display: grid; gap: 5px; }
.mark-row { min-height: 42px; }
.pdf-button { color: #7e332f; border-color: #e2c4bf !important; }

.report-results:empty::before {
  display: block;
  padding: 35px 22px;
  color: var(--ink-soft);
  text-align: center;
  content: "Zeitraum wählen und Report anzeigen.";
}

.report-summary {
  display: grid;
  padding: 13px 20px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.report-summary div {
  display: flex;
  min-height: 48px;
  padding: 8px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 9px;
  background: var(--band);
}
.report-summary span { color: var(--ink-soft); font-size: .68rem; font-weight: 750; text-transform: uppercase; }
.report-summary strong { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.17rem; }

.report-table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-size: .67rem; letter-spacing: .05em; text-transform: uppercase; background: #f2f5ef; }
td { font-size: .8rem; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

.guest-layout {
  display: grid;
  max-width: 920px;
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(40px, 9vw, 100px);
}
.guest-copy > p:last-child { max-width: 520px; margin-top: 20px; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.65; }
.login-card { padding: 29px; }
.login-card h2 { margin-top: 17px; }
.login-card > .muted { margin: 8px 0 22px; }
.symbol-tile { display: grid; width: 46px; height: 46px; place-items: center; color: var(--accent); border-radius: 13px; background: var(--band); }
.symbol-tile svg { width: 26px; height: 26px; }
.form-stack { display: grid; gap: 9px; }
.login-divider { display: flex; margin: 22px 0 13px; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.login-divider::before, .login-divider::after { height: 1px; content: ""; flex: 1; background: var(--line); }
.login-card > .button { width: 100%; }
.fallback-login { margin-top: 17px; color: var(--ink-soft); font-size: .8rem; }
.fallback-login summary { width: max-content; cursor: pointer; }
.compact-form { margin-top: 13px; }

.toast {
  position: fixed;
  z-index: 60;
  top: 76px;
  left: 50%;
  max-width: min(520px, calc(100vw - 30px));
  padding: 11px 16px;
  color: var(--ink);
  font-size: .87rem;
  border: 1px solid var(--band-strong);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(23,63,69,.18);
  transform: translateX(-50%);
  animation: toast-in .2s ease-out;
}
.toast.error { color: #792d28; border-color: #e9c6bf; background: #fff6f3; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%,-8px); } to { opacity: 1; transform: translate(-50%,0); } }

@media (max-width: 920px) {
  .section-nav-item small { display: none; }
  .clock-panel { grid-template-columns: 1fr; gap: 13px; }
  .clock-status { width: max-content; max-width: 100%; }
  .clock-action { grid-template-columns: 1fr; }
  .report-toolbar { grid-template-columns: 1fr 1fr 1.2fr; }
  .mark-row { grid-column: 1 / -1; }
  .report-toolbar .button { width: 100%; }
  .employee-columns, .employee-row-main { grid-template-columns: minmax(190px,1.3fr) .65fr .5fr 1fr; }
  .month-toolbar { grid-template-columns: 1fr 220px; }
  .month-toolbar > .button { grid-column: 2; }
  .month-columns, .month-row { grid-template-columns: minmax(145px, 1.15fr) .6fr .75fr .45fr .45fr .45fr .6fr auto; gap: 8px; }
}

@media (max-width: 720px) {
  .option-guidance { grid-template-columns: 1fr; }
  .shell { padding-top: 28px; }
  .guest-layout { max-width: 560px; min-height: auto; grid-template-columns: 1fr; gap: 28px; }
  .guest-copy { text-align: center; }
  .guest-copy > p:last-child { margin-inline: auto; }
  .page-heading { display: grid; }
  .employee-picker { width: 100%; }
  .section-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .section-nav::-webkit-scrollbar { display: none; }
  .section-nav-item { min-width: 146px; min-height: 50px; grid-template-columns: 24px 1fr; }
  .summary-list { grid-template-columns: 1fr 1fr; }
  .summary-list > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .summary-list > div:nth-child(4) { border-top: 1px solid var(--line); }
  .entry-columns, .employee-columns { display: none; }
  .entry-row { grid-template-columns: 1fr auto; padding: 13px 15px; gap: 9px 14px; }
  .entry-row > .list-value { grid-template-columns: auto auto; justify-content: space-between; grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
  .entry-row > .status-badge { grid-column: 1; width: max-content; }
  .row-details { display: block; grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .mobile-label { display: inline; color: var(--ink-soft); font-size: .7rem; font-weight: 600; }
  .edit-form { grid-template-columns: 1fr; margin: 10px -15px -13px; }
  .edit-checks { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; gap: 8px; }
  .create-row { grid-template-columns: 1fr 1fr; }
  .create-row > label { grid-column: 1 / -1; }
  .employee-row-main { grid-template-columns: 1fr auto; padding: 13px 15px; }
  .employee-row-main > .list-value, .employee-row-main > .status-badge { grid-column: 1; }
  .employee-row-main > .row-actions { grid-column: 1 / -1; }
  .month-toolbar { grid-template-columns: 1fr; }
  .month-toolbar > .button { grid-column: auto; width: 100%; }
  .month-summary { grid-template-columns: 1fr 1fr; }
  .month-summary > div { border-top: 1px solid var(--line); }
  .month-summary > div:nth-child(odd) { border-left: 0; }
  .month-summary > div:first-child, .month-summary > div:nth-child(2) { border-top: 0; }
  .month-summary > div:last-child { grid-column: 1 / -1; }
  .calendar-day { min-height: 70px; padding: 7px; }
  .calendar-day strong { margin-top: 7px; font-size: .84rem; }
  .calendar-day small { display: none; }
  .month-columns { display: none; }
  .month-row { grid-template-columns: 1fr 1fr; padding: 13px 15px; gap: 9px 14px; }
  .month-row > .list-primary, .month-row > .status-badge { grid-column: 1 / -1; }
  .month-row > .list-value { display: grid; grid-template-columns: auto auto; justify-content: space-between; padding-top: 7px; border-top: 1px solid var(--line); }
  .month-row > .row-action { grid-column: 1 / -1; width: 100%; }
  .employee-edit { grid-template-columns: 1fr; }
  .setting-row { gap: 15px; }
  .compact-input { width: 130px; }
  .report-toolbar { grid-template-columns: 1fr 1fr; }
  .report-toolbar > label:nth-child(3), .mark-row { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .header-inner { min-height: 56px; padding: 7px 14px; }
  .brand img { height: 35px; }
  .brand span, .user-pill > span:last-child { display: none; }
  .user-pill { padding-right: 4px; }
  .shell { padding: 25px 12px calc(58px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 17px; }
  .section-nav { margin-inline: -2px; }
  .section-nav-item { min-width: 137px; padding: 7px 9px; }
  .day-nav { padding: 9px 7px; }
  .day-title strong { max-width: 190px; font-size: .98rem; }
  .summary-list > div { min-height: 60px; padding: 11px 12px; }
  .summary-list span { font-size: .62rem; }
  .summary-list strong { font-size: 1.2rem; }
  .clock-panel { padding: 15px 14px; }
  .clock-actions { gap: 8px; }
  .clock-button { min-height: 54px; padding: 9px 11px; }
  .clock-button svg { display: none; }
  .clock-action .check-row { align-items: start; font-size: .73rem; line-height: 1.2; }
  .list-header { min-height: 72px; padding: 15px; }
  .soft-badge { max-width: 118px; text-align: center; }
  .entry-row > .list-value { font-size: .8rem; }
  .create-row { padding: 13px 15px; }
  .employee-row-main .row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .month-calendar { padding: 7px; gap: 3px; }
  .calendar-weekdays { padding: 0 7px; }
  .calendar-day { min-height: 52px; padding: 5px; border-radius: 7px; }
  .calendar-day strong { margin-top: 4px; font-size: .68rem; }
  .month-row { grid-template-columns: 1fr; }
  .month-row > .list-value { grid-column: 1; }
  .option-guidance { padding: 10px 12px; }
  .option-info { min-height: 0; padding: 10px; }
  .row-action { min-height: 34px; }
  .setting-row { display: grid; padding: 14px 15px; }
  .compact-input { width: 100%; }
  .settings-actions { padding: 14px 15px; }
  .settings-actions .button { width: 100%; }
  .report-toolbar { padding: 13px 15px; grid-template-columns: 1fr 1fr 1fr; }
  .report-toolbar > label { grid-column: 1 / -1 !important; }
  .report-summary { padding: 11px 15px; grid-template-columns: 1fr; }
  .login-card { padding: 26px 24px; }
}

/* Einheitliche Typografie fuer alle interaktiven Bedienelemente. */
:root {
  --control-font-size: .8125rem;
  --control-line-height: 1.2;
}

.button,
.row-action {
  font-size: var(--control-font-size);
  font-weight: 700;
  line-height: var(--control-line-height);
  letter-spacing: 0;
}

.compact-button,
.employee-edit .button,
.employee-edit .row-action,
.employee-row-main .row-action,
.create-row .button,
.report-toolbar .button {
  font-size: var(--control-font-size);
}

.employee-edit .button,
.employee-edit .row-action {
  min-height: 42px;
  padding: 8px 12px;
}

input,
select,
textarea {
  font-size: .875rem;
  line-height: 1.35;
}

.edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .edit-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .edit-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
