:root { --accent: #0d9488; --accent-d: #0f766e; --accent-l: #ccfbf1; --text: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff; --warn: #b45309; --warn-bg: #fffbeb; --bad: #b91c1c; --r: 14px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--accent-d); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { white-space: nowrap; font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
#nav { display: flex; gap: 2px; flex-wrap: nowrap; justify-content: flex-end; }
#nav a { padding: 6px 9px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
#nav a.on { background: var(--accent-l); color: var(--accent-d); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 14px; } h2 { font-size: 18px; margin: 18px 0 10px; } h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.auth { max-width: 420px; margin: 24px auto; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer; background: var(--accent); color: #fff; text-decoration: none; display: inline-block; text-align: center; }
button:hover { background: var(--accent-d); }
button:disabled { opacity: .6; cursor: default; }
button.ghost, .btn.ghost { background: #fff; color: var(--accent-d); border: 1px solid var(--line); }
button.danger { background: #fff; color: var(--bad); border: 1px solid #fecaca; }
button.block { width: 100%; margin-top: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 8px; text-align: center; } .stat b { display: block; font-size: 18px; } .stat span { font-size: 12px; color: var(--muted); }
.notes { white-space: pre-wrap; margin: 8px 0; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg); }
.ph { position: relative; } .ph button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--bad); font-size: 16px; line-height: 26px; }
.reply { background: var(--accent-l); border-radius: 10px; padding: 8px 10px; margin-top: 8px; white-space: pre-wrap; } .reply .who { font-size: 12px; color: var(--accent-d); font-weight: 700; display: block; }
.client { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.client .meta { flex: 1; min-width: 0; } .client .kg { text-align: right; font-weight: 700; white-space: nowrap; }
.client.overdue, .card.overdue { border-color: #fcd34d; background: var(--warn-bg); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fde68a; color: #78350f; margin-left: 6px; }
.badge.ok { background: var(--accent-l); color: var(--accent-d); } .badge.off { background: #e2e8f0; color: var(--muted); }
.down { color: var(--accent-d); } .up { color: var(--warn); }
.chart { width: 100%; height: auto; display: block; } .chart .ln { fill: none; stroke: var(--accent); stroke-width: 3.5; } .chart .pt { fill: var(--accent); } .chart text { font-size: 19px; fill: var(--muted); } .chart .grid { stroke: var(--line); }
.code { font: 600 20px/1.2 ui-monospace, Menlo, monospace; letter-spacing: 1px; word-break: break-all; }
.linkbox { font: 13px ui-monospace, Menlo, monospace; word-break: break-all; background: var(--bg); padding: 8px; border-radius: 8px; border: 1px dashed var(--line); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }
#lightbox { position: fixed; inset: 0; background: rgba(15,23,42,.92); display: flex; align-items: center; justify-content: center; z-index: 20; }
#lightbox[hidden] { display: none; } #lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 8px; }
#lightbox .close { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--text); width: 40px; height: 40px; border-radius: 50%; padding: 0; font-size: 22px; }
.range { display: flex; align-items: center; gap: 10px; } .range input { flex: 1; padding: 0; accent-color: var(--accent); } .range output { width: 2ch; font-weight: 700; text-align: right; }
@media (min-width: 760px) { main { padding: 24px; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid2 .card { margin: 0; } }
@media (max-width: 420px) { .top { padding-left: 12px; padding-right: 8px; } #nav a { padding: 6px 7px; font-size: 13px; } .brand { font-size: 15px; } }
.notice { background: var(--accent-l); color: var(--accent-d); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
