/* Schichtsteiger Zuschlagsrechner. Everything is scoped to .ssz; colours only as tokens. */
.ssz {
  --ssz-ink: #23272d;
  --ssz-muted: #5f656d;
  --ssz-line: #ddd8cc;
  --ssz-surface: #fff;
  --ssz-ground: #f7f5f0;
  --ssz-accent: #8a6420;          /* bronze, white text 5.3:1 */
  --ssz-accent-hover: #74531a;
  --ssz-accent-soft: #f3ecdf;
  --ssz-error: #b42318;
  --ssz-error-soft: #fde8e7;
  --ssz-radius: 12px;
  color: var(--ssz-ink);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 960px;
}
.ssz *, .ssz *::before, .ssz *::after { box-sizing: border-box; }
.ssz-intro { margin: 0 0 1rem; color: var(--ssz-muted); }

.ssz-form { display: grid; gap: 1rem; margin: 0; }
.ssz-section {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--ssz-line);
  border-radius: var(--ssz-radius);
  background: var(--ssz-surface);
  min-width: 0;
}
.ssz-heading { margin: 0 0 .75rem; padding: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; color: var(--ssz-ink); }
legend.ssz-heading { float: left; width: 100%; }
legend.ssz-heading + * { clear: left; }
.ssz-hint { margin: 0 0 1rem; color: var(--ssz-muted); font-size: .9375rem; }

.ssz-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .ssz-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ssz-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ssz-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ssz-field label { font-weight: 600; font-size: .9375rem; }
.ssz-field small { color: var(--ssz-muted); font-size: .8125rem; }
.ssz input[type="text"], .ssz input[type="number"], .ssz input[type="date"], .ssz input[type="time"], .ssz select {
  width: 100%;
  min-height: 44px;
  padding: .5rem .75rem;
  font: inherit;
  color: var(--ssz-ink);
  background: var(--ssz-surface);
  border: 1px solid var(--ssz-line);
  border-radius: 8px;
}
.ssz input:focus-visible, .ssz select:focus-visible, .ssz button:focus-visible, .ssz summary:focus-visible, .ssz a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ssz-accent) 60%, transparent);
  outline-offset: 2px;
}
.ssz-affix { position: relative; }
.ssz-affix input { padding-right: 2.25rem; }
.ssz-affix span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--ssz-muted); pointer-events: none; }
.ssz [hidden] { display: none; }
.ssz-check { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; font-size: .9375rem; }
.ssz-check input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--ssz-accent); }

.ssz-shifts { display: grid; gap: .75rem; margin-bottom: 1rem; }
.ssz-shift {
  margin: 0;
  padding: .75rem 1rem 1rem;
  border: 1px solid var(--ssz-line);
  border-radius: 10px;
  background: var(--ssz-ground);
  min-width: 0;
}
.ssz-shift legend { padding: 0 .25rem; font-weight: 700; font-size: .9375rem; }
.ssz-shift-fields { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.ssz-shift-fields .ssz-field-date { grid-column: 1 / -1; }
.ssz-remove {
  justify-self: start;
  padding: .25rem 0;
  min-height: 44px;
  font: inherit;
  font-size: .875rem;
  color: var(--ssz-error);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
/* Desktop: eine Zeile je Schicht; Beschriftungen nur in der ersten Zeile sichtbar */
@media (min-width: 640px) {
  .ssz-shifts { gap: .35rem; }
  .ssz-shift { padding: .35rem .75rem; }
  .ssz-shift legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .ssz-shift-fields { grid-template-columns: 1.4fr 1fr 1fr 1fr 6rem; }
  .ssz-shift-fields .ssz-field-date { grid-column: auto; }
  .ssz-shift + .ssz-shift .ssz-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
.ssz-remove[hidden] { display: none; }

.ssz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--ssz-surface);
  background: var(--ssz-accent);
  border: 1px solid var(--ssz-accent);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}
.ssz-button:hover { background: var(--ssz-accent-hover); border-color: var(--ssz-accent-hover); color: var(--ssz-surface); }
.ssz-button-secondary { color: var(--ssz-accent); background: var(--ssz-surface); }
.ssz-button-secondary:hover { color: var(--ssz-surface); }
.ssz-button:disabled { opacity: .5; cursor: not-allowed; }

.ssz-rates summary { cursor: pointer; margin: 0; list-style-position: outside; }
.ssz-rates[open] summary { margin-bottom: .75rem; }
.ssz-summary-hint { font-weight: 400; color: var(--ssz-muted); font-size: .875rem; }

.ssz-result {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--ssz-radius);
  background: var(--ssz-accent-soft);
  border: 1px solid color-mix(in srgb, var(--ssz-accent) 25%, var(--ssz-surface));
}
.ssz-stats { display: grid; gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .ssz-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ssz-stat { display: flex; flex-direction: column; gap: .1rem; padding: .875rem 1rem; background: var(--ssz-surface); border-radius: 10px; }
.ssz-stat-label { font-size: .875rem; color: var(--ssz-muted); }
.ssz-stat-value { font-size: 1.5rem; line-height: 1.2; color: var(--ssz-ink); font-variant-numeric: tabular-nums; }
.ssz-stat-sub { font-size: .8125rem; color: var(--ssz-muted); }

.ssz-table-wrap { overflow-x: auto; background: var(--ssz-surface); border-radius: 10px; }
.ssz-table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.ssz-table th, .ssz-table td { padding: .6rem .75rem; text-align: right; border-bottom: 1px solid var(--ssz-line); white-space: nowrap; }
.ssz-table thead th { font-size: .8125rem; color: var(--ssz-muted); font-weight: 600; }
.ssz-table th:first-child { text-align: left; white-space: normal; }
.ssz-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 639px) {
  .ssz-table thead { display: none; }
  .ssz-table, .ssz-table tbody, .ssz-table tr, .ssz-table th, .ssz-table td { display: block; width: 100%; }
  .ssz-table tr { padding: .5rem 0; border-bottom: 1px solid var(--ssz-line); }
  .ssz-table tbody tr:last-child { border-bottom: 0; }
  .ssz-table th, .ssz-table td { border: 0; padding: .2rem .75rem; }
  .ssz-table tbody th { font-weight: 700; }
  .ssz-table td { display: flex; justify-content: space-between; gap: 1rem; }
  .ssz-table td::before { content: attr(data-label); color: var(--ssz-muted); }
}

.ssz-notes { margin: 1rem 0 0; padding-left: 1.25rem; font-size: .9375rem; }
.ssz-notes li + li { margin-top: .25rem; }
.ssz-print { margin-top: 1rem; }
.ssz-empty { margin: 0; color: var(--ssz-muted); }
.ssz-error { margin: 0; padding: .75rem 1rem; color: var(--ssz-error); background: var(--ssz-error-soft); border-radius: 8px; }
.ssz-legal { margin: 1rem 0 0; font-size: .8125rem; color: var(--ssz-muted); }

.ssz-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-top: 3px solid var(--ssz-accent);
  background: var(--ssz-surface);
  border-radius: 0 0 var(--ssz-radius) var(--ssz-radius);
}
.ssz-cta p { margin: 0; flex: 1 1 280px; }

.ssz-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Monatsnachweis */
.ssz-optional { font-weight: 400; color: var(--ssz-muted); }
.ssz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.ssz-link {
  min-height: 44px; padding: .25rem 0; font: inherit; font-size: .9375rem;
  color: var(--ssz-muted); background: none; border: 0; text-decoration: underline; cursor: pointer;
}
.ssz-link[data-confirm] { color: var(--ssz-error); font-weight: 600; }
.ssz-bulk { margin-top: 1rem; padding: .75rem 1rem; border: 1px dashed var(--ssz-line); border-radius: 10px; }
.ssz-bulk summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.ssz-bulk[open] summary { margin-bottom: .75rem; }
.ssz-bulk-fields { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .ssz-bulk-fields { grid-template-columns: 1.4fr 1.4fr 1fr 1fr 1fr; } }
.ssz-weekdays { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: .75rem 0 1rem; padding: 0; border: 0; }
.ssz-weekdays legend { width: 100%; margin-bottom: .35rem; padding: 0; font-weight: 600; font-size: .9375rem; }
.ssz-weekdays label {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .75rem;
  border: 1px solid var(--ssz-line); border-radius: 8px; background: var(--ssz-surface); cursor: pointer;
}
.ssz-weekdays input { width: 1.1rem; height: 1.1rem; accent-color: var(--ssz-accent); }
.ssz-bulk-msg { margin: .5rem 0 0; font-size: .9375rem; color: var(--ssz-muted); }
.ssz-bulk-msg:empty { display: none; }
.ssz-remember { margin-top: 1rem; color: var(--ssz-muted); }

.ssz-nachweis { margin-top: 1.25rem; }
.ssz-nachweis-title { margin: 0 0 .25rem; font-size: 1.0625rem; }
.ssz-nachweis-person { margin: 0 0 .5rem; font-weight: 600; }
.ssz-nachweis-wrap { overflow-x: auto; background: var(--ssz-surface); border-radius: 10px; }
.ssz-nachweis-wrap:focus-visible { outline: 3px solid color-mix(in srgb, var(--ssz-accent) 60%, transparent); outline-offset: 2px; }
.ssz-nachweis-table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.ssz-nachweis-table th, .ssz-nachweis-table td { padding: .45rem .6rem; text-align: right; border-bottom: 1px solid var(--ssz-line); white-space: nowrap; }
.ssz-nachweis-table thead th { font-size: .75rem; font-weight: 600; color: var(--ssz-muted); white-space: normal; vertical-align: bottom; min-width: 4.5rem; }
.ssz-nachweis-table th:first-child, .ssz-nachweis-table .ssz-text, .ssz-nachweis-table thead th:nth-child(2) { text-align: left; }
.ssz-nachweis-table tbody th { font-weight: 400; }
.ssz-nachweis-table .ssz-continued .ssz-text { color: var(--ssz-muted); font-style: italic; }
.ssz-nachweis-table tfoot > tr > * { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ssz-ink); }
.ssz-nachweis-hint { margin: .5rem 0 0; font-size: .8125rem; color: var(--ssz-muted); }
.ssz-nachweis-cta { margin: .75rem 0 0; padding: .6rem .9rem; font-size: .9375rem; background: var(--ssz-surface); border-left: 3px solid var(--ssz-accent); border-radius: 0 8px 8px 0; }

@media print {
  .ssz-form, .ssz-cta, .ssz-print, .ssz-nachweis-cta, .ssz-intro { display: none; }
  .ssz { max-width: none; font-size: 10pt; }
  .ssz-result { margin: 0; border: 0; background: none; padding: 0; }
  .ssz-stats { grid-template-columns: repeat(3, 1fr); }
  .ssz-stat { border: 1px solid #ccc; padding: .4rem .6rem; }
  .ssz-stat-value { font-size: 13pt; }
  .ssz-table-wrap, .ssz-nachweis-wrap { overflow: visible; }
  .ssz-table thead { display: table-header-group; }
  .ssz-table { display: table; }
  .ssz-table tbody { display: table-row-group; }
  .ssz-table tr { display: table-row; }
  .ssz-table th, .ssz-table td { display: table-cell; width: auto; }
  .ssz-table td::before { content: none; }
  .ssz-nachweis { break-before: auto; }
  .ssz-nachweis-table { font-size: 9pt; }
  .ssz-nachweis-table th, .ssz-nachweis-table td { padding: .2rem .35rem; }
  .ssz-nachweis-table thead { display: table-header-group; }
  .ssz-nachweis-table tr { break-inside: avoid; }
}
