/* CityWorld : administration. Sobre, lisible, responsive. */
:root { --ink:#1f3b33; --muted:#5b6f66; --line:#e3ddcc; --bg:#f7f4ec; --card:#fff; --green:#2b8452; --green-l:#e3f6ea; --amber:#c98a14; --amber-l:#fff4d6; --red:#c13d51; --red-l:#fde8eb; --violet:#6a4fb8;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; }
a { color: var(--green); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: #f1ede2; padding: 1px 5px; border-radius: 5px; }
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
aside { background: #1f3b33; color: #e8efe9; padding: 18px 12px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 900; font-size: 24px; color: #fff; padding: 0 8px; }
.brand span { color: #f2b134; }
.brand small { display: block; font-size: 12px; font-weight: 600; color: #9fb7ab; }
.brand.big { color: var(--green); font-size: 34px; text-align: center; }
aside nav { display: flex; flex-direction: column; gap: 2px; }
aside nav a { color: #d3e0d8; text-decoration: none; padding: 8px 10px; border-radius: 10px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
aside nav a i { font-style: normal; width: 18px; text-align: center; opacity: .8; }
aside nav a:hover { background: rgba(255,255,255,.08); }
aside nav a.on { background: #fff; color: var(--ink); }
.who { margin-top: auto; padding: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.who b, .who small { display: block; }
.who small { color: #9fb7ab; }
.who .link { color: #f2b134; }
main { padding: 22px 28px 60px; min-width: 0; }
.top h1 { margin: 0 0 14px; font-size: 26px; }
.lead, .muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; position: relative; }
.tile small { color: var(--muted); font-weight: 700; display: block; }
.tile b { display: block; font-size: 26px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12.5px; }
.tile em { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--amber-l); color: var(--amber); padding: 2px 8px; border-radius: 99px; }
.tile.estimate { border-style: dashed; }
.tile.alert { border-color: var(--red); background: var(--red-l); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid #efe9dc; vertical-align: middle; }
tr:hover td { background: #fbf9f3; }
.empty { color: var(--muted); padding: 10px 0; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; background: #eee8da; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--green-l); color: var(--green); }
.badge.warn { background: var(--amber-l); color: var(--amber); }
.badge.danger { background: var(--red-l); color: var(--red); }
.btn { border: 0; background: #ece6d8; color: var(--ink); font: inherit; font-weight: 800; padding: 9px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(.96); }
.btn.primary { background: var(--green); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
form.inline input, form.inline select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.stack .field, .stack textarea { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row .field { flex: 1; min-width: 140px; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; font-weight: 700; font-size: 13px; }
.field.inline { flex-direction: row; align-items: center; gap: 6px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid #d9d2c0; border-radius: 10px; padding: 9px 10px; background: #fff; }
input[type=color] { padding: 2px; width: 44px; height: 34px; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
textarea.invalid { border-color: var(--red); background: var(--red-l); }
.search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search input { min-width: 280px; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.flash { padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 700; background: var(--green-l); color: var(--green); }
.flash.error { background: var(--red-l); color: var(--red); }
.facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.pager { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 7px 14px; border-radius: 99px; background: #ece6d8; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 13px; }
.tabs a.on { background: var(--ink); color: #fff; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin: 6px 0 10px; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.role-perms { border-top: 1px solid var(--line); padding: 10px 0; }
.role-perms h3 { margin: 4px 0; font-size: 15px; }
canvas.thumb { width: 56px; height: 56px; }
.preview { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(circle at 50% 65%, #e3f4dc, #fff 70%); display: block; margin: 8px 0; }
.kinds { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.chart { width: 100%; height: auto; }
.chart rect { fill: #3baa6a; }
.chart rect:hover { fill: #2b8452; }
.chart text { font-size: 11px; fill: var(--muted); }
.event-preview { --c: #f59e0b; border: 2px solid var(--c); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; background: #fffdf7; }
.event-preview .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.event-preview p { margin: 6px 0; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, #9fd8f0, #e3f4dc); }
.auth-card { background: #fff; border-radius: 22px; padding: 26px; width: 100%; max-width: 420px; box-shadow: 0 10px 30px rgba(31,59,51,.15); }
.auth-card h1 { font-size: 20px; text-align: center; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 800; letter-spacing: 1px; background: #f1ede2; border-radius: 10px; padding: 12px; text-align: center; word-break: break-all; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; }
  aside nav { flex-direction: row; flex-wrap: wrap; }
  .grid2 { grid-template-columns: 1fr; }
  main { padding: 16px; }
}
.tile.estimate small { padding-right: 84px; }
.app { background: linear-gradient(90deg, #1f3b33 240px, transparent 240px); }
.chart text { font-size: 9px; }
@media (max-width: 900px) { .app { background: none; } }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; align-items: end; }
