/* =======================================================================
   Store Revenue Tracker — minimalist black / white / gold, Arial, mobile.
   ======================================================================= */
:root {
  /* Surfaces — a cool near-black in four elevation steps. Warm gold on a
     cool ground is what makes the accent read as precious rather than loud. */
  --bg: #08080a;
  --card: #121216;
  --card-2: #1a1a20;
  --card-3: #23232a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  /* Text — three deliberate steps, all comfortably above 4.5:1 on cards. */
  --text: #f5f5f7;
  --text-2: #b4b4bd;
  --muted: #8e8e99;

  /* Brand gold, kept from the logo, used sparingly so it stays special. */
  --gold: #d4af37;
  --gold-2: #f0dca4;
  --gold-dim: rgba(212, 175, 55, 0.12);
  --gold-glow: rgba(212, 175, 55, 0.22);

  /* Semantics — an emerald that sits in harmony with gold, and a clean red. */
  --danger: #ff4d45;
  --danger-dim: rgba(255, 77, 69, 0.12);
  --ok: #35d07f;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 18px 46px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}
html.reduce-motion { scroll-behavior: auto; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  /* SF Pro on the owner's iPhone / Mac, Roboto on Android, Arial as the
     final fallback — the native face is what makes it feel like a system app. */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Money never jitters while live values update. */
.amount, .value, .s-val, .stat .value, .hero .value, .amount-display, .key-box {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* ---------- Header ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
  min-width: 0;
}
.brand b {
  font-size: 16px;
  letter-spacing: 0.3px;
}
.brand .brand-gold { color: var(--gold); }
.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iconbtn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.iconbtn:active { transform: scale(0.97); }
.lang-toggle { letter-spacing: 1px; }
.lang-toggle .on { color: var(--gold); }
.lang-toggle .off { color: var(--muted); }

/* dropdown menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: 42px;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 190px;
}
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
}
.menu button + button { border-top: 1px solid var(--line); }
.menu button:active { background: var(--card); }
.hidden { display: none !important; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
}
.tabs button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: bold;
  padding: 10px 4px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Content ---------- */
main {
  flex: 1;
  padding: 16px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card.tight { padding: 12px; }

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 2px 0 10px;
}

/* stat tiles */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.stat .value {
  font-size: 30px;
  font-weight: bold;
  margin-top: 6px;
}
.stat.gold .value { color: var(--gold); }

/* big hero total */
.hero {
  background: linear-gradient(160deg, #1c1913 0%, var(--card) 60%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.hero .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.hero .value {
  font-size: 46px;
  font-weight: bold;
  color: var(--gold);
  margin: 6px 0 2px;
  line-height: 1;
}
.hero .sub { color: var(--muted); font-size: 13px; }

/* ---------- Amount entry ---------- */
.entry .amount-input {
  width: 100%;
  text-align: center;
  font-size: 44px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  outline: none;
}
.entry .amount-input:focus { border-color: var(--gold); }
.entry .hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 12px;
}
.btn-pay {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1400;
  font-size: 20px;
  font-weight: bold;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-pay:active { transform: scale(0.99); filter: brightness(1.05); }
.btn-pay:disabled { opacity: 0.5; cursor: default; }

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1400;
  font-weight: bold;
  font-size: 14px;
  padding: 12px 14px;
  cursor: pointer;
}
.btn:active { transform: scale(0.99); }
.btn.block { width: 100%; }
.btn-ghost {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-danger { background: none; border: 1px solid var(--danger); color: var(--danger); }
.btn-sm { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.input, select.input {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  padding: 12px;
  outline: none;
  font-family: inherit;
}
.input:focus { border-color: var(--gold); }
select.input { appearance: none; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: none; }
.row .rank {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row .rank.top { background: var(--gold-dim); color: var(--gold); border-color: rgba(212,175,55,.4); }
.row .main { flex: 1; min-width: 0; }
.row .main .name { font-weight: bold; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row .amount { font-weight: bold; font-size: 16px; }
.row .amount.gold { color: var(--gold); }
.row.clickable { cursor: pointer; }
.row.clickable:active { background: var(--card-2); }
.row .chev { color: var(--muted); font-size: 18px; }

.pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.pill.gold { color: var(--gold); border-color: rgba(212,175,55,.4); background: var(--gold-dim); }
.pill.off { color: var(--danger); border-color: rgba(229,83,60,.4); }
.pill.ok { color: var(--ok); border-color: rgba(70,178,106,.4); }

.empty { color: var(--muted); text-align: center; padding: 26px 10px; font-size: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Login ---------- */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  gap: 18px;
}
.login-logo { text-align: center; margin-bottom: 6px; }
.login-logo .mark {
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 1px;
}
.login-logo .mark span { color: var(--gold); }
.login-logo .tag { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* Textknoepfe unter den Anmeldeformularen: "Passwort vergessen",
   "Studio registrieren", "zurueck". Bewusst grosszuegig angetippt —
   ein Teil der Zielgruppe bedient das mit dem Daumen. */
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.linkbtn {
  background: none;
  border: none;
  padding: 8px 2px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.linkbtn.gold { color: var(--gold); font-weight: bold; }
.linkbtn:active { opacity: 0.6; }

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  max-width: 88%;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { border-color: rgba(70,178,106,.5); }
#toast.err { border-color: rgba(229,83,60,.5); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 90;
}
.modal {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  padding: 18px;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 14px; font-size: 17px; }
@media (min-width: 520px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 18px; }
}

/* small loading shimmer */
.loading { color: var(--muted); text-align: center; padding: 30px; font-size: 14px; }
.dot-live {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(70,178,106,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(70,178,106,.5); }
  70% { box-shadow: 0 0 0 7px rgba(70,178,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(70,178,106,0); }
}

/* =======================================================================
   v2 — Lytchie branding, numpad, check-in, tombstones, week navigator
   ======================================================================= */

/* brand: logo mark + text */
.brand { flex-direction: row; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.login-mark { width: 320px; max-width: 84%; height: auto; display: block; margin: 0 auto 6px; }

/* refresh button (gold icon) */
@keyframes nm-spin { to { transform: rotate(360deg); } }
.spinning { animation: nm-spin 0.7s linear; }
.refresh-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  line-height: 0;
}
.refresh-btn img { width: 100%; height: 100%; display: block; }
.refresh-btn:active { transform: scale(0.94); }

/* numeric keypad for revenue entry */
.amount-display {
  width: 100%;
  text-align: center;
  font-size: 46px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.amount-display.empty { color: #4b4b52; }
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.numpad button {
  font-size: 24px;
  font-weight: bold;
  padding: 16px 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.numpad button:active { background: #262629; transform: scale(0.97); }
.numpad .np-action { color: var(--gold); font-size: 20px; }

/* check-in */
.checkin-cta { text-align: center; }
.checkin-cta .big-emoji { font-size: 34px; }
.pos-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  border: 1px solid rgba(212,175,55,.4);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: bold;
  font-size: 14px;
}
.pos-badge .num {
  background: var(--gold);
  color: #1a1400;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* deleted (tombstone) rows — red, transparent history */
.row.deleted .name { color: var(--muted); text-decoration: line-through; }
.row.deleted .amount { color: var(--danger); text-decoration: line-through; opacity: .85; }
.tomb {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .6px;
  color: var(--danger);
  border: 1px solid rgba(229,83,60,.45);
  background: rgba(229,83,60,.10);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* week navigator */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.weeknav .range { text-align: center; flex: 1; }
.weeknav .range b { font-size: 14px; }
.weeknav .range small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }

/* info banner (entry closed etc.) */
.banner {
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.banner.warn { border-color: rgba(229,83,60,.45); color: #e8b6ac; }
.banner .big-emoji { font-size: 30px; display: block; margin-bottom: 6px; }

/* =======================================================================
   v3 — green revenues, iOS-style toggle, grouped accounts, closed state
   ======================================================================= */
:root { --green: #35d07f; --green-soft: rgba(53, 208, 127, 0.13); }

/* revenues in light green; deleted stay red (specificity matches the v1 rules) */
.row .amount.gold { color: var(--green); }
.stat.gold .value { color: var(--green); }
.hero .value { color: var(--green); }
.hero { background: linear-gradient(160deg, #12140f 0%, var(--card) 60%); }
.row.deleted .amount { color: var(--danger); }

/* iOS-style active / inactive toggle */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #3a3a40; transition: background .25s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .25s ease; box-shadow: 0 1px 3px rgba(0,0,0,.5);
  pointer-events: none;
}
.switch input:checked ~ .track { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.switch input:checked ~ .knob { transform: translateX(18px); }
.switch input:disabled { cursor: default; }
.switch.locked { opacity: .5; }

/* accounts grouped by type, symmetric rows */
.acc-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--gold); margin: 16px 2px 4px; font-weight: bold;
}
.acc-group-title:first-child { margin-top: 4px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.acc-row + .acc-row { border-top: 1px solid var(--line); }
.acc-group .acc-row:first-of-type { border-top: none; }
.acc-row .a-main { flex: 1; min-width: 0; }
.acc-row .a-name { font-weight: bold; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row.off .a-name { color: var(--muted); }
.acc-row .a-user { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row .a-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.acc-iconbtn {
  border: 1px solid var(--line-strong); background: var(--card-2); color: var(--text);
  width: 34px; height: 34px; border-radius: 9px; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.acc-iconbtn.danger { border-color: rgba(229,83,60,.4); color: var(--danger); }

/* dimmed / closed */
.list.closed, .card.closed { opacity: .45; filter: grayscale(.35); pointer-events: none; }

/* =======================================================================
   v4 — daily settlement (Tagesabrechnung) + month detail
   ======================================================================= */

/* dashboard hero becomes tappable → opens today's settlement */
.hero.clickable { cursor: pointer; }
.hero.clickable:active { filter: brightness(1.12); }
.hero .hero-link {
  margin-top: 10px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.4px;
  color: var(--gold);
}

/* settlement sheet — clean label/value rows like the sample */
.settle-title { text-align: center; font-size: 20px; font-weight: bold; margin: 2px 0; }
.settle-sub { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0 14px; }
.s-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.s-row .lbl { font-weight: 600; font-size: 15px; }
.s-row .s-val { font-weight: bold; font-size: 16px; white-space: nowrap; }
.s-row.total .lbl, .s-row.total .s-val { font-size: 17px; }
.s-sep { border: none; border-top: 1px solid var(--line-strong); margin: 4px 0; }
.s-sep.short { width: 40%; margin-left: auto; }
.s-green { color: var(--green); }
.s-red { color: var(--danger); }
.s-input {
  width: 132px;
  text-align: right;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green);
  font-weight: bold;
  font-size: 16px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
}
.s-input:focus { border-color: var(--gold); }
.s-input::placeholder { color: #4b4b52; font-weight: normal; }
.settle-lock { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }

/* =======================================================================
   v5 — hand/feet categories, 24h settlement edit, monthly settlement
   ======================================================================= */

/* two confirm buttons on the employee numpad: $ Feet | $ Hand */
.pay-row { display: flex; gap: 10px; }
.pay-row .btn-pay { flex: 1; font-size: 18px; padding: 15px 8px; }

/* hand / feet note pills in revenue lists */
.pill.cat-hand { color: var(--gold); border-color: rgba(212, 175, 55, 0.4); background: var(--gold-dim); }
.pill.cat-feet { color: var(--text); border-color: var(--line-strong); background: var(--card-2); }
.row.deleted .pill { opacity: 0.6; }

/* three stat tiles in one row (hand / feet / total) */
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats3 .stat { padding: 12px 10px; }
.stats3 .stat .value { font-size: 20px; margin-top: 4px; }

/* tappable card (monthly settlement entry point) */
.clickable-card { cursor: pointer; }
.clickable-card:active { background: var(--card-2); }

/* =======================================================================
   v6 — monthly payroll
   ======================================================================= */
.settle-section { text-align: center; font-weight: bold; font-size: 16px; margin: 10px 0 2px; }
.s-input.deduct { color: var(--danger); }
.s-select {
  width: 132px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-weight: bold;
  font-size: 16px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
  appearance: none;
  text-align: right;
}
.s-select:focus { border-color: var(--gold); }
.s-lbl-input {
  flex: 1;
  min-width: 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
}
.s-lbl-input:focus { border-color: var(--gold); }
.s-lbl-input::placeholder { color: #6b6b72; }

/* =======================================================================
   v9 — payroll periods, privacy screen, connection pulse
   ======================================================================= */

/* commission: whole percent, 1–100 */
.rate-wrap { display: flex; align-items: center; gap: 8px; }
.s-input.rate { width: 76px; text-align: right; }
.rate-wrap .pct { font-weight: 700; font-size: 15px; color: var(--text-2); }

/* values pulled forward from the employee's previous period */
.carry-note {
  background: var(--gold-dim);
  border: 1px solid rgba(212, 175, 55, 0.32);
  color: var(--gold);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* ---------- privacy screen (tab / app-switcher preview) ---------- */
#privacyScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  /* fades out gently, but appears instantly (see .privacy below) so it
     wins the race against the OS snapshot */
  transition: opacity 0.22s var(--ease-soft);
  /* Promoted to its own compositor layer up front, so switching it on is a
     compositor-only change with no layout or repaint work — that is what
     makes it fast enough to beat the iOS app-switcher snapshot. */
  transform: translateZ(0);
  will-change: opacity;
  backface-visibility: hidden;
}
/* Die Wortmarke traegt den Namen bereits — daneben braucht es keinen Text. */
#privacyScreen img {
  width: 240px;
  max-width: 64%;
  height: auto;
  display: block;
}
html.privacy #privacyScreen {
  opacity: 1;
  pointer-events: auto;
  transition: none;
}

/* ---------- connection pulse on the day total ---------- */
@keyframes nm-live {
  0%, 100% { opacity: 1; text-shadow: 0 0 44px rgba(53, 208, 127, 0.24); }
  50%      { opacity: 0.5; text-shadow: 0 0 8px rgba(53, 208, 127, 0.08); }
}
@keyframes nm-live-off {
  0%, 100% { opacity: 1; text-shadow: 0 0 44px rgba(255, 77, 69, 0.26); }
  50%      { opacity: 0.42; text-shadow: 0 0 8px rgba(255, 77, 69, 0.08); }
}
.live-value { animation: nm-live 3.2s ease-in-out infinite; }
html.offline .live-value {
  color: var(--danger) !important;
  animation-name: nm-live-off;
}
/* Colour still communicates the state when motion is switched off. */
html.reduce-motion .live-value { animation: none; }

/* =======================================================================
   v7 — bulk staff switch + automation key
   ======================================================================= */
.btn-lock {
  background: linear-gradient(180deg, #f0705c, var(--danger));
  color: #fff;
  border: none;
}
.key-box {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--gold);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  line-height: 1.5;
}

/* =======================================================================
   v8 — premium pass: motion, depth, typography, refined components
   ======================================================================= */

/* ---------- motion: scroll reveals + view transitions ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  will-change: opacity, transform;
}
.reveal-in {
  opacity: 1;
  transform: none;
}
.reveal-in:not(.hero) { will-change: auto; }
html.reduce-motion .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- shell ---------- */
main { gap: 18px; padding: 18px 16px 56px; }

.appbar {
  padding: 15px 16px;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease-soft), background 0.35s var(--ease-soft);
}
.appbar.scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 8, 10, 0.88);
}
.brand b { letter-spacing: -0.01em; font-size: 17px; }
.brand small { color: var(--muted); letter-spacing: 0.01em; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; }

.iconbtn {
  border-radius: 12px;
  background: var(--card);
  border-color: var(--line);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease-soft);
}
.iconbtn:active { transform: scale(0.94); background: var(--card-2); }

/* ---------- tabs ---------- */
.tabs { padding: 6px 12px 0; gap: 2px; }
.tabs button {
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 12px 4px 14px;
  border-bottom-width: 2px;
  transition: color 0.28s var(--ease-soft);
}
.tabs button.active { color: var(--text); border-bottom-color: var(--gold); }
/* Segmented panels sit inside a card and have four options — keep them on
   one line so the control reads as a single row. */
.card .tabs { padding: 0; }
.card .tabs button {
  font-size: 12px;
  letter-spacing: -0.005em;
  padding: 9px 2px 11px;
  white-space: nowrap;
}

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 42%), var(--card);
  border-radius: var(--radius);
  border-color: var(--line);
  box-shadow: var(--edge);
  padding: 18px;
}
.card.tight { padding: 14px; }
.section-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- hero: parallax + glow ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 20px 28px;
  border-radius: 22px;
  background: linear-gradient(168deg, #14181a 0%, var(--card) 58%);
  border: 1px solid var(--line);
  box-shadow: var(--edge), var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  top: -46%;
  left: 50%;
  width: 320px;
  height: 320px;
  margin-left: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-soft) 0%, transparent 68%);
  pointer-events: none;
  opacity: var(--par-fade, 1);
  transform: translate3d(0, calc(var(--par, 0px) * -0.5), 0);
}
.hero .label,
.hero .value,
.hero .sub,
.hero .hero-link {
  position: relative;
  transform: translate3d(0, calc(var(--par, 0px) * -1), 0);
  opacity: var(--par-fade, 1);
}
.hero .label { font-size: 11px; letter-spacing: 0.16em; font-weight: 600; }
.hero .value {
  font-size: 54px;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 10px 0 4px;
  text-shadow: 0 0 44px rgba(53, 208, 127, 0.22);
}
.hero .sub { color: var(--text-2); font-size: 13px; }
.hero .hero-link { margin-top: 14px; letter-spacing: 0.02em; }

/* ---------- stat tiles ---------- */
/* Column layout with the value pinned to the bottom, so tiles whose label
   wraps to two lines still line their numbers up with their neighbour. */
.stat {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 46%), var(--card);
  border-radius: var(--radius-sm);
  border-color: var(--line);
  box-shadow: var(--edge);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
}
.stat .label {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 600;
  line-height: 1.35;
}
.stat .value { font-size: 28px; letter-spacing: -0.025em; margin-top: 8px; }
.stats3 .stat { min-height: 84px; }
.stats3 .stat .value { font-size: 21px; }

/* ---------- lists ---------- */
.row { padding: 15px 4px; }
.row .main .name { letter-spacing: -0.01em; }
.row .main .meta { color: var(--muted); }
.row .amount { font-size: 17px; letter-spacing: -0.02em; }
.row.clickable { transition: background 0.22s var(--ease-soft); border-radius: 10px; }
.row.clickable:active { background: var(--card-2); }
.row .rank { border-radius: 9px; }
.row .chev { color: var(--muted); opacity: 0.55; }

/* ---------- buttons ---------- */
.btn {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.14);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease-soft);
}
.btn:active { transform: scale(0.985); filter: brightness(1.06); }
.btn-ghost {
  box-shadow: none;
  background: var(--card);
  border-color: var(--line-strong);
}
.btn-ghost:active { background: var(--card-2); }
.btn-sm { padding: 9px 12px; border-radius: 10px; }
.btn-lock { box-shadow: 0 6px 20px rgba(255, 77, 69, 0.2); }
.btn-pay {
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
  transition: transform 0.18s var(--ease), filter 0.2s var(--ease-soft);
}
.btn-pay:active { transform: scale(0.975); }

/* ---------- numpad ---------- */
.amount-display {
  border-radius: 14px;
  font-size: 50px;
  letter-spacing: -0.03em;
  background: var(--card-2);
  border-color: var(--line);
  box-shadow: var(--edge);
  transition: color 0.25s var(--ease-soft);
}
.numpad button {
  border-radius: 14px;
  background: var(--card-2);
  border-color: var(--line);
  box-shadow: var(--edge);
  transition: transform 0.14s var(--ease), background 0.18s var(--ease-soft);
}
.numpad button:active { background: var(--card-3); transform: scale(0.95); }

/* ---------- inputs ---------- */
.input, select.input, .s-input, .s-select, .s-lbl-input {
  border-radius: var(--radius-sm);
  background: var(--card-2);
  border-color: var(--line);
  transition: border-color 0.22s var(--ease-soft), background 0.22s var(--ease-soft);
}
.input:focus, select.input:focus, .s-input:focus, .s-select:focus, .s-lbl-input:focus {
  border-color: rgba(212, 175, 55, 0.55);
  background: var(--card-3);
}
.field label { font-size: 11px; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }

/* ---------- settlement / payroll sheets ---------- */
.settle-title { font-size: 21px; letter-spacing: -0.02em; }
.settle-sub { color: var(--muted); letter-spacing: 0.01em; }
.s-row { padding: 11px 0; }
.s-row .lbl { letter-spacing: -0.01em; color: var(--text-2); }
.s-row.total .lbl { color: var(--text); }
.s-val { letter-spacing: -0.02em; }
.s-sep { border-top-color: var(--line); }
.settle-section { letter-spacing: -0.01em; }

/* ---------- pills / badges ---------- */
.pill { border-radius: 8px; letter-spacing: 0.06em; font-weight: 600; }
.pos-badge { box-shadow: var(--edge); }
.tomb { border-radius: 8px; }

/* ---------- login ---------- */
.login-wrap { gap: 22px; }
.login-logo .tag { color: var(--muted); letter-spacing: 0.01em; }

/* ---------- modal ---------- */
.modal {
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 34%), var(--card);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: nm-sheet 0.42s var(--ease);
}
.modal h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 16px; }
.modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: nm-fade 0.28s var(--ease-soft);
}
@keyframes nm-sheet { from { transform: translate3d(0, 24px, 0); opacity: 0; } }
@keyframes nm-fade { from { opacity: 0; } }
html.reduce-motion .modal,
html.reduce-motion .modal-backdrop { animation: none; }
@media (min-width: 520px) {
  .modal { border-radius: 24px; }
}

/* ---------- toast ---------- */
#toast {
  border-radius: 14px;
  background: rgba(26, 26, 32, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lift);
  transition: opacity 0.3s var(--ease), transform 0.42s var(--ease);
}

/* ---------- banner / empty ---------- */
.banner { border-radius: var(--radius); background: var(--card); box-shadow: var(--edge); }
.empty { color: var(--muted); }

/* ---------- pointer-capable screens get a lift on hover ---------- */
@media (hover: hover) and (pointer: fine) {
  .card, .stat { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
  .clickable-card:hover, .hero.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--edge), var(--shadow-lift);
  }
  .row.clickable:hover { background: var(--card-2); }
  .btn:hover, .btn-pay:hover { filter: brightness(1.05); }
}

/* Support-Zugriff aus der Konsole. Bewusst andersfarbig als der
   Ablauf-Hinweis: es ist keine Einschraenkung, sondern die Mitteilung, dass
   gerade jemand von aussen mitarbeitet. */
.banner.support {
  background: rgba(53, 208, 127, 0.10);
  border: 1px solid rgba(53, 208, 127, 0.38);
  color: var(--text);
}

/* Freitextfeld in "Problem melden". Erbt bewusst die Eingabefarben —
   ein weisses Textfeld auf schwarzem Grund blendet nachts im Studio. */
textarea.input {
  resize: vertical;
  min-height: 84px;
  font-family: inherit;
  line-height: 1.5;
}
