/* dexplan web: dark, calm surfaces, type colors only as accents. Breakpoints (docs/webapp_konzept.md):
   >= 1280 px sidebar + columns, 900-1279 px narrow sidebar, < 900 px one column + bottom tab bar. */
:root {
  --bg: #14161a; --panel: #1c1f25; --panel-2: #23272f; --line: #2e333d;
  --text: #e6e8eb; --muted: #9aa1ab; --accent: #5aa9ff; --good: #4cc38a; --warn: #f0b44c; --bad: #ef6461;
  --radius: 10px; --tap: 44px;
  font-family: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky;
  top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 1.1rem; margin: 4px 8px 18px; }
.nav-group { margin-bottom: 14px; }
.nav-group .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 0 8px 4px; }
.nav-group a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.nav-group a.active, .nav-group a:hover { background: var(--panel-2); }
main { padding: 20px 24px 40px; max-width: 1500px; width: 100%; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px;
  flex-wrap: wrap; }
.job { font-size: .85rem; color: var(--muted); }
.job.rechnet { color: var(--warn); }
.job.Fehler { color: var(--bad); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card + .card { margin-top: 0; }
.stack > * + * { margin-top: 16px; }

/* tables and rows */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; color: #fff;
  margin-right: 4px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--panel-2); font-size: .8rem; }
.boss-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.boss-pick a { padding: 8px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); min-height: var(--tap); display: inline-flex; align-items: center; }
.boss-pick a.active { border-color: var(--accent); }

/* team (compact + expandable) */
.team { list-style: none; margin: 0; padding: 0; }
.team li { border-bottom: 1px solid var(--line); }
.team details summary { list-style: none; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px;
  align-items: center; padding: 10px 4px; cursor: pointer; min-height: var(--tap); }
.team details summary::-webkit-details-marker { display: none; }
.team .pos { color: var(--muted); font-weight: 700; }
.team .name { font-weight: 600; }
.team .moves { color: var(--muted); font-size: .85rem; }
.team .value { font-variant-numeric: tabular-nums; }
.team .more { padding: 0 4px 12px 36px; color: var(--muted); font-size: .88rem; }

/* copy strings */
.copy { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 14px; }
.copy code { flex: 1; background: var(--panel-2); border-radius: 8px; padding: 10px; overflow-x: auto;
  white-space: nowrap; font-size: .85rem; }
button, .btn { background: var(--accent); color: #0b1220; border: 0; border-radius: 8px; padding: 0 14px;
  min-height: var(--tap); font-weight: 600; cursor: pointer; font-family: inherit; font-size: .9rem; }
button.secondary { background: var(--panel-2); color: var(--text); }
input[type=file], input[type=password] { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; min-height: var(--tap); width: 100%; }

.offline { background: var(--warn); color: #1b1300; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
  font-weight: 600; }

/* mobile tab bar */
.tabbar { display: none; }

@media (max-width: 1279px) {
  .shell { grid-template-columns: 76px 1fr; }
  .sidebar .label, .brand .full { display: none; }
  .nav-group a { font-size: .75rem; text-align: center; padding: 8px 4px; }
}
@media (max-width: 899px) {
  .shell { display: block; }
  .sidebar { display: none; }
  main { padding: 14px 14px 90px; }
  .grid { grid-template-columns: 1fr; }
  .desk { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { color: var(--muted); text-align: center; padding: 12px 0; min-height: 56px; font-size: .82rem; }
  .tabbar a.active { color: var(--accent); font-weight: 700; }
  table.cards thead { display: none; }
  table.cards tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.cards td { display: block; border: 0; padding: 2px 4px; }
  table.cards td.num { text-align: left; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* edit forms (stage 2) */
.num-in, .text-in, input[type=search] { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-height: 40px; font-family: inherit; font-size: .95rem; }
.num-in { width: 90px; text-align: right; }
.text-in { width: 100%; }
.row-form { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 8px; }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  background: var(--bg); padding: 12px 0; margin-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 899px) {
  .row-form { grid-template-columns: 1fr 1fr; }
  .savebar { bottom: 56px; }
  table.cards td .num-in { width: 110px; }
}
select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; min-height: 40px; font-family: inherit; font-size: .95rem; }
