/* Barvy a rozměry podle prototypu PWA (connectNET-PWA/css/app.css). */
:root {
  --navy: #141821;
  --blue: #1b94f4;
  --blue-dark: #1178cc;
  --orange: #f4511e;
  --green: #22a55b;
  --yellow: #e6a100;
  --red: #d93b3b;
  --bg: #eef2f7;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5d6b80;
  --line: #dde3ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 33, .06), 0 4px 14px rgba(20, 24, 33, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131b;
    --surface: #1a202c;
    --text: #e8edf5;
    --muted: #9aa7bb;
    --line: #2b3446;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--blue); }

.appbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  background: var(--navy);
  color: #fff;
}
.appbar .brand { display: flex; }
.appbar-title { font-weight: 600; }

.container { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.footer { padding: 20px 16px 24px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer a { color: inherit; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card.narrow { max-width: 480px; margin: 32px auto; }
.card h1 { margin-top: 0; font-size: 1.5rem; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--text); }
.badge-dev { background: var(--orange); color: #fff; }

.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.dot-ok { background: var(--green); }
.dot-bad { background: var(--red); }

h2 { margin: 0 0 12px; font-size: 1.1rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.item { padding: 8px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item.row { display: flex; justify-content: space-between; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.form input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-secondary { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--bg); }

.alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; border-left: 4px solid; }
.alert-info { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.alert-ok { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.alert-warn { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 12%, transparent); }
.alert-error { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
#login-error:empty { display: none; }
.badge-warn { background: var(--yellow); color: #fff; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 20px; padding: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); }
.tabs a, .tab-logout { padding: 8px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font: inherit; }
.tabs a:hover, .tab-logout:hover { background: var(--bg); }
.tabs a.active { background: var(--blue); color: #fff; }
.tab-logout { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
h2 a { color: inherit; text-decoration: none; }
h2 a:hover { color: var(--blue); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.filters select { margin-left: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; }
.filters .check { display: flex; align-items: center; gap: 6px; }

details.invoice { border-top: 1px solid var(--line); }
details.invoice:first-child { border-top: 0; }
details.invoice summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
details.invoice summary::-webkit-details-marker { display: none; }
details.invoice summary::before { content: "▸"; color: var(--muted); margin-right: 4px; }
details.invoice[open] summary::before { content: "▾"; }
.inv-code { flex: 1; }
.inv-body { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 0 0 16px 16px; }
.inv-body .kv { flex: 1 1 280px; }
.inv-actions { display: flex; align-items: flex-start; }
.qr { margin: 0; text-align: center; }
.qr img { display: block; background: #fff; padding: 8px; border-radius: 8px; }
.badge-ok { background: var(--green); color: #fff; }
.badge-error { background: var(--red); color: #fff; }
.item.total { font-weight: 600; }
.muted-card { opacity: .7; }

details.help { border-top: 1px solid var(--line); }
details.help summary { padding: 12px 0; font-weight: 600; cursor: pointer; }
.help-body { padding: 0 0 12px; }
.help-body li { margin: 4px 0; }
.inv-code .muted, .item.row .muted { white-space: nowrap; }
.inv-amount { white-space: nowrap; }
.live { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.live .kv { margin-bottom: 10px; }
.oku { margin-top: 10px; }
.oku-code { font-family: ui-monospace, monospace; font-size: 1.1em; letter-spacing: .05em; }
.btn-link { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.kinds { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kind { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; }
.kind:hover { border-color: var(--blue); background: var(--bg); }
.card.wide { max-width: 640px; }
.row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.form select, .form textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--text); font: inherit; font-weight: 400; }
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choices legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.choice { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15px !important;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice input { margin-top: 4px; }
.actions { display: flex; gap: 16px; align-items: center; }
.req-body { padding: 0 0 12px 16px; }
.req-text { white-space: pre-wrap; font: inherit; margin: 0 0 8px; }
.badge-info { background: var(--blue); color: #fff; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.danger { color: var(--red); }
.speeds { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.speeds legend { grid-column: 1 / -1; }
.row2.even { grid-template-columns: 1fr 1fr; }
.check { display: flex !important; gap: 8px; align-items: center; font-weight: 400 !important; cursor: pointer; }
.qr-pay { margin: -2px 0 8px; }
.qr-pay summary { cursor: pointer; color: var(--blue); font-size: 14px; }
.qr-pay .qr { display: inline-block; margin-top: 8px; }
.contacts { display: grid; gap: 16px 32px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin: 8px 0 4px; }
.contacts h3 { font-size: 15px; margin: 0 0 6px; }
.contacts .kv { font-size: 15px; }
