:root {
  --bg: #f4f7f4; --card: #ffffff; --text: #1d2a21; --muted: #5f6f64; --line: #d9e3dc;
  --green: #2f7d4f; --green-dark: #246540; --sun: #f7c948; --lamp: #7b5ea7; --bad: #b4452f; --ok: #2f7d4f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--green-dark); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; word-break: break-all; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--green); color: #fff; }
.brand { color: #fff; text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: radial-gradient(circle at 65% 35%, var(--sun) 0 38%, transparent 40%), #246540; display: inline-block; }
.navlink { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 15px; text-decoration: none; cursor: pointer; }
.wrap { max-width: 640px; margin: 0 auto; padding: 12px 16px 32px; }
.foot { max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; color: var(--muted); font-size: 14px; }
h1 { font-size: 26px; margin: 10px 0 12px; }
h2 { font-size: 19px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 14px; }
.card.note { background: #fff8dd; border-color: #f0dc8a; }
.card.narrow { max-width: 420px; margin: 24px auto; }
.card.today .big { font-size: 22px; margin: 2px 0 8px; }
.label { color: var(--muted); font-size: 14px; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.big { font-size: 20px; margin: 6px 0; }
.ivs { list-style: none; padding: 0; margin: 6px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.ivs li { background: #eef3ef; border-radius: 8px; padding: 6px 10px; font-size: 20px; font-weight: 700; }
.muted { color: var(--muted); font-size: 15px; }
.center { text-align: center; }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.flash { background: #e6f4ea; border: 1px solid #b9dcc5; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.facts { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 10px 0 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.btn { display: inline-block; background: #e9f1ec; color: var(--green-dark); border: 1px solid #c9dccf; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.small { padding: 6px 10px; min-height: 0; font-size: 14px; font-weight: 500; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.side { min-width: 64px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row > label { flex: 1 1 120px; }
.form label, .row label { display: block; margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.form input, .form select, .row input, .row select, input[type=text], input[type=password], input[type=number], input[type=time], input[type=date], select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 46px; }
.row > input[type=text] { flex: 1 1 200px; margin-top: 0; }
.sub { border-left: 3px solid var(--line); padding-left: 12px; margin: 6px 0 12px; }
.inline { display: inline; }
.steps li, .step li { margin: 0 0 8px; }
.sides { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.compass { text-align: center; margin: 14px 0; }
.dial { position: relative; width: 180px; height: 180px; margin: 0 auto 8px; border-radius: 50%; border: 3px solid var(--line); background: #fff; }
.dial span { position: absolute; font-weight: 700; color: var(--muted); }
.dial .n { top: 6px; left: 50%; transform: translateX(-50%); color: var(--bad); }
.dial .s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.dial .e { right: 10px; top: 50%; transform: translateY(-50%); }
.dial .w { left: 10px; top: 50%; transform: translateY(-50%); }
.needle { position: absolute; left: 50%; top: 50%; width: 6px; height: 70px; margin: -70px 0 0 -3px; background: var(--green); border-radius: 3px; transform-origin: 50% 100%; transition: transform .15s; }
.needle::after { content: ""; position: absolute; left: -7px; top: -8px; border: 10px solid transparent; border-bottom: 14px solid var(--green); border-top: 0; }
.chart { width: 100%; height: auto; display: block; }
.chart .sun { fill: var(--sun); } .chart .lamp { fill: var(--lamp); } .chart .none { fill: var(--line); }
.chart .target { stroke: var(--muted); stroke-dasharray: 4 4; }
.chart .tick { font-size: 11px; fill: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.swatch.sun { background: var(--sun); } .swatch.lamp { background: var(--lamp); }
.scheme { width: 100%; height: auto; display: block; margin: 4px 0 10px; }
.g-ground { fill: #e3ece6; } .g-lamp { fill: #4a4f55; } .g-line, .g-frame { stroke: #4a4f55; stroke-width: 2; }
.g-rays line { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; }
.g-plant rect { fill: #b8865b; } .g-plant path { fill: var(--green); }
.g-text { font-size: 13px; fill: var(--muted); } .g-dim { stroke: var(--muted); stroke-dasharray: 3 3; }
.g-socket { fill: #fff; stroke: #4a4f55; stroke-width: 2; } .g-hole { fill: #4a4f55; } .g-led { fill: #e04b3a; }
.g-cord { fill: none; stroke: #4a4f55; stroke-width: 2; }
.g-phone { fill: #2b2f33; } .g-screen { fill: #eaf4ee; } .g-wifi { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; }
.g-window { fill: #dff0fa; stroke: #4a4f55; stroke-width: 3; } .g-arrow { stroke: var(--green); stroke-width: 3; } .g-sun { fill: var(--sun); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.tbl th, .tbl td { text-align: left; padding: 6px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 500; }
.tbl tr.unassigned td { background: #fff8dd; }
.tbl.log tr.lvl-error td { background: #fdeceb; } .tbl.log tr.lvl-warn td { background: #fff8dd; }
.user { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.user .inline.row { display: inline-flex; gap: 6px; margin-left: 8px; }
.user .inline.row input { width: 160px; min-height: 0; padding: 4px 8px; }
@media (max-width: 480px) {
  body { font-size: 16px; }
  .tbl { display: block; overflow-x: auto; }
}
