/* Tablet-Oberflaeche: grosse Flaechen, hoher Kontrast, keine Textauswahl */
body.kiosk {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #eef2f7 0%, #e2e9f2 100%);
  user-select: none;
  overflow: hidden;
}

.kiosk-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 27, 45, 0.05);
  flex-shrink: 0;
}

.kiosk-header__logo {
  height: 46px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

.kiosk-header__branch {
  flex: 1;
  min-width: 0;
}

.kiosk-header__branch strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kiosk-header__branch span {
  font-size: 0.85rem;
  color: var(--muted);
}

.kiosk-clock {
  text-align: right;
  flex-shrink: 0;
}

.kiosk-clock__time {
  font-size: 2.1rem;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.kiosk-clock__date {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.kiosk-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.screen {
  width: 100%;
  max-width: 760px;
  animation: fade-in 0.25s ease;
}

.screen[hidden] {
  display: none !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 2.25rem 2.25rem;
}

.panel__title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.panel__subtitle {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* --- Anmeldung -------------------------------------------------------- */

.branch-picker {
  max-width: 420px;
  margin: 0 auto 1.75rem;
}

.branch-picker label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}

.branch-picker .select {
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  min-height: 58px;
}

.branch-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: -0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.branch-indicator strong {
  color: var(--ink);
}

.branch-indicator button {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.branch-indicator button:hover {
  color: var(--brand-ink);
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

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

.employee-picker label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}

.spaced-top {
  margin-top: 1.25rem;
}

.employee-picker .input,
.employee-picker .select {
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  min-height: 58px;
}

.pin-display {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.25rem 0;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface-2);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.pin-dot--filled {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.12);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.key {
  height: 68px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.12s ease, transform 0.06s ease;
  touch-action: manipulation;
}

.key:hover {
  background: var(--brand-soft);
}

.key:active {
  transform: scale(0.96);
  background: var(--brand-soft);
}

.key--action {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
}

.login-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
}

.btn--xl {
  font-size: 1.15rem;
  padding: 1.1rem 2rem;
  border-radius: 14px;
  min-height: 64px;
}

/* --- Buchungsschritt --------------------------------------------------- */

.greeting {
  text-align: center;
  margin-bottom: 2rem;
}

.greeting__hello {
  color: var(--muted);
  font-size: 1.05rem;
}

.greeting__name {
  font-size: 2.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
}

.greeting__number {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.last-entry {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.link-button {
  display: block;
  margin: -0.75rem 0 1.5rem;
  padding: 0.4rem;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: var(--brand-ink);
}

/* --- Stunden-Historie (Dialog) ------------------------------------------ */

.hours-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  width: min(420px, calc(100vw - 2.5rem));
  max-height: min(720px, calc(100vh - 3rem));
  color: var(--ink);
  background: var(--surface);
}

.hours-dialog::backdrop {
  background: rgba(15, 27, 45, 0.5);
}

.hours-dialog__title {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  text-align: center;
}

.hours-dialog__body {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
}

.hours-table th {
  position: sticky;
  top: 0;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hours-table th:last-child,
.hours-table td:last-child {
  text-align: right;
}

.hours-table td {
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.hours-table tr.is-today td {
  font-weight: 700;
  background: var(--brand-soft);
}

.hours-dialog__total {
  margin: 1rem 0 1.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  font-size: 1rem;
}

.hours-dialog__total strong {
  font-variant-numeric: tabular-nums;
}

.action-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.action-layout .action-buttons {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .action-layout {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* --- Stunden-Gauge ------------------------------------------------------ */

.gauge {
  position: relative;
  flex: none;
  width: 220px;
  text-align: center;
}

.gauge__svg {
  display: block;
  width: 100%;
  height: auto;
}

.gauge__segment {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  /* stroke-dasharray/-dashoffset werden per JS als Attribute gesetzt
     (Fuellstand) - als CSS-Property hier NICHT setzen, sonst hat die
     CSS-Property immer Vorrang vor dem Attribut und der Gauge bliebe
     immer leer bzw. voll. */
}

.gauge__segment--worked {
  stroke: var(--ok);
}

.gauge__segment--missing {
  stroke: var(--danger);
}

.gauge__value {
  margin-top: -2.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.gauge__value strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.gauge__overtime {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b8620f;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.action-buttons--multi .action-button {
  min-height: 108px;
  font-size: 1.6rem;
}

.action-button {
  width: 100%;
  min-height: 148px;
  border-radius: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 2.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-lg);
  transition: transform 0.08s ease, filter 0.15s ease;
}

.action-button small {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 0;
}

.action-button:active:not(:disabled) {
  transform: scale(0.985);
  filter: brightness(0.95);
}

.action-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.action-button--start {
  background: linear-gradient(160deg, #1a7f4b 0%, #146c43 100%);
}

.action-button--end {
  background: linear-gradient(160deg, #1d5f92 0%, #14507d 100%);
}

.action-button--break-start,
.action-button--break-end {
  background: linear-gradient(160deg, #d97a17 0%, #b8620f 100%);
}

.countdown {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1.25rem;
}

/* --- Bestaetigung (Schritt 6) ------------------------------------------ */

.confirmation {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--surface);
  border-radius: 24px;
  border: 2px solid var(--ok);
  box-shadow: var(--shadow-lg);
}

.confirmation__icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--ok-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

.confirmation__icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--ok);
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirmation__message {
  font-size: 1.85rem;
  font-weight: 650;
  color: var(--ok);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.confirmation__detail {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: var(--ink-2);
}

.confirmation__detail strong {
  font-size: 2.4rem;
  display: block;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-top: 0.35rem;
}

.confirmation__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--ok);
  margin-top: 2rem;
  transform-origin: left;
  animation: shrink var(--confirm-duration, 5s) linear forwards;
}

@keyframes shrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* --- Zustaende --------------------------------------------------------- */

.state-panel {
  text-align: center;
  padding: 3rem 2rem;
}

.state-panel h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.state-panel p {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 460px;
}

.kiosk-footer {
  padding: 0.6rem 1.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.kiosk-footer button {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: underline;
}

.error-banner {
  max-width: 760px;
  margin: 0 auto 1rem;
}
