:root {
    --bg: #f6f7f4; --fg: #1d2420; --muted: #5f6b64; --card: #fff; --line: #dfe4de;
    --brand: #2f6b4f; --brand-fg: #fff; --danger: #b3261e;
    --alert: #c62828; --off: #8a8f8c;
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #151a17; --fg: #e8ece9; --muted: #a0aba4; --card: #1e2521; --line: #2f3833; --brand: #5fb58b; --brand-fg: #0c1410; --danger: #f2877f; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--brand); }
.topbar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; padding: .6rem 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.topbar nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 16px; }
.foot { padding: 12px 16px; text-align: center; color: var(--muted); font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.narrow { max-width: 460px; margin: 2rem auto; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.row > label { flex: 1; min-width: 140px; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: block; margin: 12px 0 0; font-weight: 600; font-size: .92rem; }
label.check { font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
input[type=checkbox] { display: inline; width: auto; margin-right: 6px; }
.btn { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); font: inherit; text-decoration: none; cursor: pointer; margin-top: 12px; }
.btn-primary { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
form.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.danger { color: var(--danger) !important; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--card); }
.flash-ok { border-color: #2e7d32; } .flash-error { border-color: var(--danger); } .flash-info { border-color: var(--brand); }
.field-error { color: var(--danger); font-size: .85rem; }
.grid-form { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .grid-form { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; color: var(--muted); }
tr.is-off td { opacity: .55; }
.actions { white-space: nowrap; display: flex; gap: 12px; }
.mapwrap { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
@media (max-width: 800px) { .mapwrap { grid-template-columns: 1fr; } }
.map { height: 70vh; min-height: 360px; border-radius: 10px; border: 1px solid var(--line); }
.map-small { height: 340px; min-height: 0; }
.legend { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; align-self: start; }
.legend h2 { margin-top: 0; font-size: 1.1rem; }
.side { display: grid; gap: 16px; align-self: start; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores a { display: block; text-align: center; text-decoration: none; color: var(--fg); font-size: .85rem; }
.stores img { display: block; width: 100%; max-width: 200px; height: auto; background: #fff; padding: 6px; border-radius: 8px; }
.getapp .stores a { flex: 1 1 110px; max-width: 200px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: middle; }
.dot:first-child { margin-left: 0; }
.dot-active { background: var(--alert); } .dot-old { background: var(--alert); opacity: .3; } .dot-inactive { background: var(--off); }
.marker { fill-opacity: .55; }
.marker-active { stroke: var(--alert); fill: var(--alert); }
.marker-inactive { stroke: var(--off); fill: var(--off); }
.marker-old { fill-opacity: .2; stroke-dasharray: 3 3; }
