:root {
  --bg: #f3eee7; --surface: #fffdf9; --ink: #171717; --muted: #6d645c;
  --line: #e4d8cc; --primary: #ec6820; --fg: #fffdf9; --dark: #1a1a1a;
  --ok: #2d7a4f; --warn: #c0392b; --soon: #d97706;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3 { font-family: Oswald, "Arial Narrow", sans-serif; letter-spacing: .01em; margin: 0 0 .4rem; }
button:not(:disabled), [role=button] { cursor: pointer; }
input, select, textarea { font-size: 16px; font-family: inherit; }
.app { display: flex; min-height: 100dvh; max-width: 1100px; margin: 0 auto; }
.aside { display: none; width: 210px; background: var(--dark); color: var(--fg); padding: 16px; flex-direction: column; }
.aside img { height: 32px; width: auto; margin-bottom: 20px; }
.aside button, .tab { display: flex; align-items: center; gap: 8px; min-height: 44px; width: 100%; border: 0; background: transparent; color: #e4d8cc; border-radius: 12px; padding: 0 12px; text-align: left; }
.aside button.on, .tab.on { background: var(--primary); color: #fff; }
.main { flex: 1; padding: 20px 16px 96px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; justify-content: space-between; }
.btn { min-height: 44px; border: 0; border-radius: 12px; padding: 0 14px; font-weight: 700; background: var(--line); }
.btn.p { background: var(--primary); color: #fff; }
.btn.d { background: var(--dark); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.grid2 { display: grid; gap: 12px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.kpi b { display: block; font-size: 28px; font-family: Oswald, sans-serif; }
.list btn, .st { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.tag { border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.ok { background: #e8f4ec; color: var(--ok); }
.soon { background: #fff4d6; color: var(--soon); }
.overdue { background: #fde8e4; color: var(--warn); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; background: var(--dark); padding: 8px 4px max(8px, env(safe-area-inset-bottom)); }
.nav button { color: #e4d8cc; flex-direction: column; font-size: 11px; justify-content: center; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); margin: 4px 0 10px; }
label.l { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.modal { position: fixed; inset: 0; background: #0007; display: flex; align-items: flex-end; z-index: 40; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; margin: 0 auto; max-height: 92dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px; }
.login { min-height: 100dvh; background: var(--dark); color: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: 100%; max-width: 360px; }
.login input, .login select { width: 100%; background: #000; color: #fff; border: 1px solid #333; border-radius: 12px; padding: 12px; margin: 6px 0; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin: 8px 0; }
#map { height: min(72vh, 640px); border-radius: 16px; border: 1px solid var(--line); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cell { min-height: 72px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; font-size: 11px; }
.muted { color: var(--muted); font-size: 14px; }
.warn { color: var(--warn); }
.hero { position: relative; background: var(--dark); border-radius: 16px; overflow: hidden; margin: 12px 0; min-height: 160px; }
.hero img { width: 100%; height: 220px; object-fit: cover; display: block; }
@media (min-width: 800px) {
  .aside { display: flex; }
  .nav { display: none; }
  .main { padding: 28px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .modal { align-items: center; padding: 16px; }
  .sheet { border-radius: 16px; }
}
