/* Kolipak Palettenzähler — dashboard styles */
:root {
  --bg: #f2f4f5;
  --surface: #ffffff;
  --ink: #1c2429;
  --muted: #5f6f78;
  --line: #dde3e6;
  --accent: #2e6f8e;
  --accent-dark: #245a74;
  --accent-soft: #e3edf2;
  --ok: #2f7d4f;
  --ok-soft: #e2f0e8;
  --off: #8a9299;
  --off-soft: #eceff1;
  --danger: #c8402f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 16px; min-height: 56px;
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-sub { font-weight: 400; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 2px; }
nav a {
  color: var(--muted); text-decoration: none; padding: 8px 12px;
  border-radius: 6px; font-weight: 500;
}
nav a:hover { color: var(--ink); background: var(--off-soft); }
nav a.active { color: var(--accent-dark); background: var(--accent-soft); }
nav a.logout { color: var(--danger); }

/* layout */
.content { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }
.page-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 20px;
}
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 14px; color: var(--muted); font-weight: 600;
     text-transform: uppercase; letter-spacing: 0.05em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* tiles */
.tiles { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 24px; min-width: 200px; flex: 1;
  display: flex; flex-direction: column;
}
.tile-hero { border-left: 4px solid var(--accent); }
.tile-label { color: var(--muted); font-size: 13px; font-weight: 600;
              text-transform: uppercase; letter-spacing: 0.05em; }
.tile-value { font-size: 40px; font-weight: 700; line-height: 1.15;
              font-variant-numeric: tabular-nums; }
.tile-unit { color: var(--muted); font-size: 13px; }
.tile-split { color: var(--muted); font-size: 13px; margin-top: 8px;
              font-variant-numeric: tabular-nums; }
.tile-split strong { color: var(--ink); font-weight: 600; }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 24px; margin-bottom: 20px;
}

/* chart */
.chart {
  display: flex; align-items: stretch; gap: 6px;
  height: 190px; padding-top: 4px;
}
.chart-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  min-width: 0;
}
.chart-bar-area {
  flex: 1; width: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; position: relative;
}
.chart-value {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
  margin-bottom: 2px; opacity: 0; transition: opacity 0.1s;
}
.chart-col:hover .chart-value, .chart-col.today .chart-value { opacity: 1; }
.chart-bar {
  width: 70%; max-width: 34px; min-height: 2px;
  background: var(--accent); opacity: 0.55;
  border-radius: 4px 4px 0 0;
}
.chart-col.today .chart-bar { opacity: 1; }
.chart-col:hover .chart-bar { opacity: 0.85; }
.chart-day { font-size: 11px; color: var(--muted); margin-top: 6px; }
.chart-date { font-size: 11px; color: var(--muted); }
.chart-col.today .chart-day, .chart-col.today .chart-date { color: var(--accent-dark); font-weight: 600; }
@media (max-width: 600px) {
  .chart-date { display: none; }
}

/* tables */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
     color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
td.strong { font-weight: 700; }
tr:last-child td { border-bottom: none; }
tr.inactive-row td { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); margin: 4px 0; }

/* pills */
.pill {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px;
  border-radius: 10px; vertical-align: 1px;
}
.pill-on { background: var(--ok-soft); color: var(--ok); }
.pill-off { background: var(--off-soft); color: var(--off); }

/* forms + buttons */
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
input[type="text"], input[type="password"] {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 15px; min-width: 220px; background: var(--bg);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
button, .btn-small {
  background: var(--accent); color: #fff; border: none; border-radius: 7px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
}
button:hover { background: var(--accent-dark); }
.btn-small {
  background: var(--surface); color: var(--accent-dark);
  border: 1px solid var(--line); padding: 5px 12px; font-size: 13px;
}
.btn-small:hover { background: var(--accent-soft); }
.btn-small.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-small.btn-primary:hover { background: var(--accent-dark); }
code.token {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 6px; word-break: break-all;
}

/* abrechnung */
.rate-label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.rate-label input { min-width: 110px; width: 110px; }
.settle-all { margin-top: 14px; }

/* login */
.login-body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 20px;
}
.login-box form { display: flex; flex-direction: column; gap: 10px; }
.login-box label { font-size: 13px; font-weight: 600; color: var(--muted); }
.login-box input { min-width: 0; width: 100%; }
.form-error { color: var(--danger); margin: 0; font-size: 14px; }
