[hidden] { display: none !important; }
:root {
  --green: #00a13a;
  --green-dark: #007a2c;
  --gold: #a39335;
  --ink: #1b1f1c;
  --muted: #5d665f;
  --paper: #f7f5ef;
  --card: #ffffff;
  --line: #e2ded2;
  --radius: 16px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--green-dark); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.top { background: #fff; border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
header.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
header.top .brand img { height: 44px; width: auto; }
header.top nav a { margin-left: 16px; text-decoration: none; font-weight: 600; }

.hero { background: linear-gradient(135deg, #0b3d1d 0%, #00692a 60%, #00a13a 100%); color: #fff; padding: 48px 0 56px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; margin: 0 0 12px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; opacity: .95; }
.hero .zds { height: 54px; width: auto; margin-bottom: 22px; }
.hero .counter { margin-top: 18px; font-size: 1.05rem; }
.hero .counter b { font-size: 1.6rem; color: #ffe27a; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 14px 26px; font-size: 1.05rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .1s, background .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-light { background: #fff; color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green-dark); border: 2px solid var(--green); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

section { padding: 44px 0; }
section h2 { font-size: 1.7rem; margin: 0 0 8px; }
section p.sub { color: var(--muted); margin-top: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.step { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step h3 { margin: 12px 0 4px; }

.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.persona { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  text-align: left; padding: 0; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.persona img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.persona .meta { padding: 10px 12px 12px; }
.persona .name { font-weight: 700; line-height: 1.25; }
.persona .years { color: var(--muted); font-size: .9rem; }
.persona.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,161,58,.25); }
.persona .bio { display: none; }

.panel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; margin-top: 18px; }
.panel h3 { margin-top: 0; }
.chosen { display: flex; gap: 16px; align-items: flex-start; }
.chosen img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }

.toggle { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle label { flex: 1 1 160px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; }
.toggle input { margin-right: 8px; accent-color: var(--green); }
.toggle label:has(input:checked) { border-color: var(--green); background: #eef8f1; }

.photo-drop { border: 2px dashed var(--green); border-radius: var(--radius); padding: 22px; text-align: center; background: #f4fbf6; }
.photo-drop img.preview { max-height: 320px; margin: 0 auto 12px; border-radius: 12px; }
.hint { color: var(--muted); font-size: .92rem; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); flex: none; }
select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); width: 100%; max-width: 420px; background: #fff; }

.error { background: #fdecea; color: #8a1c13; border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.ok { background: #eef8f1; color: #0b5d27; border-radius: 12px; padding: 12px 14px; margin-top: 14px; }

.result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 820px) { .result { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.result img.final { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); width: 100%; }
.waiting { text-align: center; padding: 50px 10px; }
.spinner { width: 64px; height: 64px; border: 6px solid #d7eedd; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

.mosaic-frame { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--radius); background: #111; }
.partner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.partner img { height: 110px; width: auto; }

footer { background: #0f1a13; color: #cfd8d1; padding: 36px 0; margin-top: 30px; font-size: .95rem; }
footer a { color: #fff; }
footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
footer img.sgs { height: 90px; width: auto; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .85rem; }
.admin-card img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.admin-card .meta { padding: 8px; }
.admin-card.hidden-entry { opacity: .45; }
.admin-card button { font: inherit; font-size: .8rem; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 140px; }
.kpi b { display: block; font-size: 1.5rem; }
table.simple { border-collapse: collapse; background: #fff; }
table.simple td { border-bottom: 1px solid var(--line); padding: 4px 10px; }
