/* ============================================================
   Hoch³ – Stylesheet
   Marke: dunkler Espresso-Sperrbildschirm, helle App,
   Honig-Gold-Akzent, ³ als Erkennungszeichen.
   ============================================================ */

:root {
  /* Farben */
  --ink: #241a15;        /* Espresso, fast schwarz */
  --ink-2: #34261e;
  --paper: #fbf7f0;      /* warmes Papier */
  --paper-2: #f3ebdd;    /* Karten auf hellem Grund */
  --line: #e6dccc;
  --honey: #e0922e;      /* Hauptakzent */
  --honey-deep: #c2761b;
  --matcha: #2e9e6b;     /* Punkte/Positiv, sparsam */
  --muted: #8a7a6b;      /* Sekundärtext */
  --muted-2: #b6a795;
  --danger: #c0492f;

  /* Schrift */
  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;

  /* Maße */
  --maxw: 460px;            /* App-Rahmen auf großen Schirmen */
  --tabbar-h: 66px;
  --topbar-h: 58px;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--f-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--ink);
  color: var(--ink);
}

button { font-family: inherit; cursor: pointer; }

#app { min-height: 100dvh; }

.wordmark {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 46px;
  color: var(--paper);
  line-height: 1;
}
.wordmark sup {
  color: var(--honey);
  font-size: 0.6em;
  margin-left: 0.02em;
  text-shadow: 0 0 22px rgba(224, 146, 46, 0.55);
}
.wordmark.sm { font-size: 28px; }

/* ============================================================
   SPERRBILDSCHIRM (Login)
   ============================================================ */

.screen-lock {
  background:
    radial-gradient(120% 80% at 50% -10%, #3a2a20 0%, rgba(58,42,32,0) 55%),
    var(--ink);
  color: var(--paper);
  min-height: 100dvh;
}

.splash {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
}
.lock-error { color: var(--muted-2); font-size: 14px; text-align: center; max-width: 280px; }

.lock {
  min-height: 100dvh;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 22px 32px;
}
.lock-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
}
.lock-head .wordmark { margin: 0; }
.lock-sub {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lock-back {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--paper);
}
.lock-back svg { width: 22px; height: 22px; }

.lock-body { flex: 1; display: flex; flex-direction: column; padding-top: 30px; }
.lock-hint { color: var(--muted-2); font-size: 14px; margin: 0 0 14px; }

/* Namensliste */
.name-list { display: flex; flex-direction: column; gap: 10px; }
.name-plate {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: var(--paper);
  font-size: 17px;
  text-align: left;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.name-plate:hover { background: rgba(255,255,255,0.09); border-color: rgba(224,146,46,0.5); }
.name-plate:active { transform: scale(0.98); }
.name-text { font-weight: 500; }

.avatar {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--honey), var(--honey-deep));
  color: #fff; font-weight: 700; font-size: 17px;
  font-family: var(--f-display);
}
.avatar.lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 30px; }

.empty { color: var(--muted-2); font-size: 14px; line-height: 1.6; }
.empty strong { color: var(--honey); font-weight: 600; }

/* PIN-Eingabe */
.pin-body { align-items: center; text-align: center; padding-top: 22px; }
.pin-name { font-size: 20px; font-weight: 600; margin: 16px 0 2px; color: var(--paper); }
.pin-hint { color: var(--muted-2); font-size: 14px; margin: 0 0 22px; transition: color 0.15s; }
.pin-hint.error { color: #f0a58f; }

.pin-dots { display: flex; gap: 14px; margin-bottom: 34px; }
.pin-dots.shake { animation: shake 0.4s; }
.dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.dot.filled { background: var(--honey); border-color: var(--honey); transform: scale(1.05); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-7px); }
  40%,80% { transform: translateX(7px); }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 300px;
  margin-top: auto;
}
.key {
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: var(--paper);
  font-size: 24px;
  font-weight: 500;
  font-family: var(--f-ui);
  display: grid; place-items: center;
  transition: transform 0.07s ease, background 0.15s ease;
}
.key:active { transform: scale(0.95); background: rgba(255,255,255,0.14); }
.key-util { background: transparent; border-color: transparent; }
.key-util svg { width: 26px; height: 26px; }
.key-ok { background: var(--honey); border-color: var(--honey); color: #fff; font-size: 26px; }
.key-ok:active { background: var(--honey-deep); }

/* Spinner */
.spinner {
  width: 30px; height: 30px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--honey);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  padding: 11px 20px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: var(--paper); font-size: 15px;
}

/* ============================================================
   APP-HÜLLE (nach Login)
   ============================================================ */

.screen-app { background: var(--ink); min-height: 100dvh; }

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.3);
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: var(--ink);
  color: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand {
  font-family: var(--f-display); font-weight: 800; font-size: 22px;
  letter-spacing: -0.03em; color: var(--paper);
}
.topbar .brand sup { color: var(--honey); font-size: 0.6em; }
.top-right { display: flex; align-items: center; gap: 8px; }

.points-chip {
  display: inline-flex; align-items: baseline; gap: 2px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(224,146,46,0.16);
  border: 1px solid rgba(224,146,46,0.4);
  font-family: var(--f-mono);
}
.points-chip .pts { color: var(--honey); font-weight: 700; font-size: 15px; }
.points-chip .pts-lbl { color: var(--honey); font-size: 11px; opacity: 0.8; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px; border: 0;
  background: rgba(255,255,255,0.08);
  color: var(--paper);
}
.icon-btn:active { background: rgba(255,255,255,0.18); }
.icon-btn svg { width: 20px; height: 20px; }

/* Inhalt */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 18px calc(var(--tabbar-h) + 28px);
}

.hello { margin-bottom: 22px; }
.hello h1 {
  font-family: var(--f-display);
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0; color: var(--ink);
}
.hello-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Platzhalter-Bereiche */
.placeholder {
  margin-top: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 26px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.ph-icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--honey-deep);
}
.ph-icon svg { width: 28px; height: 28px; }
.placeholder h2 {
  font-family: var(--f-display);
  font-size: 21px; font-weight: 700; margin: 2px 0 0; color: var(--ink);
}
.placeholder p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 300px; }
.ph-tag {
  margin-top: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--honey-deep);
  background: rgba(224,146,46,0.12);
  padding: 5px 12px; border-radius: 999px;
}
.placeholder.admin .ph-icon { color: var(--ink); }

/* Tab-Leiste */
.tabbar {
  height: var(--tabbar-h);
  flex: 0 0 auto;
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  position: sticky; bottom: 0; z-index: 10;
}
.tab {
  flex: 1;
  border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: var(--muted-2);
  padding: 8px 2px;
  transition: color 0.15s ease;
}
.tab-ic { display: grid; place-items: center; }
.tab-ic svg { width: 23px; height: 23px; }
.tab-lbl { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
.tab.active { color: var(--honey-deep); }
.tab.active .tab-lbl { font-weight: 600; }

/* Fokus-Sichtbarkeit (Tastatur) */
:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   Admin-Bereich, Formulare, Dialoge, Toast
   ============================================================ */

/* Buttons (helles Theme) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; font-family: var(--f-ui);
  transition: transform 0.07s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--honey); color: #fff; }
.btn-primary:active { background: var(--honey-deep); }
.btn-secondary { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--danger); border-color: transparent; padding-left: 4px; padding-right: 4px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-sm { padding: 9px 13px; font-size: 14px; }

/* Admin-Kopf */
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.admin-head h1 { font-family: var(--f-display); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.admin-sub { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

/* Mitarbeiterliste */
.emp-list { display: flex; flex-direction: column; gap: 9px; }
.emp-row {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink);
  transition: transform 0.07s ease, border-color 0.15s ease;
}
.emp-row:active { transform: scale(0.99); }
.emp-row:hover { border-color: var(--muted-2); }
.emp-row.is-inactive { opacity: 0.6; }
.emp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.emp-name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-meta { display: flex; align-items: center; gap: 7px; }
.emp-pts { font-family: var(--f-mono); font-weight: 700; color: var(--honey-deep); font-size: 15px; white-space: nowrap; }
.emp-pts small { font-size: 11px; opacity: 0.7; margin-left: 1px; }

.role-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 999px; }
.role-badge.admin { background: rgba(36,26,21,0.10); color: var(--ink); }
.role-badge.employee { background: rgba(46,158,107,0.14); color: #1f7a4d; }
.off-badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(192,73,47,0.12); color: var(--danger); }

.avatar.sm { width: 38px; height: 38px; flex-basis: 38px; font-size: 16px; }
.empty-light { color: var(--muted); font-size: 14px; text-align: center; padding: 30px 10px; }
.spinner.dark { border-color: rgba(36,26,21,0.15); border-top-color: var(--honey); margin: 30px auto; }

/* Dialoge (Modal) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,14,10,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0; backdrop-filter: blur(2px);
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: 100%; max-width: var(--maxw);
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px max(22px, env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  animation: slideup 0.22s cubic-bezier(0.2,0.8,0.2,1);
  max-height: 92dvh; overflow-y: auto;
}
@keyframes slideup { from { transform: translateY(100%); } }
@media (min-width: 520px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal-card { border-radius: 22px; animation: fade 0.18s ease; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-family: var(--f-display); font-size: 20px; font-weight: 700; margin: 0; color: var(--ink); }
.modal-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--paper-2); color: var(--muted); font-size: 16px; }
.modal-x:active { background: var(--line); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.modal-actions .btn-ghost-danger { flex: 0 0 auto; }
.mc-text { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0 0 6px; }
.mc-text em { color: var(--honey-deep); font-style: normal; font-weight: 600; }
.mc-sub { font-family: var(--f-display); font-size: 15px; font-weight: 700; color: var(--ink); margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Formularfelder */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: var(--f-ui);
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--honey); outline-offset: 1px; border-color: var(--honey); }
.field-hint { margin: 7px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; margin-bottom: 6px; border-top: 1px solid var(--line); }
.fr-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.fr-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Segmentierte Auswahl (Rolle) */
.seg { display: flex; gap: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Schalter (aktiv/inaktiv) */
.switch { width: 50px; height: 30px; border-radius: 999px; border: 0; background: var(--line); position: relative; flex: 0 0 auto; transition: background 0.18s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.18s; }
.switch.on { background: var(--matcha); }
.switch.on span { transform: translateX(20px); }

/* Konto-Kopf */
.acct { display: flex; align-items: center; gap: 13px; padding: 4px 0 6px; }
.acct-name { font-weight: 600; font-size: 17px; color: var(--ink); }
.acct-role { font-size: 13px; color: var(--muted); }

/* Fehlermeldung im Formular */
.form-msg { margin: 4px 0 0; font-size: 13.5px; min-height: 0; }
.form-msg.err { color: var(--danger); margin-top: 10px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px); transform: translate(-50%, 20px);
  z-index: 200; max-width: 320px;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ============================================================
   Dienstplan, Schichten, Admin-Unternavigation, Chips
   ============================================================ */

/* Admin-Unternavigation */
.admin-subnav { display: flex; gap: 6px; margin-bottom: 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.subnav-tab { flex: 1 0 auto; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.subnav-tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Dienstplan-Bereich */
.dp-section-title {
  font-family: var(--f-display); font-size: 15px; font-weight: 700;
  color: var(--ink); margin: 22px 0 10px; letter-spacing: -0.01em;
}
.dp-section-title:first-child { margin-top: 0; }
.dp-section-title-open { color: var(--honey-deep); }
.dp-date {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 14px 0 7px;
}
.dp-date:first-child { margin-top: 0; }

.shift-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px; margin-bottom: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.shift-card.shift-open { border-color: rgba(224,146,46,0.4); background: rgba(224,146,46,0.06); }
.shift-card.shift-gone { opacity: 0.3; transform: scale(0.97); }
.shift-card.shift-claimed-flash { animation: claimFlash 0.5s ease; }
@keyframes claimFlash { 0% { background: rgba(46,158,107,0.25); } 100% { background: var(--paper-2); } }

.shift-time { display: flex; flex-direction: column; align-items: flex-start; font-family: var(--f-mono); font-size: 13px; color: var(--ink); flex: 0 0 auto; min-width: 56px; }
.shift-sep { display: none; }
.shift-start, .shift-end { font-weight: 700; line-height: 1.3; }

.shift-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shift-pos { font-weight: 600; font-size: 15px; color: var(--ink); }
.shift-note { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shift-action { flex: 0 0 auto; }
.btn-xs { padding: 8px 13px; font-size: 13px; }

/* Admin-Schichtliste */
.admin-shift-row { gap: 12px; }
.shift-time-badge {
  font-family: var(--f-mono); font-size: 12.5px; font-weight: 700;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; white-space: nowrap; color: var(--ink-2); flex: 0 0 auto;
}
.open-badge { background: rgba(224,146,46,0.14); color: var(--honey-deep); }
.pos-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--honey); flex: 0 0 auto; }

/* Chips (Mehrfachauswahl Positionen) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 13.5px; font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chip.on { background: var(--honey); border-color: var(--honey); color: #fff; }
.chip-loading { font-size: 13px; color: var(--muted); padding: 6px 0; }

/* Zwei Felder nebeneinander (Start/Ende) */
.field-2col { display: flex; gap: 12px; }
.field-2col .field { flex: 1; }

select#s-employee, select#d-employee {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: var(--f-ui);
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}

/* ============================================================
   Abmelde-Anfragen & Wochenübersicht
   ============================================================ */

.dp-toggle { display: flex; gap: 6px; margin-bottom: 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.dp-toggle .subnav-tab { flex: 1; }

.dp-week-range { font-size: 13px; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.week-card { opacity: 0.96; }

.shift-card.shift-pending { opacity: 0.75; }
.req-pending-note { color: var(--honey-deep) !important; font-weight: 600; }
.req-pending-badge { background: rgba(224,146,46,0.14); color: var(--honey-deep); }

.seg-3 button { font-size: 13px; padding: 8px 4px; }

.request-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px; margin-bottom: 8px;
}
.request-card.req-confirmed { border-color: rgba(46,158,107,0.35); background: rgba(46,158,107,0.06); }
.request-card.req-rejected { opacity: 0.7; }
.req-status-badge { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--honey-deep); }
.request-card.req-confirmed .req-status-badge { color: #1f7a4d; }
.request-card.req-rejected .req-status-badge { color: var(--danger); }

.swap-admin-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 10px;
}

/* ============================================================
   Aufgaben
   ============================================================ */

.task-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 13px; margin-bottom: 9px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.task-card.task-open { border-color: rgba(224,146,46,0.4); background: rgba(224,146,46,0.06); }
.task-card.task-pending { opacity: 0.75; }

.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.task-desc { font-size: 12.5px; color: var(--muted); }
.task-repeat { font-size: 12px; color: var(--honey-deep); font-weight: 600; }

.task-points {
  font-family: var(--f-mono); font-weight: 700; font-size: 16px; color: var(--matcha);
  flex: 0 0 auto; white-space: nowrap;
}
.task-points small { font-size: 11px; opacity: 0.7; margin-left: 1px; }

.task-action { flex: 0 0 auto; }

.task-points-badge {
  font-family: var(--f-mono); font-weight: 700; font-size: 13px; color: var(--matcha);
  background: rgba(46,158,107,0.12); border-radius: 8px; padding: 5px 8px;
  flex: 0 0 auto; white-space: nowrap;
}

/* ============================================================
   Infos / Neuigkeiten
   ============================================================ */

.news-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 17px; margin-bottom: 12px; position: relative;
}
.news-card.news-pinned { border-color: rgba(224,146,46,0.45); background: rgba(224,146,46,0.06); }
.news-pin-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--honey-deep);
  background: rgba(224,146,46,0.14); padding: 4px 9px; border-radius: 999px; margin-bottom: 9px;
}
.news-title {
  font-family: var(--f-display); font-size: 17px; font-weight: 700;
  color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em;
}
.news-body { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.news-edit-btn { border: 0; background: transparent; color: var(--honey-deep); font-weight: 600; font-size: 12.5px; padding: 0; }

/* ============================================================
   Rangliste
   ============================================================ */

.lb-head { text-align: center; margin: 4px 0 22px; }
.lb-year {
  font-family: var(--f-display); font-size: 38px; font-weight: 800;
  color: var(--ink); margin: 0; letter-spacing: -0.02em;
}
.lb-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.lb-podium { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 24px; }
.lb-podium-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 16px; padding: 16px 8px 14px;
  background: var(--paper-2); border: 1px solid var(--line);
}
.lb-medal { font-size: 30px; line-height: 1; }
.lb-podium-name {
  font-weight: 700; font-size: 13.5px; color: var(--ink); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.lb-podium-points {
  font-family: var(--f-mono); font-weight: 800; color: var(--honey-deep); font-size: 17px;
}
.lb-podium-points small { font-size: 11px; opacity: 0.7; margin-left: 1px; }

/* Höhenstaffelung: 1. Platz in der Mitte am höchsten, klassisches Podium-Gefühl */
.lb-podium { align-items: flex-end; }
.lb-rank-1 { order: 2; padding-top: 22px; background: linear-gradient(160deg, rgba(224,146,46,0.16), var(--paper-2)); border-color: rgba(224,146,46,0.5); }
.lb-rank-2 { order: 1; }
.lb-rank-3 { order: 3; }
.lb-rank-1 .lb-medal { font-size: 36px; }

.lb-podium-card.lb-is-me { box-shadow: 0 0 0 2px var(--honey) inset; }

.lb-list { display: flex; flex-direction: column; gap: 7px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px;
}
.lb-row.lb-is-me { border-color: var(--honey); background: rgba(224,146,46,0.07); }
.lb-rank { font-family: var(--f-mono); font-weight: 700; color: var(--muted); width: 22px; flex: 0 0 auto; }
.lb-row-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row-points { font-family: var(--f-mono); font-weight: 700; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; }
.lb-row-points small { font-size: 11px; opacity: 0.7; margin-left: 1px; }

.lb-footnote { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }

/* ============================================================
   Punktekonto
   ============================================================ */

.pa-summary { margin-bottom: 18px; }
.pa-name { font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.pa-stats { display: flex; gap: 8px; }
.pa-stat {
  flex: 1; text-align: center; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 4px;
}
.pa-stat-val { display: block; font-family: var(--f-mono); font-weight: 800; font-size: 18px; color: var(--honey-deep); }
.pa-stat-lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.tx-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.tx-row:last-child { border-bottom: 0; }
.tx-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-note { font-weight: 600; font-size: 14px; color: var(--ink); }
.tx-meta { font-size: 12px; color: var(--muted); }
.tx-amount { font-family: var(--f-mono); font-weight: 800; font-size: 15px; flex: 0 0 auto; }
.tx-positive { color: #1f7a4d; }
.tx-negative { color: var(--danger); }

/* ============================================================
   Punkte-Shop
   ============================================================ */

.shop-balance {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(160deg, rgba(224,146,46,0.14), var(--paper-2));
  border: 1px solid rgba(224,146,46,0.4); border-radius: 16px;
  padding: 18px; margin-bottom: 22px; text-align: center;
}
.shop-balance-val { font-family: var(--f-mono); font-weight: 800; font-size: 32px; color: var(--honey-deep); }
.shop-balance-lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

.shop-item-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px; margin-bottom: 9px;
}
.shop-item-card.shop-item-disabled { opacity: 0.55; }
.shop-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-item-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.shop-item-desc { font-size: 12.5px; color: var(--muted); }
.shop-item-stock { font-size: 11.5px; color: var(--honey-deep); font-weight: 600; }
.shop-item-cost {
  font-family: var(--f-mono); font-weight: 800; font-size: 16px; color: var(--honey-deep);
  flex: 0 0 auto; white-space: nowrap;
}
.shop-item-cost small { font-size: 11px; opacity: 0.7; margin-left: 1px; }
.shop-item-action { flex: 0 0 auto; }

/* ============================================================
   Arbeitszeiterfassung
   ============================================================ */

.clock-widget {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 16px;
}
.clock-widget.clock-active { border-color: rgba(46,158,107,0.4); background: rgba(46,158,107,0.06); }
.clock-info { display: flex; flex-direction: column; gap: 2px; }
.clock-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.clock-time { font-family: var(--f-mono); font-weight: 800; font-size: 20px; color: #1f7a4d; }
.btn-clock { flex: 0 0 auto; min-width: 130px; }

.clock-history-toggle {
  display: block; width: 100%; text-align: center; background: transparent; border: 0;
  color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 0 14px;
}
.clock-history { margin-bottom: 6px; }
.clock-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 6px; font-size: 13px;
}
.clock-entry-range { color: var(--ink-2); font-weight: 500; }
.clock-entry-dur { font-family: var(--f-mono); font-weight: 700; color: var(--honey-deep); white-space: nowrap; }

/* ============================================================
   Monatsstunden / Arbeitszeitkonten
   ============================================================ */

.month-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 18px;
}
.month-nav-label { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); min-width: 140px; text-align: center; }

.month-nav-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
}
.month-nav-btn:active { background: var(--line); }
.month-nav-btn svg { width: 20px; height: 20px; }

.mh-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 9px; text-align: left; font-family: inherit;
}
.mh-row:not(:disabled):active { background: var(--line); }
.mh-row:disabled { cursor: default; opacity: 0.85; }
.mh-main { flex: 1.3; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mh-name { font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-sub { font-size: 12px; color: var(--muted); }

.mh-hours, .mh-balance { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mh-worked { font-family: var(--f-mono); font-weight: 700; font-size: 15px; color: var(--ink-2); }
.mh-worked-lbl, .mh-balance-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.mh-balance-val { font-family: var(--f-mono); font-weight: 800; font-size: 15px; }
.mh-balance-pos .mh-balance-val { color: #1f7a4d; }
.mh-balance-neg .mh-balance-val { color: var(--danger); }

/* ============================================================
   Update-Banner
   ============================================================ */

#hoch3-update-banner {
  position: fixed; left: 0; right: 0; top: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  animation: hoch3SlideDown 0.25s ease;
}
@keyframes hoch3SlideDown { from { transform: translateY(-100%); } }
#hoch3-update-banner button {
  background: var(--honey); color: #fff; border: 0; border-radius: 9px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; font-family: var(--f-ui);
}
#hoch3-update-banner button:active { background: var(--honey-deep); }
#hoch3-update-banner button:disabled { opacity: 0.7; }

/* ============================================================
   Pausen-Einträge (visuell unterschieden)
   ============================================================ */

.is-break-row { background: rgba(224,146,46,0.07); border-color: rgba(224,146,46,0.3); opacity: 0.85; }

/* ============================================================
   Benachrichtigungen (Glocke)
   ============================================================ */

.icon-btn-bell { position: relative; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 800; font-family: var(--f-mono);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
}

.notif-row {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  padding: 12px 13px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  margin-bottom: 8px; color: var(--ink);
}
.notif-row:active { background: var(--line); }
.notif-icon { font-size: 20px; flex: 0 0 auto; line-height: 1.3; }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-text { font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.notif-time { font-size: 12px; color: var(--muted); }

/* ============================================================
   Abwesenheiten
   ============================================================ */

.abs-summary-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 7px;
}
.abs-summary-name { font-weight: 600; font-size: 14.5px; color: var(--ink); flex: 1; min-width: 80px; }
.abs-summary-stat { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }

/* ============================================================
   Wochenstunden
   ============================================================ */

.wo-warning {
  background: rgba(214,80,57,0.1); border: 1px solid rgba(214,80,57,0.35);
  color: var(--danger); font-weight: 600; font-size: 13.5px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 14px;
}
.wo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 7px;
}
.wo-row-warn { border-color: rgba(214,80,57,0.4); background: rgba(214,80,57,0.06); }
.wo-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.wo-hours { display: flex; align-items: baseline; gap: 6px; }
.wo-hours-val { font-family: var(--f-mono); font-weight: 800; font-size: 16px; color: var(--ink); }
.wo-row-warn .wo-hours-val { color: var(--danger); }
.wo-hours-target { font-size: 12px; color: var(--muted); }
