/* Επίδειξη Αδέσποτων. Δύο θέματα: «Λιμάνι» (Δήμαρχος, Δημότης) και «Αυλή» (Επιτροπή, Κτηνίατρος).
   Χωρίς εξωτερικές γραμματοσειρές ή εικόνες: λειτουργεί χωρίς σύνδεση. */
:root { --toolbar: #080808; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg);
  font-family: var(--body-font); }
body[data-theme="port"] {
  --bg: #f3ebdd; --ink: #12355b; --ink-soft: #496282; --card: #fffaf0; --line: #d9ccb2; --soft: #ebe1cc;
  --accent: #e8a33d; --accent-ink: #12355b; --accent-line: #b97d17; --focus: #12355b; --here: #12355b; --here-ink: #fffaf0;
  --head-font: Georgia, 'Source Serif 4', 'Times New Roman', serif; --body-font: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 6px; --pill-bg: #e5edf5;
}
body[data-theme="yard"] {
  --bg: #faf8f3; --ink: #24302a; --ink-soft: #566359; --card: #ffffff; --line: #dfe3d6; --soft: #eef2e6;
  --accent: #2f6b4f; --accent-ink: #ffffff; --accent-line: #245640; --focus: #2f6b4f; --here: #2f6b4f; --here-ink: #ffffff;
  --head-font: system-ui, 'Segoe UI', Roboto, Arial, sans-serif; --body-font: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 14px; --pill-bg: #e6efe0;
}

/* Γραμμή επίδειξης: ίδια με των άλλων demo */
.demo-toolbar { min-height: 58px; padding: 8px 18px; display: flex; align-items: center; gap: 8px; background: var(--toolbar);
  color: #eef5e9; border-bottom: 1px solid #31442b; font: 14px 'IBM Plex Sans', system-ui, sans-serif; }
.demo-toolbar a { color: #b5d894; text-decoration: none; font-weight: 700; white-space: nowrap; }
.demo-note { color: #b6c3ad; font-size: 12px; margin-right: auto; }
.demo-toolbar button { border: 1px solid #38513a; background: #18231a; color: #fff; border-radius: 6px; padding: 7px 10px; cursor: pointer; white-space: nowrap; font: inherit; }
.demo-toolbar button[aria-pressed="true"] { background: #3d6128; border-color: #77ac55; }
.demo-toolbar button:hover { border-color: #92bf75; }
.demo-toolbar a:focus-visible, .demo-toolbar button:focus-visible { outline: 2px solid #b5d894; outline-offset: 2px; }
@media (max-width: 800px) { .demo-toolbar { flex-wrap: wrap; padding: 8px; } .demo-note { order: 2; width: 100%; margin: 0; } }

#app { max-width: 1080px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 28px) 56px; }
h1, h2, h3 { font-family: var(--head-font); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(26px, 5vw, 36px); }
h2 { font-size: 22px; margin-bottom: 8px; }
h3 { font-size: 18px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--ink-soft); margin-bottom: 16px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }

.app-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 26px 0 16px; }
.muni { margin: 0 0 2px; font-size: 14px; color: var(--ink-soft); letter-spacing: .02em; }
.role-badge { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 650; white-space: nowrap; }

/* Ροή */
.flow { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin-bottom: 14px; }
.flow-hint { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.step a, .step-static { display: flex; gap: 10px; align-items: flex-start; height: 100%; padding: 10px; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; color: inherit; }
.step { opacity: .72; }
.step.is-yours { opacity: 1; }
.step.is-yours a, .step.is-yours .step-static { background: var(--soft); border-color: var(--line); }
.step.is-here a { background: var(--here); color: var(--here-ink); border-color: var(--here); }
.step a:hover { border-color: var(--ink); }
.step-no { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.step-body { display: grid; gap: 2px; min-width: 0; }
.step-body b { font-size: 15px; }
.step-body small { font-size: 12.5px; line-height: 1.3; opacity: .85; }
@media (max-width: 760px) {
  .flow ol { grid-template-columns: 1fr; gap: 4px; }
  .step a, .step-static { padding: 8px 10px; align-items: center; }
  .step-body { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; }
}

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; font-weight: 650; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; color: var(--ink-soft); }
.tabs a[aria-current="page"] { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-color: var(--card); margin-bottom: -2px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel.soft { background: var(--soft); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col > .panel { margin-bottom: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .two-col > .panel { margin-bottom: 0; } }

.list { display: grid; gap: 10px; }
.list.compact { gap: 6px; }
.card { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; }
.panel.soft .card { background: var(--card); }
a.card:hover { border-color: var(--ink); }
.card-main { min-width: 0; flex: 1; }
.card-main p { margin-bottom: 2px; }
.card.slim { padding: 8px 12px; }
.report-card, .decision-card { align-items: flex-start; }
.art { flex: none; border-radius: 12px; }
.empty { padding: 18px; text-align: center; color: var(--ink-soft); border: 1px dashed var(--line); border-radius: var(--radius); }
.notice { background: var(--soft); border-radius: var(--radius); padding: 12px 14px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 17px; font-weight: 700; margin-bottom: 4px; }

.pill { flex: none; font-size: 13px; font-weight: 650; padding: 4px 11px; border-radius: 999px; background: var(--pill-bg); white-space: nowrap; }
.pill-adoptable { background: #dcefd9; color: #1d5a2c; }
.pill-reserved { background: #fbe8c2; color: #6b4300; }
.pill-adopted { background: #d8e6f5; color: #17406d; }
.pill-recorded { background: #ece6d8; color: #4d4430; }

/* Φόρμες */
.field { margin: 0 0 14px; }
.field.grow { flex: 1; min-width: 180px; }
.label { display: block; font-weight: 650; margin-bottom: 4px; }
input[type="text"], input:not([type]), input[name], select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: calc(var(--radius) - 2px); padding: 10px 12px; min-height: 46px; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent-line); }
textarea { resize: vertical; }
.row { display: flex; gap: 8px; align-items: end; }
.row.wrap { flex-wrap: wrap; align-items: start; }
.row input { flex: 1; }
.seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.seg legend { font-weight: 650; margin-bottom: 6px; padding: 0; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 10px 18px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; }
.seg-opt input:checked + span { background: var(--ink); color: var(--card); border-color: var(--ink); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; margin: 6px 0 14px; font-weight: 600; }
.form-error { color: #a1182c; font-weight: 650; margin: 0 0 10px; }
.record-form { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.record-form[hidden], .form-error[hidden], [data-actions][hidden] { display: none; }
.sample { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sample-art { display: inline-flex; align-items: center; gap: 10px; }

.btn { font: inherit; font-weight: 700; border-radius: calc(var(--radius) - 1px); padding: 10px 18px; min-height: 46px; cursor: pointer; border: 2px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-line); }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost:hover { background: var(--soft); }
.btn.big { width: 100%; min-height: 54px; font-size: 18px; }
.actions { margin-top: 10px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 650; color: var(--ink-soft); }
.detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }

/* Χάρτης */
.map { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; background: #efe7d6; }
.spot { cursor: default; }
.spot-halo { fill: rgba(18, 53, 91, .12); }
.spot-dot { fill: #12355b; stroke: #fff; stroke-width: 3; }
.spot-name { font: 600 12px system-ui, sans-serif; fill: #12355b; paint-order: stroke; stroke: #efe7d6; stroke-width: 4px; }
.spot-count { fill: #fff; font: 700 11px system-ui, sans-serif; }
.has-pins .spot-dot { fill: #b3341f; r: 11; }
.has-pins .spot-halo { fill: rgba(179, 52, 31, .18); }
[data-place] { cursor: pointer; }
[data-place]:hover .spot-halo { fill: rgba(18, 53, 91, .25); }
[data-place]:focus-visible { outline: none; }
[data-place]:focus-visible .spot-halo { stroke: #12355b; stroke-width: 3; }
.spot.is-picked .spot-dot { fill: #e8a33d; stroke: #12355b; }
.spot.is-picked .spot-halo { fill: rgba(232, 163, 61, .35); }
.place-line { margin: 8px 0 0; }

/* Χρονολόγιο */
.trail { list-style: none; margin: 14px 0; padding: 0 0 0 26px; border-left: 3px solid var(--line); display: grid; gap: 14px; }
.trail li { position: relative; display: grid; gap: 2px; color: var(--ink-soft); }
.trail li::before { content: ''; position: absolute; left: -35px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); }
.trail li.is-done { color: var(--ink); }
.trail li.is-done::before { background: var(--accent-line); border-color: var(--accent-line); }
.trail li.is-current::before { background: var(--accent); border-color: var(--ink); }
.trail b { font-size: 16px; }
.trail small { font-size: 14px; }

.history { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.history li { padding: 10px 12px; background: var(--soft); border-radius: var(--radius); }
.history p { margin: 4px 0 0; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }

/* Δήμαρχος */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.kpi b { font-family: var(--head-font); font-size: clamp(28px, 5vw, 40px); line-height: 1; }
.kpi span { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.bars { width: 100%; height: auto; }
.bar { fill: #9fb6cc; }
.bar.now { fill: #e8a33d; }
.bar-v { font: 700 12px system-ui, sans-serif; fill: #12355b; }
.bar-l { font: 12px system-ui, sans-serif; fill: #496282; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.who { font-weight: 700; margin-right: 4px; }

.footnote { margin-top: 24px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 24px); background: #12251b; color: #fff; padding: 12px 18px; border-radius: 10px; max-width: min(92vw, 520px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 5; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media (max-width: 520px) {
  .card { flex-wrap: wrap; }
  .card .pill { margin-left: 78px; }
  .app-head { align-items: start; flex-direction: column; }
}
