:root {
  --accent: #e0292e; --accent-dark: #b81f23;
  --ink: #1a1a1a; --muted: #5c5c5c; --faint: #8a8a8a;
  --bg: #f4f4f5; --surface: #ffffff; --surface-alt: #f6f6f7;
  --line: #e7e7e9; --line-2: #d8d8db;
  --warn-bg: #fdecec;
  --font-head: 'Montserrat', 'Arial Black', Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 3px rgba(20,20,22,.06), 0 6px 20px rgba(20,20,22,.05);
}

* { box-sizing: border-box; }
body { font-family: var(--font-body); margin: 0; background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; }
h1 { font-family: var(--font-head); letter-spacing: -.02em; margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--accent); font-size: 13px; min-height: 18px; }

.brand { font-family: var(--font-head); font-weight: 800; font-size: 17px; }
.brand .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin: 0 1px 2px; }
.brand-sub { font-family: var(--font-body); font-weight: 600; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-left: 2px; }

input, select, button { font: inherit; padding: 8px 11px; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--surface); color: var(--ink); }
button { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
  cursor: pointer; }
button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.link { background: none; border: none; color: var(--muted); text-decoration: underline;
  cursor: pointer; padding: 4px 6px; }

/* ---- Přihlášení ---- */
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
#login[hidden] { display: none; }
#loginForm { width: min(340px, 90vw); background: var(--surface); padding: 28px;
  border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
#loginForm .brand { margin-bottom: 8px; }
#loginForm label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
#loginForm button { margin-top: 6px; }

/* ---- Admin konzole ---- */
header { display: flex; align-items: center; gap: 14px; padding: 14px 24px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
header #who { flex: 1; }
main { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

#companiesWrap { margin-top: 18px; background: var(--surface); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint);
  background: var(--surface-alt); }
tr:last-child td { border-bottom: none; }
td select { padding: 5px 8px; }
td input[type="text"] { margin: 0; padding: 6px 9px; width: 160px; }
.usage-full { color: var(--accent); font-weight: 700; }

/* Souhlasy a poslední využití */
.section-h { margin-top: 40px; }
.table-wrap { margin-top: 12px; background: var(--surface); border-radius: 12px;
  box-shadow: var(--shadow); overflow-x: auto; }
#companiesWrap { overflow-x: auto; }
td .muted { font-size: 12px; }
.ok { color: #1e7a3c; font-weight: 600; }
.warn { color: var(--accent); font-weight: 600; }
.filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  margin-top: 10px; }
.filter input { padding: 0; margin: 0; }

/* Počty dat u firmy */
.data-cell { font-size: 12.5px; white-space: nowrap; line-height: 1.5; }

/* Hromadný e-mail */
.bc { margin-top: 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.bc label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.bc label select { align-self: flex-start; }
.bc textarea { font: inherit; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 8px;
  resize: vertical; }
.bc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
code { font-size: 12px; background: var(--surface-alt); padding: 1px 4px; border-radius: 4px; }
