:root {
  --bg: #f4eee1;
  --card: #fffaf0;
  --ink: #0b3d2e;
  --muted: rgba(11, 61, 46, .68);
  --line: rgba(11, 61, 46, .13);
  --accent: #0f5c46;
  --accent-2: #e6b85c;
  --danger: #a83232;
  --ok: #247a52;
  --shadow: 0 18px 45px rgba(11, 61, 46, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { width: 100%; max-width: 760px; margin: 0 auto; min-height: 100dvh; padding: 14px 14px 92px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 10px; backdrop-filter: blur(16px); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 15px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.brand strong { display: block; line-height: 1.05; font-size: 16px; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: white; border: 1px solid var(--line); font-weight: 800; }
.content { display: grid; gap: 14px; }
.page-hero { border-radius: 28px; padding: 22px; background: linear-gradient(135deg, #0b3d2e, #146b51); color: white; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.page-hero:after { content: ""; position: absolute; right: -40px; bottom: -55px; width: 150px; height: 150px; border-radius: 999px; background: rgba(255,255,255,.12); }
.page-hero h1 { margin: 2px 0 6px; font-size: clamp(28px, 7vw, 42px); letter-spacing: -.05em; line-height: .95; }
.page-hero p { margin: 0; color: rgba(255,255,255,.76); max-width: 36em; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-weight: 900; font-size: 11px; color: var(--accent-2) !important; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); background: var(--card); border-radius: 24px; padding: 16px; box-shadow: 0 10px 28px rgba(11,61,46,.08); }
.card h2, .card h3 { margin: 0 0 10px; letter-spacing: -.02em; }
.card p { color: var(--muted); }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat b { font-size: 28px; letter-spacing: -.05em; }
.stat .emoji { font-size: 32px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .meta { color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn, button.btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 16px; padding: 10px 13px; background: var(--ink); color: white; font-weight: 800; min-height: 42px; }
.btn.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.warn { background: var(--danger); color: white; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px dashed var(--line); }
.chip, .pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 10px; background: white; border: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.pill.ok { color: var(--ok); }
.pill.danger { color: var(--danger); }
.pill.gold { color: #8a5f00; background: #fff4d0; }
.flash { border-radius: 18px; padding: 12px 14px; border: 1px solid var(--line); background: white; font-weight: 700; }
.flash.success { border-color: rgba(36,122,82,.25); color: var(--ok); }
.flash.error { border-color: rgba(168,50,50,.25); color: var(--danger); }
.flash.info { color: var(--accent); }
.form { display: grid; gap: 11px; }
label span { display: block; margin: 0 0 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; color: var(--muted); }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px 13px; background: white; color: var(--ink); outline: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,92,70,.08); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.bottom-nav { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(720px, calc(100% - 20px)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px; border-radius: 24px; background: rgba(255,250,240,.94); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.bottom-nav a { display: grid; place-items: center; gap: 2px; padding: 7px 4px; border-radius: 17px; color: var(--muted); font-size: 17px; }
.bottom-nav a span { font-size: 10px; font-weight: 800; }
.bottom-nav a.active { background: var(--ink); color: white; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.admin-tabs a { white-space: nowrap; border-radius: 999px; padding: 9px 12px; background: white; border: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.empty { border: 1px dashed var(--line); border-radius: 20px; padding: 16px; background: rgba(255,255,255,.45); }
.empty p { margin: 4px 0 0; }
.auth-wrap { min-height: calc(100dvh - 40px); display: grid; place-items: center; }
.auth-card { width: min(420px, 100%); }
.kpi { min-height: 112px; }
.kpi a { color: var(--accent); font-weight: 900; }
.vote-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); padding: 14px; border-radius: 20px; background: white; }
.vote-card .dish { display: flex; align-items: center; gap: 10px; }
.vote-card .dish span { font-size: 28px; }
.progress { height: 10px; background: rgba(11,61,46,.1); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; }
.compass { width: 220px; height: 220px; border-radius: 999px; border: 12px solid white; margin: 16px auto; display: grid; place-items: center; background: radial-gradient(circle, #fff 0, #fff 50%, #f1e5ce 51%); box-shadow: var(--shadow); position: relative; }
.compass .needle { font-size: 62px; transform: rotate(var(--deg, 0deg)); transition: transform .3s ease; }
.notice.high { border-left: 6px solid #a83232; }
.notice.medium { border-left: 6px solid #e6b85c; }
.notice.low { border-left: 6px solid #247a52; }
.small { font-size: 12px; color: var(--muted); }
.danger-text { color: var(--danger); }
.center { text-align: center; }
