:root {
  --bg: #f3f0e8;
  --ink: #1c2430;
  --muted: #5c6770;
  --card: #fffdf8;
  --line: #e2dcd0;
  --green: #0f6e56;
  --green-ink: #fff;
  --amber: #a86b10;
  --red: #9d342c;
  --blue: #1f4e79;
  --shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--blue); }
header.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 16px 18px; background: #1c2430; color: #fff;
}
header.top strong { font-size: 18px; letter-spacing: 0.02em; }
header.top nav { display: flex; gap: 8px; flex-wrap: wrap; }
header.top a, header.top button.link {
  color: #fff; text-decoration: none; background: transparent; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer;
}
main { max-width: 980px; margin: 0 auto; padding: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 14px 12px; border-radius: 12px; border: 1px solid #cfc6b8;
  background: #fff; width: 100%;
}
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 14px; padding: 16px 18px;
  cursor: pointer; min-height: 56px;
}
button.primary, .btn.primary { background: var(--green); color: var(--green-ink); }
button.amber { background: #f3d7a1; color: #5c3b04; }
button.red { background: var(--red); color: #fff; }
button.ghost, .btn.ghost { background: #efeae1; color: var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.big { min-height: 84px; font-size: 22px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }
.est {
  display: block; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line);
  border-radius: 16px; padding: 18px; min-height: 72px;
}
.est strong { display: block; font-size: 20px; }
.banner { padding: 12px 14px; border-radius: 12px; background: #fde8e4; color: #6d241e; }
.ok { background: #e5f6ef; color: #0d5a46; padding: 12px 14px; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { min-height: 44px; background: #efeae1; }
.tabs button.on { background: var(--ink); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } header.top { align-items: flex-start; flex-direction: column; } }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kpi div { background: #f7f4ee; border-radius: 12px; padding: 10px; }
.kpi b { display: block; font-size: 20px; }
.err { color: var(--red); font-weight: 700; }

.install-hint {
  position: sticky; bottom: 12px; margin: 12px;
  background: #1c2430; color: #fff; border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow);
}
.install-hint p { margin: 0 0 10px; }
.install-hint button { min-height: 48px; }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { font-size: 28px; min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.staff button { width: 100%; text-align: left; font-size: 22px; padding: 16px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
video.cam { width: 160px; height: 120px; object-fit: cover; border-radius: 12px; background: #111; }
