:root {
  --bg: hsl(80, 22%, 97%);
  --panel: #ffffff;
  --border: hsl(150, 12%, 88%);
  --border-strong: hsl(150, 12%, 80%);
  --text: hsl(160, 25%, 12%);
  --muted: hsl(160, 10%, 42%);
  --dark: hsl(160, 28%, 10%);
  --green: hsl(152, 55%, 28%);
  --green-dark: hsl(152, 62%, 20%);
  --green-soft: hsl(152, 45%, 92%);
  --green-glow: hsl(150, 60%, 42%);
  --blue: #3d6db5;
  --row-alt: hsl(80, 16%, 96%);
  --shadow-sm: 0 1px 3px hsl(160 25% 12% / 0.06);
  --shadow-md: 0 4px 16px -4px hsl(160 25% 12% / 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

.kiosk-body {
  display: grid;
  place-items: start center;
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: hsl(152, 55%, 28%);
  /* Scrollbar verstecken aber Scroll erhalten — verhindert Layout-Versatz */
  scrollbar-width: none;
}
.kiosk-body::-webkit-scrollbar {
  display: none;
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: hsl(152, 55%, 28%);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.launch-screen-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.launch-screen-card {
  width: min(100%, 320px);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  color: white;
}

.launch-screen-logo {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.launch-screen-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
}

.launch-screen-subtitle {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.82);
}

.launch-screen-spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--green);
  animation: launch-spin 0.9s linear infinite;
}

@keyframes launch-spin {
  to {
    transform: rotate(360deg);
  }
}

.kiosk-shell {
  width: 100%;
  max-width: 620px;
  padding: 18px 20px 16px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.kiosk-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 18px 22px;
  display: grid;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.kiosk-card h1 {
  margin: 0;
  font-size: 1.8rem;
}

.kiosk-logo {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 18px;
  justify-self: center;
}

.kiosk-form {
  display: grid;
  gap: 14px;
}

.kiosk-form label {
  gap: 10px;
  font-size: 1rem;
}

.kiosk-form input {
  min-height: 72px;
  padding: 16px 18px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  border-width: 2px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.kiosk-form input::placeholder {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kiosk-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(31, 93, 46, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 249, 239, 0.98) 0%, rgba(233, 242, 220, 0.98) 100%);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kiosk-key {
  min-height: 64px;
  border: 1px solid rgba(31, 93, 46, 0.14);
  border-radius: 16px;
  background: white;
  color: #183d20;
  font: inherit;
  font-size: 1.65rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 55, 28, 0.08);
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.kiosk-key:hover,
.kiosk-key:focus-visible {
  background: #f6fbef;
  box-shadow: 0 10px 20px rgba(22, 55, 28, 0.12);
}

.kiosk-key:active {
  transform: translateY(1px) scale(0.99);
}

.kiosk-key-clear,
.kiosk-key-backspace {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.kiosk-key-clear {
  background: #eef3e7;
}

.kiosk-key-backspace {
  background: hsl(152, 55%, 28%);
  color: white;
}

.kiosk-install-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(157, 204, 77, 0.45);
  background: rgba(157, 204, 77, 0.12);
}

.kiosk-install-panel strong {
  display: block;
  margin-bottom: 4px;
}

.kiosk-submit,
.kiosk-actions button,
.kiosk-logout {
  min-height: 46px;
}

.kiosk-employee-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.kiosk-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.kiosk-progress-section {
  display: grid;
  gap: 8px;
}

.kiosk-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.kiosk-progress-head strong {
  font-size: 1rem;
}

.kiosk-progress-card {
  border: 1px solid var(--border);
  background: #fafafa;
  padding: 10px;
  display: grid;
  grid-template-rows: minmax(34px, auto) 1fr;
  align-items: start;
  min-height: 92px;
}

.kiosk-progress-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
}

.kiosk-progress-card strong {
  display: block;
  font-size: 1.1rem;
  align-self: end;
  line-height: 1;
}

.kiosk-employee-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.kiosk-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.kiosk-cash-closing-button {
  min-height: 92px;
  width: 100%;
}

.cash-closing-page {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  width: 100%;
}

.cash-closing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cash-closing-head h2 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
}

.cash-closing-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  background: #fbfbf7;
  padding: 14px;
  align-content: start;
  border-radius: 18px;
}

.cash-closing-card h3,
.cash-count-table h4 {
  margin: 0;
  color: hsl(152, 55%, 22%);
}

.cash-meta-grid,
.cash-values-grid,
.cash-closing-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.cash-values-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.cash-readonly-field,
.cash-value-display {
  min-height: 48px;
  border: 1px solid var(--border);
  background: white;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.cash-readonly-field span,
.cash-value-line span {
  color: var(--muted);
  font-size: 0.78rem;
}

.cash-readonly-field strong,
.cash-value-display {
  font-weight: 800;
}

.cash-count-groups,
.cash-closing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}

.cash-count-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  background: white;
  min-height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.cash-count-table h4 {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.cash-count-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) 96px minmax(112px, 0.95fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #ece8df;
}

.cash-count-row > span,
.cash-count-row strong {
  white-space: nowrap;
}

.cash-count-row > span {
  line-height: 1.25;
}

.cash-count-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.cash-count-row input {
  width: 100%;
  min-height: 36px;
  min-width: 0;
  padding: 6px 8px;
  text-align: center;
}

.cash-count-row strong,
.cash-total-row strong,
.cash-value-display {
  text-align: right;
}

.cash-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(157, 204, 77, 0.14);
  color: hsl(152, 55%, 22%);
  font-weight: 800;
}

.cash-manual-total {
  padding: 10px 12px;
  border-top: 1px solid #ece8df;
  background: #fbfbf7;
}

.cash-manual-total label {
  display: grid;
  gap: 6px;
  color: hsl(152, 55%, 22%);
  font-weight: 800;
}

.cash-manual-total input {
  min-height: 36px;
}

.cash-closing-card label {
  align-content: start;
}

.cash-closing-card textarea {
  resize: vertical;
}

.cash-small-money-total {
  border: 1px solid rgba(157, 204, 77, 0.38);
}

.cash-closing-back-button {
  min-height: 52px;
  padding: 0 20px;
  white-space: nowrap;
}

.cash-value-line {
  display: grid;
  gap: 6px;
}

.cash-value-display.good {
  color: #3b6d11;
  border-color: rgba(157, 204, 77, 0.55);
  background: #f4fae9;
}

.cash-value-display.bad {
  color: #a32d2d;
  border-color: #e7a6a2;
  background: #fff1f1;
}

.cash-signature-input {
  min-height: 64px;
  font-size: 1.35rem;
}

.cash-actions-card button {
  min-height: 50px;
}

@media (min-width: 980px) {
  body.cash-closing-mode {
    background: #f7f7f4;
  }

  body.cash-closing-mode .kiosk-shell {
    width: 100%;
    max-width: min(1780px, 100vw);
    padding: 14px 18px;
  }

  body.cash-closing-mode .kiosk-card {
    min-height: auto;
    padding: 14px 18px;
    gap: 12px;
    border: 0;
    box-shadow: none;
    background: #fbfbf7;
  }

  body.cash-closing-mode .kiosk-logo,
  body.cash-closing-mode .kiosk-card > .eyebrow,
  body.cash-closing-mode .kiosk-card > h1,
  body.cash-closing-mode .kiosk-card > .muted,
  body.cash-closing-mode .kiosk-install-panel {
    display: none !important;
  }

  body.cash-closing-mode .cash-closing-page {
    border-top: 0;
    padding-top: 0;
    gap: 12px;
  }

  body.cash-closing-mode .cash-closing-head {
    align-items: center;
  }

  body.cash-closing-mode .cash-closing-head h2 {
    font-size: 2rem;
  }

  body.cash-closing-mode .cash-closing-card {
    padding: 16px;
    gap: 12px;
  }

  body.cash-closing-mode .cash-meta-grid {
    grid-template-columns: 1.05fr 1.6fr 1.6fr 1fr;
  }

  body.cash-closing-mode .cash-closing-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.cash-closing-mode .cash-count-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.cash-closing-mode .cash-closing-bottom-grid {
    grid-template-columns: 1.15fr 1.2fr 1fr 0.95fr;
    align-items: stretch;
  }

  body.cash-closing-mode .cash-count-row {
    grid-template-columns: minmax(150px, 1.2fr) 96px minmax(116px, 0.95fr);
    padding: 8px 10px;
  }

  body.cash-closing-mode .cash-count-row input {
    min-height: 34px;
  }

  body.cash-closing-mode .cash-readonly-field,
  body.cash-closing-mode .cash-value-display {
    min-height: 52px;
  }

  body.cash-closing-mode .cash-values-grid {
    grid-template-columns: 1fr;
  }

  body.cash-closing-mode .cash-signature-input {
    min-height: 52px;
  }
}

@media (min-width: 900px) and (max-height: 980px) {
  .kiosk-shell {
    max-width: 580px;
    padding: 12px 16px 10px;
  }

  .kiosk-card {
    padding: 14px 18px;
    gap: 10px;
  }

  .kiosk-logo {
    width: 62px;
    height: 62px;
    border-radius: 16px;
  }

  .kiosk-card h1 {
    font-size: 1.6rem;
    line-height: 1.04;
  }

  .kiosk-card > .muted {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .kiosk-install-panel {
    display: none !important;
  }

  .kiosk-form {
    gap: 10px;
  }

  .kiosk-form label {
    gap: 8px;
    font-size: 0.95rem;
  }

  .kiosk-form input {
    min-height: 60px;
    padding: 12px 14px;
    font-size: 1.7rem;
  }

  .kiosk-keypad {
    gap: 8px;
    padding: 10px;
  }

  .kiosk-key {
    min-height: 52px;
    font-size: 1.28rem;
  }

  .kiosk-key-clear,
  .kiosk-key-backspace {
    font-size: 0.9rem;
  }

  .kiosk-submit,
  .kiosk-actions button,
  .kiosk-logout {
    min-height: 42px;
  }

  .kiosk-employee-panel {
    gap: 8px;
    padding-top: 10px;
  }

  .kiosk-employee-head {
    gap: 10px;
  }

  .kiosk-employee-head strong {
    font-size: 1rem;
  }

  .kiosk-employee-head .muted,
  .kiosk-progress-head .muted {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .kiosk-progress-section {
    gap: 6px;
  }

  .kiosk-progress-head strong {
    font-size: 0.95rem;
  }

  .kiosk-progress {
    gap: 8px;
  }

  .kiosk-progress-card {
    min-height: 76px;
    padding: 8px;
    grid-template-rows: minmax(28px, auto) 1fr;
  }

  .kiosk-progress-card span {
    font-size: 0.72rem;
  }

  .kiosk-progress-card strong {
    font-size: 1rem;
  }

  .kiosk-actions {
    gap: 8px;
  }
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

.admin-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  background: #f9f9f9;
  border-bottom: 1px solid var(--border);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
}

.topbar-meta {
  display: grid;
  justify-items: start;
  align-content: start;
  text-align: left;
  color: var(--muted);
  min-width: 172px;
}

.topbar-meta strong {
  display: block;
  color: var(--text);
}

.topbar-logout {
  margin-top: 8px;
  justify-self: start;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 75px);
}

.sidebar {
  border-right: none;
  background: hsl(160, 28%, 10%);
  padding: 16px 0;
}

.sidebar-head {
  padding: 0 14px 16px;
  border-bottom: 1px solid hsl(160, 22%, 18%);
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: hsl(80, 18%, 92%);
}

.sidebar-subtitle {
  color: hsl(80, 18%, 92% / 0.55);
  font-size: 0.92rem;
  margin-top: 4px;
}

.nav {
  display: grid;
  gap: 2px;
  padding: 8px 10px 0;
}

.nav-link {
  border: none;
  border-top: none;
  background: transparent;
  padding: 11px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  color: hsl(80, 18%, 85%);
  border-radius: 10px;
  transition: background 150ms ease, color 150ms ease;
}

.nav-link:last-child {
  border-bottom: none;
}

.nav-link:hover {
  background: hsl(160, 25%, 18%);
  color: hsl(80, 22%, 97%);
}

.nav-link.active {
  background: hsl(160, 25%, 18%);
  color: hsl(80, 22%, 97%);
  font-weight: 700;
}

.sidebar-info {
  display: grid;
  gap: 8px;
  padding: 14px 10px 0;
}

.info-tile {
  background: hsl(160, 25%, 16%);
  border: 1px solid hsl(160, 22%, 20%);
  border-radius: 10px;
  padding: 12px 14px;
}

.info-tile span {
  display: block;
  font-size: 0.78rem;
  color: hsl(80, 18%, 92% / 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-tile strong {
  display: block;
  margin-top: 4px;
  color: hsl(80, 18%, 92%);
}

.main-content {
  padding: 14px 22px 18px 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  align-items: start;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
}

.hero h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.content-section {
  display: none;
}

.content-section.visible {
  display: grid;
  gap: 12px;
  align-content: start;
  align-items: start;
}

.panel-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  align-self: start;
  margin-right: 4px;
  box-shadow: var(--shadow-sm);
}

.month-overview-panel {
  margin: 14px 0 16px;
  padding: 16px;
}

.compact-section-header {
  margin-bottom: 10px;
}

.monthly-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.monthly-summary-card {
  border: 1px solid var(--border);
  background: #fbfbf8;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.monthly-summary-card.success {
  border-color: rgba(124, 166, 58, 0.42);
}

.monthly-summary-card.warning {
  border-color: rgba(204, 163, 48, 0.42);
  background: #fffdf5;
}

.monthly-summary-card.danger {
  border-color: rgba(197, 74, 74, 0.42);
  background: #fff7f7;
}

/* Karten-Kopf: Name + Info-Block oben, Status-Badge auf eigener Zeile darunter.
   Robust gegen jede Namenslänge — kein Flex-Squeeze, kein Clipping. */
.monthly-summary-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.monthly-summary-head .badge {
  white-space: nowrap;
  justify-content: center;
  align-self: flex-start;
}

.monthly-summary-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.monthly-summary-values span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 3px;
}

.monthly-summary-values strong {
  font-size: 1.05rem;
}

.panel-title-row,
.section-header,
.toolbar,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.panel-title-row h3,
.section-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  margin-top: 16px;
}

.weekly-cell {
  background: white;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 108px;
  padding: 14px;
}

.weekly-cell.active-day {
  background: #ececec;
}

.weekly-day {
  font-size: 1.5rem;
  font-weight: 800;
}

.weekly-date {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.weekly-total {
  margin-top: 18px;
  font-size: 1.35rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 1.9rem;
}

.stat-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.list-row,
.employee-list-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  padding: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
}

.badge.success {
  background: #e4f3d1;
  color: #4d6f1f;
}

.badge.warning {
  background: #fff0c9;
  color: #8a6700;
}

.badge.muted {
  background: #ededed;
  color: #6f6f6f;
}

.muted {
  color: var(--muted);
}

/* ── Employee Status Tabs ─────────────────────── */
.emp-status-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}

.emp-status-tab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.emp-status-tab:hover {
  background: #f0f0f0;
  color: var(--text);
}

.emp-status-tab--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Badge-styled <select> ────────────────────── */
.badge-select {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.badge-select--success {
  background: #e4f3d1;
  color: #4d6f1f;
}

.badge-select--warning {
  background: #fff0c9;
  color: #8a6700;
}

.badge-select--muted {
  background: #ededed;
  color: #6f6f6f;
}

/* ── Employee Status Chip ──────────────────────────────────── */
.emp-status-wrap {
  position: relative;
  display: inline-block;
}

.emp-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-family: inherit;
}

.emp-status-btn--success { background: #dcfce7; color: #15803d; }
.emp-status-btn--warning { background: #fef9c3; color: #a16207; }
.emp-status-btn--muted   { background: #f1f5f9; color: #64748b; }

.emp-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.emp-status-btn--success .emp-status-dot { background: #16a34a; }
.emp-status-btn--warning .emp-status-dot { background: #d97706; }
.emp-status-btn--muted   .emp-status-dot { background: #94a3b8; }

.emp-status-dot--active  { background: #16a34a; }
.emp-status-dot--paused  { background: #d97706; }
.emp-status-dot--left    { background: #94a3b8; }

.emp-status-chevron {
  width: 10px;
  height: 7px;
  opacity: 0.6;
  flex-shrink: 0;
}

.emp-status-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  padding: 4px;
  min-width: 158px;
  display: grid;
  gap: 2px;
}

.emp-status-menu.hidden { display: none; }

.emp-status-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  color: #1e293b;
  width: 100%;
  font-family: inherit;
}

.emp-status-menu-item:hover { background: #f1f5f9; }

.emp-status-menu-item--active {
  background: #f0fdf4;
  font-weight: 700;
  color: #15803d;
}

.emp-status-menu-item--active:hover { background: #dcfce7; }
/* ─────────────────────────────────────────────────────────── */

.emp-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  vertical-align: middle;
  margin: 0 2px;
}
.emp-toggle-btn.on {
  background: #ecfdf5;
  border-color: #059669;
  color: #059669;
}
.emp-toggle-btn.off {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #9ca3af;
}
.emp-toggle-btn:hover.on  { background: #d1fae5; }
.emp-toggle-btn:hover.off { background: #e5e7eb; }

/* ── Inactive employee row ────────────────────── */
.emp-row--inactive td {
  opacity: 0.55;
}

.emp-row--inactive td:last-child,
.emp-row--inactive td:nth-last-child(2) {
  opacity: 1;
}

.tabs-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.tab-chip {
  border: 1px solid var(--border-strong);
  background: #d9d9d9;
  padding: 8px 14px;
  font-weight: 700;
}

.tab-chip.active {
  background: white;
}
.tab-chip[draggable="true"] { cursor: grab; }
.tab-chip[draggable="true"]:active { cursor: grabbing; }
.tab-chip.tab-dragging { opacity: 0.35; }
.tab-chip.tab-drag-over { outline: 2px solid hsl(152, 55%, 28%); outline-offset: 2px; }

.toolbar {
  margin-bottom: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  min-width: 240px;
  border: 1px solid var(--border);
  background: white;
}

.search-icon {
  padding: 0 10px;
  color: var(--muted);
  font-size: 1.1rem;
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 10px 10px 10px 0;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
  align-items: start;
}

.employee-action-card {
  border: 1px solid var(--border);
  background: white;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.employee-action-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.employee-action-head > div {
  display: grid;
  justify-items: start;
  text-align: left;
}

.employee-action-name {
  font-weight: 800;
}

.employee-action-role {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 3px;
}

.employee-action-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.primary-button,
.secondary-button,
.action-button,
.ghost-button,
.success-button,
.danger-button,
.text-button {
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--dark);
  color: white;
}

.secondary-button,
.action-button {
  background: #ededed;
  color: var(--text);
}

.ghost-button {
  background: #f5f5f5;
  color: var(--text);
  border: 1px solid var(--border);
}

.success-button {
  background: var(--green);
  color: white;
}

.danger-button {
  background: #d9534f;
  color: white;
}

.button-disabled {
  opacity: 0.55;
}

.text-button {
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.danger-text {
  color: #c0392b;
}

.table-select,
.table-input {
  width: 100%;
  min-width: 120px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  background: white;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .text-button + .text-button {
  margin-left: 10px;
}

.employee-order-buttons {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.emp-order-col {
  width: 52px;
  white-space: nowrap;
  text-align: center;
}

.employee-order-button {
  min-width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: #f5f5f5;
  color: var(--text);
  line-height: 1;
}

.employee-order-buttons .text-button + .text-button {
  margin-left: 0;
}

.entry-time-button {
  border: none;
  background: transparent;
  padding: 4px 6px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: background 140ms ease;
  user-select: none;
}

.entry-time-button:hover {
  background: rgba(164, 206, 87, 0.16);
}

.state-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.state-dot.active {
  background: #66c93a;
}

.state-dot.pending {
  background: #4c4c4c;
}

.state-dot.confirmed {
  background: #d94134;
}

.confirmed-row {
  background: #e8f3bf !important;
}

.entry-action-menu {
  position: absolute;
  z-index: 1000;
  width: 310px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.11), 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 4px 0;
}

.entry-action-menu.hidden {
  display: none;
}

.entry-menu-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-top: 1px solid #f0f2f4;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.entry-menu-button:first-child {
  border-top: none;
}

.entry-menu-button:hover {
  background: #f7f8fa;
}

.entry-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.entry-menu-button.edit   .entry-menu-icon { background: #e6f2ec; color: #204A33; }
.entry-menu-button.remove .entry-menu-icon { background: #fdecea; color: #c0392b; }
.entry-menu-button.confirm .entry-menu-icon { background: #e6f2ec; color: #204A33; }

.entry-menu-button.remove { color: #c0392b; }
.entry-menu-button.edit   { color: #204A33; }
.entry-menu-button.confirm { color: #204A33; }

.inline-form,
.filter-bar,
.form-grid,
.employee-form-grid,
.backoffice-user-grid {
  display: grid;
  gap: 14px;
}

.inline-form {
  grid-template-columns: 320px minmax(220px, 1fr);
  margin-bottom: 16px;
}

.filter-bar {
  grid-template-columns: repeat(3, minmax(0, 260px));
  margin-bottom: 16px;
}

.filter-result-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #f7f6f1;
  color: var(--muted);
  font-size: 0.94rem;
}

.filter-result-bar strong {
  color: var(--text);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(157, 207, 59, 0.14);
  color: #446212;
  font-weight: 700;
}

.backoffice-view-row {
  justify-content: flex-start;
  margin: 0 0 14px;
}

.backoffice-day-timeline {
  display: block;
  max-width: 520px;
  line-height: 1.45;
  color: var(--text);
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 18px;
}

.employee-form-grid {
  grid-template-columns: repeat(3, minmax(220px, 320px));
  justify-content: start;
  align-items: start;
  column-gap: 18px;
  row-gap: 16px;
}

.employee-form-grid > input[type="hidden"],
.absence-grid > input[type="hidden"] {
  display: none;
}

.employee-form-grid label {
  min-width: 0;
  align-content: start;
}

.employee-form-grid input,
.employee-form-grid select {
  min-height: 48px;
}

.employee-form-grid .toggle-row {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  margin-top: 2px;
}

.employee-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.absence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.backoffice-user-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin-bottom: 16px;
}

.backoffice-user-actions {
  display: flex;
  align-items: end;
}

.absence-note-field {
  grid-column: span 4;
}

.absence-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  grid-column: span 4;
}

.export-dialog-card {
  display: grid;
  gap: 16px;
}

.export-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
}

.export-toggle {
  grid-template-columns: 22px 1fr;
  align-items: flex-start;
}

.export-toggle strong,
.export-toggle small {
  display: block;
}

.export-toggle small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.export-period-grid {
  margin-bottom: 10px;
}

.export-time-controls {
  display: grid;
  gap: 12px;
}

.export-free-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#employeeFormPanel.collapsed {
  display: none;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: white;
  padding: 10px 12px;
  color: var(--text);
}

.toggle-row {
  grid-template-columns: 22px 1fr;
  align-items: center;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.table-wrapper table {
  border: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 0.89rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 8px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: hsl(80, 16%, 96%);
  font-weight: 700;
  color: hsl(160, 20%, 20%);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:nth-child(even):not(.recipe-group-header) {
  background: var(--row-alt);
}

.recipe-group-header td {
  background: hsl(152, 45%, 93%);
  border-top: 2px solid var(--green);
  padding: 7px 10px;
  font-size: 0.88rem;
}

.recipe-group-count {
  margin-left: 10px;
  font-size: 0.8rem;
  font-weight: normal;
  color: #666;
}

.kalk-group-avg {
  margin-left: 16px;
  font-size: 0.8rem;
  color: #444;
}

.kalk-pct-ok {
  color: #3a7d1e;
  font-weight: 600;
}

.kalk-pct-warn {
  color: #c0392b;
  font-weight: 600;
}

.kalk-row-warning {
  background: #fff5f5 !important;
}

.kalk-simulated {
  color: #1a6fa8;
  font-weight: 600;
}

.kalk-sim-warning-banner {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 6px;
  padding: 9px 14px;
  color: #92400E;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.kalk-simulator-row {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}

.kalk-sim-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
}

.kalk-sim-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kalk-sim-input-wrap input {
  width: 80px;
  padding: 6px 8px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.kalk-sim-unit {
  font-size: 0.9rem;
  color: #666;
}

.kalk-kpi-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}

.kalk-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f6f9f1;
  border: 1px solid #d6e8b0;
  border-radius: 10px;
  padding: 12px 20px;
  min-width: 160px;
}

.kalk-kpi-label {
  font-size: 0.78rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kalk-kpi-val {
  font-size: 1.4rem;
  font-weight: 700;
}

.kalk-edit-row.hidden {
  display: none;
}

.kalk-edit-panel {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 8px;
  background: #f8fbf4;
  border-radius: 8px;
}

.kalk-edit-row td {
  border-top: none;
  padding: 0 8px 8px;
}

.employee-row {
  cursor: pointer;
}

.employee-row:hover {
  background: rgba(157, 207, 59, 0.08);
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.edit-dialog {
  border: none;
  padding: 0;
  background: transparent;
}

.edit-dialog form {
  width: min(680px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--border);
  padding: 12px;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.edit-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.edit-status-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 6px;
}

.edit-status-card {
  border: 1px solid var(--border);
  background: #faf9f3;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.edit-status-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.edit-status-card strong {
  font-size: 0.95rem;
}

.edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 0.92fr);
  gap: 10px;
  margin-bottom: 10px;
}

.edit-panel {
  border: 1px solid var(--border);
  background: #fcfcfc;
  padding: 9px;
  display: grid;
  gap: 9px;
}

.edit-panel-title {
  font-weight: 800;
}

.edit-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.worktime-panel-grid {
  grid-template-columns: 1fr;
}

.edit-panel-grid label {
  min-width: 0;
}

.split-datetime-input {
  display: grid;
  grid-template-columns: minmax(136px, 1fr) 76px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.split-datetime-input input[type="text"],
.split-datetime-input input[type="time"] {
  min-height: 32px;
  font-variant-numeric: tabular-nums;
  width: 100%;
  min-width: 0;
}

.split-datetime-input input[type="text"] {
  font-size: 0.92rem;
  letter-spacing: 0;
}

.split-datetime-input input[type="time"] {
  text-align: center;
  font-size: 0.92rem;
}

.create-datetime-input {
  grid-template-columns: minmax(210px, 1fr) 112px;
}

.edit-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(34, 34, 34, 0.92);
  color: white;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.backoffice-login-body {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 18px 20px 16px;
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: hsl(152, 55%, 28%);
}

.backoffice-login-shell {
  width: 100%;
  max-width: 620px;
}

.backoffice-login-card {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.backoffice-login-card h1 {
  margin: 0;
  font-size: 1.8rem;
}

.backoffice-login-form {
  grid-template-columns: 1fr;
}

.backoffice-login-field {
  gap: 10px;
}

.backoffice-login-field input {
  min-height: 72px;
  padding: 0 18px;
  font-size: 1rem;
}

.backoffice-login-hint {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .grid-two,
  .inline-form,
  .filter-bar,
  .weekly-grid,
  .employee-action-grid,
  .kiosk-progress,
  .monthly-summary-values {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .employee-form-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .backoffice-user-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar,
  .hero,
  .toolbar,
  .kiosk-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-content {
    padding: 14px;
  }

  .employee-form-grid,
  .absence-grid {
    grid-template-columns: 1fr;
  }

  .backoffice-login-body {
    padding: 14px 14px 12px;
  }

  .backoffice-login-card {
    padding: 16px 16px 14px;
  }

  .backoffice-login-field input {
    min-height: 64px;
  }

  .edit-header,
  .edit-grid,
  .edit-panel-grid,
  .edit-status-stack {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .kiosk-install-panel {
    grid-template-columns: 1fr;
  }

  .launch-screen-logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .launch-screen-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 1040px) {
  .edit-grid {
    grid-template-columns: 1fr;
  }

  .split-datetime-input,
  .create-datetime-input {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 900px) {
  .kiosk-shell {
    padding-top: 12px;
  }

  .kiosk-card {
    padding: 16px 18px;
    gap: 10px;
  }

  .kiosk-logo {
    width: 64px;
    height: 64px;
  }

  .kiosk-form input {
    min-height: 64px;
    font-size: 1.65rem;
  }

  .kiosk-key {
    min-height: 58px;
    font-size: 1.4rem;
  }

  .kiosk-key-clear,
  .kiosk-key-backspace {
    font-size: 0.95rem;
  }

  .kiosk-progress-card {
    min-height: 84px;
  }
}

@media (max-width: 480px) {
  .kiosk-body {
    place-items: start stretch;
  }

  .kiosk-shell {
    max-width: 100%;
    min-height: 100dvh;
    padding: 10px 10px 12px;
  }

  .kiosk-card {
    min-height: calc(100dvh - 22px);
    padding: 12px 14px;
    gap: 10px;
  }

  .kiosk-logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .eyebrow {
    margin: 0;
    font-size: 0.78rem;
  }

  .kiosk-card h1 {
    font-size: 1.55rem;
    line-height: 1.05;
  }

  .kiosk-card > .muted {
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0;
  }

  .kiosk-install-panel {
    display: none !important;
  }

  .kiosk-form {
    gap: 10px;
  }

  .kiosk-form label {
    font-size: 0.95rem;
    gap: 8px;
  }

  .kiosk-form input {
    min-height: 58px;
    padding: 12px 14px;
    font-size: 1.5rem;
  }

  .kiosk-form input::placeholder {
    font-size: 1rem;
  }

  .kiosk-keypad {
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .kiosk-key {
    min-height: 50px;
    font-size: 1.2rem;
    border-radius: 14px;
  }

  .kiosk-key-clear,
  .kiosk-key-backspace {
    font-size: 0.88rem;
  }

  .kiosk-submit,
  .kiosk-actions button,
  .kiosk-logout {
    min-height: 42px;
  }

  .kiosk-employee-panel {
    gap: 8px;
    padding-top: 10px;
  }

  .kiosk-employee-head {
    gap: 10px;
  }

  .kiosk-employee-head strong {
    font-size: 1rem;
  }

  .kiosk-progress-head strong {
    font-size: 0.95rem;
  }

  .kiosk-progress-head .muted,
  .kiosk-employee-head .muted {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .kiosk-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kiosk-progress-card {
    min-height: 72px;
    padding: 8px;
    grid-template-rows: minmax(28px, auto) 1fr;
  }

  .kiosk-progress-card span {
    font-size: 0.72rem;
  }

  .kiosk-progress-card strong {
    font-size: 1rem;
  }

  .kiosk-actions {
    gap: 8px;
  }

  .badge {
    font-size: 0.78rem;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) and (max-height: 760px) {
  .kiosk-shell {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .kiosk-card {
    min-height: calc(100dvh - 16px);
    padding: 10px 12px;
    gap: 8px;
  }

  .kiosk-logo {
    width: 50px;
    height: 50px;
  }

  .kiosk-card h1 {
    font-size: 1.4rem;
  }

  .kiosk-card > .muted {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .kiosk-form input {
    min-height: 52px;
    font-size: 1.35rem;
  }

  .kiosk-key {
    min-height: 44px;
    font-size: 1.08rem;
  }

  .kiosk-progress-card {
    min-height: 66px;
  }
}

/* ── Dienstplanung ────────────────────────────────── */
.kw-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}
#currentWeekLabel {
  font-size: 14px;
  font-weight: 600;
  min-width: 160px;
  text-align: center;
}
#dienstplanTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
#dienstplanTable th,
#dienstplanTable td {
  padding: 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
}
#dienstplanTable th:first-child,
#dienstplanTable td:first-child {
  text-align: left;
  padding-left: 8px;
  width: 160px;
}
#dienstplanTable th:last-child,
#dienstplanTable td:last-child {
  width: 70px;
  white-space: normal;
}
.dp-cell-btn {
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 6px;
  transition: opacity 0.15s;
}
.dp-cell-btn:hover { opacity: 0.8; }
.dp-cell-empty {
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border: 1.5px dashed var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dp-cell-empty:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
}
.dp-cell-schicht   { background: #E6F1FB; color: #0C447C; }
.dp-cell-urlaub    { background: #FAEEDA; color: #854F0B; }
.dp-cell-krank     { background: #FCEBEB; color: #A32D2D; }
.dp-cell-feiertag  { background: #EEEDFE; color: #534AB7; }
.dp-cell-frei      { background: #F1EFE8; color: #5F5E5A; }
.dp-cell-sonstiges { background: #F1EFE8; color: #5F5E5A; }
.dp-cell-locked    { opacity: 0.75; cursor: not-allowed; pointer-events: auto; }
.dp-employee-cell {
  white-space: normal;
}
.dp-employee-name-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
}
.dp-employee-name-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}
.dp-employee-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.dp-employee-hints span {
  border-radius: 999px;
  background: #f1f5e8;
  color: #4f6f1c;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
}
.dp-week-total {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.dp-week-total .dp-ist { color: #3B6D11; }
.dp-week-total .dp-soll { color: #A32D2D; }
.dp-week-total .dp-soll-separator {
  color: var(--text-muted);
  padding: 0 1px;
}
.dp-soll-ok,
.dp-soll-warn { font-weight: 700; }
.dp-holiday-col { background: #EEEDFE22; }
.dp-today-col   { background: #E1F5EE22; }
.dp-day-clear {
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.dp-day-clear:hover {
  border-color: #C9463D;
  color: #C9463D;
}
.dienstplan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.legend-soll-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dp-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
/* Schicht-Popup */
.dp-popup-overlay {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 99999 !important;
  background: rgba(0,0,0,0.5);
  transform: none !important;
}
.dp-popup-overlay.open { display: block; }
.dp-popup {
  background: #ffffff !important;
  border-radius: 16px;
  padding: 20px;
  width: 360px;
  max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  border: 0.5px solid var(--border-strong);
  box-shadow: 0 12px 48px rgba(0,0,0,0.28);
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 100000 !important;
  margin: 0;
}
.dp-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dp-popup-title { font-size: 15px; font-weight: 600; }
.dp-banner {
  display: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.dp-banner.show { display: block; }
.dp-banner-warn { background: #FAEEDA; color: #854F0B; }
.dp-banner-ok   { background: #EAF3DE; color: #3B6D11; }
.dp-banner-err  { background: #FCEBEB; color: #A32D2D; }
.dp-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.dp-type-btn {
  border: 1px solid transparent;
  background: #ffffff;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.dp-type-btn:hover {
  transform: translateY(-1px);
}
.dp-type-btn:focus-visible {
  outline: none;
}
.dp-type-btn:disabled,
.dp-type-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status-btn-shift {
  background: #E8F3FF;
  border-color: #7DB7FF;
  color: #0B4F8A;
}
.status-btn-shift:hover {
  background: #E1EEFF;
  border-color: #63A8FF;
}
.status-btn-shift:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.18);
}
.dp-type-btn.sel-schicht {
  background: #D7EBFF;
  border-color: #2F80ED;
  color: #0B4F8A;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.16);
}

.status-btn-vacation {
  background: #EAF7EA;
  border-color: #8BCF8B;
  color: #1F6B2A;
}
.status-btn-vacation:hover {
  background: #E1F3E1;
  border-color: #70BE70;
}
.status-btn-vacation:focus-visible {
  box-shadow: 0 0 0 3px rgba(63, 163, 77, 0.18);
}
.dp-type-btn.sel-urlaub {
  background: #D8F0D8;
  border-color: #3FA34D;
  color: #1F6B2A;
  box-shadow: 0 0 0 3px rgba(63, 163, 77, 0.16);
}

.status-btn-sick {
  background: #FDEAEA;
  border-color: #F19A9A;
  color: #B3261E;
}
.status-btn-sick:hover {
  background: #FCE2E2;
  border-color: #E77F7F;
}
.status-btn-sick:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.18);
}
.dp-type-btn.sel-krank {
  background: #FAD6D6;
  border-color: #D93025;
  color: #B3261E;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.16);
}

.status-btn-holiday {
  background: #F1ECFF;
  border-color: #B8A7F5;
  color: #5B3FA3;
}
.status-btn-holiday:hover {
  background: #ECE5FF;
  border-color: #A28CEB;
}
.status-btn-holiday:focus-visible {
  box-shadow: 0 0 0 3px rgba(123, 97, 209, 0.18);
}
.dp-type-btn.sel-feiertag {
  background: #E4DAFF;
  border-color: #7B61D1;
  color: #5B3FA3;
  box-shadow: 0 0 0 3px rgba(123, 97, 209, 0.16);
}

.status-btn-free {
  background: #F3F5F4;
  border-color: #C9D1CC;
  color: #5F6B66;
}
.status-btn-free:hover {
  background: #EDF1EE;
  border-color: #B2BCB6;
}
.status-btn-free:focus-visible {
  box-shadow: 0 0 0 3px rgba(140, 153, 146, 0.16);
}
.dp-type-btn.sel-frei {
  background: #E6EAE8;
  border-color: #8C9992;
  color: #5F6B66;
  box-shadow: 0 0 0 3px rgba(140, 153, 146, 0.14);
}

.status-btn-other {
  background: #FFF4E5;
  border-color: #F2B66D;
  color: #9A5A00;
}
.status-btn-other:hover {
  background: #FFF0DA;
  border-color: #E9A24A;
}
.status-btn-other:focus-visible {
  box-shadow: 0 0 0 3px rgba(224, 138, 0, 0.18);
}
.dp-type-btn.sel-sonstiges {
  background: #FFE8C2;
  border-color: #E08A00;
  color: #9A5A00;
  box-shadow: 0 0 0 3px rgba(224, 138, 0, 0.14);
}
.dp-preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.dp-preset-btn {
  font-size: 11px;
  padding: 7px 6px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  white-space: nowrap;
}
.dp-preset-btn:hover { background: var(--bg-subtle); }
.dp-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.dp-time-label {
  font-size: 12px;
  color: var(--text-muted);
  width: 30px;
  flex-shrink: 0;
}
.dp-time-input {
  flex: 1;
  font-size: 13px;
  padding: 7px 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
}
.dp-soll-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: var(--bg-subtle);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.dp-popup-actions { display: flex; gap: 8px; }
.dp-popup-actions .primary-button { flex: 1; }
.dp-employee-details-popup {
  width: 430px;
}
.dp-details-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}
.dp-details-section {
  margin-bottom: 14px;
}
.dp-details-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
}
.dp-details-help {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: -2px 0 8px;
}
.dp-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.dp-day-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 700;
}
.dp-day-choice input {
  width: 16px;
  height: 16px;
}
.dp-details-note {
  width: 100%;
  resize: vertical;
}
.dp-feiertag-badge {
  display: inline-block;
  font-size: 9px;
  background: #EEEDFE;
  color: #534AB7;
  border-radius: 4px;
  padding: 1px 4px;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* UI System Refresh ------------------------------------------------------ */
:root {
  --color-primary-dark: #204A33;
  --color-primary: #9BBE40;
  --color-off-white: #F0F3F1;
  --color-border-light: #D9DDD7;
  --color-text-dark: #1F2320;
  --color-muted-text: #66706A;
  --color-soft-bg: #F7F8F6;
  --color-success-bg: #EEF6E3;
  --color-danger: #D9534F;
  --color-danger-bg: #FCEAEA;
  --color-surface: #FFFFFF;
  --color-surface-muted: #FAFBF9;
  --color-surface-strong: #E7EEE0;
  --shadow-soft: 0 10px 28px rgba(32, 74, 51, 0.08);
  --shadow-dialog: 0 18px 48px rgba(31, 35, 32, 0.18);
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --font-size-page-title: 24px;
  --font-size-section-title: 16px;
  --font-size-card-title: 15px;
  --font-size-table-header: 13px;
  --font-size-body: 14px;
  --font-size-kpi: 16px;
  --font-size-meta: 12px;
  --line-height-body: 1.45;
  --bg: var(--color-off-white);
  --panel: var(--color-surface);
  --border: var(--color-border-light);
  --border-strong: #BCC7BF;
  --text: var(--color-text-dark);
  --muted: var(--color-muted-text);
  --dark: var(--color-primary-dark);
  --green: var(--color-primary);
  --green-dark: #173825;
  --blue: var(--color-primary-dark);
  --row-alt: #FAFBF8;
  --primary: var(--color-primary-dark);
  --bg-subtle: var(--color-soft-bg);
  --text-muted: var(--color-muted-text);
  --focus-ring: 0 0 0 3px rgba(155, 190, 64, 0.2);
}

html {
  background: var(--bg);
  /* overflow-x on html (not body) so position:fixed children still use viewport */
  overflow-x: hidden;
}

body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(155, 190, 64, 0.14), transparent 22%),
    linear-gradient(180deg, #f7f9f6 0%, #eef2ee 100%);
}

/* Removed overflow-x:hidden from body — breaks position:fixed in Chrome/Safari */

.admin-shell {
  min-height: 100vh;
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-6);
  background: rgba(240, 243, 241, 0.94);
  border-bottom: 1px solid rgba(217, 221, 215, 0.92);
  backdrop-filter: blur(16px);
}

.brand-block {
  gap: var(--space-4);
}

.brand-copy,
.sidebar-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 6px 14px rgba(32, 74, 51, 0.08);
}

.topbar h1 {
  font-size: var(--font-size-page-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.topbar-subtitle {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}

.topbar-meta {
  gap: var(--space-1);
  align-content: center;
  min-width: 180px;
  font-size: var(--font-size-meta);
}

.topbar-meta strong {
  font-size: var(--font-size-body);
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 var(--space-1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-shell {
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 85px);
}

.sidebar {
  position: sticky;
  top: 80px;
  align-self: stretch;
  height: auto;
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  background: linear-gradient(180deg, rgba(32, 74, 51, 0.96) 0%, rgba(25, 60, 41, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
}

.sidebar-head,
.sidebar-info {
  padding: 0;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sidebar-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.sidebar-subtitle {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(240, 243, 241, 0.66);
}

.sidebar-store-card {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-store-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 243, 241, 0.64);
}

.sidebar-store-card strong {
  font-size: 14px;
  line-height: 1.35;
  color: #ffffff;
}

.nav {
  gap: var(--space-4);
  align-content: start;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  padding: 0 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 243, 241, 0.52);
}

.sidebar-nav-link {
  min-height: 52px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 0 14px;
  color: rgba(240, 243, 241, 0.84);
  font-size: var(--font-size-body);
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.sidebar-nav-link:hover,
.sidebar-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

.nav-label {
  min-width: 0;
}

.nav-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(240, 243, 241, 0.88);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-nav-link.active {
  background: rgba(155, 190, 64, 0.16);
  border-color: rgba(155, 190, 64, 0.28);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-link-soon {
  opacity: 0.78;
  cursor: not-allowed;
}

.nav-link-soon:hover,
.nav-link-soon:focus-visible {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(240, 243, 241, 0.84);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout-link {
  color: rgba(255, 255, 255, 0.9);
}

.main-content {
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.hero {
  min-height: 48px;
  align-items: center;
}

.hero h2 {
  font-size: var(--font-size-page-title);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary-dark);
}

.content-section.visible {
  gap: var(--space-4);
}

.panel-card,
.monthly-summary-card,
.stat-card,
.employee-action-card,
.list-row,
.employee-list-card,
.edit-panel,
.edit-status-card,
.backoffice-login-card,
.kiosk-card,
.cash-closing-card,
.dp-popup {
  border-radius: var(--radius-lg);
}

.panel-card {
  margin-right: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel-title-row,
.section-header,
.toolbar,
.dialog-actions {
  gap: var(--space-4);
}

.panel-title-row h3,
.section-header h3,
.cash-closing-card h3,
.cash-count-table h4,
.edit-panel-title,
.dp-popup-title {
  font-size: var(--font-size-card-title);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.muted,
.edit-subtitle,
.search-icon,
.topbar-meta,
.cash-readonly-field span,
.cash-value-line span,
.monthly-summary-values span,
.stat-card span,
.kiosk-progress-card span,
.backoffice-login-hint {
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.stat-card {
  padding: var(--space-4);
  border: 1px solid var(--border);
  background: var(--color-surface);
}

.stat-card span {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-meta);
}

.stat-card strong {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary-dark);
}

.stat-card small {
  margin-top: var(--space-3);
  font-size: var(--font-size-meta);
}

.weekly-grid {
  gap: 0;
  margin-top: var(--space-4);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.weekly-cell {
  min-height: 112px;
  padding: var(--space-4);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--color-surface);
}

.weekly-cell.active-day {
  background: rgba(155, 190, 64, 0.11);
}

.weekly-day {
  font-size: 24px;
  line-height: 1;
  color: var(--color-primary-dark);
}

.weekly-date {
  font-size: var(--font-size-body);
  font-weight: 600;
}

.weekly-total {
  margin-top: var(--space-4);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.monthly-summary-grid {
  gap: var(--space-4);
}

.monthly-summary-card {
  padding: var(--space-4);
  background: var(--color-surface-muted);
  border: 1px solid var(--border);
}

.monthly-summary-card.success {
  background: var(--color-success-bg);
  border-color: rgba(155, 190, 64, 0.38);
}

.monthly-summary-card.warning {
  background: #fff8eb;
  border-color: rgba(184, 144, 51, 0.28);
}

.monthly-summary-card.danger {
  background: var(--color-danger-bg);
  border-color: rgba(217, 83, 79, 0.26);
}

.monthly-summary-head {
  gap: var(--space-3);
}

.monthly-summary-values {
  gap: var(--space-3) var(--space-4);
}

.monthly-summary-values span {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-meta);
}

.monthly-summary-values strong {
  font-size: var(--font-size-kpi);
  font-weight: 700;
}

.tabs-row {
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.tab-chip {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-soft-bg);
  padding: 0 var(--space-4);
  color: var(--text);
  font-size: var(--font-size-body);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* SVG-Icons in Tab-Chips (Sidebar-Stil) */
.tc-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.tab-chip.active .tc-icon,
.tab-chip:hover .tc-icon {
  opacity: 1;
}

.tab-chip.active {
  border-color: rgba(155, 190, 64, 0.36);
  background: rgba(155, 190, 64, 0.14);
  color: var(--color-primary-dark);
}

.toolbar {
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.search-box {
  min-height: 40px;
  min-width: min(100%, 280px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.search-box input {
  padding: 10px 12px 10px 0;
}

.toolbar-actions,
.employee-action-buttons,
.employee-form-actions,
.absence-actions,
.backoffice-user-actions,
.edit-inline-actions,
.dp-popup-actions {
  gap: var(--space-2);
}

.employee-action-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.employee-action-card,
.list-row,
.employee-list-card {
  border: 1px solid var(--border);
  background: var(--color-surface);
  padding: var(--space-4) var(--space-4) var(--space-6);
}

.employee-action-name {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.employee-action-role {
  font-size: var(--font-size-meta);
}

.primary-button,
.secondary-button,
.action-button,
.ghost-button,
.success-button,
.danger-button,
.text-button,
.employee-order-button,
.entry-menu-button,
.dp-type-btn,
.dp-preset-btn,
.dp-day-clear,
.nav-link,
.tab-chip,
.kiosk-key {
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.primary-button,
.secondary-button,
.action-button,
.ghost-button,
.success-button,
.danger-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-body);
  font-weight: 600;
}

.primary-button {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #173825;
}

.secondary-button,
.action-button {
  background: #ffffff;
  color: var(--color-primary-dark);
  border-color: rgba(32, 74, 51, 0.22);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.action-button:hover,
.action-button:focus-visible {
  background: rgba(32, 74, 51, 0.05);
}

/* Pause starten: Light Periwinkle Blue */
.kiosk-actions .action-button[data-kiosk-action="break_start"] {
  background: #C5CCE0 !important;
  border-color: #B4BBD0 !important;
  color: #1a1a1a !important;
}
.kiosk-actions .action-button[data-kiosk-action="break_start"]:hover,
.kiosk-actions .action-button[data-kiosk-action="break_start"]:focus-visible {
  background: #B4BBD0 !important;
}
/* Pause beenden: Light Periwinkle Blue (gleiche Farbe) */
.kiosk-actions .action-button[data-kiosk-action="break_end"] {
  background: #C5CCE0 !important;
  border-color: #B4BBD0 !important;
  color: #1a1a1a !important;
}
.kiosk-actions .action-button[data-kiosk-action="break_end"]:hover,
.kiosk-actions .action-button[data-kiosk-action="break_end"]:focus-visible {
  background: #B4BBD0 !important;
}

.cash-actions-card #cashClosingSave {
  color: #111111;
}

.ghost-button {
  background: var(--color-soft-bg);
  color: var(--text);
  border-color: var(--border);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: #eef1ed;
}

.success-button {
  background: var(--color-primary);
  color: var(--color-primary-dark);
}

.ing-action-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.ing-action-group .ghost-button {
  padding: 4px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.ing-action-danger {
  color: var(--color-danger, #c0392b);
}

.success-button:hover,
.success-button:focus-visible {
  background: #8eb335;
}

/* Anmeldung-Buttons (Zeiterfassung) — helles Grün wie ERLEDIGT-KPI-Karte */
.employee-action-buttons [data-employee-action="clock_in"] {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}
.employee-action-buttons [data-employee-action="clock_in"]:hover,
.employee-action-buttons [data-employee-action="clock_in"]:focus-visible {
  background: #dcfce7;
  border-color: #6ee7b7;
}

.danger-button {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(217, 83, 79, 0.24);
}

.danger-button:hover,
.danger-button:focus-visible {
  background: #f9dfde;
}

.text-button {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.text-button:hover,
.text-button:focus-visible {
  color: #173825;
  text-decoration: underline;
}

.button-disabled {
  opacity: 0.55;
}

.danger-text {
  color: var(--color-danger);
}

label {
  gap: var(--space-2);
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--text);
}

input,
select,
textarea,
.table-select,
.table-input,
.dp-time-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 10px 12px;
  color: var(--text);
}

input,
select,
.table-select,
.table-input {
  min-height: 40px;
}

input::placeholder,
textarea::placeholder {
  color: #8e9791;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.table-select:focus-visible,
.table-input:focus-visible,
.entry-time-button:focus-visible {
  outline: none;
  border-color: rgba(155, 190, 64, 0.72);
  box-shadow: var(--focus-ring);
}

input[type="number"],
.table-input[type="number"],
.cash-count-row input,
[data-cash-input] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.toggle-row {
  gap: var(--space-2);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.inline-form,
.filter-bar,
.employee-form-grid,
.backoffice-user-grid,
.absence-grid,
.export-grid,
.export-free-range,
.cash-meta-grid,
.cash-values-grid,
.cash-closing-bottom-grid,
.cash-count-groups,
.cash-closing-grid {
  gap: var(--space-4);
}

.inline-form {
  grid-template-columns: minmax(260px, 360px);
}

.filter-bar {
  grid-template-columns: repeat(3, minmax(220px, 280px));
}

.filter-result-bar {
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-soft-bg);
  font-size: var(--font-size-body);
}

.filter-chip {
  padding: 6px 10px;
  background: rgba(155, 190, 64, 0.16);
  color: var(--color-primary-dark);
}

.employee-form-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  column-gap: var(--space-4);
  row-gap: var(--space-4);
}

.backoffice-user-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.absence-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.absence-note-field,
.absence-actions {
  grid-column: 1 / -1;
}

.export-grid {
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.05fr);
}

.table-wrapper {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

table {
  min-width: 900px;
  font-size: var(--font-size-body);
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e9ece6;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8f5;
  color: var(--muted);
  font-size: var(--font-size-table-header);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
}

tbody tr:nth-child(even):not(.recipe-group-header) {
  background: var(--row-alt);
}

tbody tr:hover {
  background: rgba(155, 190, 64, 0.07);
}

.employee-row:hover {
  background: rgba(155, 190, 64, 0.1);
}

.empty-state {
  padding: var(--space-6);
  font-size: var(--font-size-body);
}


/* ── Tracking-Tabelle — kompaktes Layout ─────────────────────────────────── */
#tracking table { font-size: 12px; }
#tracking table th { font-size: 11px; padding: 5px 8px; }
#tracking table td { padding: 5px 8px; white-space: nowrap; }
#tracking table th:nth-child(7), #tracking table td:nth-child(7),
#tracking table th:nth-child(8), #tracking table td:nth-child(8),
#tracking table th:nth-child(9), #tracking table td:nth-child(9),
#tracking table th:nth-child(10), #tracking table td:nth-child(10) { min-width: 78px; }
#tracking table th:nth-child(11), #tracking table td:nth-child(11) { width: 100%; }

#tracking table th:nth-child(1),
#tracking table th:nth-child(6),
#tracking table th:nth-child(7),
#tracking table th:nth-child(8),
#tracking table th:nth-child(9),
#tracking table th:nth-child(10),
#tracking table td:nth-child(1),
#tracking table td:nth-child(6),
#tracking table td:nth-child(7),
#tracking table td:nth-child(8),
#tracking table td:nth-child(9),
#tracking table td:nth-child(10),
#dashboard table th:nth-child(4),
#dashboard table th:nth-child(5),
#dashboard table th:nth-child(6),
#dashboard table td:nth-child(4),
#dashboard table td:nth-child(5),
#dashboard table td:nth-child(6),
#backofficeTimePanel table th:nth-child(4),
#backofficeTimePanel table th:nth-child(5),
#backofficeTimePanel table th:nth-child(6),
#backofficeTimePanel table th:nth-child(7),
#backofficeTimePanel table td:nth-child(4),
#backofficeTimePanel table td:nth-child(5),
#backofficeTimePanel table td:nth-child(6),
#backofficeTimePanel table td:nth-child(7),
#employees table th:nth-child(9),
#employees table th:nth-child(10),
#employees table th:nth-child(11),
#employees table td:nth-child(9),
#employees table td:nth-child(10),
#employees table td:nth-child(11) {
  text-align: right;
}

/* ── Backoffice Zeiterfassung — kompaktes Layout ─────────────────────────── */
#backofficeTimePanel table { font-size: 13px; }
#backofficeTimePanel table th { font-size: 12px; padding: 6px 9px; }
#backofficeTimePanel table td { padding: 6px 9px; white-space: nowrap; }

#backofficeTimePanel table td:nth-child(3) {
  white-space: nowrap; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis;
  color: var(--muted); font-size: 12px;
}
#backofficeTimePanel table td:nth-child(9),
#backofficeTimePanel table td:nth-child(10) {
  max-width: 140px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted);
}

.bk-emp-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.bk-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; background: var(--color-success);
}
.bk-status-dot.dot-active { background: #3d9be9; }
.bk-emp-name { font-weight: 600; font-size: 13px; }
.bk-emp-role { font-size: 12px; color: var(--muted); }

#employees table th,
#employees table td {
  white-space: nowrap;
  vertical-align: middle;
}

#employees table tbody td {
  height: 54px;
}

.badge {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--font-size-meta);
  font-weight: 600;
  border: 1px solid transparent;
}

.badge.success {
  background: var(--color-success-bg);
  color: #47691b;
  border-color: rgba(155, 190, 64, 0.24);
}

.badge.warning {
  background: #fff4dc;
  color: #8a6506;
  border-color: rgba(184, 144, 51, 0.24);
}

.badge.muted {
  background: #eef1ee;
  color: #5f6661;
  border-color: rgba(102, 112, 106, 0.14);
}

.entry-time-button {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.entry-time-button:hover {
  background: rgba(155, 190, 64, 0.12);
}

.state-dot.active {
  background: var(--color-primary);
}

.state-dot.pending {
  background: #6e7570;
}

.state-dot.confirmed {
  background: var(--color-danger);
}

.confirmed-row {
  background: #f3f8ea !important;
}

/* entry-action-menu overrides removed — styles consolidated above */

.edit-dialog form {
  width: min(680px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: var(--space-3);
  box-shadow: var(--shadow-dialog);
}

.edit-header {
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.edit-status-stack {
  gap: var(--space-3);
}

.edit-status-card {
  background: var(--color-soft-bg);
  border: 1px solid var(--border);
  padding: var(--space-3);
}

.edit-status-card span {
  font-size: var(--font-size-meta);
}

.edit-status-card strong {
  font-size: var(--font-size-kpi);
  font-weight: 700;
}

.edit-grid {
  gap: var(--space-4);
}

.edit-panel {
  padding: var(--space-4);
  background: var(--color-surface-muted);
}

.split-datetime-input input[type="time"] {
  text-align: center;
}

.toast {
  right: var(--space-5);
  bottom: var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(31, 35, 32, 0.92);
  padding: 12px 14px;
}

.backoffice-login-body {
  place-items: center;
  padding: var(--space-6);
  background:
    radial-gradient(circle at top left, rgba(155, 190, 64, 0.16), transparent 28%),
    linear-gradient(180deg, #244d36 0%, #1a3928 100%);
}

.backoffice-login-shell {
  max-width: 560px;
}

.backoffice-login-card {
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 54px rgba(12, 26, 18, 0.24);
}

.backoffice-login-card h1 {
  font-size: var(--font-size-page-title);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.backoffice-login-form {
  gap: var(--space-4);
}

.backoffice-login-field {
  gap: var(--space-2);
}

.backoffice-login-field input {
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--font-size-body);
}

.kiosk-body {
  background:
    radial-gradient(circle at top left, rgba(155, 190, 64, 0.22), transparent 22%),
    linear-gradient(180deg, #244d36 0%, #173825 100%);
}

.launch-screen {
  background:
    radial-gradient(circle at top left, rgba(155, 190, 64, 0.22), transparent 22%),
    linear-gradient(180deg, #244d36 0%, #173825 100%);
}

.launch-screen-logo {
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.launch-screen-title {
  font-size: 26px;
  font-weight: 700;
}

.launch-screen-subtitle {
  font-size: var(--font-size-body);
}

.launch-screen-spinner {
  border-top-color: var(--color-primary);
}

.kiosk-shell {
  width: min(760px, calc(100vw - 48px));
  max-width: 760px;
  padding: var(--space-5);
}

.kiosk-card {
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 52px rgba(12, 26, 18, 0.18);
}

.kiosk-card h1 {
  font-size: var(--font-size-page-title);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.kiosk-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.kiosk-form {
  gap: var(--space-4);
}

.kiosk-form label {
  gap: var(--space-2);
  font-size: var(--font-size-body);
}

.kiosk-form input {
  min-height: 68px;
  border-radius: var(--radius-md);
  border-width: 1px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.kiosk-form input::placeholder {
  font-size: 18px;
  font-weight: 500;
}

.kiosk-keypad {
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(32, 74, 51, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 248, 246, 0.98) 0%, rgba(241, 245, 237, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.kiosk-key {
  min-height: 60px;
  border: 1px solid rgba(32, 74, 51, 0.12);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--color-primary-dark);
  font-size: 28px;
  font-weight: 700;
  box-shadow: none;
}

.kiosk-key:hover,
.kiosk-key:focus-visible {
  background: rgba(155, 190, 64, 0.1);
  box-shadow: none;
}

.kiosk-key-clear,
.kiosk-key-backspace {
  font-size: var(--font-size-body);
}

.kiosk-key-clear {
  background: var(--color-soft-bg);
}

.kiosk-key-backspace {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.kiosk-install-panel {
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(155, 190, 64, 0.34);
  border-radius: var(--radius-md);
  background: rgba(155, 190, 64, 0.12);
}

.kiosk-submit,
.kiosk-actions button,
.kiosk-logout {
  min-height: 44px;
}

.kiosk-employee-panel {
  gap: var(--space-3);
  padding-top: var(--space-4);
}

.kiosk-progress {
  gap: var(--space-3);
}

.kiosk-progress-card {
  min-height: 88px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  background: var(--color-surface-muted);
}

.kiosk-progress-card span {
  font-size: var(--font-size-meta);
}

.kiosk-progress-card strong {
  font-size: var(--font-size-kpi);
  font-weight: 700;
}

.kiosk-actions {
  gap: var(--space-3);
}

.kiosk-cash-closing-button {
  min-height: 88px;
}

.cash-closing-page {
  gap: var(--space-4);
  padding-top: var(--space-4);
}

.cash-closing-head h2 {
  font-size: var(--font-size-page-title);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-primary-dark);
}

.cash-closing-card {
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.cash-readonly-field,
.cash-value-display {
  min-height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.cash-count-table {
  border-radius: var(--radius-md);
}

.cash-count-table h4 {
  padding: var(--space-3) var(--space-4);
}

.cash-count-row {
  grid-template-columns: minmax(140px, 1.2fr) 96px minmax(120px, 1fr);
  gap: var(--space-2);
  padding: 10px var(--space-4);
}

.cash-count-head {
  font-size: 11px;
}

.cash-count-row input,
.cash-manual-total input {
  min-height: 40px;
}

.cash-total-row {
  padding: var(--space-3) var(--space-4);
  background: var(--color-success-bg);
  color: var(--color-primary-dark);
}

.cash-manual-total {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-muted);
}

.cash-manual-total label {
  color: var(--color-primary-dark);
}

.cash-closing-back-button {
  min-height: 44px;
  padding: 0 16px;
}

.cash-value-display.good {
  background: var(--color-success-bg);
  color: #416319;
}

.cash-value-display.bad {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.cash-signature-input {
  min-height: 56px;
  font-size: 22px;
}

.kw-navigation {
  gap: var(--space-2);
}

#currentWeekLabel {
  min-width: 170px;
  font-size: var(--font-size-body);
}

#dienstplanTable th,
#dienstplanTable td {
  padding: 8px;
}

#dienstplanTable th:first-child,
#dienstplanTable td:first-child {
  width: 180px;
}

.dp-cell-btn,
.dp-cell-empty {
  min-height: 40px;
  border-radius: var(--radius-md);
}

.dp-cell-empty {
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.dp-cell-empty:hover {
  border-color: var(--color-primary);
  background: rgba(155, 190, 64, 0.08);
}

.dp-employee-name-btn:hover {
  color: var(--color-primary-dark);
}

.dp-popup {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-dialog);
}

.dp-banner,
.dp-day-choice,
.dp-soll-display {
  border-radius: var(--radius-md);
}

.dp-type-btn,
.dp-preset-btn,
.dp-day-clear {
  border-radius: var(--radius-md);
}

.dp-preset-btn:hover {
  background: rgba(155, 190, 64, 0.08);
}

@media (max-width: 1366px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main-content {
    padding: var(--space-4) var(--space-5) var(--space-5);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .topbar {
    position: static;
    padding: var(--space-4);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    max-height: none;
    grid-template-rows: auto auto auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .sidebar-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-form,
  .filter-bar,
  .weekly-grid,
  .employee-action-grid,
  .monthly-summary-values {
    grid-template-columns: 1fr;
  }

  .employee-form-grid,
  .absence-grid,
  .backoffice-user-grid,
  .export-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .stats-grid,
  .monthly-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar-meta {
    min-width: 0;
  }

  .main-content {
    padding: var(--space-4);
  }

  .hero,
  .toolbar,
  .section-header,
  .panel-title-row,
  .cash-closing-head,
  .kiosk-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .employee-form-grid,
  .absence-grid,
  .backoffice-user-grid,
  .export-grid,
  .export-free-range {
    grid-template-columns: 1fr;
  }

  .edit-header,
  .edit-grid,
  .edit-panel-grid,
  .edit-status-stack,
  .cash-closing-bottom-grid,
  .cash-count-groups,
  .cash-closing-grid {
    grid-template-columns: 1fr;
  }

  .split-datetime-input,
  .create-datetime-input {
    grid-template-columns: 1fr;
  }

  .kiosk-shell {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .sidebar {
    padding: var(--space-4);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-info {
    grid-template-columns: 1fr;
  }

  .topbar h1,
  .hero h2,
  .backoffice-login-card h1,
  .kiosk-card h1,
  .cash-closing-head h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .backoffice-login-body,
  .kiosk-shell,
  .main-content {
    padding: var(--space-3);
  }

  .topbar,
  .panel-card,
  .backoffice-login-card,
  .kiosk-card,
  .cash-closing-card,
  .edit-dialog form {
    padding: var(--space-4);
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .table-wrapper {
    border-radius: 0;
  }

  .kiosk-form input {
    min-height: 58px;
    font-size: 28px;
  }

  .kiosk-key {
    min-height: 50px;
    font-size: 22px;
  }

  .kiosk-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Cash Closing Tablet Layout -------------------------------------------- */
.cash-closing-page {
  --cash-gap: 12px;
  --cash-card-pad: 12px;
  --cash-row-height: 44px;
  --cash-head-height: 36px;
  --cash-input-height: 36px;
  --cash-total-height: 40px;
  gap: 8px;
  width: 100%;
}

.cash-closing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.cash-closing-head-main {
  display: grid;
  gap: 0;
}

.cash-closing-head .eyebrow {
  margin-bottom: 0;
  font-size: 10px;
}

.cash-closing-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.cash-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 24px;
}

.cash-section-heading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.cash-section-step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(155, 190, 64, 0.18);
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.cash-head-data-section {
  padding-block: var(--cash-card-pad);
}

.cash-meta-grid {
  grid-template-columns: 0.95fr 1.55fr 1.55fr 0.85fr;
  gap: var(--cash-gap);
}

.cash-readonly-field {
  min-height: 0;
  padding: 8px 12px;
  align-content: center;
  border-radius: 8px;
}

.cash-readonly-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.cash-readonly-field strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.cash-readonly-field-wide {
  min-width: 0;
}

.cash-closing-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(270px, 0.95fr);
  gap: var(--cash-gap);
  align-items: stretch;
  min-height: 0;
}

.cash-count-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.cash-count-groups {
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cash-gap);
  align-items: stretch;
}

.cash-count-table {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.cash-count-body {
  display: grid;
  grid-auto-rows: var(--cash-row-height);
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.cash-count-table h4 {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  background: #f5f8f3;
  font-size: 15px;
}

.cash-count-row {
  grid-template-columns: minmax(104px, 1.15fr) 72px minmax(84px, 0.9fr);
  min-height: var(--cash-row-height);
  height: var(--cash-row-height);
  padding: 0 12px;
}

.cash-count-head {
  min-height: var(--cash-head-height);
  height: var(--cash-head-height);
  background: #fafbf9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.cash-count-row > span,
.cash-count-row strong {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.cash-count-row > span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.15;
  white-space: normal;
}

.cash-count-row strong,
.cash-total-row strong,
.cash-value-display {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cash-count-row input {
  min-height: var(--cash-input-height);
  height: var(--cash-input-height);
  max-height: var(--cash-input-height);
  padding: 4px 8px;
  font-size: 13px;
  text-align: right;
  justify-self: stretch;
}

.cash-manual-total {
  display: grid;
  align-items: center;
  min-height: 60px;
  padding: 8px 12px;
}

.cash-manual-total label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.cash-manual-total input {
  min-height: var(--cash-input-height);
  height: var(--cash-input-height);
  max-height: var(--cash-input-height);
}

.cash-total-row {
  align-items: center;
  min-height: var(--cash-total-height);
  padding: 0 12px;
  font-size: 12px;
}

.cash-small-money-total {
  margin-top: 2px;
  border-radius: 8px;
}

.cash-values-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: var(--cash-gap);
  min-width: 0;
}

.cash-values-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  gap: 10px;
}

.cash-value-line {
  display: grid;
  gap: 4px;
}

.cash-value-line span,
.cash-value-line strong,
.cash-values-section label {
  font-size: 13px;
}

.cash-value-display {
  display: grid;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--color-success-bg);
}

.cash-value-line-emphasis .cash-value-display {
  min-height: 44px;
  border-width: 1px;
}

.cash-value-display:not(.bad) {
  color: var(--color-primary-dark);
}

.cash-value-display.good {
  border-color: rgba(155, 190, 64, 0.32);
}

.cash-value-display.bad {
  border-color: rgba(217, 83, 79, 0.26);
}

.cash-closing-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr) minmax(220px, 0.7fr);
  gap: var(--cash-gap);
  align-items: stretch;
  min-height: 0;
}

.cash-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px var(--cash-gap);
  align-content: start;
}

.cash-notes-field {
  grid-column: 1 / -1;
}

.cash-day-grid label,
.cash-values-section label,
.cash-signature-section label {
  display: grid;
  gap: 4px;
  align-content: start;
  font-size: 13px;
}

.cash-day-grid input,
.cash-values-section input,
.cash-signature-section input {
  min-height: var(--cash-input-height);
  height: var(--cash-input-height);
  max-height: var(--cash-input-height);
}

.cash-notes-field textarea {
  min-height: 56px;
  max-height: 56px;
  resize: none;
  overflow: auto;
  font-size: 13px;
}

.cash-signature-section,
.cash-actions-card {
  align-content: start;
}

.cash-signature-input {
  min-height: var(--cash-input-height);
  height: var(--cash-input-height);
  max-height: var(--cash-input-height);
  font-size: 14px;
}

.cash-actions-card {
  grid-template-rows: auto auto;
  gap: 10px;
}

.cash-actions-card button {
  width: auto;
  min-height: 40px;
  max-height: 40px;
  flex: 1 1 0;
  white-space: nowrap;
}

.cash-actions-card {
  align-content: start;
}

.cash-actions-card .cash-section-heading {
  margin-bottom: 2px;
}

.cash-actions-card {
  grid-auto-rows: min-content;
}

.cash-actions-card button + button {
  margin-left: 0;
}

.cash-actions-card {
  display: grid;
}

.cash-actions-card .success-button,
.cash-actions-card .secondary-button {
  width: 100%;
}

.cash-actions-card {
  align-items: start;
}

.cash-actions-card {
  grid-template-columns: 1fr;
}

.cash-actions-card {
  min-width: 0;
}

.cash-actions-card {
  overflow: hidden;
}

.cash-actions-card {
  padding-bottom: 10px;
}

body.cash-closing-mode {
  background: #f4f7f3;
  height: 100vh;
  overflow: hidden;
}

body.cash-closing-mode .kiosk-shell {
  width: 100%;
  max-width: min(1720px, 100vw);
  height: 100vh;
  padding: 8px 12px;
  overflow: hidden;
}

body.cash-closing-mode .kiosk-card {
  height: calc(100vh - 16px);
  min-height: 0;
  padding: 8px 10px;
  gap: var(--cash-gap);
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: hidden;
}

body.cash-closing-mode .cash-closing-page {
  border-top: 0;
  padding-top: 0;
  gap: var(--cash-gap);
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body.cash-closing-mode .cash-closing-card {
  padding: var(--cash-card-pad);
  gap: 10px;
  min-height: 0;
  border-radius: 8px;
}

body.cash-closing-mode .cash-closing-head {
  min-height: 56px;
}

body.cash-closing-mode .cash-closing-workspace {
  min-height: 0;
}

body.cash-closing-mode .cash-count-groups,
body.cash-closing-mode .cash-count-table,
body.cash-closing-mode .cash-count-body,
body.cash-closing-mode .cash-values-grid,
body.cash-closing-mode .cash-day-grid {
  min-height: 0;
}

body.cash-closing-mode .cash-count-body,
body.cash-closing-mode .cash-values-grid {
  overflow: auto;
}

body.cash-closing-mode .cash-count-section,
body.cash-closing-mode .cash-values-section,
body.cash-closing-mode .cash-day-section,
body.cash-closing-mode .cash-signature-section,
body.cash-closing-mode .cash-actions-card {
  min-height: 0;
}

body.cash-closing-mode .cash-actions-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 8px;
}

body.cash-closing-mode .cash-actions-card .cash-section-heading {
  grid-column: 1 / -1;
}

body.cash-closing-mode .cash-actions-card button {
  width: 100%;
}

body.cash-closing-mode .cash-actions-card .success-button {
  grid-column: 1;
}

body.cash-closing-mode .cash-actions-card .secondary-button {
  grid-column: 2;
}

body.cash-closing-mode .cash-day-section,
body.cash-closing-mode .cash-signature-section,
body.cash-closing-mode .cash-actions-card {
  overflow: hidden;
}

@media (max-width: 1280px) {
  .cash-closing-workspace {
    grid-template-columns: 1fr;
  }

  .cash-closing-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .cash-meta-grid,
  .cash-count-groups,
  .cash-closing-footer-grid,
  .cash-day-grid {
    grid-template-columns: 1fr;
  }

  .cash-count-row {
    grid-template-columns: minmax(110px, 1.15fr) 86px minmax(92px, 1fr);
  }
}

/* Global Admin Consistency ---------------------------------------------- */
.topbar {
  min-height: 80px;
}

/* Cash Closing PDF Restore ---------------------------------------------- */
body.cash-closing-mode .cash-closing-page {
  --cash-gap: 14px;
  --cash-card-pad: 14px;
  --cash-row-height: 52px;
  --cash-head-height: 42px;
  --cash-input-height: 34px;
  --cash-total-height: 46px;
  gap: 12px;
}

body.cash-closing-mode .cash-closing-card {
  padding: 14px;
  gap: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d6ddd2;
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.04);
}

body.cash-closing-mode .cash-closing-head {
  min-height: 76px;
  padding-inline: 16px;
}

body.cash-closing-mode .cash-closing-head .eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
}

body.cash-closing-mode .cash-closing-head h2 {
  font-size: 32px;
  line-height: 1.05;
}

body.cash-closing-mode .cash-closing-back-button {
  min-height: 42px;
  padding: 0 20px;
}

body.cash-closing-mode .cash-head-data-section {
  padding-block: 14px;
}

body.cash-closing-mode .cash-meta-grid {
  gap: 12px;
}

body.cash-closing-mode .cash-readonly-field {
  min-height: 78px;
  padding: 12px 14px;
  border-radius: 10px;
}

body.cash-closing-mode .cash-readonly-field span {
  font-size: 13px;
}

body.cash-closing-mode .cash-readonly-field strong {
  font-size: 17px;
  line-height: 1.15;
}

body.cash-closing-mode .cash-readonly-field small {
  font-size: 12px;
}

body.cash-closing-mode .cash-closing-workspace {
  grid-template-columns: minmax(0, 2.15fr) minmax(360px, 1.02fr);
  gap: 12px;
}

body.cash-closing-mode .cash-count-groups {
  gap: 12px;
}

body.cash-closing-mode .cash-count-table {
  border: 1px solid #d6ddd2;
  border-radius: 10px;
  background: #ffffff;
}

body.cash-closing-mode .cash-count-table h4 {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  background: #f7f9f5;
  border-bottom: 1px solid #dfe5da;
}

body.cash-closing-mode .cash-count-head {
  min-height: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 12px;
  background: #fbfcfa;
  border-bottom: 1px solid #e4e9e0;
}

body.cash-closing-mode .cash-count-body {
  grid-auto-rows: 52px;
  overflow: hidden;
}

body.cash-closing-mode .cash-count-row {
  grid-template-columns: minmax(118px, 1.15fr) 96px minmax(88px, 0.82fr);
  min-height: 52px;
  height: 52px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid #ecefe8;
}

body.cash-closing-mode .cash-count-row > span,
body.cash-closing-mode .cash-count-row strong {
  font-size: 15px;
  white-space: nowrap;
}

body.cash-closing-mode .cash-count-row input,
body.cash-closing-mode .cash-manual-total input,
body.cash-closing-mode .cash-values-section input,
body.cash-closing-mode .cash-day-grid input {
  min-height: 34px;
  height: 34px;
  max-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 14px;
}

body.cash-closing-mode .cash-manual-total {
  min-height: 78px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid #ecefe8;
}

body.cash-closing-mode .cash-manual-total label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

body.cash-closing-mode .cash-total-row {
  min-height: 46px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  background: #edf6e0;
}

body.cash-closing-mode .cash-small-money-total {
  min-height: 48px;
  margin-top: 0;
  border-radius: 10px;
}

body.cash-closing-mode .cash-values-section {
  grid-template-rows: auto 1fr;
}

body.cash-closing-mode .cash-values-grid {
  gap: 12px;
  overflow: hidden;
}

body.cash-closing-mode .cash-value-line span,
body.cash-closing-mode .cash-values-section label {
  font-size: 13px;
}

body.cash-closing-mode .cash-value-display {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 17px;
  background: #eef6e3;
}

body.cash-closing-mode .cash-value-line-emphasis .cash-value-display {
  min-height: 50px;
}

body.cash-closing-mode .cash-closing-footer-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.86fr) minmax(280px, 0.74fr);
  gap: 12px;
}

body.cash-closing-mode .cash-day-grid {
  gap: 12px;
}

body.cash-closing-mode .cash-day-grid label,
body.cash-closing-mode .cash-values-section label,
body.cash-closing-mode .cash-signature-section label {
  font-size: 13px;
  gap: 6px;
}

body.cash-closing-mode .cash-notes-field textarea {
  min-height: 92px;
  max-height: 92px;
  border-radius: 10px;
  padding: 12px 14px;
}

body.cash-closing-mode .cash-signature-input {
  min-height: 50px;
  height: 50px;
  max-height: 50px;
  border-radius: 10px;
  font-size: 18px;
}

body.cash-closing-mode .cash-signature-section small {
  font-size: 12px;
}

body.cash-closing-mode .cash-actions-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 12px;
  align-content: start;
}

body.cash-closing-mode .cash-actions-card .cash-section-heading,
body.cash-closing-mode .cash-actions-card .success-button,
body.cash-closing-mode .cash-actions-card .secondary-button {
  grid-column: auto;
}

body.cash-closing-mode .cash-actions-card .success-button {
  min-height: 86px;
  max-height: none;
  font-size: 15px;
  font-weight: 700;
}

body.cash-closing-mode .cash-actions-card .secondary-button {
  min-height: 44px;
  max-height: 44px;
  font-size: 14px;
}

/* Blue card style for manual cash input fields — UNIFIED */
.cash-manual-total,
body.cash-closing-mode .cash-manual-total,
body.cash-closing-mode #cashClosingPage .cash-manual-total,
.cash-field-card,
body.cash-closing-mode .cash-field-card,
body.cash-closing-mode #cashClosingPage .cash-field-card {
  background: #DBEAFE !important;
  border: 2px solid #3B82F6 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  margin: 10px 12px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  gap: 6px !important;
  align-content: start !important;
  overflow: visible !important;
}

/* Make sure parent containers don't clip the rounded corners */
body.cash-closing-mode #cashClosingPage .cash-count-table {
  overflow: visible !important;
}

/* Red highlight when a required blue field is empty after save attempt */
.cash-manual-total.cash-required-missing,
body.cash-closing-mode .cash-manual-total.cash-required-missing,
body.cash-closing-mode #cashClosingPage .cash-manual-total.cash-required-missing,
.cash-field-card.cash-required-missing,
body.cash-closing-mode .cash-field-card.cash-required-missing,
body.cash-closing-mode #cashClosingPage .cash-field-card.cash-required-missing {
  background: #FEE2E2 !important;
  border-color: #DC2626 !important;
}

.cash-manual-total.cash-required-missing::after,
.cash-field-card.cash-required-missing::after {
  content: "Bitte ausfüllen";
  display: block;
  margin-top: 4px;
  color: #DC2626;
  font-size: 12px;
  font-weight: 700;
}

/* Info banner above the cash closing form */
.cash-required-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 0 0 12px 0;
  background: #DBEAFE;
  border: 2px solid #3B82F6;
  border-radius: 12px;
  color: #1E3A8A;
  font-size: 14px;
  font-weight: 500;
}

.cash-required-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3B82F6;
  color: #ffffff;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-block > div,
.sidebar-head,
.hero-copy,
.section-header > div,
.panel-title-row > div {
  min-width: 0;
}

.topbar-meta {
  justify-items: end;
  text-align: right;
}

.topbar-logout {
  margin-top: 0;
}

.sidebar {
  width: 240px;
}

.nav-link {
  display: grid;
  align-items: center;
  justify-items: start;
  text-align: left;
}

.nav-link.active {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(155, 190, 64, 0.22);
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-link.active:hover,
.nav-link.active:focus-visible {
  color: var(--color-primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 4px 0 2px;
}

.hero-copy {
  display: grid;
  gap: 6px;
}

.hero-subtitle {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: var(--font-size-body);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(32, 74, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-primary-dark);
  font-size: var(--font-size-meta);
  font-weight: 600;
}

.content-section {
  min-width: 0;
}

.content-section > .panel-card,
.content-section > .stats-grid,
.content-section > .employee-action-grid {
  min-width: 0;
}

.panel-card {
  gap: 16px;
}

.section-header,
.panel-title-row {
  align-items: flex-start;
}

.section-header h3,
.panel-title-row h3 {
  line-height: 1.3;
}

.toolbar {
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--color-soft-bg);
}

.toolbar-actions {
  justify-content: flex-end;
}

.tabs-row {
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.inline-form,
.filter-bar,
.employee-form-grid,
.absence-grid,
.backoffice-user-grid {
  padding: 0;
}

.employee-form-grid,
.absence-grid,
.backoffice-user-grid,
.export-grid {
  align-items: start;
}

.employee-form-actions,
.absence-actions,
.backoffice-user-actions,
.dialog-actions {
  flex-wrap: wrap;
}

.table-wrapper {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

table {
  background: #ffffff;
}

th {
  min-height: 44px;
}

td {
  min-height: 44px;
}

.filter-result-bar,
.edit-status-card,
.monthly-summary-card,
.stat-card,
.employee-action-card,
.info-tile {
  box-shadow: none;
}

.edit-dialog form,
.export-dialog-card,
.edit-panel,
.edit-status-card {
  border-radius: 8px;
}

.edit-dialog form {
  display: grid;
  gap: 10px;
}

.edit-header,
.edit-grid,
.dialog-actions {
  margin-bottom: 0;
}

.edit-panel-grid {
  align-items: start;
}

.split-datetime-input input[type="text"],
.split-datetime-input input[type="time"],
.create-datetime-input input[type="text"],
.create-datetime-input input[type="time"] {
  min-height: 40px;
}

.export-dialog-card {
  gap: 16px;
}

.absence-note-field input,
.cash-notes-field textarea,
#editNote,
#createNote {
  min-height: 40px;
}

@media (max-width: 1180px) {
  .sidebar {
    width: auto;
  }

  .topbar-meta {
    justify-items: start;
    text-align: left;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .toolbar {
    padding: 12px;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

/* Cash Closing Actions and Alignment ------------------------------------ */
.topbar-meta-id {
  font-size: var(--font-size-meta);
  color: var(--muted);
}

body.cash-closing-mode #cashClosingPage .cash-count-head span:first-child,
body.cash-closing-mode #cashClosingPage .cash-count-row > span:first-child {
  justify-content: flex-start !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head span:nth-child(2),
body.cash-closing-mode #cashClosingPage .cash-count-row > span:nth-child(2) {
  justify-content: center !important;
  text-align: center !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head span:nth-child(3),
body.cash-closing-mode #cashClosingPage .cash-count-row strong {
  justify-content: flex-end !important;
  text-align: right !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-row input {
  justify-self: center !important;
  width: min(100%, 156px) !important;
  text-align: center !important;
}

body.cash-closing-mode #cashClosingPage .cash-signature-section label {
  gap: 8px !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card {
  grid-template-rows: auto repeat(4, auto) !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card button {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

body.cash-closing-mode #cashClosingPage #cashClosingSave {
  min-height: 68px !important;
}

body.cash-closing-mode #cashClosingPage #cashClosingSendEmail,
body.cash-closing-mode #cashClosingPage #cashClosingPreview,
body.cash-closing-mode #cashClosingPage #cashClosingDiscard {
  min-height: 52px !important;
  max-height: 52px !important;
}

body.cash-closing-mode #cashClosingPage #cashClosingSendEmail,
body.cash-closing-mode #cashClosingPage #cashClosingPreview {
  background: #ffffff !important;
  color: var(--color-primary-dark) !important;
  border: 1px solid rgba(32, 74, 51, 0.24) !important;
}

body.cash-closing-mode #cashClosingPage #cashClosingDiscard {
  background: #ffffff !important;
  color: var(--color-danger) !important;
  border: 1px solid rgba(217, 83, 79, 0.45) !important;
}

/* Responsive System Refresh --------------------------------------------- */
.topbar-menu-toggle,
.mobile-bottom-nav,
.nav-backdrop {
  display: none;
}

.main-content,
.content-section,
.panel-card,
.toolbar,
.table-wrapper,
.employee-form-grid,
.kiosk-shell,
.cash-closing-workspace,
.cash-closing-footer-grid {
  min-width: 0;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  min-width: max(720px, 100%);
}

.toolbar,
.employee-form-grid,
.absence-grid,
.backoffice-user-grid,
.export-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.employee-form-grid label,
.absence-grid label,
.backoffice-user-grid label,
.export-grid label {
  min-width: 0;
}

.hero-actions {
  max-width: 100%;
}

@media (min-width: 1200px) {
  .topbar-menu-toggle,
  .mobile-bottom-nav,
  .nav-backdrop {
    display: none !important;
  }

  .app-shell {
    grid-template-columns: 264px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 80px;
    min-height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .app-shell {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .sidebar {
    width: 94px;
    padding-inline: 8px;
  }

  .sidebar-brand-copy,
  .sidebar-store-card {
    display: none;
  }

  .sidebar-head,
  .sidebar-info,
  .nav-link {
    padding-inline: 10px;
  }

  .sidebar-subtitle,
  .sidebar-info,
  .nav-link {
    font-size: 13px;
  }

  .main-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .employee-form-grid,
  .absence-grid,
  .backoffice-user-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr auto;
  }

  body.cash-closing-mode .kiosk-shell {
    max-width: min(1120px, 100vw);
    padding: 16px 18px !important;
  }

  body.cash-closing-mode .cash-closing-workspace {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr) !important;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 84px;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 80px auto 0 0;
    width: min(320px, 86vw);
    height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 18px 0 34px rgba(10, 24, 15, 0.16);
    overflow-y: auto;
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 80px 0 0;
    z-index: 35;
    border: 0;
    background: rgba(15, 22, 18, 0.34);
  }

  body.mobile-nav-open .nav-backdrop {
    display: block;
  }

  .main-content {
    padding: 18px 16px 28px;
  }

  .stats-grid,
  .weekly-grid,
  .monthly-summary-grid,
  .employee-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .toolbar,
  .employee-form-grid,
  .absence-grid,
  .backoffice-user-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .table-wrapper table,
  #dienstplanTable {
    min-width: 860px;
  }

  .kiosk-shell {
    max-width: min(900px, 100vw);
    padding: 16px;
  }

  .kiosk-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kiosk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.cash-closing-mode .cash-closing-workspace,
  body.cash-closing-mode .cash-closing-footer-grid,
  .cash-closing-workspace,
  .cash-closing-footer-grid {
    grid-template-columns: 1fr !important;
  }

  body.cash-closing-mode #cashClosingPage .cash-count-groups {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 45;
  }

  .brand-block {
    gap: 10px;
    min-width: 0;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-subtitle {
    font-size: 11px;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
  }

  .topbar-meta {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 70px auto 0 0;
    width: min(320px, 88vw);
    height: calc(100vh - 70px);
    min-height: calc(100vh - 70px);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 18px 0 34px rgba(10, 24, 15, 0.18);
    overflow-y: auto;
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 70px 0 0;
    z-index: 45;
    border: 0;
    background: rgba(15, 22, 18, 0.38);
  }

  body.mobile-nav-open .nav-backdrop {
    display: block;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px rgba(16, 22, 18, 0.08);
  }

  .mobile-bottom-nav .nav-link {
    min-height: 48px;
    padding: 8px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    justify-items: center;
  }

  .mobile-bottom-nav .nav-link.active {
    background: rgba(155, 190, 64, 0.16);
    color: var(--color-primary-dark);
    box-shadow: none;
  }

  .main-content {
    padding: 14px 14px 92px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero h2 {
    font-size: clamp(20px, 5vw, 24px);
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .stats-grid,
  .weekly-grid,
  .monthly-summary-grid,
  .employee-action-grid,
  .kiosk-progress,
  .kiosk-actions,
  .cash-meta-grid,
  .cash-day-grid {
    grid-template-columns: 1fr !important;
  }

  .panel-card,
  .backoffice-login-card,
  .cash-closing-card,
  .kiosk-card {
    padding: 14px;
    border-radius: 12px;
  }

  .toolbar,
  .employee-form-grid,
  .absence-grid,
  .backoffice-user-grid,
  .export-grid,
  .dialog-actions {
    grid-template-columns: 1fr !important;
  }

  .toolbar-actions,
  .employee-form-actions,
  .absence-actions,
  .backoffice-user-actions,
  .dialog-actions {
    justify-content: stretch;
  }

  .toolbar-actions > *,
  .employee-form-actions > *,
  .absence-actions > *,
  .backoffice-user-actions > *,
  .dialog-actions > * {
    width: 100%;
  }

  .search-box,
  input,
  select,
  textarea,
  button,
  .tab-chip,
  .primary-button,
  .secondary-button,
  .success-button,
  .danger-button,
  .ghost-button,
  .action-button {
    min-height: 44px;
  }

  input[type="number"] {
    text-align: right;
  }

  .table-wrapper {
    border-radius: 12px;
  }

  .table-wrapper table,
  #dienstplanTable {
    min-width: 760px;
    font-size: 13px;
  }

  #dienstplanTable th,
  #dienstplanTable td {
    white-space: nowrap;
  }

  .kiosk-shell {
    max-width: 100%;
    padding: 12px;
  }

  .kiosk-card {
    padding: 16px;
  }

  .kiosk-form input {
    min-height: 56px;
    font-size: clamp(24px, 7vw, 34px);
  }

  .kiosk-key {
    min-height: 56px;
    font-size: 24px;
  }

  .kiosk-cash-closing-button {
    min-height: 72px;
  }

  .cash-closing-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cash-closing-workspace,
  .cash-closing-footer-grid,
  body.cash-closing-mode .cash-closing-workspace,
  body.cash-closing-mode .cash-closing-footer-grid,
  body.cash-closing-mode #cashClosingPage .cash-count-groups {
    grid-template-columns: 1fr !important;
  }

  body.cash-closing-mode #cashClosingPage .cash-count-table,
  body.cash-closing-mode #cashClosingPage .cash-values-section,
  body.cash-closing-mode #cashClosingPage .cash-day-section,
  body.cash-closing-mode #cashClosingPage .cash-signature-section,
  body.cash-closing-mode #cashClosingPage .cash-actions-card {
    width: 100%;
  }

  body.cash-closing-mode #cashClosingPage .cash-count-body {
    overflow: visible !important;
  }

  body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row,
  body.cash-closing-mode #cashClosingPage .cash-count-head {
    grid-template-columns: minmax(110px, 1fr) 112px 88px !important;
  }

  body.cash-closing-mode #cashClosingPage .cash-actions-card .success-button {
    min-height: 72px !important;
  }

  body.cash-closing-mode #cashClosingPage #cashClosingSendEmail,
  body.cash-closing-mode #cashClosingPage #cashClosingPreview,
  body.cash-closing-mode #cashClosingPage #cashClosingDiscard {
    min-height: 48px !important;
  }
}

/* Cash Closing Final Restore -------------------------------------------- */
body.cash-closing-mode {
  height: auto !important;
  min-height: 100vh;
  overflow: auto !important;
}

body.cash-closing-mode .kiosk-shell {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
  padding: 24px 30px !important;
  max-width: 1440px;
}

body.cash-closing-mode .kiosk-card {
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
  gap: 14px !important;
  background: transparent !important;
}

body.cash-closing-mode .cash-closing-page {
  display: grid;
  grid-template-rows: none !important;
  height: auto !important;
  overflow: visible !important;
  gap: 14px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

body.cash-closing-mode .cash-closing-card {
  padding: 14px !important;
  gap: 12px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #d6ddd2 !important;
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.04) !important;
  overflow: visible !important;
}

body.cash-closing-mode .cash-closing-head {
  min-height: 92px !important;
  padding: 12px 18px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.cash-closing-mode .cash-closing-head .eyebrow {
  font-size: 11px !important;
  letter-spacing: 0.12em;
}

body.cash-closing-mode .cash-closing-head h2 {
  font-size: 32px !important;
  line-height: 1.05;
}

body.cash-closing-mode .cash-closing-back-button {
  min-height: 42px !important;
  padding: 0 20px !important;
}

body.cash-closing-mode .cash-meta-grid {
  grid-template-columns: 0.95fr 1.45fr 1.45fr 0.9fr !important;
  gap: 12px !important;
}

body.cash-closing-mode .cash-readonly-field {
  min-height: 108px !important;
  padding: 16px 18px !important;
  border-radius: 12px !important;
}

body.cash-closing-mode .cash-readonly-field span {
  font-size: 14px !important;
}

body.cash-closing-mode .cash-readonly-field strong {
  font-size: 17px !important;
  line-height: 1.18;
}

body.cash-closing-mode .cash-readonly-field small {
  font-size: 12px !important;
}

body.cash-closing-mode .cash-closing-workspace {
  grid-template-columns: minmax(0, 2.15fr) minmax(360px, 1.02fr) !important;
  gap: 14px !important;
  align-items: start !important;
  min-height: auto !important;
}

body.cash-closing-mode .cash-count-section {
  grid-template-rows: auto auto auto !important;
  min-height: auto !important;
}

body.cash-closing-mode .cash-count-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
  min-height: auto !important;
}

body.cash-closing-mode .cash-count-table {
  display: grid !important;
  grid-template-rows: auto auto auto auto auto !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

body.cash-closing-mode .cash-count-table h4 {
  min-height: 46px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  background: #f7f9f5 !important;
  border-bottom: 1px solid #dfe5da !important;
}

body.cash-closing-mode .cash-count-head {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  background: #fbfcfa !important;
  border-bottom: 1px solid #e4e9e0 !important;
}

body.cash-closing-mode .cash-count-body {
  display: block !important;
  min-height: auto !important;
  overflow: visible !important;
}

body.cash-closing-mode .cash-count-body .cash-count-row {
  display: grid !important;
  grid-template-columns: minmax(118px, 1.15fr) 96px minmax(88px, 0.82fr) !important;
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 10px 0 14px !important;
  border-bottom: 1px solid #ecefe8 !important;
}

body.cash-closing-mode .cash-count-row > span,
body.cash-closing-mode .cash-count-row strong {
  display: flex !important;
  align-items: center !important;
  min-height: 100% !important;
  font-size: 15px !important;
  white-space: nowrap !important;
}

body.cash-closing-mode .cash-count-row input,
body.cash-closing-mode .cash-manual-total input,
body.cash-closing-mode .cash-values-section input,
body.cash-closing-mode .cash-day-grid input {
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  border-radius: 10px !important;
  padding: 0 10px !important;
  font-size: 14px !important;
}

body.cash-closing-mode .cash-manual-total {
  min-height: 80px !important;
  padding: 10px 10px 10px 14px !important;
  border-bottom: 1px solid #ecefe8 !important;
}

body.cash-closing-mode .cash-manual-total label {
  display: grid !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--color-primary-dark) !important;
}

body.cash-closing-mode .cash-total-row {
  min-height: 48px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  background: #edf6e0 !important;
}

body.cash-closing-mode .cash-small-money-total {
  min-height: 56px !important;
  margin-top: 2px !important;
  border-radius: 10px !important;
}

body.cash-closing-mode .cash-values-section {
  grid-template-rows: auto auto !important;
  gap: 12px !important;
}

body.cash-closing-mode .cash-values-grid {
  display: grid !important;
  gap: 12px !important;
  overflow: visible !important;
}

body.cash-closing-mode .cash-value-line,
body.cash-closing-mode .cash-values-section label {
  display: grid !important;
  gap: 6px !important;
  font-size: 13px !important;
}

body.cash-closing-mode .cash-value-display {
  min-height: 48px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 17px !important;
  background: #eef6e3 !important;
}

body.cash-closing-mode .cash-closing-footer-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.86fr) minmax(280px, 0.74fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

body.cash-closing-mode .cash-day-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-content: start !important;
}

body.cash-closing-mode .cash-day-grid label,
body.cash-closing-mode .cash-signature-section label {
  display: grid !important;
  gap: 6px !important;
  font-size: 13px !important;
}

body.cash-closing-mode .cash-notes-field {
  grid-column: 1 / -1 !important;
}

body.cash-closing-mode .cash-notes-field textarea {
  min-height: 116px !important;
  max-height: 116px !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  overflow: auto !important;
}

body.cash-closing-mode .cash-signature-input {
  min-height: 50px !important;
  height: 50px !important;
  max-height: 50px !important;
  border-radius: 10px !important;
  font-size: 18px !important;
}

body.cash-closing-mode .cash-signature-section small {
  font-size: 12px !important;
}

body.cash-closing-mode .cash-actions-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto !important;
  gap: 14px !important;
  align-content: start !important;
}

body.cash-closing-mode .cash-actions-card .success-button {
  min-height: 128px !important;
  max-height: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body.cash-closing-mode .cash-actions-card .secondary-button {
  min-height: 52px !important;
  max-height: 52px !important;
  font-size: 14px !important;
}

/* Cash Closing Visibility Fix ------------------------------------------ */
body.cash-closing-mode #cashClosingPage .cash-closing-workspace {
  grid-template-columns: minmax(0, 2.85fr) minmax(250px, 0.92fr) !important;
  align-items: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-section,
body.cash-closing-mode #cashClosingPage .cash-count-groups,
body.cash-closing-mode #cashClosingPage .cash-count-table,
body.cash-closing-mode #cashClosingPage .cash-count-body,
body.cash-closing-mode #cashClosingPage .cash-values-section,
body.cash-closing-mode #cashClosingPage .cash-values-grid {
  min-height: 0 !important;
  height: auto !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-table,
body.cash-closing-mode #cashClosingPage .cash-count-body,
body.cash-closing-mode #cashClosingPage .cash-values-section,
body.cash-closing-mode #cashClosingPage .cash-values-grid {
  overflow: visible !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-table {
  grid-template-rows: auto auto 1fr auto auto !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-row,
body.cash-closing-mode #cashClosingPage .cash-count-head {
  grid-template-columns: minmax(0, 1.35fr) minmax(88px, 96px) minmax(90px, 0.78fr) !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-row > span,
body.cash-closing-mode #cashClosingPage .cash-count-row strong,
body.cash-closing-mode #cashClosingPage .cash-count-head > span {
  min-width: 0 !important;
}

/* Cash Closing Count Table Grid Fix ------------------------------------ */
body.cash-closing-mode #cashClosingPage .cash-count-groups {
  gap: 12px !important;
  align-items: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-table {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-table h4 {
  margin: 0 !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row {
  display: grid !important;
  grid-template-columns: minmax(0, 40%) minmax(0, 30%) minmax(0, 30%) !important;
  align-items: center !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head {
  background: #fbfcfa !important;
  border-top: 1px solid #d9ddd7 !important;
  border-bottom: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-body {
  display: block !important;
  overflow: visible !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row {
  border-bottom: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > span,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > strong {
  min-width: 0 !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(1),
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > span:nth-child(1) {
  justify-content: flex-start !important;
  text-align: left !important;
  border-right: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(2) {
  justify-content: center !important;
  text-align: center !important;
  border-right: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > input {
  width: calc(100% - 24px) !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  margin: 0 12px !important;
  justify-self: stretch !important;
  align-self: center !important;
  text-align: center !important;
  border-radius: 10px !important;
  border-right: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > strong,
body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(3) {
  justify-content: flex-end !important;
  text-align: right !important;
}

body.cash-closing-mode #cashClosingPage .cash-manual-total {
  padding: 12px 16px !important;
  border: 2px solid #3B82F6 !important;
  border-radius: 12px !important;
  background: #DBEAFE !important;
}

body.cash-closing-mode #cashClosingPage .cash-manual-total label {
  display: grid !important;
  gap: 8px !important;
}

body.cash-closing-mode #cashClosingPage .cash-manual-total input {
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  margin: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row {
  display: grid !important;
  grid-template-columns: minmax(0, 40%) minmax(0, 30%) minmax(0, 30%) !important;
  align-items: center !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-top: 2px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row > span,
body.cash-closing-mode #cashClosingPage .cash-total-row > strong {
  min-height: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 16px !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row > span {
  grid-column: 1 / span 2 !important;
  justify-content: flex-start !important;
  text-align: left !important;
  border-right: 1px solid #d9ddd7 !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row > strong {
  grid-column: 3 !important;
  justify-content: flex-end !important;
  text-align: right !important;
}

/* Cash Closing Column Alignment Fix ------------------------------------ */
body.cash-closing-mode #cashClosingPage .cash-count-head,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row,
body.cash-closing-mode #cashClosingPage .cash-total-row {
  grid-template-columns: minmax(0, 45%) minmax(0, 25%) minmax(0, 30%) !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > span,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > strong,
body.cash-closing-mode #cashClosingPage .cash-total-row > span,
body.cash-closing-mode #cashClosingPage .cash-total-row > strong {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(1),
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > span:nth-child(1),
body.cash-closing-mode #cashClosingPage .cash-total-row > span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-right: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(2) {
  justify-content: center !important;
  text-align: center !important;
  border-right: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-head > span:nth-child(3),
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > strong,
body.cash-closing-mode #cashClosingPage .cash-total-row > strong {
  justify-content: flex-end !important;
  text-align: right !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row > input {
  width: min(100%, 132px) !important;
  max-width: 132px !important;
  margin: 0 auto !important;
  justify-self: center !important;
  border-right: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row > span {
  grid-column: 1 !important;
}

body.cash-closing-mode #cashClosingPage .cash-total-row::before,
body.cash-closing-mode #cashClosingPage .cash-count-head::before,
body.cash-closing-mode #cashClosingPage .cash-count-body .cash-count-row::before {
  content: none !important;
}

/* Frontoffice Danger Button Match -------------------------------------- */
.kiosk-actions button[data-kiosk-action="clock_out"] {
  background: var(--color-danger-bg) !important;
  color: var(--color-danger) !important;
  border: 1px solid rgba(217, 83, 79, 0.24) !important;
  border-radius: var(--radius-md) !important;
  font-size: var(--font-size-body) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.kiosk-actions button[data-kiosk-action="clock_out"]:hover,
.kiosk-actions button[data-kiosk-action="clock_out"]:focus-visible {
  background: #f9dfde !important;
}

.kiosk-actions button[data-kiosk-action="clock_out"].button-disabled {
  opacity: 1 !important;
}

/* Cash Closing Header Alignment ---------------------------------------- */
body.cash-closing-mode #cashClosingPage .cash-closing-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head-side {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head-side-left {
  justify-content: flex-start !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head-side-right {
  justify-content: flex-end !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head-logo {
  width: 46px !important;
  height: 46px !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  border: 1px solid rgba(217, 221, 215, 0.92) !important;
  background: #ffffff !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head-main {
  display: grid !important;
  justify-items: center !important;
  text-align: center !important;
  min-width: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-head .eyebrow,
body.cash-closing-mode #cashClosingPage .cash-closing-head h2 {
  text-align: center !important;
}

/* Cash Closing Footer Simplify ----------------------------------------- */
body.cash-closing-mode #cashClosingPage .cash-closing-workspace {
  grid-template-columns: 1fr !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-footer-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.82fr) minmax(320px, 0.98fr) !important;
  align-items: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-content: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card .cash-section-heading {
  grid-column: 1 / -1 !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card button {
  width: 100% !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card .success-button,
body.cash-closing-mode #cashClosingPage .cash-actions-card .secondary-button,
body.cash-closing-mode #cashClosingPage .cash-actions-card .danger-button {
  min-height: 52px !important;
  max-height: 52px !important;
}

body.cash-closing-mode #cashClosingPage .cash-signature-section,
body.cash-closing-mode #cashClosingPage .cash-actions-card,
body.cash-closing-mode #cashClosingPage .cash-values-section {
  min-height: 0 !important;
}

.cash-closing-hidden-fields {
  display: none !important;
}

/* Cash Closing Two-Column Layout -------------------------------------- */
body.cash-closing-mode #cashClosingPage .cash-closing-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-column {
  display: grid !important;
  gap: 12px !important;
  align-content: start !important;
  min-width: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-count-groups-stacked {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

body.cash-closing-mode #cashClosingPage .cash-rolls-section,
body.cash-closing-mode #cashClosingPage .cash-values-section {
  min-width: 0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-closing-lower-grid {
  width: 100% !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  align-items: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-signature-section {
  display: grid !important;
  align-content: start !important;
  gap: 12px !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-content: start !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card .cash-section-heading {
  grid-column: 1 / -1 !important;
}

body.cash-closing-mode #cashClosingPage .cash-actions-card button {
  width: 100% !important;
}

@media (max-width: 1024px) {
  body.cash-closing-mode #cashClosingPage .cash-closing-workspace,
  body.cash-closing-mode #cashClosingPage .cash-closing-lower-grid {
    grid-template-columns: 1fr !important;
  }

  body.cash-closing-mode #cashClosingPage .cash-actions-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.cash-closing-mode #cashClosingPage .cash-actions-card {
    grid-template-columns: 1fr !important;
  }
}

/* Cash Closing Status Logic ------------------------------------------- */
body.cash-closing-mode #cashClosingPage .cash-value-display.warn {
  color: #9a6400 !important;
  border-color: rgba(214, 145, 28, 0.34) !important;
  background: #fff6e8 !important;
}

body.cash-closing-mode #cashClosingPage .cash-value-display.bad {
  color: var(--color-danger) !important;
  border-color: rgba(217, 83, 79, 0.32) !important;
  background: var(--color-danger-bg) !important;
}

body.cash-closing-mode #cashClosingPage .cash-value-display.good {
  color: #2f6a1f !important;
  border-color: rgba(155, 190, 64, 0.34) !important;
  background: var(--color-success-bg) !important;
}

body.cash-closing-mode #cashClosingPage .cash-value-display.reference {
  background: #f3f7ee !important;
}

body.cash-closing-mode #cashClosingPage #cashTotalBalance {
  color: var(--color-danger) !important;
  border-color: rgba(217, 83, 79, 0.32) !important;
  background: var(--color-danger-bg) !important;
}

body.cash-closing-mode #cashClosingPage #cashSidesBalance {
  color: var(--color-danger) !important;
  border-color: rgba(217, 83, 79, 0.32) !important;
  background: var(--color-danger-bg) !important;
}

body.cash-closing-mode #cashClosingPage .cash-value-display.attention {
  box-shadow: inset 0 0 0 1px rgba(214, 145, 28, 0.2) !important;
}

body.cash-closing-mode #cashClosingPage .cash-status-hint {
  min-height: 40px !important;
  margin-top: 4px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

body.cash-closing-mode #cashClosingPage .cash-status-neutral {
  background: #f7f8f6 !important;
  color: var(--color-muted) !important;
}

body.cash-closing-mode #cashClosingPage .cash-status-good {
  background: var(--color-success-bg) !important;
  border-color: rgba(155, 190, 64, 0.32) !important;
  color: #2f6a1f !important;
}

body.cash-closing-mode #cashClosingPage .cash-status-warn {
  background: #fff6e8 !important;
  border-color: rgba(214, 145, 28, 0.28) !important;
  color: #9a6400 !important;
}

body.cash-closing-mode #cashClosingPage .cash-status-bad {
  background: var(--color-danger-bg) !important;
  border-color: rgba(217, 83, 79, 0.28) !important;
  color: var(--color-danger) !important;
}

body.cash-closing-mode #cashClosingPage .cash-input-missing {
  border-color: rgba(214, 145, 28, 0.4) !important;
  background: #fffaf0 !important;
}

body.cash-closing-mode #cashClosingPage .cash-input-invalid {
  border-color: rgba(217, 83, 79, 0.42) !important;
  background: #fff5f5 !important;
}

body.cash-closing-mode #cashClosingPage .cash-save-warning {
  box-shadow: inset 0 0 0 1px rgba(214, 145, 28, 0.26) !important;
}

.inventory-panel.hidden {
  display: none;
}

.inventory-grid {
  display: grid;
  gap: 18px;
}

.inventory-form-grid {
  background: rgba(246, 249, 241, 0.75);
  border: 1px solid rgba(40, 73, 39, 0.08);
  border-radius: 20px;
  padding: 18px;
}

.inventory-form-grid.compact {
  align-items: end;
}

.inventory-form-grid textarea {
  min-height: 160px;
  resize: vertical;
}

.inventory-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.inventory-subcard {
  margin-top: 18px;
}

.inventory-count-form textarea,
.inventory-count-form input,
.inventory-count-form select {
  font-size: 16px;
}

.supplier-notes-field {
  grid-column: 1 / -1;
}

/* ── Supplier Invoice Scanner ───────────────────────────────────────── */
.supplier-scan-section {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.supplier-scan-toggle {
  width: 100%;
  text-align: left;
  font-size: 13px;
}

.supplier-scan-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supplier-scan-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--color-border, #d0d5dd);
  border-radius: 10px;
  padding: 28px 16px;
  cursor: pointer;
  background: var(--color-surface, #f9fafb);
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}

.supplier-scan-dropzone:hover,
.supplier-scan-dropzone.drag-over {
  border-color: var(--color-primary, #2b7d4f);
  background: rgba(43, 125, 79, 0.06);
}

.supplier-scan-icon {
  font-size: 28px;
  line-height: 1;
}

.supplier-scan-hint {
  font-size: 13px;
  color: var(--color-text-muted, #667085);
}

.supplier-scan-card {
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface-raised, #fff);
}

.supplier-scan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-surface, #f9fafb);
  border-bottom: 1px solid var(--color-border, #d0d5dd);
  gap: 10px;
  flex-wrap: wrap;
}

.supplier-scan-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.supplier-scan-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(43, 125, 79, 0.12);
  color: #21623e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.supplier-scan-btn-apply,
.supplier-scan-btn-edit,
.supplier-scan-btn-discard {
  font-size: 12px;
  padding: 6px 12px;
  white-space: nowrap;
}

.supplier-scan-btn-discard {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.35);
}

.supplier-scan-btn-discard:hover {
  background: rgba(192, 57, 43, 0.07);
  border-color: #c0392b;
}

/* Edit-mode field inputs */
.supplier-scan-field--edit input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--color-primary, #2b7d4f);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--color-text, #101828);
  outline: none;
  box-sizing: border-box;
}

.supplier-scan-field--edit input:focus {
  box-shadow: 0 0 0 2px rgba(43, 125, 79, 0.2);
}

.supplier-scan-field--edit {
  background: rgba(43, 125, 79, 0.04);
}

.supplier-scan-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--color-border, #d0d5dd);
}

.supplier-scan-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--color-surface-raised, #fff);
}

.supplier-scan-field label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #667085);
}

.supplier-scan-field span {
  font-size: 13px;
  color: var(--color-text, #101828);
  word-break: break-word;
}

.supplier-scan-field span:empty::after {
  content: "—";
  color: var(--color-text-muted, #667085);
}

.supplier-scan-error {
  font-size: 13px;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

.supplier-scan-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-muted, #667085);
  padding: 8px 0;
}

.inventory-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* Rezepte/Wareneinsatz-Tabelle: Kopfzeilen einheitlich (kein Umbruch von "Food Cost %") */
.recipes-cost-table th {
  white-space: nowrap;
  vertical-align: middle;
}

.inventory-status-badge.ok {
  background: rgba(43, 125, 79, 0.12);
  color: #21623e;
}

.inventory-status-badge.warn {
  background: rgba(207, 147, 43, 0.14);
  color: #986803;
}

.inventory-status-badge.critical {
  background: rgba(184, 53, 53, 0.12);
  color: #9a1f1f;
}

@media (max-width: 1100px) {
  .inventory-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.badge.danger {
  color: #9f1f1f;
  background: #fee2e2;
}

.tasks-panel {
  display: grid;
  gap: 18px;
}

.tasks-workspace,
.tasks-analytics-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.tasks-analytics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tasks-subcard,
.task-form-grid,
.task-schedule-context,
.task-suggestion-row,
.task-context-grid,
.task-dashboard-summary-grid,
.task-dashboard-list,
.task-list,
.task-metric-list,
.kiosk-task-list,
.kiosk-task-section {
  display: grid;
  gap: 12px;
}

.task-form-grid textarea {
  min-height: 104px;
  resize: vertical;
}

.task-description-field {
  grid-column: 1 / -1;
}

.task-context-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.task-suggestion-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 93, 46, 0.1);
  color: hsl(152, 55%, 28%);
  font-size: 13px;
  font-weight: 700;
}

.task-context-card,
.task-dashboard-summary-card,
.task-metric-item,
.kiosk-task-card {
  border: 1px solid rgba(19, 38, 27, 0.08);
  border-radius: 16px;
  background: #f8fbf7;
  padding: 14px 16px;
}

.task-dashboard-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 12px;
}

.task-dashboard-summary-card span,
.task-metric-item span,
.task-context-card .muted {
  color: var(--text-muted);
  font-size: 13px;
}

.task-dashboard-summary-card strong,
.task-metric-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.3rem;
}

.task-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.task-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(19, 38, 27, 0.08);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(18, 46, 31, 0.06);
}

.task-card.task-card--closing,
.timeclock-task-card.task-card--closing {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 180ms ease, transform 220ms ease;
  pointer-events: none;
}

.task-card.priority-critical {
  border-left: 6px solid #d22f2f;
}

.task-card.priority-high {
  border-left: 6px solid #e37b13;
}

.task-card.priority-normal {
  border-left: 6px solid hsl(152, 55%, 28%);
}

.task-card.priority-low {
  border-left: 6px solid #7f8c83;
}

.task-card-head,
.task-card-badges,
.task-card-actions,
.kiosk-task-head,
.kiosk-task-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.task-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-category-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(31, 93, 46, 0.08);
}

.task-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

.task-card-description,
.kiosk-task-description {
  margin: 0;
  color: var(--text-color);
  line-height: 1.5;
}

.task-priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.task-priority-pill.priority-critical {
  color: #9f1f1f;
  background: #fee2e2;
}

.task-priority-pill.priority-high {
  color: #8f4c07;
  background: #ffedd5;
}

.task-priority-pill.priority-normal {
  color: #14532d;
  background: #dcfce7;
}

.task-priority-pill.priority-low {
  color: #55645b;
  background: #edf1ee;
}

.task-card-actions button,
.kiosk-task-actions button {
  flex: 1 1 140px;
}

.task-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kiosk-shift-info {
  margin-top: 4px;
}

.kiosk-task-card {
  background: rgba(255, 255, 255, 0.94);
}

.kiosk-task-comment {
  width: 100%;
  min-height: 82px;
  border-radius: 14px;
  border: 1px solid rgba(19, 38, 27, 0.12);
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
}

@media (max-width: 1080px) {
  .tasks-workspace,
  .tasks-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .task-list,
  .task-context-grid,
  .task-dashboard-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Frontoffice Timeclock Refresh --------------------------------------- */
.kiosk-login-eyebrow.hidden {
  display: none;
}

.timeclock-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 0 0;
  display: grid;
  gap: 18px;
  justify-self: center;
}

.kiosk-employee-panel .timeclock-employee-card {
  padding: 16px 18px;
  border: 1px solid #dde5df;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(18, 46, 31, 0.04);
}

.kiosk-employee-panel .timeclock-employee-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kiosk-employee-panel .timeclock-employee-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.kiosk-employee-panel .timeclock-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef5ea;
  color: #2f7b46;
  font-size: 24px;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-employee-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kiosk-employee-panel .timeclock-employee-copy strong {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #13261b;
}

.kiosk-employee-panel .timeclock-employee-copy .muted,
.kiosk-employee-panel .timeclock-shift-row {
  font-size: var(--font-size-body);
  line-height: 1.4;
}

.kiosk-employee-panel .timeclock-shift-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: hsl(152, 55%, 28%);
}

.kiosk-employee-panel .timeclock-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(143, 190, 47, 0.12);
  font-size: 12px;
}

.kiosk-employee-panel .timeclock-status-badge {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(19, 38, 27, 0.08);
  font-size: var(--font-size-body);
  font-weight: 700;
  white-space: nowrap;
}

.kiosk-employee-panel .timeclock-task-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid #dde5df;
}

.kiosk-employee-panel .timeclock-task-banner.hidden {
  display: none;
}

.kiosk-employee-panel .timeclock-task-banner-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.kiosk-employee-panel .timeclock-task-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  font-size: 18px;
  flex: 0 0 auto;
}

.kiosk-employee-panel .timeclock-task-banner-copy {
  display: grid;
  gap: 2px;
}

.kiosk-employee-panel .timeclock-task-banner-copy strong {
  font-size: 17px;
  line-height: 1.2;
  color: #13261b;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-task-banner-copy span {
  color: #65736c;
  font-size: 14px;
}

.kiosk-employee-panel .timeclock-task-banner-link {
  color: #d97706;
  font-size: var(--font-size-body);
  font-weight: 700;
  white-space: nowrap;
}

.kiosk-employee-panel .timeclock-task-banner--info {
  background: #eaf7ea;
  border-color: rgba(143, 190, 47, 0.24);
}

.kiosk-employee-panel .timeclock-task-banner--warning {
  background: #fff7e8;
  border-color: rgba(245, 158, 11, 0.22);
}

.kiosk-employee-panel .timeclock-task-banner--danger {
  background: #fdeaea;
  border-color: rgba(217, 48, 37, 0.18);
}

.kiosk-employee-panel .timeclock-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.kiosk-employee-panel .timeclock-section-header strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.kiosk-employee-panel .timeclock-section-header .muted {
  font-size: 14px;
  line-height: 1.4;
}

.kiosk-employee-panel .timeclock-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 108px;
  gap: 16px;
  align-items: stretch;
}

.kiosk-employee-panel .timeclock-kpi-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  height: 108px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dde5df;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(18, 46, 31, 0.03);
  text-align: left;
}

.kiosk-employee-panel .timeclock-kpi-card--action {
  background: var(--color-primary);
  border-color: rgba(143, 190, 47, 0.34);
  color: var(--color-primary-dark);
}

.kiosk-employee-panel .timeclock-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef5ea;
  color: #2f7b46;
  font-size: 24px;
}

.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-icon {
  background: rgba(255, 255, 255, 0.18);
}

.kiosk-employee-panel .timeclock-kpi-copy {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.kiosk-employee-panel .timeclock-kpi-copy span {
  color: #65736c;
  font-size: 13px;
  line-height: 1.35;
}

.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-copy span,
.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-copy strong {
  color: var(--color-primary-dark);
}

.kiosk-employee-panel .timeclock-kpi-copy strong {
  font-size: 22px;
  line-height: 1.08;
  color: #13261b;
  font-weight: 700;
  word-break: keep-all;
}

.kiosk-employee-panel .timeclock-kpi-value--negative {
  color: #d93025 !important;
}

.kiosk-employee-panel .timeclock-kpi-value--positive {
  color: #174f36 !important;
}

.kiosk-employee-panel .timeclock-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.kiosk-employee-panel .timeclock-action-button {
  min-height: 72px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.kiosk-employee-panel .timeclock-action-button--primary {
  background: var(--color-primary);
  color: var(--color-primary-dark);
}

.kiosk-employee-panel .timeclock-action-button--danger {
  background: #fff5f4;
}

.kiosk-employee-panel .timeclock-action-icon {
  font-size: 16px;
  line-height: 1;
}

.kiosk-employee-panel .timeclock-task-section {
  display: grid;
  gap: 16px;
}

.kiosk-employee-panel .timeclock-task-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kiosk-employee-panel .timeclock-task-count-badge {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff1dd;
  color: #d97706;
  font-size: 12px;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-task-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #dde5df;
  background: #fbfcfa;
  color: #65736c;
  font-size: var(--font-size-body);
}

.kiosk-employee-panel .timeclock-task-card {
  display: grid;
  position: relative;
  overflow: hidden;
  grid-template-columns: 5px minmax(0, 1fr);
  grid-auto-rows: min-content;
  gap: 0;
  padding: 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #dde5df;
  box-shadow: 0 6px 14px rgba(18, 46, 31, 0.03);
  width: 100%;
  transition: opacity 180ms ease, transform 220ms ease;
}

.kiosk-employee-panel .timeclock-task-card > :not(.timeclock-task-signal) {
  grid-column: 2;
  padding-left: 18px;
  padding-right: 18px;
}

.kiosk-employee-panel .timeclock-task-card .kiosk-task-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
}

.kiosk-employee-panel .timeclock-task-card .kiosk-task-description,
.kiosk-employee-panel .timeclock-task-card .timeclock-task-comment-hint,
.kiosk-employee-panel .timeclock-task-card .timeclock-task-comment-wrap,
.kiosk-employee-panel .timeclock-task-card .timeclock-task-actions {
  padding-bottom: 0;
}

.kiosk-employee-panel .timeclock-task-card .timeclock-task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding-bottom: 18px;
}

.kiosk-employee-panel .timeclock-task-signal {
  grid-column: 1;
  grid-row: 1 / -1;
  width: 5px;
  height: 100%;
}

.kiosk-employee-panel .signal-open,
.kiosk-employee-panel .task-card--open .timeclock-task-signal {
  background: #8fbe2f;
}

.kiosk-employee-panel .signal-due,
.kiosk-employee-panel .task-card--due .timeclock-task-signal {
  background: #f59e0b;
}

.kiosk-employee-panel .signal-critical,
.kiosk-employee-panel .task-card--critical .timeclock-task-signal {
  background: #d93025;
}

.kiosk-employee-panel .signal-progress,
.kiosk-employee-panel .task-card--in-progress .timeclock-task-signal {
  background: #d6a02c;
}

.kiosk-employee-panel .signal-done,
.kiosk-employee-panel .task-card--done .timeclock-task-signal {
  background: #174f36;
}

.kiosk-employee-panel .task-card--due {
  background: #fffdf8;
}

.kiosk-employee-panel .task-card--critical {
  background: #fff8f8;
}

.kiosk-employee-panel .task-card--in-progress {
  background: #fffdf8;
}

.kiosk-employee-panel .task-card--done {
  background: #f9fcf8;
  opacity: 0.92;
}

.kiosk-employee-panel .timeclock-task-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.kiosk-employee-panel .timeclock-task-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kiosk-employee-panel .timeclock-task-title-row strong {
  font-size: 18px;
  line-height: 1.25;
  color: #13261b;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-task-category-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f8f6;
  color: #174f36;
  font-size: 18px;
  flex: 0 0 auto;
}

.kiosk-employee-panel .timeclock-task-meta {
  display: flex;
  gap: 8px 10px;
  align-items: center;
  flex-wrap: wrap;
  color: #65736c;
  font-size: 13px;
}

.kiosk-employee-panel .timeclock-task-category {
  color: #2f7b46;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-task-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.kiosk-employee-panel .task-priority-badge,
.kiosk-employee-panel .task-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.kiosk-employee-panel .task-priority-badge.priority-critical {
  background: #fdeaea;
  color: #d93025;
}

.kiosk-employee-panel .task-priority-badge.priority-high {
  background: #ffe7c2;
  color: #c96d02;
}

.kiosk-employee-panel .task-priority-badge.priority-normal {
  background: #eaf7ea;
  color: #2f7b46;
}

.kiosk-employee-panel .task-priority-badge.priority-low {
  background: #edf1ee;
  color: #65736c;
}

.kiosk-employee-panel .timeclock-task-chevron {
  color: #6a776f;
  font-size: 22px;
  line-height: 1;
}

.kiosk-employee-panel .timeclock-task-comment-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: #65736c;
  font-size: 13px;
  font-weight: 600;
}

.kiosk-employee-panel .timeclock-task-comment-wrap {
  display: grid;
  gap: 8px;
  width: 100%;
}

.kiosk-employee-panel .timeclock-task-comment-error {
  color: #d93025;
  font-size: 13px;
  font-weight: 600;
}

.kiosk-employee-panel .timeclock-task-comment-error.hidden {
  display: none;
}

.kiosk-employee-panel .kiosk-task-comment {
  min-height: 68px;
  border-radius: 14px;
  border: 1px solid #dde5df;
  background: #ffffff;
  font-size: 14px;
}

.kiosk-employee-panel .timeclock-task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kiosk-employee-panel .timeclock-task-action-button {
  min-height: 56px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
}

.kiosk-employee-panel .timeclock-task-action-button--done {
  background: #dcecc2;
  color: #23452e;
  border: 1px solid #bfd791;
}

.kiosk-employee-panel .timeclock-task-action-button--done:hover,
.kiosk-employee-panel .timeclock-task-action-button--done:focus-visible {
  background: #d2e6b0;
}

.kiosk-employee-panel .timeclock-task-category-icon.category-order {
  color: #d97706;
  background: #fff1dd;
}

.kiosk-employee-panel .timeclock-task-category-icon.category-cash {
  color: #2f80ed;
  background: #e8f3ff;
}

.kiosk-employee-panel .timeclock-task-category-icon.category-stock {
  color: #2f7b46;
  background: #eaf7ea;
}

.kiosk-employee-panel .timeclock-task-category-icon.category-cleaning,
.kiosk-employee-panel .timeclock-task-category-icon.category-haccp,
.kiosk-employee-panel .timeclock-task-category-icon.category-prep,
.kiosk-employee-panel .timeclock-task-category-icon.category-close,
.kiosk-employee-panel .timeclock-task-category-icon.category-other {
  color: #46544d;
  background: #f3f5f2;
}

.kiosk-employee-panel .timeclock-back-button {
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .kiosk-shell {
    width: min(760px, calc(100vw - 32px));
  }
}

@media (max-width: 760px) {
  .timeclock-panel {
    gap: 18px;
  }

  .kiosk-employee-panel .timeclock-employee-header,
  .kiosk-employee-panel .timeclock-task-banner,
  .kiosk-employee-panel .timeclock-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .kiosk-employee-panel .timeclock-status-badge {
    align-self: flex-start;
  }

  .kiosk-employee-panel .timeclock-kpi-grid,
  .kiosk-employee-panel .timeclock-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .kiosk-employee-panel .timeclock-kpi-grid,
  .kiosk-employee-panel .timeclock-action-grid,
  .kiosk-employee-panel .timeclock-task-actions {
    grid-template-columns: 1fr;
  }

  .kiosk-employee-panel .timeclock-employee-copy strong {
    font-size: 20px;
  }

  .kiosk-employee-panel .timeclock-task-title-row strong {
    font-size: 18px;
  }
}

/* ─── Tab search input ──────────────────────────────────────────────────── */
.tab-search {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}
.tab-search:focus {
  border-color: var(--green);
}

/* ─── Preisimport ───────────────────────────────────────────────────────── */
.preis-import-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0 16px;
}
.preis-import-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.preis-import-label select,
.preis-import-label input[type="file"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}
.preis-import-status {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 6px 0;
}
.preis-import-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.preis-import-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}
.preis-diff-up   { color: #c0392b; font-weight: 600; }
.preis-diff-down { color: #27ae60; font-weight: 600; }
.preis-conf-high { color: #27ae60; font-weight: 600; }
.preis-conf-mid  { color: #e67e22; font-weight: 600; }
.preis-conf-low  { color: #c0392b; }

/* ─── Ingredient stats row ──────────────────────────────────────────────── */
.ingredient-stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ing-stat-card {
  flex: 1 1 120px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ing-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.ing-stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.ing-stat-ok   { color: #27ae60; }
.ing-stat-warn { color: #c0392b; }
.ing-stat-muted { color: var(--muted); }

/* ─── Kalkulation expanded edit panel v2 ────────────────────────────────── */
.kalk-edit-panel-v2 {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  align-items: flex-start;
  padding: 12px 8px 14px;
  background: #f8fbf4;
  border-radius: 8px;
}
.kalk-edit-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
.kalk-edit-col-wide {
  flex: 1 1 340px;
}
.kalk-edit-col-actions {
  display: flex;
  align-items: flex-start;
  padding-top: 28px;
}
.kalk-edit-section-label {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.kalk-items-wrapper {
  max-height: 260px;
  overflow-y: auto;
}
.kalk-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.kalk-items-table th {
  background: hsl(152, 45%, 93%);
  padding: 4px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.kalk-items-table td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--border);
}
.kalk-items-table input[type="number"] {
  width: 80px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
}
.kalk-items-table input[type="number"]:focus {
  border-color: var(--green);
  outline: none;
}
.kalk-ing-total { text-align: right; }

.kalk-del-ing {
  border: none;
  background: transparent;
  color: var(--color-danger, #c0392b);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.kalk-del-ing:hover { background: rgba(192, 57, 43, 0.12); }

.kalk-add-ing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
  padding: 8px;
  background: hsl(152, 45%, 97%);
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.kalk-add-ing-row select,
.kalk-add-ing-row input[type="number"] {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
}
.kalk-add-ing-select { flex: 1 1 160px; min-width: 140px; }
.kalk-add-ing-qty { width: 90px; }
.kalk-add-ing-unit { width: 90px; }

/* ── WE-Report ─────────────────────────────────────────────── */
.we-report-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.we-filter-group { display: flex; flex-direction: column; gap: 4px; }
.we-filter-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.we-filter-input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.85rem; background: var(--bg); color: var(--text); }
.we-filter-shortcuts { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end; }
.we-kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.we-kpi-row .ing-stat-card { flex: 1 1 160px; }
.ing-stat-danger { color: #c0392b; font-weight: 700; }
.we-bar-cell { display: flex; align-items: center; gap: 6px; }
.we-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; min-width: 60px; }
.we-bar-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }

/* ── Kiosk WE card ─────────────────────────────────────────── */
.kiosk-we-card { background: linear-gradient(135deg, #f0f7f0 0%, #e8f5e8 100%); }
.kiosk-we-quote { font-size: 0.78rem; margin-top: 2px; display: block; }
/* ── Option A: Semantic Signal Colors ──────────────────────── */
/* Waste: Amber/Orange */
.kiosk-waste-button {
  background: #F5A04A !important;
  border: 1px solid #E8893A !important;
  color: #2E1400 !important;
}
.kiosk-waste-button .timeclock-kpi-copy span,
.kiosk-waste-button .timeclock-kpi-copy strong { color: #2E1400 !important; }
.kiosk-waste-button .timeclock-kpi-icon { background: rgba(255,255,255,0.22) !important; color: #2E1400 !important; }

/* ── Generisches Modal (modal-overlay / modal-card) ───────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--card-bg, #fff); border-radius: 20px;
  width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 28px 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-card label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.875rem; font-weight: 600; color: var(--text-secondary, #374151);
}
.modal-card label input, .modal-card label select {
  font-size: 0.95rem; padding: 9px 12px;
  border: 1.5px solid var(--border-color, #e2e8f0); border-radius: 10px;
  background: var(--input-bg, #fff); color: var(--text-primary, #111827);
  outline: none; transition: border-color .15s;
}
.modal-card label input:focus, .modal-card label select:focus {
  border-color: var(--color-primary, #204A33);
}

/* ── Waste Modal ───────────────────────────────────────────── */
.waste-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.waste-modal-overlay.hidden { display: none; }
.waste-modal {
  background: var(--card-bg, #fff); border-radius: 20px;
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.waste-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.waste-modal-header h2 { font-size: 1.3rem; margin: 0; }
.waste-modal-close { font-size: 1.2rem; padding: 4px 10px; }

/* Personalisierte Begrüßung im Verzehr-Modal */
.verzehr-greeting-box {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-left: 4px solid #4caf50;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.verzehr-greeting-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2e7d32;
  margin: 0 0 4px 0;
}
.verzehr-greeting-sub {
  font-size: 0.9rem;
  color: #388e3c;
  margin: 0;
  line-height: 1.4;
}
.waste-step-hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.waste-group-grid {
  display: flex; flex-direction: column; gap: 18px;
}
.waste-category-section { display: flex; flex-direction: column; gap: 8px; }
.waste-category-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted, #888); padding-left: 2px;
}
.waste-category-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.waste-group-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; border: 2px solid var(--border);
  background: var(--bg); cursor: pointer; transition: all .15s;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  min-height: 44px;
}
.waste-group-tile:hover, .waste-group-tile:active { border-color: var(--green); background: #f0faf0; }
.waste-tile-icon { font-size: 1.8rem; }
.waste-tile-label { text-align: center; line-height: 1.2; }
.waste-portion-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.waste-portion-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 16px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--bg); cursor: pointer; transition: all .15s; min-width: 90px;
  min-height: 44px;
}
.waste-portion-tile:hover, .waste-portion-tile.active {
  border-color: var(--green); background: #f0faf0;
}
.waste-portion-label { font-weight: 700; font-size: 0.95rem; }
.waste-portion-cost { font-size: 0.78rem; color: var(--text-muted); }
.waste-qty-row {
  display: flex; align-items: center; gap: 12px; margin: 12px 0;
}
.waste-qty-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); min-width: 60px; }
.waste-qty-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--bg); font-size: 1.4rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
}
.waste-qty-btn:hover { border-color: var(--green); background: #f0faf0; }
.waste-qty-display { font-size: 1.5rem; font-weight: 700; min-width: 40px; text-align: center; }
.waste-reason-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.waste-reason-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.waste-reason-chip {
  padding: 5px 12px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg); font-size: 0.8rem; cursor: pointer; font-weight: 500;
}
.waste-reason-chip.active { border-color: var(--green); background: #f0faf0; color: var(--green); font-weight: 700; }
.waste-cost-preview {
  background: #f8f9fa; border-radius: 10px; padding: 12px 16px;
  margin: 12px 0; font-size: 0.9rem; min-height: 40px;
}
.waste-save-btn { width: 100%; margin-top: 8px; padding: 14px; font-size: 1rem; }
.waste-back-btn { margin-bottom: 12px; font-size: 0.85rem; }
.waste-today-summary {
  border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px;
}
.waste-today-row { font-size: 0.85rem; text-align: center; }
th.num, td.num { text-align: right; }

/* ── Waste delete / undo ───────────────────────────────────── */
.waste-today-header { font-size: 0.82rem; margin-bottom: 8px; color: var(--text-muted); }
.waste-today-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.waste-today-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; font-size: 0.83rem;
  transition: opacity .3s;
}
.waste-today-item-text { flex: 1; }
.waste-today-item-cost { color: var(--text-muted); min-width: 52px; text-align: right; font-size: 0.8rem; }
.waste-item-pending-delete { opacity: 0.3; text-decoration: line-through; }
.waste-delete-btn {
  background: none; border: none; cursor: pointer; color: #c0392b;
  font-size: 0.9rem; padding: 2px 6px; border-radius: 6px; line-height: 1;
  opacity: 0.6; transition: opacity .15s;
}
.waste-delete-btn:hover { opacity: 1; background: #fdf0ee; }
.waste-undo-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #2d3436; color: #fff; border-radius: 10px;
  padding: 10px 14px; margin-top: 12px; font-size: 0.85rem;
}
.waste-undo-bar.hidden { display: none; }
.waste-undo-btn {
  background: var(--green); color: #fff; border: none; border-radius: 6px;
  padding: 5px 12px; cursor: pointer; font-weight: 700; font-size: 0.82rem;
}
.waste-bo-delete-btn { opacity: 0.5; padding: 2px 6px; font-size: 0.9rem; }
.waste-bo-delete-btn:hover { opacity: 1; }
.toast-undo-btn {
  background: none; border: 1px solid rgba(255,255,255,.5); color: #fff;
  border-radius: 5px; padding: 3px 10px; cursor: pointer;
  font-weight: 700; font-size: 0.8rem; margin-left: 12px;
}
.toast-undo-btn:hover { background: rgba(255,255,255,.15); }

/* ── Waste inline edit ─────────────────────────────────────── */
.waste-qty-cell { cursor: pointer; }
.waste-qty-cell:hover .waste-qty-val { text-decoration: underline dotted; color: var(--green); }
.waste-qty-input { border: 1.5px solid var(--green); border-radius: 5px; padding: 2px 4px; font-size: 0.85rem; background: var(--bg); color: var(--text); }

/* ── Waste time badge ──────────────────────────────────────── */
.waste-time-badge {
  display: inline-block; margin-left: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted, #888);
  background: var(--bg-subtle, #f4f4f4);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 5px; padding: 1px 5px;
  vertical-align: middle; white-space: nowrap;
}

/* ── Personalverzehr prompt ─────────────────────────────────── */
.verzehr-prompt-modal { text-align: center; max-width: 400px; padding: 32px; }
.verzehr-prompt-icon { font-size: 3rem; margin-bottom: 12px; }
.verzehr-prompt-title { font-size: 1.3rem; margin: 0 0 8px; }
.verzehr-prompt-text { color: var(--text-muted); margin: 0 0 24px; font-size: 0.95rem; }
.verzehr-prompt-actions { display: flex; flex-direction: column; gap: 10px; }
.verzehr-prompt-btn { padding: 14px; font-size: 1rem; border-radius: 12px; }
/* Verzehr: Salbei-Grün */
.kiosk-verzehr-button {
  background: #5C9E7A !important;
  border: 1px solid #4A8A68 !important;
  color: #ffffff !important;
}
.kiosk-verzehr-button .timeclock-kpi-copy span,
.kiosk-verzehr-button .timeclock-kpi-copy strong { color: #ffffff !important; }
.kiosk-verzehr-button .timeclock-kpi-icon { background: rgba(255,255,255,0.22) !important; color: #ffffff !important; }

/* ── Kassenabschluss Gate Modal ─────────────────────────────── */
.cash-gate-modal { max-width: 460px; padding: 28px 24px 20px; }
.cash-gate-subtitle { font-size: 0.88rem; color: var(--text-muted, #666); margin: 4px 0 20px; }
.cash-gate-checks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cash-gate-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: #fff8f0; border: 1.5px solid #f5c07a;
  transition: background .2s, border-color .2s;
}
.cash-gate-row.gate-row--ok {
  background: #f0faf4; border-color: #a8d5b5;
}
.cash-gate-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.cash-gate-copy { flex: 1; min-width: 0; }
.cash-gate-copy strong { display: block; font-size: 0.95rem; color: var(--text); }
.cash-gate-copy span { font-size: 0.8rem; color: var(--text-muted, #777); }
.cash-gate-action-btn {
  flex-shrink: 0; padding: 7px 14px; border-radius: 10px;
  background: var(--color-primary); color: var(--color-primary-dark);
  font-size: 0.82rem; font-weight: 700; border: none; cursor: pointer;
}
.cash-gate-footer { display: flex; flex-direction: column; gap: 10px; }
.cash-gate-proceed-btn {
  width: 100%; padding: 14px; border-radius: 14px;
  background: var(--color-primary-dark, #1a3d26); color: #fff;
  font-size: 1rem; font-weight: 700; border: none; cursor: pointer;
}
.cash-gate-cancel-btn {
  width: 100%; padding: 10px; border-radius: 14px;
  background: transparent; color: var(--text-muted, #888);
  font-size: 0.88rem; font-weight: 600; border: 1.5px solid var(--border);
  cursor: pointer;
}

/* ── Button Entry Badge ─────────────────────────────────────── */
.kiosk-entry-badge {
  position: absolute; top: 8px; right: 10px;
  min-width: 22px; height: 22px; border-radius: 11px;
  font-size: 0.72rem; font-weight: 800; line-height: 22px;
  text-align: center; padding: 0 5px; pointer-events: none;
}
.kiosk-entry-badge.warn {
  background: #d93025; color: #fff;
}
.kiosk-entry-badge.done {
  background: rgba(255,255,255,0.35); color: #1a3d26;
}
/* Make parent buttons position:relative for badge positioning */
#kioskWasteButton, #kioskVerzehrButton { position: relative; }

/* ── Verzehr Rabatt-Auswahl ─────────────────────────────────── */
.verzehr-rabatt-row {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 4px;
}
.verzehr-rabatt-label {
  font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
.verzehr-rabatt-tiles {
  display: flex; gap: 8px;
}
.verzehr-rabatt-tile {
  padding: 8px 18px; border-radius: 10px; font-size: 0.9rem; font-weight: 700;
  border: 2px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; transition: all .15s;
}
.verzehr-rabatt-tile.active {
  background: var(--color-primary-dark, #1a3d26);
  color: #fff; border-color: var(--color-primary-dark, #1a3d26);
}
.verzehr-nichts-btn {
  width: 100%; margin-top: 16px; padding: 12px;
  font-size: 0.88rem; color: var(--text-muted, #888);
  border-radius: 12px;
}

/* ── Produkte Tab ───────────────────────────────────────────── */
.produkte-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.produkte-toolbar input[type="search"],
.produkte-toolbar select {
  padding: 7px 12px; border: 1px solid var(--border, #ddd);
  border-radius: 8px; font-size: 0.88rem;
  background: var(--surface, #fff); color: inherit;
}
.produkte-toolbar input[type="search"] { min-width: 200px; }
.produkte-active-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.88rem; cursor: pointer; white-space: nowrap;
}
.produkte-active-toggle input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer; flex-shrink: 0;
  accent-color: hsl(152, 55%, 28%);
}
.produkte-row-inactive td { opacity: 0.45; }
.produkte-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}
.produkte-badge.active  { background: #d1fae5; color: #065f46; }
.produkte-badge.inactive { background: #f3f4f6; color: #6b7280; }
.produkte-badge.warn    { background: #fef3c7; color: #92400e; }
td.fc-green { color: #059669; font-weight: 600; }
td.fc-yellow { color: #d97706; font-weight: 600; }
td.fc-red   { color: #dc2626; font-weight: 600; }

/* ── Gate Waste Summary ─────────────────────────────────────── */
.gate-waste-summary {
  margin: 8px 0 0 0;
  padding: 10px 14px;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.gate-waste-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem;
}
.gate-waste-group { flex: 1; color: var(--text-main, #1a1a1a); }
.gate-waste-qty   { color: var(--text-muted, #888); min-width: 24px; text-align: right; }
.gate-waste-cost  { font-weight: 600; min-width: 64px; text-align: right; }

/* ── Kiosk Button Homogenisierung ───────────────────────────── */
/* Kassenabschluss gleiche Höhe wie Waste/Verzehr */
.kiosk-cash-closing-button {
  min-height: 108px !important;
}

/* Action-Grid: gleiche Grid-Struktur wie KPI-Grid */
.kiosk-actions.timeclock-action-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

/* Action-Buttons: exakt gleiche Karten-Struktur wie KPI-Cards */
.kiosk-actions.timeclock-action-grid .timeclock-action-button {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  height: 108px !important;
  box-sizing: border-box !important;
  padding: 16px !important;
  border-radius: 18px !important;
  text-align: left !important;
  font-size: inherit !important;
  justify-content: unset !important;
  width: 100% !important;
  overflow: hidden !important;
}
.kiosk-actions.timeclock-action-grid .timeclock-kpi-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  background: rgba(255,255,255,0.18) !important;
  flex-shrink: 0;
}
.kiosk-actions.timeclock-action-grid .timeclock-kpi-copy {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
}
.kiosk-actions.timeclock-action-grid .timeclock-kpi-copy span {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.8;
}
.kiosk-actions.timeclock-action-grid .timeclock-kpi-copy strong {
  font-size: 22px;
  line-height: 1.08;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 640px) {
  .kiosk-cash-closing-button,
  .kiosk-actions.timeclock-action-grid .timeclock-action-button {
    height: auto !important;
    min-height: 84px !important;
  }
  .kiosk-employee-panel .timeclock-kpi-grid {
    grid-auto-rows: 88px;
  }
  .kiosk-employee-panel .timeclock-kpi-card {
    height: 88px;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-kpi-copy strong {
    font-size: 15px;
    white-space: normal;
    word-break: break-word;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-action-button {
    overflow: visible !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-kpi-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }
}
@media (max-width: 420px) {
  .kiosk-actions.timeclock-action-grid .timeclock-action-button {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
    min-height: 76px !important;
  }
  .kiosk-employee-panel .timeclock-kpi-grid {
    grid-auto-rows: 76px;
  }
  .kiosk-employee-panel .timeclock-kpi-card {
    height: 76px;
    padding: 10px 12px;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-kpi-copy strong {
    font-size: 13px;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-kpi-copy span {
    font-size: 11px;
  }
  .kiosk-actions.timeclock-action-grid .timeclock-kpi-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    border-radius: 10px !important;
  }
}

/* ── WE Ampel-Karte ─────────────────────────────────────────── */
.kiosk-we-bar-card {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
  justify-content: space-between;
  gap: 0;
  padding: 13px 16px;
}
.we-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}
.we-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #1a2e1f;
  opacity: 0.75;
  white-space: nowrap;
}
.we-bar-delta {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.we-bar-delta.we-ok   { background: #d1fae5; color: #065f46; }
.we-bar-delta.we-warn { background: #fef3c7; color: #92400e; }
.we-bar-delta.we-over { background: #fee2e2; color: #991b1b; }
.we-bar-delta.we-muted { background: #f3f4f6; color: #9ca3af; }

.we-bar-track {
  position: relative;
  height: 9px;
  background: rgba(0,0,0,0.1);
  border-radius: 5px;
  overflow: visible;
  flex-shrink: 0;
}
.we-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: #4caf7d;
  transition: width 0.5s ease, background 0.3s ease;
  min-width: 4px;
}
.we-bar-soll-line {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: rgba(0,0,0,0.35);
  border-radius: 2px;
}
.we-bar-soll-line::after {
  content: none;
}
.we-bar-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #1a2e1f;
  margin-top: 6px;
}
.we-bar-values strong { font-weight: 700; }
.we-bar-waste {
  font-size: 11px;
  color: rgba(0,0,0,0.5);
  margin-top: 4px;
}
.we-bar-waste strong { font-weight: 600; color: rgba(0,0,0,0.65); }

/* Inventur: Rosé — überschrieben durch #id-Block weiter unten */

/* ── Kiosk Button Texte einheitlich Schwarz ─────────────────── */
/* Verzehr-Button: war weiß → jetzt schwarz */
.kiosk-verzehr-button,
.kiosk-verzehr-button .timeclock-kpi-copy span,
.kiosk-verzehr-button .timeclock-kpi-copy strong {
  color: #1a1a1a !important;
}

/* KPI Action-Cards (Kassenabschluss, Waste, Verzehr): eyebrow + bold schwarz */
.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-copy span,
.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-copy strong {
  color: #1a1a1a !important;
}

/* Action-Grid Buttons: eyebrow + bold schwarz, auch wenn disabled */
.kiosk-actions.timeclock-action-grid .timeclock-action-button .timeclock-kpi-copy span,
.kiosk-actions.timeclock-action-grid .timeclock-action-button .timeclock-kpi-copy strong,
.kiosk-actions.timeclock-action-grid .timeclock-action-button span:not(.timeclock-kpi-icon) {
  color: #1a1a1a !important;
  opacity: 1 !important;
}

/* Disabled Buttons: Schrift trotzdem schwarz, nur Hintergrund gedimmt */
.kiosk-actions.timeclock-action-grid .timeclock-action-button:disabled .timeclock-kpi-copy span,
.kiosk-actions.timeclock-action-grid .timeclock-action-button:disabled .timeclock-kpi-copy strong {
  color: #1a1a1a !important;
  opacity: 0.55 !important;
}

/* Arbeitszeit beenden (Danger): kein Rot mehr, schwarz */
.kiosk-actions.timeclock-action-grid .timeclock-action-button--danger .timeclock-kpi-copy span,
.kiosk-actions.timeclock-action-grid .timeclock-action-button--danger .timeclock-kpi-copy strong {
  color: #1a1a1a !important;
}

/* ── Kiosk Button Texte v2 ──────────────────────────────────── */
/* Disabled-Klasse NOT auf ganzen Button, nur Icon abdimmen */
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled {
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled .timeclock-kpi-icon {
  opacity: 0.45 !important;
}

/* Alle Eyebrow-Labels (kleine Texte) = einheitlich gedimmtes Grau */
.kiosk-employee-panel .timeclock-kpi-copy > span:first-child,
.kiosk-actions.timeclock-action-grid .timeclock-action-button .timeclock-kpi-copy > span:first-child {
  color: rgba(30, 40, 35, 0.48) !important;
  opacity: 1 !important;
}

/* Alle Haupt-Labels (fett) = schwarz */
.kiosk-employee-panel .timeclock-kpi-card--action .timeclock-kpi-copy > strong,
.kiosk-actions.timeclock-action-grid .timeclock-action-button .timeclock-kpi-copy > strong {
  color: #1a1a1a !important;
  opacity: 1 !important;
}

/* Auch .button-disabled: Haupttext bleibt schwarz */
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled .timeclock-kpi-copy > strong {
  color: #1a1a1a !important;
  opacity: 0.6 !important;
}
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled .timeclock-kpi-copy > span:first-child {
  color: rgba(30, 40, 35, 0.48) !important;
  opacity: 1 !important;
}

/* ── Dienstplan drag-to-fill ─────────────────────────────────────────────── */
.dp-cell-btn.dp-drag-source {
  outline: 3px solid #0C447C;
  outline-offset: -2px;
  cursor: grabbing !important;
  opacity: 0.85;
}
.dp-cell-btn.dp-drag-target,
.dp-cell-empty.dp-drag-target {
  outline: 3px dashed #0C447C;
  outline-offset: -2px;
  background: #d0e8ff !important;
  color: #0C447C !important;
  cursor: grabbing !important;
}
/* Prevent text selection on cells while dragging */
.dp-body td * {
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KIOSK PASTEL CARD REDESIGN  (v20260502)
   Overrides alle vorherigen Farb-Regeln für die 8 Kiosk-Kacheln.
   Struktur, IDs, Klassen und Funktionalität bleiben unverändert.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Button-Karten: Icon + Text exakt wie stat-Karten ausrichten ─────────── */
#kioskWasteButton,
#kioskVerzehrButton,
#kioskCashClosingButton {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  text-align: left !important;
}
#kioskWasteButton .timeclock-kpi-icon,
#kioskVerzehrButton .timeclock-kpi-icon,
#kioskInventurButton .timeclock-kpi-icon,
#kioskCashClosingButton .timeclock-kpi-icon {
  align-self: center;
  justify-self: center;
  flex-shrink: 0;
}
#kioskWasteButton .timeclock-kpi-copy,
#kioskVerzehrButton .timeclock-kpi-copy,
#kioskInventurButton .timeclock-kpi-copy,
#kioskCashClosingButton .timeclock-kpi-copy {
  align-self: center;
  display: grid;
  gap: 4px;
}

/* ─── 1. Schwund / Waste erfassen ─────────────────────────────────────────── */
#kioskWasteButton {
  background: #FFF3E0 !important;
  border: 2px solid #F59E0B !important;
  box-shadow: none !important;
  color: #92400E !important;
}
#kioskWasteButton .timeclock-kpi-copy > span:first-child {
  color: rgba(146,64,14,0.60) !important;
  opacity: 1 !important;
}
#kioskWasteButton .timeclock-kpi-copy > strong {
  color: #92400E !important;
  opacity: 1 !important;
}
#kioskWasteButton .timeclock-kpi-icon {
  background: rgba(245,158,11,0.16) !important;
  color: #92400E !important;
}
#kioskWasteButton:hover, #kioskWasteButton:active {
  background: #FFE9C2 !important;
  border-color: #D97706 !important;
}

/* ─── 2. Personalverzehr / Verzehr erfassen ───────────────────────────────── */
#kioskVerzehrButton {
  background: #EAF7EF !important;
  border: 2px solid #22A06B !important;
  box-shadow: none !important;
  color: #14532D !important;
}
#kioskVerzehrButton .timeclock-kpi-copy > span:first-child {
  color: rgba(20,83,45,0.60) !important;
  opacity: 1 !important;
}
#kioskVerzehrButton .timeclock-kpi-copy > strong {
  color: #14532D !important;
  opacity: 1 !important;
}
#kioskVerzehrButton .timeclock-kpi-icon {
  background: rgba(34,160,107,0.14) !important;
  color: #14532D !important;
}
#kioskVerzehrButton:hover, #kioskVerzehrButton:active {
  background: #D3F0E0 !important;
  border-color: #16855A !important;
}

/* ─── 3. Kassenabschluss ──────────────────────────────────────────────────── */
#kioskCashClosingButton {
  background: #EAF3FF !important;
  border: 2px solid #2563EB !important;
  box-shadow: none !important;
  color: #1E3A8A !important;
}
#kioskCashClosingButton .timeclock-kpi-copy > span:first-child {
  color: rgba(30,58,138,0.60) !important;
  opacity: 1 !important;
}
#kioskCashClosingButton .timeclock-kpi-copy > strong {
  color: #1E3A8A !important;
  opacity: 1 !important;
}
#kioskCashClosingButton .timeclock-kpi-icon {
  background: rgba(37,99,235,0.12) !important;
  color: #1E3A8A !important;
}
#kioskCashClosingButton:hover, #kioskCashClosingButton:active {
  background: #D5E8FF !important;
  border-color: #1D4ED8 !important;
}

/* ─── 3b. Inventur erfassen ───────────────────────────────────────────────── */
#kioskInventurButton {
  background: #FDE8E8 !important;
  border: 2px solid #C0504D !important;
  box-shadow: none !important;
  color: #7B2220 !important;
}
#kioskInventurButton .timeclock-kpi-copy > span:first-child {
  color: rgba(123,34,32,0.60) !important;
  opacity: 1 !important;
}
#kioskInventurButton .timeclock-kpi-copy > strong {
  color: #7B2220 !important;
  opacity: 1 !important;
}
#kioskInventurButton .timeclock-kpi-icon {
  background: rgba(192,80,77,0.14) !important;
  color: #C0504D !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#kioskInventurButton:hover, #kioskInventurButton:active {
  background: #FBCECE !important;
  border-color: #A03C39 !important;
}

/* ─── 4. Wareneinsatz Heute (WE-Bar-Karte) ────────────────────────────────── */
#kioskWEBarCard {
  background: #DCE6F0 !important;
  border: 2px solid #64748B !important;
  box-shadow: none !important;
}
#kioskWEBarCard .we-bar-label {
  color: #1F3D2B !important;
  opacity: 0.75 !important;
}
#kioskWEBarCard .we-bar-values {
  color: #1F3D2B !important;
}
#kioskWEBarCard .we-bar-waste {
  color: #64748B !important;
}
#kioskWEBarCard .we-bar-track {
  background: #E2E8F0 !important;
}

/* ─── 5. Arbeitszeit beginnen ─────────────────────────────────────────────── */
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled) {
  background: #D9F0CC !important;
  border: 2px solid #16A34A !important;
  box-shadow: none !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled)
  .timeclock-kpi-copy > span:first-child {
  color: rgba(21,128,61,0.70) !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled)
  .timeclock-kpi-copy > strong {
  color: #15803D !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled)
  .timeclock-kpi-icon {
  background: rgba(22,163,74,0.18) !important;
  color: #15803D !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled):hover,
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_in"]:not(.button-disabled):active {
  background: #C8E8B8 !important;
  border-color: #15803D !important;
}

/* ─── 6. Pause starten ────────────────────────────────────────────────────── */
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"] {
  background: #F1F0FF !important;
  border: 2px solid #7C6EE6 !important;
  box-shadow: none !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"]
  .timeclock-kpi-copy > span:first-child {
  color: rgba(67,56,202,0.60) !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"]
  .timeclock-kpi-copy > strong {
  color: #4338CA !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"]
  .timeclock-kpi-icon {
  background: rgba(124,110,230,0.16) !important;
  color: #4338CA !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"]:hover,
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_start"]:active {
  background: #E0DEFF !important;
  border-color: #5B4FC7 !important;
}

/* ─── 7. Pause beenden ────────────────────────────────────────────────────── */
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled) {
  background: #DCE6F0 !important;
  border: 2px solid #475569 !important;
  box-shadow: none !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled)
  .timeclock-kpi-copy > span:first-child {
  color: rgba(51,65,85,0.70) !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled)
  .timeclock-kpi-copy > strong {
  color: #334155 !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled)
  .timeclock-kpi-icon {
  background: rgba(71,85,105,0.22) !important;
  color: #334155 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled):hover,
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="break_end"]:not(.button-disabled):active {
  background: #C8D8E8 !important;
  border-color: #334155 !important;
}

/* ─── 8. Arbeitszeit beenden ──────────────────────────────────────────────── */
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"] {
  background: #FFF1F2 !important;
  border: 2px solid #EF4444 !important;
  box-shadow: none !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"]
  .timeclock-kpi-copy > span:first-child {
  color: rgba(153,27,27,0.65) !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"]
  .timeclock-kpi-copy > strong {
  color: #991B1B !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"]
  .timeclock-kpi-icon {
  background: rgba(239,68,68,0.14) !important;
  color: #991B1B !important;
}
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"]:hover,
.kiosk-actions.timeclock-action-grid
  .timeclock-action-button[data-kiosk-action="clock_out"]:active {
  background: #FFE1E3 !important;
  border-color: #DC2626 !important;
}

/* ─── Disabled: neutral grau, auf ALLEN Geräten klar als inaktiv erkennbar ── */
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled {
  background: #EAECEF !important;
  border: 2px solid #C8CDD4 !important;
  opacity: 1 !important;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled
  .timeclock-kpi-icon {
  background: rgba(0,0,0,0.07) !important;
  color: #9CA3AF !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled
  .timeclock-kpi-copy > span:first-child {
  color: rgba(107,114,128,0.75) !important;
  opacity: 1 !important;
}
.kiosk-actions.timeclock-action-grid .timeclock-action-button.button-disabled
  .timeclock-kpi-copy > strong {
  color: #9CA3AF !important;
  opacity: 1 !important;
}

/* ── Dienstplan Drag-to-fill Action Bar ──────────────────────────────────── */
.dp-drag-action-bar {
  position: fixed;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #d0d7e2;
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
  animation: dpBarIn 0.15s ease;
  width: max-content;
}
.dp-drag-action-bar.hidden { display: none; }
@keyframes dpBarIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.dp-drag-ab-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  line-height: 1.2;
  transition: background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.dp-drag-ab-fill {
  background: #0C447C;
  color: #ffffff;
  border-color: #0C447C;
}
.dp-drag-ab-fill:hover { background: #0a3669; }
.dp-drag-ab-delete {
  background: #FFF1F2;
  color: #991B1B;
  border-color: #EF4444;
}
.dp-drag-ab-delete:hover { background: #FFE1E3; }
.dp-drag-ab-cancel {
  background: transparent;
  color: #888;
  border-color: transparent;
  padding: 7px 10px;
}
.dp-drag-ab-cancel:hover { background: #f3f4f6; color: #444; }

/* ═══════════════════════════════════════════════════════════════════════════
   DIENSTPLAN POPUP – Farb-Konsistenz & Drag-to-move
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Urlaub: Popup-Button = gleiche Farbe wie Zelle (warm-orange/amber) ───── */
.status-btn-vacation {
  background: #FAEEDA !important;
  border-color: #D4A461 !important;
  color: #854F0B !important;
}
.status-btn-vacation:hover {
  background: #F5DFC4 !important;
  border-color: #C48940 !important;
}
.dp-type-btn.sel-urlaub {
  background: #F5DFC4 !important;
  border-color: #C48940 !important;
  color: #854F0B !important;
  box-shadow: 0 0 0 3px rgba(196,137,64,0.18) !important;
}

/* ── Sonstiges: Zellen-Farbe = gleiche Farbe wie Popup-Button (orange) ─────── */
.dp-cell-sonstiges {
  background: #FFF4E5 !important;
  color: #9A5A00 !important;
}

/* ── Popup draggable: Positionierung per CSS-Variablen ────────────────────── */
.dp-popup-head {
  cursor: grab !important;
  user-select: none;
}
.dp-popup-head:active {
  cursor: grabbing !important;
}
/* Schließen-Button innerhalb des Kopfs soll keinen Grab-Cursor zeigen */
.dp-popup-head .icon-button {
  cursor: default !important;
}
/* Wenn per Drag verschoben: transform aufheben, CSS-Variablen für Position nutzen */
.dp-popup.is-dragged {
  top:       var(--dp-drag-top,  50%) !important;
  left:      var(--dp-drag-left, 50%) !important;
  transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIENSTPLAN – Vollständiges Redesign (Frontoffice Design-Sprache)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tabellen-Container als helle Karte ─────────────────────────────────── */
.table-wrapper:has(#dienstplanTable),
#dienstplanTable {
  background: #FFFFFF;
}
.table-wrapper:has(#dienstplanTable) {
  border: 1px solid #E2E8F0 !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06) !important;
  overflow: hidden !important;
}

/* ─── Tabelle ─────────────────────────────────────────────────────────────── */
#dienstplanTable {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}
#dienstplanTable th,
#dienstplanTable td {
  padding: 8px 6px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  vertical-align: middle !important;
  text-align: center !important;
}
#dienstplanTable th:first-child,
#dienstplanTable td:first-child {
  text-align: left !important;
  padding-left: 14px !important;
  width: 148px !important;
}
#dienstplanTable th:last-child,
#dienstplanTable td:last-child {
  width: 80px !important;
  white-space: normal !important;
}
#dienstplanTable tbody tr:last-child td {
  border-bottom: none !important;
}

/* ─── Tabellenkopf ────────────────────────────────────────────────────────── */
#dienstplanTable thead th {
  background: #F8FAF7 !important;
  color: #5F6B63 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.01em !important;
  border-bottom: 1px solid #E2E8F0 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
#dienstplanTable thead th:first-child {
  border-top-left-radius: 18px !important;
}
#dienstplanTable thead th:last-child {
  border-top-right-radius: 18px !important;
}

/* ─── Feiertag & Heute-Spaltenfarbe ──────────────────────────────────────── */
.dp-holiday-col { background: #F8F6FF !important; }
.dp-today-col   { background: #F3FAF5 !important; }

/* ─── Alles-löschen Button ────────────────────────────────────────────────── */
.dp-day-clear {
  margin-top: 4px !important;
  padding: 2px 8px !important;
  border: 1px solid #DDE3EA !important;
  border-radius: 999px !important;
  background: #FFFFFF !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  transition: all 120ms ease !important;
}
.dp-day-clear:hover {
  border-color: #EF4444 !important;
  color: #991B1B !important;
  background: #FFF1F2 !important;
}

/* ─── Mitarbeiter-Spalte ──────────────────────────────────────────────────── */
.dp-employee-cell { white-space: normal !important; }
.dp-employee-name-btn {
  color: #17231B !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
.dp-employee-name-btn:hover {
  color: #184A2C !important;
  text-decoration: underline !important;
}

/* ─── Leere Zellen ────────────────────────────────────────────────────────── */
.dp-cell-empty {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 14px !important;
  border: 2px dashed #CBD5E1 !important;
  background: #FFFFFF !important;
  cursor: pointer !important;
  font-size: 16px !important;
  color: #CBD5E1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 140ms ease !important;
}
.dp-cell-empty:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
  color: #64748B !important;
  transform: translateY(-1px) !important;
}

/* ─── Gefüllte Zellen: Basis ──────────────────────────────────────────────── */
.dp-cell-btn {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 14px !important;
  border: 2px solid transparent !important;
  cursor: pointer !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 6px !important;
  transition: all 140ms ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.25 !important;
}
.dp-cell-btn:hover {
  opacity: 1 !important;
  transform: translateY(-1px) !important;
  filter: brightness(0.97) !important;
}

/* ─── Statusfarben Zellen ─────────────────────────────────────────────────── */
.dp-cell-schicht {
  background: #EAF3FF !important;
  border-color: #2563EB !important;
  color: #1E3A8A !important;
}
.dp-cell-urlaub {
  background: #EAF7EF !important;
  border-color: #22A06B !important;
  color: #14532D !important;
}
.dp-cell-krank {
  background: #FFF1F2 !important;
  border-color: #EF4444 !important;
  color: #991B1B !important;
}
.dp-cell-feiertag {
  background: #F1F0FF !important;
  border-color: #7C6EE6 !important;
  color: #4338CA !important;
}
.dp-cell-frei {
  background: #EEF3F8 !important;
  border-color: #94A3B8 !important;
  color: #475569 !important;
}
.dp-cell-sonstiges {
  background: #FFF3E0 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
}

/* ─── Wochen-Spalte ───────────────────────────────────────────────────────── */
.dp-week-total {
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  min-width: 68px !important;
}
.dp-week-total .dp-ist  { color: #2F6B1F !important; }
.dp-week-total .dp-soll { color: #B91C1C !important; }
.dp-week-total .dp-soll-separator { color: #94A3B8 !important; padding: 0 1px !important; }

/* ─── Besetzt-Fußzeile ────────────────────────────────────────────────────── */
#dienstplanFoot tr td {
  background: #FAFBF8 !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-bottom: none !important;
  border-top: 1px solid #E2E8F0 !important;
  padding: 8px 6px !important;
}

/* ─── Legende ─────────────────────────────────────────────────────────────── */
.dienstplan-legend {
  padding: 10px 0 14px !important;
  font-size: 12px !important;
  color: #5F6B63 !important;
  gap: 12px !important;
}
.dp-legend-dot {
  width: 12px !important;
  height: 12px !important;
  border-radius: 4px !important;
  border-width: 1.5px !important;
  border-style: solid !important;
}

/* ─── Drag-Highlight ──────────────────────────────────────────────────────── */
.dp-cell-btn.dp-drag-source {
  outline: 3px solid #2563EB !important;
  outline-offset: -2px !important;
  opacity: 0.85 !important;
}
.dp-cell-btn.dp-drag-target,
.dp-cell-empty.dp-drag-target {
  outline: 3px dashed #2563EB !important;
  outline-offset: -2px !important;
  background: #DBEAFE !important;
  color: #1E3A8A !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIENSTPLAN MODAL – Redesign
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Overlay ─────────────────────────────────────────────────────────────── */
.dp-popup-overlay {
  background: rgba(15,23,42,0.45) !important;
}

/* ─── Modal-Karte ─────────────────────────────────────────────────────────── */
.dp-popup {
  background: #FFFFFF !important;
  border-radius: 24px !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 18px 50px rgba(15,23,42,0.14) !important;
  padding: 24px 22px 20px !important;
  width: 400px !important;
}

/* ─── Modal Titel-Zeile ───────────────────────────────────────────────────── */
.dp-popup-head {
  margin-bottom: 18px !important;
  gap: 10px !important;
  cursor: grab !important;
}
.dp-popup-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #184A2C !important;
  line-height: 1.35 !important;
}

/* ─── Schließen-Button ────────────────────────────────────────────────────── */
.dp-popup .icon-button,
#dpPopupClose {
  background: #F1F5F9 !important;
  color: #111827 !important;
  border: none !important;
  border-radius: 12px !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: background 120ms ease !important;
}
.dp-popup .icon-button:hover,
#dpPopupClose:hover {
  background: #E2E8F0 !important;
}

/* ─── Status-Typ-Buttons im Modal ─────────────────────────────────────────── */
.dp-type-grid {
  gap: 8px !important;
  margin-bottom: 16px !important;
}
.dp-type-btn {
  border-radius: 16px !important;
  border-width: 2px !important;
  border-style: solid !important;
  min-height: 48px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  transition: all 140ms ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}
.dp-type-btn:hover { transform: translateY(-1px) !important; }

/* Schicht */
.status-btn-shift {
  background: #EAF3FF !important;
  border-color: #2563EB !important;
  color: #1E3A8A !important;
}
.status-btn-shift:hover { background: #D5E8FF !important; }
.dp-type-btn.sel-schicht {
  background: #D5E8FF !important;
  border-color: #2563EB !important;
  color: #1E3A8A !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14) !important;
}

/* Urlaub */
.status-btn-vacation {
  background: #EAF7EF !important;
  border-color: #22A06B !important;
  color: #14532D !important;
}
.status-btn-vacation:hover { background: #D3F0E0 !important; }
.dp-type-btn.sel-urlaub {
  background: #D3F0E0 !important;
  border-color: #22A06B !important;
  color: #14532D !important;
  box-shadow: 0 0 0 3px rgba(34,160,107,0.14) !important;
}

/* Krank */
.status-btn-sick {
  background: #FFF1F2 !important;
  border-color: #EF4444 !important;
  color: #991B1B !important;
}
.status-btn-sick:hover { background: #FFE1E3 !important; }
.dp-type-btn.sel-krank {
  background: #FFE1E3 !important;
  border-color: #EF4444 !important;
  color: #991B1B !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.14) !important;
}

/* Feiertag */
.status-btn-holiday {
  background: #F1F0FF !important;
  border-color: #7C6EE6 !important;
  color: #4338CA !important;
}
.status-btn-holiday:hover { background: #E0DEFF !important; }
.dp-type-btn.sel-feiertag {
  background: #E0DEFF !important;
  border-color: #7C6EE6 !important;
  color: #4338CA !important;
  box-shadow: 0 0 0 3px rgba(124,110,230,0.14) !important;
}

/* Frei */
.status-btn-free {
  background: #EEF3F8 !important;
  border-color: #94A3B8 !important;
  color: #475569 !important;
}
.status-btn-free:hover { background: #DCE6F0 !important; }
.dp-type-btn.sel-frei {
  background: #DCE6F0 !important;
  border-color: #94A3B8 !important;
  color: #475569 !important;
  box-shadow: 0 0 0 3px rgba(148,163,184,0.18) !important;
}

/* Sonstiges */
.status-btn-other {
  background: #FFF3E0 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
}
.status-btn-other:hover { background: #FFE9C2 !important; }
.dp-type-btn.sel-sonstiges {
  background: #FFE9C2 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.16) !important;
}

/* ─── Schichtzeiten-Vorlagen ──────────────────────────────────────────────── */
.dp-preset-row {
  gap: 8px !important;
  margin-bottom: 14px !important;
}
.dp-preset-btn {
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px 6px !important;
  border: 1.5px solid #DDE3EA !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  white-space: nowrap !important;
  transition: all 120ms ease !important;
}
.dp-preset-btn:hover {
  background: #F3F8FF !important;
  border-color: #93C5FD !important;
  color: #1E3A8A !important;
}
.dp-preset-btn.active,
.dp-preset-btn[data-active="true"] {
  background: #EAF3FF !important;
  border: 2px solid #2563EB !important;
  color: #1E3A8A !important;
}

/* ─── Abschnitt "Schichtzeiten" Label ────────────────────────────────────── */
#dpSchichtSection > *:first-child::before {
  content: "";
}

/* ─── Von/Bis Eingabefelder ───────────────────────────────────────────────── */
.dp-time-row {
  gap: 12px !important;
  margin-bottom: 10px !important;
  align-items: center !important;
}
.dp-time-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #5F6B63 !important;
  width: 36px !important;
}
.dp-time-input {
  flex: 1 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 14px !important;
  border: 1.5px solid #DDE3EA !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  transition: border-color 140ms ease, box-shadow 140ms ease !important;
  min-height: 44px !important;
}
.dp-time-input:focus {
  outline: none !important;
  border-color: #184A2C !important;
  box-shadow: 0 0 0 3px rgba(24,74,44,0.12) !important;
}
/* Notiz-Textarea */
#dpNote {
  padding: 10px 14px !important;
  border: 1.5px solid #DDE3EA !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  font-size: 13px !important;
  resize: vertical !important;
  min-height: 72px !important;
  transition: border-color 140ms ease, box-shadow 140ms ease !important;
}
#dpNote::placeholder { color: #94A3B8 !important; }
#dpNote:focus {
  outline: none !important;
  border-color: #184A2C !important;
  box-shadow: 0 0 0 3px rgba(24,74,44,0.12) !important;
}

/* ─── IST/Soll-Display ────────────────────────────────────────────────────── */
.dp-soll-display {
  background: #F8FAF7 !important;
  border-radius: 14px !important;
  border: none !important;
  padding: 12px 16px !important;
  margin-bottom: 14px !important;
  font-size: 13px !important;
  color: #5F6B63 !important;
}
#dpSollDisplay {
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* ─── Speichern-Button im Modal ───────────────────────────────────────────── */
.dp-popup-actions {
  gap: 10px !important;
  margin-top: 4px !important;
}
.dp-popup-actions .primary-button,
#dpSaveBtn {
  flex: 1 !important;
  background: #184A2C !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 16px !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  padding: 14px !important;
  min-height: 52px !important;
  transition: background 140ms ease, transform 140ms ease !important;
  cursor: pointer !important;
}
.dp-popup-actions .primary-button:hover,
#dpSaveBtn:hover {
  background: #123822 !important;
  transform: translateY(-1px) !important;
}
#dpDeleteBtn {
  background: #FFF1F2 !important;
  color: #991B1B !important;
  border: 1.5px solid #EF4444 !important;
  border-radius: 16px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 12px 16px !important;
  cursor: pointer !important;
  transition: background 120ms ease !important;
}
#dpDeleteBtn:hover {
  background: #FFE1E3 !important;
}

/* ─── Banner im Modal ─────────────────────────────────────────────────────── */
.dp-banner-warn {
  background: #FFF3E0 !important;
  color: #92400E !important;
  border: 1px solid #F59E0B !important;
  border-radius: 12px !important;
}
.dp-banner-ok {
  background: #EAF7EF !important;
  color: #14532D !important;
  border: 1px solid #22A06B !important;
  border-radius: 12px !important;
}
.dp-banner-err {
  background: #FFF1F2 !important;
  color: #991B1B !important;
  border: 1px solid #EF4444 !important;
  border-radius: 12px !important;
}

/* ─── Feiertag-Badge in Zellen ────────────────────────────────────────────── */
.dp-feiertag-badge {
  background: #F1F0FF !important;
  color: #4338CA !important;
  border-radius: 6px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 2px 5px !important;
}

/* ─── "Schichtzeiten" Section-Label ──────────────────────────────────────── */
.dp-schicht-section-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #94A3B8 !important;
  margin-bottom: 8px !important;
}

/* ── Dienstplan: "Alles löschen" Mitarbeiter-Spalte – gleiche Höhe ────────── */
#dienstplanTable thead th {
  vertical-align: bottom !important;
  padding-bottom: 8px !important;
}
#dienstplanTable thead th:first-child {
  vertical-align: bottom !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIENSTPLAN REDESIGN v3  –  Reference App Style  2026-05-03
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── App shell background ─────────────────────────────────────────────────── */
.admin-shell { background: #F8FAF7 !important; }
.main-content { background: #F8FAF7 !important; }

/* ── Topbar: clean white ──────────────────────────────────────────────────── */
.topbar {
  background: rgba(255,255,255,0.97) !important;
  border-bottom: 1px solid #E2E8F0 !important;
}
.topbar h1 { font-size: 19px !important; font-weight: 800 !important; color: #17231B !important; }
.topbar-logout,
.topbar-meta .ghost-button.topbar-logout {
  height: 40px !important;
  padding: 0 16px !important;
  border: 1.5px solid #DDE3EA !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  color: #17231B !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.topbar-logout:hover { background: #F8FAF7 !important; }

/* ── Sidebar: deeper immergrün gradient + wider ───────────────────────────── */
.sidebar {
  background: linear-gradient(180deg,#0B2F1F 0%,#123F2A 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
  width: 272px !important;
}
.app-shell { grid-template-columns: 272px minmax(0,1fr) !important; }
.sidebar-nav-link.active {
  background: rgba(156,203,59,0.14) !important;
  border-color: rgba(156,203,59,0.35) !important;
  color: #9CCB3B !important;
  box-shadow: none !important;
}
.sidebar-nav-link.active .nav-icon svg { stroke: #9CCB3B !important; }

/* ── Dienstplan panel card ────────────────────────────────────────────────── */
#dienstplan.content-section { gap: 0 !important; }
#dienstplan.content-section > .panel-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 28px rgba(15,23,42,0.07) !important;
  padding: 24px 22px 20px !important;
  gap: 0 !important;
}

/* ── KW Navigation ────────────────────────────────────────────────────────── */
#dienstplan .panel-title-row { align-items: center !important; margin-bottom: 0 !important; }
#dienstplan .kw-navigation   { align-items: center !important; gap: 10px !important; }

#prevWeekBtn, #nextWeekBtn {
  width: 44px !important; height: 44px !important; min-width: 44px !important;
  border-radius: 12px !important;
  border: 1.5px solid #DDE3EA !important;
  background: #FFFFFF !important;
  color: #17231B !important;
  font-size: 21px !important; font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  padding: 0 !important; cursor: pointer !important;
  transition: all 120ms ease !important;
}
#prevWeekBtn:hover, #nextWeekBtn:hover {
  background: #F8FAF7 !important; border-color: #94A3B8 !important;
}

#currentWeekLabel {
  display: flex !important; flex-direction: column !important;
  gap: 3px !important; min-width: auto !important; text-align: left !important;
  font-size: inherit !important; font-weight: inherit !important;
}
.dp-kw-num {
  font-size: 22px !important; font-weight: 800 !important;
  color: #17231B !important; line-height: 1.1 !important;
  letter-spacing: -0.01em !important;
}
.dp-kw-range {
  font-size: 13px !important; font-weight: 500 !important;
  color: #64748B !important; line-height: 1.2 !important;
  display: flex !important; align-items: center !important; gap: 5px !important;
}
.dp-kw-icon { font-size: 12px !important; opacity: 0.75 !important; }

/* ── Toolbar action buttons ───────────────────────────────────────────────── */
#copyPrevWeekBtn, #exportPdfBtn, #publishPlanBtn, #notifyStaffBtn {
  height: 44px !important; padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1.5px solid #DDE3EA !important;
  background: #FFFFFF !important;
  color: #184A2C !important; font-weight: 800 !important; font-size: 13px !important;
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  cursor: pointer !important; transition: all 120ms ease !important;
  white-space: nowrap !important;
}
#copyPrevWeekBtn:hover, #exportPdfBtn:hover, #publishPlanBtn:hover, #notifyStaffBtn:hover {
  background: #F8FAF7 !important; border-color: #94A3B8 !important;
}

/* ── Legend chips ─────────────────────────────────────────────────────────── */
.dienstplan-legend {
  display: flex !important; flex-wrap: wrap !important;
  gap: 8px !important; padding: 14px 0 16px !important;
}
.dp-legend-chip {
  display: inline-flex !important; align-items: center !important;
  height: 28px !important; padding: 0 11px !important;
  border-radius: 8px !important;
  font-size: 12px !important; font-weight: 700 !important;
  border-width: 1.5px !important; border-style: solid !important;
  white-space: nowrap !important;
}
.dp-legend-chip--schicht   { background:#EEF6F0 !important; border-color:#6FA36F !important; color:#184A2C !important; }
.dp-legend-chip--urlaub    { background:#F3F7E8 !important; border-color:#9BBE45 !important; color:#3F5F16 !important; }
.dp-legend-chip--krank     { background:#FBECEC !important; border-color:#D36B6B !important; color:#8A1F1F !important; }
.dp-legend-chip--feiertag  { background:#F3F0FA !important; border-color:#9A8BC2 !important; color:#4B3F72 !important; }
.dp-legend-chip--frei      { background:#F1F4F2 !important; border-color:#A7B1AA !important; color:#4F5B54 !important; }
.dp-legend-chip--sonstiges { background:#F8F1E6 !important; border-color:#C99A52 !important; color:#7A4A13 !important; }

/* ── Table wrapper ────────────────────────────────────────────────────────── */
#dienstplan .table-wrapper {
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  overflow: hidden !important; overflow-x: auto !important;
  margin-top: 0 !important;
}

/* ── Table base ───────────────────────────────────────────────────────────── */
#dienstplanTable {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}

/* ── Table header row ─────────────────────────────────────────────────────── */
#dienstplanTable thead th {
  background: #F8FAF7 !important;
  color: #184A2C !important; font-weight: 800 !important; font-size: 14px !important;
  padding: 10px 8px 12px !important;
  border-bottom: 1.5px solid #E2E8F0 !important;
  border-right: 1px solid #EEF2F7 !important;
  text-align: center !important; vertical-align: top !important;
  overflow: visible !important;
}
#dienstplanTable thead th:first-child {
  text-align: left !important; padding-left: 16px !important; width: 215px !important;
}
#dienstplanTable thead th:last-child {
  border-right: none !important; width: 152px !important;
  text-align: left !important; padding-left: 12px !important;
}
#dienstplanTable thead th small {
  display: block !important; font-size: 12px !important;
  font-weight: 500 !important; color: #64748B !important; margin-top: 2px !important;
}

/* ── Badge-Slot: FESTER Wrapper – gleiche Höhe in JEDER Spalte ─────────────── */
/* Der Slot ist immer 46px hoch. Badge-Inhalt zentriert darin.                  */
/* Leere Slots (Platzhalter) sind unsichtbar aber gleich hoch.                  */
.dp-badge-slot {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 46px !important;      /* fest – deckt 2-zeiligen Badge ab */
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

/* Badge selbst: natürliche Höhe, kein festes height */
#dienstplanTable thead th .dp-feiertag-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  min-height: unset !important;
  width: auto !important;
  margin-top: 0 !important;
}

/* Wochentag-Name kommt direkt nach dem Badge-Slot */
#dienstplanTable thead th .dp-th-dayname {
  display: block !important;
  font-size: 14px !important; font-weight: 800 !important;
  color: #184A2C !important; margin-top: 2px !important; line-height: 1.2 !important;
}

/* ── Table body rows ──────────────────────────────────────────────────────── */
#dienstplanTable tbody tr { height: 72px !important; }
#dienstplanTable tbody td {
  padding: 7px 7px !important;
  border-bottom: 1px solid #EEF2F7 !important;
  border-right: 1px solid #F1F5F9 !important;
  vertical-align: middle !important; text-align: center !important;
}
#dienstplanTable tbody td:first-child {
  text-align: left !important; padding-left: 12px !important; padding-right: 8px !important;
}
#dienstplanTable tbody td:last-child { border-right: none !important; }
#dienstplanTable tbody tr:last-child td { border-bottom: none !important; }

/* ── Column tints ─────────────────────────────────────────────────────────── */
.dp-holiday-col { background: #F5F3FF !important; }
.dp-today-col   { background: #F2FAF4 !important; }

/* ── Feiertag badge in table header (full name) ───────────────────────────── */
.dp-feiertag-badge {
  display: inline-flex !important; align-items: center !important;
  padding: 3px 9px !important; border-radius: 999px !important;
  background: #F3F0FA !important;
  border: 1.5px solid #9A8BC2 !important; color: #4B3F72 !important;
  font-size: 10px !important; font-weight: 800 !important;
  white-space: normal !important; text-align: center !important;
  line-height: 1.3 !important; max-width: 100% !important;
  overflow: visible !important; margin-top: 4px !important;
}

/* ── Employee cell: round avatar + info block ─────────────────────────────── */
.dp-employee-cell {
  white-space: normal !important;
  display: flex !important; align-items: center !important; gap: 10px !important;
}
.dp-emp-avatar {
  width: 38px !important; height: 38px !important; min-width: 38px !important;
  border-radius: 999px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-weight: 900 !important; font-size: 13px !important;
  border-width: 1.5px !important; border-style: solid !important;
}
.dp-emp-info {
  display: flex !important; flex-direction: column !important;
  gap: 1px !important; min-width: 0 !important;
}
.dp-emp-number {
  font-size: 11px !important; color: #64748B !important;
  font-weight: 600 !important; line-height: 1.2 !important;
}
.dp-employee-name-btn {
  font-size: 13px !important; font-weight: 800 !important;
  color: #17231B !important; line-height: 1.3 !important;
  border: 0 !important; background: transparent !important;
  cursor: pointer !important; padding: 0 !important; text-align: left !important;
  white-space: normal !important;
}
.dp-employee-name-btn:hover { color: #184A2C !important; text-decoration: underline !important; }

/* ── Status chips ─────────────────────────────────────────────────────────── */
.dp-cell-btn {
  width: 100% !important; min-height: 36px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  font-size: 12px !important; font-weight: 800 !important;
  padding: 4px 8px !important;
  display: flex !important; align-items: center !important;
  justify-content: center !important; text-align: center !important;
  line-height: 1.2 !important;
  transition: all 140ms ease !important;
  border-width: 1.5px !important; border-style: solid !important;
}
.dp-cell-btn:hover { transform: translateY(-1px) !important; filter: brightness(0.96) !important; opacity: 1 !important; }

.dp-cell-schicht   { background:#EEF6F0 !important; border-color:#6FA36F !important; color:#184A2C !important; }
.dp-cell-urlaub    { background:#F3F7E8 !important; border-color:#9BBE45 !important; color:#3F5F16 !important; }
.dp-cell-krank     { background:#FBECEC !important; border-color:#D36B6B !important; color:#8A1F1F !important; }
.dp-cell-feiertag  { background:#F3F0FA !important; border-color:#9A8BC2 !important; color:#4B3F72 !important; }
.dp-cell-frei      { background:#F1F4F2 !important; border-color:#A7B1AA !important; color:#4F5B54 !important; }
.dp-cell-sonstiges { background:#F8F1E6 !important; border-color:#C99A52 !important; color:#7A4A13 !important; }

/* ── Empty cells ──────────────────────────────────────────────────────────── */
.dp-cell-empty {
  width: 100% !important; min-height: 36px !important;
  border-radius: 12px !important;
  border: 2px dashed #CBD5E1 !important; background: #FFFFFF !important;
  cursor: pointer !important; font-size: 20px !important; color: #CBD5E1 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  transition: all 140ms ease !important;
}
.dp-cell-empty:hover { background:#F8FAF7 !important; border-color:#94A3B8 !important; color:#64748B !important; transform:translateY(-1px) !important; }

/* ── Week total: grid layout Ist / Soll / Saldo ───────────────────────────── */
.dp-week-total { vertical-align: middle !important; }
.dp-week-grid {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  row-gap: 3px !important; column-gap: 10px !important;
  align-items: center !important;
}
.dp-week-label {
  font-size: 11px !important; color: #64748B !important;
  font-weight: 700 !important; text-align: left !important; white-space: nowrap !important;
}
.dp-week-val {
  font-size: 12.5px !important; font-weight: 900 !important;
  text-align: right !important; white-space: nowrap !important;
}
.dp-week-total .dp-ist   { color: #2F6B1F !important; }
.dp-week-total .dp-soll-v { color: #64748B !important; }
.dp-saldo-pos { color: #2F6B1F !important; }
.dp-saldo-neg { color: #B91C1C !important; }
/* backward compat */
.dp-week-total .dp-soll { color: #64748B !important; }
.dp-week-total .dp-soll-separator { display: none !important; }

/* ── Alles löschen buttons ────────────────────────────────────────────────── */
.dp-day-clear {
  margin-top: 6px !important; padding: 3px 10px !important;
  border: 1.5px solid #DDE3EA !important; border-radius: 999px !important;
  background: #FFFFFF !important; color: #94A3B8 !important;
  cursor: pointer !important; font-size: 10px !important; font-weight: 700 !important;
  transition: all 120ms ease !important; display: inline-block !important;
}
.dp-day-clear:hover { border-color:#D36B6B !important; color:#8A1F1F !important; background:#FBECEC !important; }

/* ── Footer row ───────────────────────────────────────────────────────────── */
#dienstplanFoot tr td {
  background: #F8FAF7 !important; color: #64748B !important;
  font-size: 12px !important; font-weight: 600 !important;
  border-bottom: none !important; border-top: 1.5px solid #E2E8F0 !important;
  padding: 10px 8px !important;
}

/* ── Drag highlight (new palette) ─────────────────────────────────────────── */
.dp-cell-btn.dp-drag-source { outline: 3px solid #6FA36F !important; outline-offset: -2px !important; opacity: 0.85 !important; }
.dp-cell-btn.dp-drag-target,
.dp-cell-empty.dp-drag-target { outline: 3px dashed #6FA36F !important; outline-offset: -2px !important; background: #EEF6F0 !important; color: #184A2C !important; }

/* ── Popup type buttons: new palette ──────────────────────────────────────── */
.dp-type-btn.sel-schicht   { background:#EEF6F0 !important; border:2px solid #6FA36F !important; color:#184A2C !important; }
.dp-type-btn.sel-urlaub    { background:#F3F7E8 !important; border:2px solid #9BBE45 !important; color:#3F5F16 !important; }
.dp-type-btn.sel-krank     { background:#FBECEC !important; border:2px solid #D36B6B !important; color:#8A1F1F !important; }
.dp-type-btn.sel-feiertag  { background:#F3F0FA !important; border:2px solid #9A8BC2 !important; color:#4B3F72 !important; }
.dp-type-btn.sel-frei      { background:#F1F4F2 !important; border:2px solid #A7B1AA !important; color:#4F5B54 !important; }
.dp-type-btn.sel-sonstiges { background:#F8F1E6 !important; border:2px solid #C99A52 !important; color:#7A4A13 !important; }

/* ── Drag action bar ──────────────────────────────────────────────────────── */
.dp-drag-ab-fill { background: #184A2C !important; }
.dp-drag-ab-fill:hover { background: #0F3D26 !important; }

/* ── KW label: only KW number between arrows (date on its own row) ─────────── */
#currentWeekLabel {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
}

/* ── Date range row: sits below the panel-title-row ──────────────────────── */
.dp-date-range-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #64748B !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.4 !important;
}
.dp-date-range-row .dp-kw-icon {
  font-size: 14px !important;
  opacity: 0.8 !important;
}

/* ── Woche column header subtitle ─────────────────────────────────────────── */
.dp-woche-sub {
  display: block !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  color: #94A3B8 !important;
  margin-top: 3px !important;
  letter-spacing: 0.01em !important;
}

/* ── Legend chip icon SVG alignment ───────────────────────────────────────── */
.dp-legend-chip svg {
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 4px !important;
  flex-shrink: 0 !important;
}

/* ── Toolbar button SVG icon alignment ────────────────────────────────────── */
#copyPrevWeekBtn svg, #exportPdfBtn svg, #publishPlanBtn svg, #notifyStaffBtn svg {
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   AvT – Actual vs. Theoretical Report
   ══════════════════════════════════════════════════════════════════════════════ */

/* KPI-Karten Reihe */
.avt-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}
.avt-kpi-card {
  background: #F8FAF7;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.avt-kpi-card.avt-kpi-disabled { opacity: 0.45; }
.avt-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.avt-kpi-val {
  font-size: 22px;
  font-weight: 900;
  color: #17231B;
  line-height: 1.15;
}
.avt-kpi-sub {
  font-size: 11.5px;
  color: #94A3B8;
  font-weight: 500;
}

/* Ampel-Farben */
.avt-kpi-card.avt-ok    { border-color: #6FA36F; background: #EEF6F0; }
.avt-kpi-card.avt-warn  { border-color: #D4A017; background: #FFFBEB; }
.avt-kpi-card.avt-danger{ border-color: #D36B6B; background: #FBECEC; }
.avt-ok    .avt-kpi-val { color: #184A2C; }
.avt-warn  .avt-kpi-val { color: #78460A; }
.avt-danger .avt-kpi-val{ color: #8A1F1F; }

/* Formel-Aufschlüsselung */
.avt-formula {
  background: #F8FAF7;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 8px 0 4px;
}
.avt-formula-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin-bottom: 14px;
}
.avt-formula-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.avt-formula-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 130px;
}
.avt-formula-step.avt-formula-result {
  border-color: #6FA36F;
  background: #EEF6F0;
}
.avt-formula-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.avt-formula-val {
  font-size: 17px;
  font-weight: 900;
  color: #17231B;
}
.avt-formula-result .avt-formula-val { color: #184A2C; }
.avt-formula-meta {
  font-size: 10px;
  color: #94A3B8;
}
.avt-formula-op {
  font-size: 22px;
  font-weight: 700;
  color: #94A3B8;
  padding: 0 2px;
}

/* Benchmark-Zeile */
.avt-benchmark {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748B;
}
.avt-bm-result { font-weight: 800; }
.avt-bm-result.avt-ok     { color: #184A2C; }
.avt-bm-result.avt-warn   { color: #78460A; }
.avt-bm-result.avt-danger { color: #8A1F1F; }

/* Kein-Daten Hinweis */
.avt-nodata-hint {
  background: #FFFBEB;
  border: 1.5px solid #D4A017;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #78460A;
  margin: 10px 0 4px;
  line-height: 1.6;
}

/* ═══════════════════════════════ WARENEINGÄNGE ════════════════════════════ */

/* Drop Zone */
.we-drop-zone {
  border: 2px dashed #94A3B8;
  border-radius: 12px;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: #64748B;
  text-align: center;
  margin-bottom: 12px;
}
.we-drop-zone:hover,
.we-drop-zone--over {
  border-color: hsl(152, 55%, 28%);
  background: #F0F7F2;
  color: hsl(152, 55%, 28%);
}
.we-drop-zone p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.we-drop-hint {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #94A3B8 !important;
}

/* Preview */
.we-doc-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}
.we-pdf-preview {
  width: 100%;
  height: 480px;
  border: none;
  display: block;
}
.we-img-preview {
  max-width: 100%;
  max-height: 400px;
  display: block;
  margin: 0 auto;
}

/* Upload status */
.we-upload-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #F1F5F9;
  color: #334155;
}

/* Form meta row */
.we-form-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.we-meta-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  flex: 1;
  min-width: 160px;
}
.we-meta-input {
  padding: 7px 10px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1E293B;
}
.we-meta-input:focus {
  outline: none;
  border-color: hsl(152, 55%, 28%);
  box-shadow: 0 0 0 2px rgba(31,93,46,0.12);
}

/* Line item table inputs */
.we-ing-sel,
.we-unit-sel {
  width: 100%;
  min-width: 120px;
  padding: 5px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}
.we-num-inp {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  text-align: right;
}
.we-num-inp:focus,
.we-ing-sel:focus,
.we-unit-sel:focus {
  outline: none;
  border-color: hsl(152, 55%, 28%);
}
.we-remove-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.we-remove-btn:hover { color: #DC2626; background: #FEF2F2; }

/* History doc link */
.we-doc-link {
  font-size: 15px;
  text-decoration: none;
}
.we-doc-link:hover { opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUKT EDIT DRAWER
   Overlay + right-side panel. Relies on position:fixed being viewport-relative
   (ensured by overflow-x:hidden on html, not body).
   ═══════════════════════════════════════════════════════════════════════════ */

.produkt-edit-overlay {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background: rgba(15, 23, 42, 0.45) !important;
  z-index: 2000 !important;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.produkt-edit-overlay.hidden {
  display: none !important;
}

.produkt-edit-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 460px !important;
  max-width: 96vw !important;
  height: 100vh !important;
  background: #ffffff !important;
  z-index: 2001 !important;
  box-shadow: -6px 0 40px rgba(0, 0, 0, 0.22) !important;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.produkt-edit-drawer.open {
  transform: translateX(0) !important;
}

/* Header bar */
.produkt-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1.5px solid #E2E8F0;
  background: linear-gradient(135deg, #f0f7f2 0%, #e8f4ec 100%);
  flex-shrink: 0;
}
.produkt-edit-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #0F172A;
  letter-spacing: -0.01em;
}
.produkt-edit-close {
  background: none;
  border: 1px solid #CBD5E1;
  font-size: 16px;
  cursor: pointer;
  color: #64748B;
  padding: 5px 10px;
  border-radius: 8px;
  line-height: 1;
  transition: all 0.15s;
}
.produkt-edit-close:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #DC2626;
}

/* Scrollable form body */
.produkt-edit-form {
  flex: 1;
  overflow-y: auto;
  padding: 22px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  -webkit-overflow-scrolling: touch;
}

/* Field labels */
.pe-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pe-label--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-transform: none;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}
.pe-label--inline input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer; flex-shrink: 0;
  accent-color: hsl(152, 55%, 28%);
}

/* Input fields */
.pe-input {
  padding: 10px 13px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #F8FAFC;
  color: #1E293B;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.pe-input:hover { border-color: #94A3B8; background: #fff; }
.pe-input:focus {
  outline: none;
  border-color: hsl(152, 55%, 28%);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 93, 46, 0.12);
}

/* Section divider inside form */
.pe-divider {
  border: none;
  border-top: 1px solid #E2E8F0;
  margin: 2px 0;
}

/* Status message */
.pe-status {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #F1F5F9;
  color: #334155;
  line-height: 1.5;
}

/* Action buttons row */
.pe-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  flex-shrink: 0;
}
.pe-actions .primary-button  { flex: 1; }
.pe-actions .secondary-button { flex: 0 0 auto; }

/* Edit button in table row */
.btn-produkt-edit {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #475569;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-produkt-edit:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

/* ═══ INLINE LIEFERANT-ZUWEISUNG (Zutaten-Tabelle) ════════════════════════ */
.ing-supplier-cell {
  cursor: pointer;
  padding: 6px 10px !important;
  position: relative;
}
.ing-supplier-cell:hover .ing-supplier-val {
  color: hsl(152, 55%, 28%);
  text-decoration: underline dotted;
}
.ing-supplier-val {
  font-size: 13px;
  color: #334155;
  transition: color 0.15s;
}
.ing-supplier-empty {
  color: #94A3B8;
  font-style: italic;
  font-size: 12px;
}
.ing-supplier-select {
  width: 100%;
  min-width: 140px;
  padding: 5px 8px;
  border: 1.5px solid hsl(152, 55%, 28%);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(31,93,46,0.15);
  outline: none;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   POS-VERKÄUFE IMPORT
   ══════════════════════════════════════════════════════════════ */

.sales-mode-tabs { margin-bottom: 16px; }
.sales-mode-panel { }

.sales-import-hint {
  font-size: .88rem; color: #64748b; margin-bottom: 16px; line-height: 1.5;
}

/* Drop Zone */
.sales-drop-zone {
  border: 2px dashed #cbd5e1; border-radius: 14px;
  padding: 32px 24px; text-align: center; cursor: pointer;
  background: #f8fafc; transition: all .15s; margin-bottom: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #64748b;
}
.sales-drop-zone:hover, .sales-drop-zone.drop-active {
  border-color: var(--green); background: #f0fdf4; color: var(--green);
}
.sales-drop-zone svg { opacity: .5; }
.sales-drop-hint { font-size: .8rem; color: #94a3b8; }

/* Datum-Zeile nach Datei-Auswahl */
.sales-file-date-row {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.sales-file-date-row label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }

/* Column Mapper */
.sales-column-mapper { background: #f8fafc; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.sales-mapper-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin-bottom: 12px; }
.sales-mapper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sales-mapper-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; }

/* Preview */
.sales-preview-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 12px; }
.sales-preview-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap;
}
.sales-preview-ok      { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.sales-preview-unknown { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }

/* API Tab */
.sales-api-section { margin-bottom: 20px; }
.sales-api-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #64748b; margin-bottom: 8px;
}
.sales-api-code-row, .sales-api-key-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.sales-api-code {
  background: #1e293b; color: #e2e8f0; font-family: 'Courier New', monospace;
  font-size: .82rem; padding: 8px 14px; border-radius: 8px; flex: 1;
  word-break: break-all; min-width: 0;
}
.sales-api-key-code { letter-spacing: .05em; }
.sales-api-pre {
  background: #1e293b; color: #e2e8f0; font-family: 'Courier New', monospace;
  font-size: .78rem; padding: 14px 16px; border-radius: 10px;
  white-space: pre-wrap; word-break: break-all; margin: 0; line-height: 1.6;
}
.sales-api-warn { font-size: .8rem; color: #d97706; margin-top: 6px; }
.sales-danger-btn { color: #dc2626; border-color: #fca5a5; }
.sales-danger-btn:hover { background: #fff1f2; }

/* System-Karten */
.sales-system-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.sales-system-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border: 1.5px solid #e2e8f0; border-radius: 12px;
  background: #fafbfc;
}
.sales-system-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: #2d6a2d; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; flex-shrink: 0;
}
.sales-system-info { flex: 1; min-width: 120px; }
.sales-system-info strong { display: block; font-size: .9rem; }
.sales-system-info span { font-size: .78rem; color: #64748b; }
.sales-system-status { }
.sales-system-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; white-space: nowrap;
}
.sales-system-badge-ok      { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.sales-system-badge-pending { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.sales-system-badge-future  { background: #eff6ff; color: #2563eb; border: 1px solid #93c5fd; }

/* Setup-Info */
.sales-setup-info {
  background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px; font-size: .88rem; line-height: 1.6;
}
.sales-setup-info ol { margin: 8px 0 0 16px; padding: 0; }
.sales-setup-info li { margin-bottom: 4px; }
.sales-setup-info a { color: var(--green); }

/* ══════════════════════════════════════════════════════════════
   PAR LEVELS / MINDESTBESTÄNDE
   ══════════════════════════════════════════════════════════════ */

/* KPI-Zeile */
.pl-kpi-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}
.pl-kpi-card {
  flex: 1 1 140px; min-width: 120px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 14px 18px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
  min-height: 88px;
}
.pl-kpi-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; line-height: 1.3; }
.pl-kpi-val   { font-size: 1.55rem; font-weight: 800; color: #1e293b; line-height: 1; white-space: nowrap; margin-top: auto; }
.pl-kpi-danger { border-color: #fca5a5; background: #fff1f2; }
.pl-kpi-danger .pl-kpi-val { color: #dc2626; }
.pl-kpi-warn   { border-color: #fcd34d; background: #fffbeb; }
.pl-kpi-warn   .pl-kpi-val { color: #d97706; }
.pl-kpi-ok     { border-color: #86efac; background: #f0fdf4; }
.pl-kpi-ok     .pl-kpi-val { color: #16a34a; }
.pl-kpi-order  { border-color: #93c5fd; background: #eff6ff; }
.pl-kpi-order  .pl-kpi-val { color: #2563eb; }
.pl-kpi-cost   { border-color: #059669; background: #ecfdf5; }
.pl-kpi-cost   .pl-kpi-val { color: #047857; }

/* Arbeitszeitkonto */
.pl-zeitkonto-section {
  margin-top: 28px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pl-zeitkonto-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--color-soft-bg);
  border-bottom: 1px solid var(--color-border-light);
}
.pl-zeitkonto-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary-dark);
}
.pl-zeitkonto-section .data-table {
  margin: 0;
  border-radius: 0;
}

/* Lohnabrechnung inline inputs */
.pl-iban-input {
  width: 170px; font-size: 11px; border: 1px solid #e2e8f0;
  border-radius: 6px; padding: 3px 7px; color: var(--color-text-muted);
  background: #f8fafc; transition: border-color .15s;
}
.pl-iban-input:focus { outline: none; border-color: var(--color-primary); background: #fff; }
.pl-ticket-input,
.pl-deposit-input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--color-primary); }

/* Bestellvorschlag-Banner */
.pl-order-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: #eff6ff; border: 1.5px solid #93c5fd; border-radius: 14px;
  padding: 14px 20px; margin-bottom: 16px;
}
.pl-order-banner-left { display: flex; align-items: center; gap: 12px; }
.pl-order-banner-icon { font-size: 1.6rem; }
.pl-order-banner-left strong { font-size: 1rem; color: #1e3a8a; }
.pl-order-banner-sub  { font-size: .85rem; color: #3b82f6; margin-left: 6px; }
.pl-order-btn { background: #2563eb; border-color: #2563eb; }
.pl-order-btn:hover { background: #1d4ed8; }

/* Status-Badges in Tabelle */
.pl-status-badge {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.pl-badge-ok     { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.pl-badge-warn   { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }
.pl-badge-danger { background: #fff1f2; color: #dc2626; border: 1px solid #fca5a5; }

/* Bestellmenge hervorheben */
.pl-reorder-needed { color: #2563eb; }

/* Aktionszellen */
.pl-action-cell { white-space: nowrap; }
.pl-action-cell .ghost-button { padding: 3px 7px; font-size: .9rem; opacity: .6; }
.pl-action-cell .ghost-button:hover { opacity: 1; }

/* Formular */
.pl-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 16px;
}
.pl-form-unit { font-size: .8rem; color: #64748b; font-weight: 400; }
.pl-form-actions { display: flex; gap: 12px; }

/* Bestellvorschlag-Modal */
.pl-order-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pl-order-modal-overlay.hidden { display: none; }
.pl-order-modal {
  background: #fff; border-radius: 20px;
  width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto;
  padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.pl-order-modal-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.pl-order-modal-header h2 { font-size: 1.25rem; margin: 0; }
.pl-order-modal-hint { font-size: .85rem; color: #64748b; margin-bottom: 16px; }
.pl-order-modal-footer { display: flex; justify-content: flex-end; margin-top: 20px; gap: 12px; }

/* ── Minijob Erinnerungsbanner ───────────────────────────────────────── */
.minijob-reminder-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 12px;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #92400e;
}
.minijob-reminder-banner.hidden { display: none; }

/* ── Margin Alerts / Preisalarme ─────────────────────────────────────── */
.margin-alert-row {
  padding: 16px 20px;
}
.margin-alert-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.margin-alert-product { display: flex; flex-direction: column; gap: 4px; }
.margin-alert-trigger {
  font-size: 0.78rem; color: #dc2626; background: #fee2e2;
  border-radius: 4px; padding: 2px 7px; display: inline-block;
}
.margin-alert-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.margin-alert-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 900px) {
  .margin-alert-metrics { grid-template-columns: repeat(2, 1fr); }
}
.margin-metric-box {
  background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.margin-metric-label {
  font-size: 0.72rem; color: #6b7280; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.margin-metric-value { font-size: 0.92rem; color: #111; }
.margin-metric-delta { font-size: 0.78rem; font-weight: 600; }

/* ── Rezept-Import ───────────────────────────────────────────────────── */
.recipe-import-upload-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 16px 0 8px;
}
.recipe-import-file-label { display: flex; align-items: center; gap: 10px; }
.recipe-import-filename { font-size: 0.85rem; color: #6b7280; }

.recipe-import-preview { margin-top: 20px; }

.recipe-import-summary {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.ri-summary-chip {
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.ri-summary-chip.total  { background: #e0f2fe; color: #0369a1; }
.ri-summary-chip.new    { background: #dcfce7; color: #15803d; }
.ri-summary-chip.update { background: #dbeafe; color: #1d4ed8; }
.ri-summary-chip.warn   { background: #fef9c3; color: #92400e; }

/* Recipe import item cards */
.ri-recipe-block {
  border: 1px solid #e5e7eb; border-radius: 10px;
  margin-bottom: 14px; overflow: hidden;
}
.ri-recipe-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: #f9fafb;
  cursor: pointer; user-select: none;
}
.ri-badge {
  border-radius: 4px; padding: 2px 9px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
}
.ri-badge.new    { background: #dcfce7; color: #15803d; }
.ri-badge.update { background: #dbeafe; color: #1d4ed8; }
.ri-recipe-name { font-weight: 600; font-size: 0.95rem; color: #111; }
.ri-recipe-meta { font-size: 0.8rem; color: #6b7280; margin-left: auto; }
.ri-toggle-icon { font-size: 0.75rem; color: #9ca3af; }

.ri-recipe-body {
  padding: 12px 16px 16px; border-top: 1px solid #e5e7eb;
}
.ri-items-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.ri-items-table th {
  text-align: left; padding: 6px 8px;
  color: #6b7280; font-weight: 600; font-size: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}
.ri-items-table td { padding: 7px 8px; vertical-align: middle; }
.ri-items-table tr:not(:last-child) td { border-bottom: 1px solid #f3f4f6; }

/* Match status badges */
.ri-match {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 4px; padding: 2px 7px; font-size: 0.78rem; font-weight: 600;
}
.ri-match.exact  { background: #dcfce7; color: #15803d; }
.ri-match.fuzzy  { background: #fef9c3; color: #92400e; }
.ri-match.none   { background: #fee2e2; color: #dc2626; }

.ri-manual-select {
  font-size: 0.82rem; padding: 3px 6px;
  border: 1px solid #d1d5db; border-radius: 5px;
  background: #fff; color: #111; cursor: pointer;
}

/* ── Absence Bulk-Action & Checkboxen ────────────────────────────────── */
.bulk-action-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 10px 16px; margin-bottom: 12px;
}
.bulk-count {
  font-weight: 600; font-size: 0.88rem; color: #166534;
}
.absence-checkbox {
  width: 16px; height: 16px; cursor: pointer; accent-color: #16a34a;
}

/* ── AU-Bescheinigung Upload ─────────────────────────────────────────── */
.au-upload-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.au-extracted-preview { margin-top: 16px; }
.au-extracted-box {
  border-radius: 8px; padding: 14px 16px;
  border: 1px solid #bbf7d0; background: #f0fdf4;
}
.au-extracted-warn {
  border-color: #fde68a; background: #fefce8;
}
.au-extracted-title {
  font-weight: 700; font-size: 0.9rem; color: #166534; margin-bottom: 8px;
}
.au-extracted-list {
  list-style: none; padding: 0; margin: 0; font-size: 0.88rem; color: #111;
  display: flex; flex-direction: column; gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD – Visual Refresh (2026-05)
   Alle Klassen mit .db-* Prefix oder #dashboard > .xxx scoped.
   Keine globalen Klassen verändert. Kein Einfluss auf andere Sektionen.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Dashboard Page Header ───────────────────────────────────────────── */
.db-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}

.db-page-header-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

/* ── Dashboard KPI Cards ─────────────────────────────────────────────── */
#dashboard .stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.db-kpi-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(32, 74, 51, 0.06);
}

.db-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 2.8em;
  gap: 8px;
}

.db-kpi-icon svg {
  width: 20px;
  height: 20px;
  opacity: 0.75;
  flex-shrink: 0;
}

.db-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted-text);
  line-height: 1.4;
}

.db-kpi-value {
  display: block;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-primary-dark);
  margin-top: var(--space-2);
}

.db-kpi-meta {
  display: block;
  font-size: var(--font-size-meta);
  color: var(--color-muted-text);
  margin-top: var(--space-2);
}

/* ── Weekly Grid ─────────────────────────────────────────────────────── */
#dashboard .weekly-cell {
  background: var(--color-surface);
  padding: var(--space-4);
}

#dashboard .weekly-cell.active-day {
  background: rgba(155, 190, 64, 0.09);
  border-top: 2px solid var(--color-primary);
}

#dashboard .weekly-day {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-text);
  line-height: 1;
}

#dashboard .weekly-cell.active-day .weekly-day {
  color: var(--color-primary-dark);
}

#dashboard .weekly-date {
  font-size: var(--font-size-meta);
  font-weight: 500;
  color: var(--color-muted-text);
  margin-top: 3px;
}

#dashboard .weekly-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
  padding-top: var(--space-4);
}

/* ── Monthly Summary Cards ───────────────────────────────────────────── */
#dashboard .monthly-summary-card {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  gap: var(--space-3);
}

#dashboard .monthly-summary-head strong {
  font-size: var(--font-size-body);
  font-weight: 700;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: block;
}

#dashboard .monthly-summary-values strong {
  font-size: var(--font-size-kpi);
  font-weight: 700;
  color: var(--color-text-dark);
}

#dashboard .monthly-summary-card.danger .monthly-summary-values strong {
  color: var(--color-danger);
}

/* ── Panel-Card: echter Flex-Container, damit gap wirkt ───────────────── */
/* Dienstplan ist ausgenommen (eigenes Layoutsystem mit !important).      */
.content-section:not(#dienstplan) > .panel-card,
.content-section:not(#dienstplan) .panel-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Dashboard erhält zusätzlich erhöhten Innenabstand */
#dashboard .panel-card {
  padding: var(--space-6);
}

/* Section-Header / Panel-Title-Row direkt im Panel - kein zusätzlicher Spacing */
.content-section:not(#dienstplan) .panel-card > .section-header,
.content-section:not(#dienstplan) .panel-card > .panel-title-row {
  margin: 0;
}

/* ── Task Dashboard Summary Grid ─────────────────────────────────────── */
#dashboard .task-dashboard-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
}

/* Task-Liste unterhalb der KPI-Karten - sauber abgesetzt */
#dashboard #dashboardTaskList {
  margin: 0;
}

/* ── Task Dashboard Summary Cards ────────────────────────────────────── */
#dashboard .task-dashboard-summary-card {
  border-radius: var(--radius-md);
  background: var(--color-soft-bg);
  border: 1px solid var(--color-border-light);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 96px;
}

#dashboard .task-dashboard-summary-card span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted-text);
}

#dashboard .task-dashboard-summary-card strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-top: auto;
  line-height: 1;
}

.db-task-card--danger {
  background: var(--color-danger-bg) !important;
  border-color: rgba(217, 83, 79, 0.25) !important;
}

.db-task-card--danger strong {
  color: var(--color-danger) !important;
}

.db-task-card--success {
  background: var(--color-success-bg) !important;
  border-color: rgba(155, 190, 64, 0.28) !important;
}

.db-task-card--critical {
  background: #fff0ed !important;
  border-color: rgba(200, 80, 60, 0.3) !important;
}

.db-task-card--critical strong {
  color: var(--color-danger) !important;
}

/* ── Responsive: Dashboard ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  #dashboard .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .db-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ── Pünktlichkeits-Badge (Mitarbeitertabelle) ──────────────────────────── */
.late-alert-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
  cursor: default;
  white-space: nowrap;
}

/* ── Kategorie-Tabs für Verzehr / Waste Modal ────────────────────────── */
.group-grid-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  margin-bottom: 16px;
}
.group-grid-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border, #d1d5db);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.group-grid-tab:hover {
  border-color: var(--color-primary, #9BBE40);
  color: var(--color-primary-dark, #204A33);
}
.group-grid-tab.active {
  background: var(--color-primary-dark, #204A33);
  border-color: var(--color-primary-dark, #204A33);
  color: #fff;
}
.group-grid-panel.hidden { display: none; }

/* ── Digitale Inventur ─────────────────────────────────────────────────────── */
.di-screen-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.di-screen-header > div { flex: 1; }
#diZoneTitle { display: flex; align-items: center; gap: 8px; }
#diZoneTitle svg { width: 22px; height: 22px; flex-shrink: 0; }
.di-back-btn {
  background: none;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.di-back-btn:hover { border-color: var(--color-primary, #9BBE40); color: var(--color-primary-dark, #204A33); }

/* Fortschrittsbalken (oben) */
.di-progress-bar-wrap {
  height: 8px;
  background: var(--border, #e2e8f0);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.di-progress-bar {
  height: 100%;
  background: var(--color-primary, #9BBE40);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.di-progress-label {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 18px;
}

/* Session-Liste */
.di-session-list { display: flex; flex-direction: column; gap: 10px; }
.di-session-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.di-session-card:hover { border-color: var(--color-primary, #9BBE40); background: #f9fef0; }
.di-session-card .di-session-date { font-weight: 700; font-size: 1rem; flex: 1; }
.di-session-card .di-session-status {
  font-size: 0.77rem;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.di-session-card .di-session-status.completed { background: #d1fae5; color: #065f46; }
.di-session-card .di-session-status.in_progress { background: #fef3c7; color: #92400e; }
.di-session-card .di-session-status.draft { background: #f3f4f6; color: #6b7280; }
.di-session-card .di-session-progress { font-size: 0.82rem; color: var(--text-muted, #6b7280); }
.di-empty { text-align: center; color: var(--text-muted, #6b7280); padding: 32px 0; font-size: 0.9rem; }

/* Zonen-Grid */
.di-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.di-zone-card {
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}
.di-zone-card:hover { border-color: var(--color-primary, #9BBE40); background: #f9fef0; transform: translateY(-1px); }
.di-zone-card.done { border-color: #6ee7b7; background: #f0fdf4; }
.di-zone-card .di-zone-icon { margin-bottom: 12px; display: block; }
.di-zone-card .di-zone-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-primary-dark, #204A33);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.di-zone-card:hover .di-zone-icon svg { opacity: 1; }
.di-zone-card.done .di-zone-icon svg { opacity: 1; stroke: #059669; }
.di-zone-card .di-zone-label { font-weight: 700; font-size: 0.95rem; color: var(--text-main, #1e293b); margin-bottom: 4px; }
.di-zone-card .di-zone-sub { font-size: 0.78rem; color: var(--text-muted, #6b7280); }
.di-zone-wert { font-size: 0.8rem; font-weight: 700; color: #204A33; margin-top: 4px; }
.di-zone-card.done .di-zone-wert { color: #059669; }
/* Preis + Warenwert in Artikel-Zeilen */
.di-art-price { margin-left: 8px; font-size: 0.75rem; color: var(--text-muted, #6b7280); white-space: nowrap; }
.di-art-wert { display: block; font-size: 0.8rem; font-weight: 700; color: #204A33; margin-top: 2px; }
.di-zone-card .di-zone-prog {
  margin-top: 10px;
  height: 5px;
  background: var(--border, #e2e8f0);
  border-radius: 3px;
  overflow: hidden;
}
.di-zone-card .di-zone-prog-bar {
  height: 100%;
  background: var(--color-primary, #9BBE40);
  border-radius: 3px;
  transition: width 0.3s;
}
.di-zone-card.done .di-zone-prog-bar { background: #10b981; }

/* Artikel-Liste */
.di-article-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.di-article-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 9px;
  transition: border-color 0.15s;
}
.di-article-row.counted { border-color: #6ee7b7; background: #f0fdf4; }
.di-article-row .di-art-name { flex: 1; font-size: 0.88rem; font-weight: 600; color: var(--text-main, #1e293b); }
.di-article-row .di-art-meta { font-size: 0.75rem; color: var(--text-muted, #6b7280); margin-top: 1px; }
.di-article-row .di-art-expected { font-size: 0.78rem; color: var(--text-muted, #6b7280); white-space: nowrap; text-align: right; min-width: 70px; }
.di-art-input-wrap { display: flex; align-items: center; gap: 6px; }
.di-art-qty-input {
  width: 72px;
  padding: 6px 8px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  font-size: 0.9rem;
  text-align: right;
  font-weight: 600;
  background: #fff;
}
.di-art-qty-input:focus { outline: none; border-color: var(--color-primary, #9BBE40); }
.di-art-confirm-btn {
  padding: 6px 10px;
  border-radius: 7px;
  border: none;
  background: var(--color-primary, #9BBE40);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.di-art-confirm-btn:hover { background: var(--color-primary-dark, #204A33); }
.di-art-confirm-btn.confirmed { background: #10b981; }
.di-art-unit { font-size: 0.75rem; color: var(--text-muted, #6b7280); min-width: 24px; }

/* Abschlussbericht */
.di-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.di-report-kpi {
  background: #f8fafc;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.di-report-kpi .kpi-val { font-size: 1.6rem; font-weight: 800; color: var(--color-primary-dark, #204A33); }
.di-report-kpi .kpi-lbl { font-size: 0.76rem; color: var(--text-muted, #6b7280); margin-top: 2px; }
.di-deviation-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.di-deviation-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--border, #e2e8f0); font-size: 0.78rem; color: var(--text-muted, #6b7280); }
.di-deviation-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, #f1f5f9); }
.di-deviation-table tr:last-child td { border-bottom: none; }
.di-dev-pos { color: #065f46; font-weight: 700; }
.di-dev-neg { color: #991b1b; font-weight: 700; }

/* ── DI: Artikel Action-Buttons & Edit-Modal ────────────────────────────── */
.di-art-actions {
  display: flex;
  gap: 4px;
  margin-left: 6px;
  flex-shrink: 0;
}
.di-act-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--color-soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.di-act-btn svg { width: 13px; height: 13px; }
.di-act-btn:hover { background: #eef1ed; color: var(--text); border-color: #c5d1be; }
.di-act-btn.danger:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(217, 83, 79, 0.3);
}

/* Session-Karte: Delete-Button */
.di-session-card { position: relative; }
.di-session-del {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.di-session-del svg { width: 13px; height: 13px; }
.di-session-del:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(217, 83, 79, 0.3);
}

/* Edit-Modal */
.di-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.di-modal-backdrop.hidden { display: none; }
.di-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  width: min(460px, 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.di-modal h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.di-modal-fields { display: flex; flex-direction: column; gap: 12px; }
.di-modal-field label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.di-modal-field input, .di-modal-field select {
  min-height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.di-modal-field input:focus, .di-modal-field select:focus {
  outline: none;
  border-color: var(--color-primary);
}
.di-modal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.di-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* Done-Badge auf Zone-Karte */
.di-zone-done-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #059669;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.di-zone-done-badge svg {
  width: 11px !important;
  height: 11px !important;
  stroke: #fff !important;
  opacity: 1 !important;
}

/* ── Kiosk iPad / Mobile Fixes ────────────────────────────────────────── */

/* 1. Kiosk-card füllt Viewport (verhindert weißen Halbkreis unten) */
@media (min-width: 481px) {
  body:not(.cash-closing-mode) .kiosk-card {
    min-height: calc(100dvh - 36px);
  }
}

/* 2. Icons mittig in Karten (inline-flex → flex + line-height fix) */
.kiosk-employee-panel .timeclock-kpi-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-style: normal !important;
}

/* 3. Keine Text-Selektion / blaue Handles auf Kiosk-PIN-Eingabe */
#kioskEmployeeNumber {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  caret-color: transparent;
}
#kioskEmployeeNumber::selection {
  background: transparent;
  color: inherit;
}
#kioskEmployeeNumber::-moz-selection {
  background: transparent;
  color: inherit;
}

/* 4. WE-Bar Werte klarer getrennt */
.we-bar-values {
  gap: 8px;
}
.we-bar-values span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── FINANZEN: BWA / KOSTENCONTROLLING ──────────────────────────────────── */

.fin-loading,
.fin-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-text-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
}
.fin-error { color: #c0392b; }

/* Header: month nav + tabs */
.fin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.fin-month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fin-nav-btn {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  transition: background 0.15s;
}
.fin-nav-btn:hover:not(:disabled) { background: var(--color-primary-dark); color: #fff; }
.fin-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fin-month-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-primary-dark);
  min-width: 90px;
  text-align: center;
}
.fin-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 4px;
}
.fin-tab {
  background: none;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  padding: 6px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fin-tab:hover { background: var(--color-surface-strong); }
.fin-tab--active {
  background: var(--color-primary-dark);
  color: #fff;
}

/* KPI cards */
.fin-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 700px) {
  .fin-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
.fin-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(32,74,51,0.05);
  min-width: 0;
}
.fin-kpi-card.fin-kpi--green { border-color: #9BBE40; background: #f5fae8; }
.fin-kpi-card.fin-kpi--yellow { border-color: #e6a817; background: #fffbec; }
.fin-kpi-card.fin-kpi--red { border-color: #e53935; background: #fff5f5; }
.fin-kpi-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
  opacity: 0.65;
  margin-bottom: 4px;
}
.fin-kpi-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-dark);
}
.fin-kpi-card.fin-kpi--green .fin-kpi-value { color: #4a7c22; }
.fin-kpi-card.fin-kpi--yellow .fin-kpi-value { color: #996200; }
.fin-kpi-card.fin-kpi--red .fin-kpi-value { color: #c0392b; }
.fin-kpi-hint {
  font-size: 11px;
  color: var(--color-primary-dark);
  opacity: 0.55;
  margin-top: 2px;
}
.fin-kpi--green { border-color: #9BBE40; }
.fin-kpi--yellow { border-color: #e6a817; }
.fin-kpi--red { border-color: #e53935; }

/* Content area */
.fin-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* BWA table */
.fin-bwa-panel { padding: 0; }
.fin-bwa-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
}
.fin-bwa-table thead tr {
  background: var(--color-surface-strong);
  border-bottom: 2px solid var(--color-border-light);
}
.fin-th-label, .fin-th-val {
  padding: 10px 16px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-dark);
}
.fin-th-val { text-align: right; }
.fin-bwa-table tbody tr {
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.1s;
}
.fin-bwa-table tbody tr:last-child { border-bottom: none; }
.fin-bwa-table tbody tr:hover { background: var(--color-surface-muted); }
.fin-td-label {
  padding: 9px 16px;
  color: var(--color-text-dark);
}
.fin-td-muted { opacity: 0.6; font-size: 12px !important; }
.fin-td-val {
  padding: 9px 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dark);
}
.fin-row-bold td { font-weight: 700; }
.fin-row-sep { border-top: 2px solid var(--color-border-light) !important; }
.fin-cell-neg { color: #c0392b !important; }
.fin-cell-pos { color: #2a7a3b !important; }

/* BWA actions */
.fin-bwa-actions {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-muted);
}

/* Shared small button styles */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--color-primary-dark); color: #fff; }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary { background: var(--color-surface-strong); color: var(--color-primary-dark); border: 1px solid var(--color-border-light); }
.btn-secondary:hover { background: var(--color-border-light); }
.fin-small-btn { padding: 6px 12px; font-size: 12px; }

/* Kosten panel layout */
.fin-kosten-panel {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  min-height: 400px;
}
@media (max-width: 800px) {
  .fin-kosten-panel { grid-template-columns: 1fr; }
}
.fin-kosten-left {
  border-right: 1px solid var(--color-border-light);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fin-kosten-right { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fin-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fin-panel-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.fin-kosten-hint {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
}

/* Template cards */
.fin-tmpl-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 440px; }
.fin-tmpl-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.fin-tmpl-info { flex: 1; min-width: 0; }
.fin-tmpl-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-tmpl-cat {
  font-size: 11px;
  color: var(--color-primary-dark);
  opacity: 0.65;
  margin-top: 1px;
}
.fin-tmpl-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
}
.fin-tmpl-btns { display: flex; gap: 4px; }
.fin-icon-btn {
  background: none;
  border: 1px solid var(--color-border-light);
  border-radius: 5px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  transition: background 0.12s, color 0.12s;
}
.fin-icon-btn:hover { background: var(--color-primary-dark); color: #fff; border-color: transparent; }

/* Entries table */
.fin-entries-wrap { overflow-x: auto; }
.fin-entries-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
}
.fin-entries-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-dark);
  background: var(--color-surface-strong);
  border-bottom: 1px solid var(--color-border-light);
}
.fin-entries-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-dark);
  vertical-align: middle;
}
.fin-entries-table tr:last-child td { border-bottom: none; }
.fin-td-date { white-space: nowrap; color: var(--color-primary-dark); opacity: 0.8; }
.fin-td-action { text-align: center; width: 40px; }
.fin-badge {
  display: inline-block;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fin-empty {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--color-primary-dark);
  opacity: 0.5;
  text-align: center;
  padding: 24px 0;
}
.fin-empty-cell {
  font-size: 13px;
  color: var(--color-primary-dark);
  opacity: 0.5;
  text-align: center;
  padding: 24px 10px;
}

/* Cost modal */
.fin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 22, 0.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fin-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(20,30,22,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fin-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface-strong);
}
.fin-modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-primary-dark);
}
.fin-modal-x {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-primary-dark);
  opacity: 0.6;
  line-height: 1;
  padding: 0 4px;
}
.fin-modal-x:hover { opacity: 1; }
.fin-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fin-form-row { display: flex; flex-direction: column; gap: 5px; }
.fin-form-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fin-optional { font-weight: 400; text-transform: none; opacity: 0.6; font-style: normal; letter-spacing: 0; }
.fin-form-ctrl {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--color-text-dark);
  outline: none;
  transition: border-color 0.15s;
}
.fin-form-ctrl:focus { border-color: var(--color-primary-dark); }
.fin-modal-ftr {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-muted);
}
.fin-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbe6;
  border: 1px solid #f0d060;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: #7a5c00;
  line-height: 1.5;
}
.fin-info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
/* ── BWA-Abgleich Modal CSS ────────────────────────────────────────────── */

.fin-modal-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.fin-modal-box {
  background: #fff; border-radius: 14px; width: 100%; max-width: 760px;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,.22);
  overflow: hidden;
}
.fin-modal-header {
  background: #204A33; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.fin-modal-title { color: #fff; font-size: .95rem; font-weight: 700; }
.fin-modal-close {
  background: none; border: none; color: rgba(255,255,255,.65);
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.fin-modal-close:hover { color: #fff; }
.fin-modal-stepper {
  display: flex; gap: 0; padding: 0 20px;
  background: #f8faf5; border-bottom: 1px solid #e8edd8; flex-shrink: 0;
}
.fin-step {
  padding: 10px 16px; font-size: .78rem; font-weight: 600;
  color: #aaa; border-bottom: 3px solid transparent;
}
.fin-step-active { color: #204A33; border-bottom-color: #9BBE40; }
.fin-step-done { color: #9BBE40; }
.fin-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0;
}

/* Step 1: Upload */
.fin-upload-step { padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.fin-upload-zone {
  border: 2px dashed #c5d9a4; border-radius: 10px; padding: 32px 24px;
  background: #f8faf5; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color .2s, background .2s;
}
.fin-upload-zone:hover, .fin-drop-hover {
  border-color: #9BBE40; background: #f0f7e0;
}
.fin-upload-icon { font-size: 2rem; }
.fin-upload-zone strong { font-size: .9rem; color: #204A33; }
.fin-upload-zone span { font-size: .78rem; color: #888; }
.fin-upload-month-row {
  display: flex; align-items: center; gap: 12px; font-size: .85rem;
}
.fin-upload-month-label { font-weight: 600; color: #204A33; }
.fin-upload-error { color: #c0392b; font-size: .82rem; }
.fin-upload-hint { color: #27ae60; font-size: .82rem; }

/* Step 2: Compare */
.fin-compare-step { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.bwa-compare-scroll { overflow-x: auto; flex: 1; }
.bwa-compare-table {
  width: 100%; border-collapse: collapse; font-size: .8rem;
}
.bwa-compare-table thead tr { background: #f8faf5; }
.bwa-compare-table th {
  padding: 9px 12px; text-align: left; font-weight: 600; font-size: .73rem;
  color: #204A33; border-bottom: 2px solid #e8edd8; white-space: nowrap;
}
.bwa-compare-table td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; }
.bwa-td-r { text-align: right; font-variant-numeric: tabular-nums; }
.bwa-delta-pos { color: #c0392b; font-weight: 600; }
.bwa-delta-neg { color: #27ae60; font-weight: 600; }
.bwa-delta-ok  { color: #aaa; }
.bwa-corr-val  { color: #9BBE40; }
.bwa-exact { font-size: .72rem; color: #9BBE40; }
.bwa-korr-btn {
  background: none; border: 1px solid #9BBE40; color: #204A33;
  border-radius: 5px; padding: 3px 8px; font-size: .72rem; cursor: pointer;
  white-space: nowrap;
}
.bwa-korr-btn:hover { background: #f0f7e0; }
.bwa-acc-bar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; background: #f8faf5; border-top: 1px solid #e8edd8;
  font-size: .78rem; color: #204A33; flex-shrink: 0;
}
.bwa-acc-bar-outer { flex: 1; background: #e0e0d8; border-radius: 99px; height: 8px; }
.bwa-acc-bar-inner { background: #9BBE40; border-radius: 99px; height: 8px; transition: width .4s; }

/* Korrektur-Inline-Formular */
.bwa-korr-form { padding: 0 20px 4px; flex-shrink: 0; }
.bwa-korr-inner {
  background: #f8faf5; border: 1px solid #c5d9a4; border-radius: 8px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.bwa-korr-row { display: flex; gap: 16px; font-size: .8rem; color: #555; }

/* Step 3: History */
.fin-history-step { overflow-y: auto; flex: 1; }
.bwa-hist-wrap { padding: 16px 20px; }
.bwa-hist-title { font-size: .85rem; font-weight: 700; color: #204A33; margin-bottom: 14px; }
.bwa-hist-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; font-size: .8rem;
}
.bwa-hist-month { color: #555; width: 64px; flex-shrink: 0; }
.bwa-hist-bar-outer { flex: 1; background: #e8edd8; border-radius: 99px; height: 8px; }
.bwa-hist-bar-inner { background: #9BBE40; border-radius: 99px; height: 8px; transition: width .5s; }
.bwa-hist-pct { width: 40px; text-align: right; font-weight: 600; color: #204A33; }
.bwa-hist-pct-good { color: #9BBE40; }
.fin-hint-small { font-size: .75rem; color: #888; margin-top: 10px; }

/* ── END FINANZEN CSS ──────────────────────────────────────────────────── */

/* === Inventur Barcode-Scan === */
.di-scan-btn {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  width: fit-content;
  background: #111; color: #fff; border: none; border-radius: 8px;
  padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.di-scan-btn:active { transform: scale(0.97); }

.di-scan-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: #0b1f16; color: #fff; display: flex; flex-direction: column;
}
.di-scan-overlay.hidden { display: none; }
.di-scan-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-size: 15px; font-weight: 600;
  background: rgba(0,0,0,0.35);
}
.di-scan-close {
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
  line-height: 1; padding: 4px 8px;
}
.di-scan-reader { flex: 1; min-height: 0; width: 100%; }
.di-scan-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }

.di-scan-result, .di-enroll-box {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; color: #1a1a1a; border-radius: 18px 18px 0 0;
  padding: 20px; box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
.di-scan-result.hidden, .di-enroll-box.hidden { display: none; }
.di-scan-result-name { font-size: 18px; font-weight: 800; color: #204A33; }
.di-scan-result-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.di-scan-stepper {
  display: flex; align-items: center; gap: 10px; margin: 18px 0;
}
.di-scan-stepper button {
  width: 52px; height: 52px; border-radius: 12px; border: 2px solid #204A33;
  background: #fff; color: #204A33; font-size: 28px; font-weight: 700; cursor: pointer;
}
.di-scan-stepper button:active { background: #204A33; color: #fff; }
.di-scan-stepper input {
  flex: 1; min-width: 0; height: 52px; text-align: center; font-size: 22px;
  font-weight: 700; border: 2px solid #d6d6d6; border-radius: 12px;
}
.di-scan-unit { font-size: 15px; color: var(--muted); font-weight: 600; }
.di-scan-result-actions { display: flex; }
.di-scan-confirm {
  flex: 1; background: #9BBE40; color: #143020; border: none; border-radius: 12px;
  padding: 15px; font-size: 16px; font-weight: 800; cursor: pointer;
}
.di-scan-confirm:active { transform: scale(0.99); }

.di-enroll-title { font-size: 16px; font-weight: 700; color: #204A33; margin-bottom: 12px; }
.di-enroll-search {
  width: 100%; height: 46px; border: 2px solid #d6d6d6; border-radius: 12px;
  padding: 0 14px; font-size: 16px; margin-bottom: 12px;
}
.di-enroll-list { max-height: 38vh; overflow-y: auto; }
.di-enroll-item {
  padding: 12px 14px; border-bottom: 1px solid #eee; cursor: pointer; font-size: 15px;
}
.di-enroll-item:active { background: #f0f6e8; }
.di-enroll-item small { color: var(--muted); display: block; font-size: 12px; }
.di-scan-cancel {
  width: 100%; margin-top: 12px; background: #f2f2f2; color: #555; border: none;
  border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 600; cursor: pointer;
}

/* Touch-Stepper im bestehenden Artikel-Fallback */
.di-art-step {
  width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid #204A33;
  background: #fff; color: #204A33; font-size: 15px; font-weight: 700; cursor: pointer;
  flex: 0 0 auto; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.di-art-step:active { background: #204A33; color: #fff; }
