/* AlpenPOS Portal: Tafel-Gelb als einzige Akzentfarbe, sonst ruhig und gut lesbar */
:root {
  --ink: #1a2026; --ink-2: #3c4751; --muted: #55616c; --bg: #e6eaee; --surface: #fff; --soft: #f3f5f7; --line: #d5dbe0;
  --sign: #ffc400; --sign-soft: #fff4d6; --sign-ink: #4d3800;
  --good: #17693c; --good-bg: #dcf1e4; --bad: #9d1f17; --bad-bg: #fbe1df; --wait-bg: #e1e6ea;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); font-variant-numeric: tabular-nums; }
h1 { font-size: 28px; margin: 0; font-weight: 800; text-wrap: balance; }
h2 { font-size: 20px; margin: 0; font-weight: 800; }
h3 { font-size: 16px; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #0a72c2; outline-offset: 2px; }
.loading { padding: 40px; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.brand .wordmark { height: 40px; width: auto; display: block; }
.brand.big .wordmark { height: 64px; }
.side .firm { padding: 0 8px 18px; font-weight: 700; font-size: 15px; }
.side .firm .sub { font-weight: 400; font-size: 12px; opacity: .7; }

/* Gerüst */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 250px; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.side.dark { background: var(--ink); color: #fff; }
.side.light { background: var(--surface); border-right: 1px solid var(--line); }
.side .brand { padding: 0 8px 18px; font-size: 19px; }
.side .sub { font-size: 13px; font-weight: 400; opacity: .75; }
.side a { text-decoration: none; padding: 11px 12px; border-radius: 8px; border-left: 4px solid transparent; }
.side.dark a { color: #c9d0d7; }
.side.dark a[aria-current="page"] { background: #2c353e; color: #fff; border-left-color: var(--sign); font-weight: 600; }
.side.light a { color: var(--ink-2); }
.side.light a[aria-current="page"] { background: var(--sign-soft); color: var(--ink); font-weight: 600; border-left-color: var(--sign); }
.side .grow { flex: 1; }
.side .who { font-size: 13px; padding: 8px 12px; opacity: .8; }
.side button.link { background: none; border: 0; text-align: left; padding: 8px 12px; cursor: pointer; color: inherit; text-decoration: underline; }
main { flex: 999 1 560px; min-width: 0; padding: 28px 36px 60px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 700px) { .side { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; } .side .grow { display: none; } main { padding: 20px 16px 48px; } }

.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.head p { color: var(--muted); margin-top: 4px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Kacheln, Karten */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border-radius: 10px; padding: 14px 18px; }
.tile .k { color: var(--muted); font-size: 14px; }
.tile .v { font-size: 26px; font-weight: 800; }
.tile.warn { background: var(--sign-soft); color: var(--sign-ink); }
.card { background: var(--surface); border-radius: 10px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.note { background: var(--sign-soft); color: var(--sign-ink); border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.good { background: var(--good-bg); color: var(--good); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > * { flex: 1 1 340px; min-width: 0; }

/* Tabellen */
.tablebox { background: var(--surface); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 12px 14px; }
td { padding: 12px 14px; border-top: 1px solid #e1e6ea; vertical-align: top; }
td.num, th.num { text-align: right; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.sub2 { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--good-bg); color: var(--good); }
.pill.wait { background: var(--wait-bg); color: var(--ink-2); }
.pill.warn { background: #fff0c2; color: #6b4e00; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* Formulare */
form.stack, .stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 15px; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=month], input[type=date], input:not([type]), select {
  min-height: 44px; padding: 8px 12px; border: 1px solid #b7c0c8; border-radius: 8px; background: #fff; font-weight: 400; width: 100%;
}
input.month { max-width: 170px; }
input:disabled { background: var(--soft); color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: center; font-size: 15px; }
label.check input { width: 20px; height: 20px; }
.btn { min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid #b7c0c8; background: #fff; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
a.btn { text-decoration: none; color: var(--ink); }
a.btn.main { color: #fff; }
.btn.main { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 800; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; }

/* Schritte der Einrichtung */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.steps li { background: var(--surface); border-radius: 8px; padding: 10px 14px; border-top: 4px solid #c9d0d7; }
.steps li.done { border-top-color: var(--good); }
.steps li.now { border-top-color: var(--sign); }
.steps .s { font-size: 13px; font-weight: 600; color: var(--muted); }
.steps li.done .s { color: var(--good); }
.steps li.now .s { color: #6b4e00; }

.secret { font-family: ui-monospace, Consolas, monospace; background: var(--soft); padding: 10px 12px; border-radius: 8px; word-break: break-all; }

#toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; z-index: 10; max-width: calc(100% - 32px); }
#toast:empty { display: none; }
#toast.bad { background: var(--bad); }

/* PIN-Feld und Fahrzeug-Auswahl */
input.pin { width: 8em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; letter-spacing: .2em; }
select.regsel { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 40px; }
/* Stornierte Fahrten bleiben sichtbar, aber erkennbar */
tr.cancelled td { background: var(--bad-bg); }
tr.cancelled td.amount { text-decoration: line-through; color: var(--bad); }

/* Firmendaten zur Ansicht */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
.langpick select { max-width: 220px; }
/* Datenschutzseite */
main.doc { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; line-height: 1.6; }
main.doc .doclogo { height: 56px; margin-bottom: 16px; }
/* Arabisch: von rechts nach links */
[dir="rtl"] .num { text-align: left; }
[dir="rtl"] table th, [dir="rtl"] table td { text-align: right; }
p.sum { font-weight: 700; text-align: right; margin: 8px 4px; }
input.pin.wide { width: 12em; letter-spacing: normal; }
.row > select.regsel { width: auto; flex: 0 1 220px; min-width: 160px; }

/* Version 0.6 */
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 8px; border-radius: 10px; background: #b3261e; color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.badge[hidden] { display: none; }
.perms { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.note.read { opacity: .65; }
.row.spread { justify-content: space-between; }
tr.done td { opacity: .7; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }
