/* Σύλλογος Γονέων · Αθλητικά
   Σχεδιασμένο πρώτα για κινητό. Από 900px και πάνω: πλαϊνό μενού αντί για κάτω μπάρα.
   Το βασικό χρώμα (--brand) έρχεται από τις Ρυθμίσεις. */

:root {
  --brand: #2f6fdf;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--surface));
  --brand-ink: var(--brand);     /* κείμενο σε χρώμα Συλλόγου (στο σκούρο θέμα πιο ανοιχτό, για να διαβάζεται) */
  --on-brand: #fff;              /* γράμματα πάνω σε χρώμα Συλλόγου (σκούρα αν το χρώμα είναι πολύ ανοιχτό) */
  --on-status: #fff;             /* γράμματα πάνω σε πράσινο/κόκκινο */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #17202e;
  --muted: #5d6878;
  --line: #e2e6ec;
  --ok: #157f4f;   --ok-bg: #e5f5ec;
  --warn: #9a5b00; --warn-bg: #fdf1dc;
  --bad: #c0352b;  --bad-bg: #fbe9e7;
  --radius: 12px;
  --tabbar-h: 64px;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #171e28; --text: #e7ebf1; --muted: #9aa5b5; --line: #2a3442;
    --ok: #4cc58a; --ok-bg: #133325; --warn: #f0b354; --warn-bg: #3a2b12; --bad: #ff7b6e; --bad-bg: #3d1b18;
    --shadow: none; color-scheme: dark;
    --brand-ink: color-mix(in srgb, var(--brand) 55%, #fff); --on-status: #0f141b;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e28; --text: #e7ebf1; --muted: #9aa5b5; --line: #2a3442;
  --ok: #4cc58a; --ok-bg: #133325; --warn: #f0b354; --warn-bg: #3a2b12; --bad: #ff7b6e; --bad-bg: #3d1b18;
  --shadow: none; color-scheme: dark;
    --brand-ink: color-mix(in srgb, var(--brand) 55%, #fff); --on-status: #0f141b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.05rem; }
a { color: var(--brand-ink); }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { padding: 40px 16px; text-align: center; color: var(--muted); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---------- πλαίσιο ---------- */

.demo-bar { background: var(--warn-bg); color: var(--warn); font-size: .82rem; text-align: center; padding: 6px 12px; }
.layout { min-height: 100dvh; }
main { padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; outline: none; }
.side { display: none; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font: inherit; font-size: .7rem; background: none; border: 0; padding: 6px 2px; min-width: 0;
}
.tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar .on { color: var(--brand-ink); font-weight: 600; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand b { display: block; }
.brand small { color: var(--muted); font-size: .78rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 1.2rem; flex: none; }
.brand-mark.big { width: 64px; height: 64px; font-size: 2rem; border-radius: 16px; }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 248px 1fr; }
  .tabbar { display: none; }
  main { padding: 28px 32px 48px; width: 100%; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
    background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px;
  }
  .side-links { display: grid; gap: 2px; }
  .side-links a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
  .side-links a:hover { background: var(--bg); }
  .side-links a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
  .side-foot { margin-top: auto; display: grid; gap: 6px; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: .85rem; }
}

/* «Περισσότερα» στο κινητό */
.sheet-wrap { align-items: end; }
.sheet {
  width: 100%; background: var(--surface); border-radius: 18px 18px 0 0; padding: 10px 8px calc(16px + env(safe-area-inset-bottom));
  display: grid; animation: up .18s ease-out;
}
.sheet a, .sheet button { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; font: inherit; background: none; border: 0; border-radius: 10px; text-align: left; }
.sheet a:active, .sheet button:active { background: var(--bg); }
.sheet-user { padding: 8px 16px 0; font-size: .82rem; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* ---------- περιεχόμενο ---------- */

.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.head p { margin: 4px 0 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .g2 { grid-template-columns: 1fr 1fr; align-items: start; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 32px 16px; }
.empty-state p { margin: 4px 0; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); min-height: 52px; }
.rows li:first-child { border-top: 0; }
.rows li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.row-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: end; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; flex: none; }
.checklist li.ok .tick { background: var(--ok); border-color: var(--ok); color: var(--on-status); }
.checklist li.ok span:not(.tick) { color: var(--muted); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.neutral { background: var(--bg); color: var(--muted); }

.alert { display: block; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.link { text-decoration: none; font-weight: 600; }
.alert.ok-alert { background: var(--ok-bg); color: var(--ok); }

/* Excel: εισαγωγή / εξαγωγή */
#preview { margin-top: 16px; }
.steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.issues { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .88rem; max-height: 320px; overflow: auto; }
.issues-box { margin-top: 12px; color: var(--warn); }
.issues-box summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.mail-prev { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: .9rem; max-height: 360px; overflow: auto; }
textarea { resize: vertical; font: inherit; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.help { margin-top: 12px; font-size: .9rem; }
.help summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; padding: 6px 0; }
.help ol { padding-left: 20px; }

/* ---------- μητρώο: καρτέλες, λίστες, φίλτρα ---------- */

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 10px 4px; font-size: .92rem; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 220px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.chip-btn b { background: var(--bad-bg); color: var(--bad); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.chip-btn.on { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }

.card.flush { padding: 4px 16px; }
.row-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; cursor: pointer; padding: 2px 0; }
.row-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.row-btn > div { min-width: 0; }
.rows li:has(.row-btn):hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.rows li.empty { justify-content: center; color: var(--muted); padding: 24px 0; }
.rows li.past, .inactive { opacity: .6; }
.rows.compact li { min-height: 0; padding: 6px 0; font-size: .88rem; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--bg); font-size: .78rem; }
.chip.cur { outline: 2px solid var(--brand); }
.chip[style*="--c"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.warn-text { color: var(--warn); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stats span { color: var(--muted); font-size: .85rem; }

.card.act > header h2 { display: flex; align-items: center; gap: 8px; }
.card.act .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }

/* οικονομικά */
.month-pick { display: flex; align-items: center; gap: 4px; }
.month-pick select { width: auto; min-width: 170px; }
.month-pick .btn { font-size: 1.3rem; min-width: 40px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.stat span { color: var(--muted); font-size: .78rem; }
.stat b { font-size: 1.2rem; white-space: nowrap; }
.stat small { color: var(--muted); font-size: .75rem; }
@media (min-width: 640px) { .stat { padding: 14px 16px; } .stat b { font-size: 1.5rem; } }
.meter { height: 8px; border-radius: 999px; background: var(--bg); margin-top: 12px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.due { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.total-row { font-size: .95rem; }
.big-num { font-size: 1.3rem; }
.month-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.month-checks label.check { font-weight: 500; }

/* πρόγραμμα */
.week { display: grid; gap: 10px; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(var(--days), minmax(0, 1fr)); } }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 6px; align-content: start; }
.day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.day h3 { font-size: .92rem; }
.lesson { display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); color: var(--text); text-decoration: none; font-size: .88rem; }
.lesson small { color: var(--muted); font-size: .76rem; }
.lesson.off { opacity: .55; }
.lesson.off > b, .lesson.off > span { text-decoration: line-through; }

/* παρουσίες */
#attDate { width: auto; }
.lesson-pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.lesson-pick button { flex: 0 0 auto; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 56px; }
.lesson-pick button small { color: var(--muted); font-size: .76rem; }
.lesson-pick button[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); border-left-color: var(--c); }
.att-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.att-tools .spacer { flex: 1; }
.att-list { display: grid; gap: 8px; }
@media (min-width: 700px) { .att-list { grid-template-columns: 1fr 1fr; } }
.att { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.att span:first-child { display: grid; min-width: 0; }
.att small { color: var(--muted); font-size: .78rem; }
.att .mark { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; }
.att.P { border-color: var(--ok); background: var(--ok-bg); }
.att.P .mark { background: var(--ok); border-color: var(--ok); color: var(--on-status); }
.att.A { border-color: var(--bad); background: var(--bad-bg); }
.att.A .mark { background: var(--bad); border-color: var(--bad); color: var(--on-status); }

/* μέσα στα παράθυρα */
.sub { padding: 12px 0; border-top: 1px solid var(--line); }
.sub:first-of-type { border-top: 0; }
.sub h3 { font-size: .95rem; margin-bottom: 6px; }
.sub > .btn { margin-top: 6px; }
.kid-sub { margin: 0 0 8px; }
.rows-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Στο κινητό: η μέρα σε δική της γραμμή, οι ώρες από κάτω. */
.slot-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 6px; margin-bottom: 10px; }
.slot-row select { grid-column: 1 / 3; grid-row: 1; }
.slot-row .icon-btn { grid-column: 3; grid-row: 1; }
.slot-row input, .slot-row select { padding: 8px; min-width: 0; }
@media (min-width: 560px) {
  .slot-row { grid-template-columns: 1.3fr 1fr 1fr 44px; margin-bottom: 6px; }
  .slot-row select, .slot-row .icon-btn { grid-column: auto; grid-row: auto; }
}
.price-box > .form { margin-bottom: 8px; }
.form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.form label.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.form label.check span { display: grid; gap: 2px; }
fieldset > .form { margin-top: 4px; }

/* ---------- φόρμες & κουμπιά ---------- */

.form { display: grid; gap: 12px; }
@media (min-width: 560px) { .form { grid-template-columns: 1fr 1fr; } .form > .full, .form > fieldset { grid-column: 1 / -1; } }
.form label { display: grid; gap: 5px; font-size: .88rem; font-weight: 600; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.form.inline { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); align-items: end; grid-template-columns: 1fr auto; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; font-size: 16px; /* όχι μικρότερο: αλλιώς το iPhone κάνει zoom */
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; width: 100%; font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { min-height: 36px; padding: 5px 12px; font-size: .85rem; }
@media (pointer: coarse) { .btn.sm { min-height: 44px; } }   /* στο κινητό: αρκετά μεγάλο για το δάχτυλο */
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--brand-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { background: none; border: 0; font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; border-radius: 10px; color: var(--muted); cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; align-items: center; }
.actions .spacer { flex: 1; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--c); cursor: pointer; display: block; }
.swatch input[type=radio] { position: absolute; opacity: 0; inset: 0; margin: 0; min-height: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 3px; }
.swatch.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.swatch.custom input { opacity: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; }

/* Πίνακας παρουσιών: η στήλη με τα ονόματα μένει σταθερή όταν κυλάς δεξιά */
.toolbar select { width: auto; flex: 1 1 180px; }
.grid-wrap { overflow-x: auto; padding: 0; }
.att-grid { border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: 100%; }
.att-grid th, .att-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: center; white-space: nowrap; }
.att-grid thead th { padding: 6px 4px; font-weight: 600; line-height: 1.2; vertical-align: bottom; }
.att-grid thead th span, .att-grid thead th small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.att-grid .kid { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 6px 10px; font-weight: 600; min-width: 140px; max-width: 180px; white-space: normal; }
.att-grid .sum { padding: 4px 8px; text-align: right; }
.att-grid .off { background: var(--bg); }
.att-grid .na { color: var(--muted); }
.att-grid tfoot td, .att-grid tfoot th { font-weight: 600; padding: 6px 4px; color: var(--muted); }
.att-grid .cell { width: 100%; min-width: 44px; height: 40px; border: 0; background: none; font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; color: var(--text); }
.att-grid .cell.P { background: var(--ok-bg); color: var(--ok); }
.att-grid .cell.A { background: var(--bad-bg); color: var(--bad); }
.att-grid .cell:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: -3px; }

/* Πίνακας ποσών (αποτέλεσμα χρονιάς) */
.money-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.money-table th, .money-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.money-table th:first-child { text-align: left; }
.money-table thead th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.money-table tfoot th, .money-table tfoot td { font-weight: 700; border-bottom: 0; }

/* Αρχική */
.today-list { display: grid; gap: 8px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.todo li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo .n { min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--warn-bg); color: var(--warn); flex: none; }
.todo .n.bad { background: var(--bad-bg); color: var(--bad); }
.todo a { flex: 1; text-decoration: none; font-weight: 600; }
.todo a .muted { font-weight: 400; }
/* Δύο στήλες με θέμα (Λειτουργία / Οικονομικά), η καθεμία στοιβάζει τις κάρτες της χωρίς κενά.
   Στο κινητό οι στήλες «ενώνονται» (display: contents) και η σειρά βγαίνει από το order κάθε κάρτας. */
.home-cols { display: flex; flex-direction: column; gap: 16px; }
.home-col { display: contents; }
.col-title { display: none; }
@media (min-width: 900px) {
  .home-cols { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .col-title { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 2px -6px; }
  .home-col > .card { order: 0 !important; }
}
/* Καιρός στην κάρτα «Σήμερα» */
.wx { margin: -4px 0 10px; }
.wx-l { font-weight: 400; color: var(--muted); white-space: nowrap; }
.wx-l.wet { color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 0 6px; font-weight: 600; }

/* Tablet σε κάθετη θέση (720–899px): μένει η κάτω μπάρα, αλλά το περιεχόμενο πάει σε δύο στήλες όπως στον υπολογιστή. */
@media (min-width: 720px) and (max-width: 899px) {
  main { padding-left: 24px; padding-right: 24px; }
  .g2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .home-cols { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .col-title { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 2px -6px; }
  .home-col > .card { order: 0 !important; }
  .week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Η κάτω μπάρα συμμαζεμένη στο κέντρο, όχι απλωμένη σε όλο το πλάτος. */
  .tabbar { padding-left: max(0px, calc((100% - 560px) / 2)); padding-right: max(0px, calc((100% - 560px) / 2)); }
  .tabbar a, .tabbar button { font-size: .75rem; }
}
.home-strip { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; font-size: .9rem; }
.home-strip a { color: var(--text); text-decoration: none; }
.home-strip b { font-size: 1.1rem; }

/* Οδηγός νέας χρονιάς */
.wz-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.wz-steps .on { color: var(--brand-ink); font-weight: 700; }
.wz-steps .done { color: var(--ok); }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check-row > input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.check-row > span { display: grid; gap: 2px; min-width: 0; }
.rows li:has(> .check-row) { justify-content: flex-start; }
.hol-list { display: grid; gap: 8px; }
.hol-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.hol-row .check-row { grid-column: 1 / -1; }
.hol-row .check-row > span { grid-auto-flow: column; justify-content: start; align-items: center; gap: 6px; }
.hol-row.out { opacity: .7; }
.hol-name { min-height: 36px; padding: 6px 8px; }
@media (min-width: 640px) { .hol-row { grid-template-columns: 1fr 150px 150px; align-items: center; } .hol-row .check-row { grid-column: auto; } }

/* Επιλογή ενός από λίγα (π.χ. θέμα): κουμπιά δίπλα-δίπλα */
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--muted); }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { background: var(--brand-soft); color: var(--brand-ink); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: -3px; }

.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.logo-prev { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.logo-prev.empty { width: auto; height: auto; border: 0; background: none; color: var(--muted); font-size: .85rem; }
.hol-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- σύνδεση ---------- */

.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px; box-shadow: var(--shadow); }
.auth-brand { text-align: center; display: grid; justify-items: center; gap: 6px; margin-bottom: 22px; }
.auth-brand img { width: 72px; height: 72px; object-fit: contain; }
.auth-brand p { margin: 0; }
.auth .form { grid-template-columns: 1fr; }
.auth h2 { margin-bottom: 4px; }

/* ---------- παράθυρα & μηνύματα ---------- */

.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(10 15 25 / .45); display: flex; align-items: end; justify-content: center; }
.modal {
  width: 100%; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .18s ease-out;
}
.modal > header { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface); padding: 6px 0; z-index: 1; }
.modal .form { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 24px; }
  .modal { max-width: 520px; border-radius: 16px; padding: 12px 22px 22px; }
  .modal.wide { max-width: 760px; }
  .modal .form { grid-template-columns: 1fr 1fr; }
}

.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px);
  background: var(--text); color: var(--surface); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgb(0 0 0 / .2);
}
.toast.ok { background: var(--ok); color: var(--on-status); }
.toast.bad { background: var(--bad); color: var(--on-status); }
.toast { cursor: pointer; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

@media (prefers-reduced-motion: reduce) { .sheet, .modal { animation: none; } }
