:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #efede6;
  --text: #1d1d1b;
  --muted: #5f5e5a;
  --faint: #888780;
  --line: #e1dfd7;
  --ok: #2e7d32;
  --ok-ink: #ffffff;
  --ok-soft: #e3f1e3;
  --ok-text: #1b5e20;
  --warn-soft: #fbefd6;
  --warn-text: #7a4b00;
  --bad: #b3261e;
  --bad-soft: #fbe3e1;
  --bad-text: #8c1d18;
  --info-soft: #e3edfa;
  --info-text: #0c447c;
  --accent: #185fa5;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514;
    --surface: #21211f;
    --surface-2: #2b2b28;
    --text: #f1efe8;
    --muted: #b4b2a9;
    --faint: #8c8a82;
    --line: #3a3a37;
    --ok: #3d9443;
    --ok-ink: #ffffff;
    --ok-soft: #1d3a1f;
    --ok-text: #bfe3c0;
    --warn-soft: #3d2e10;
    --warn-text: #f5d08a;
    --bad: #e2675f;
    --bad-soft: #43201d;
    --bad-text: #f6b9b4;
    --info-soft: #16304f;
    --info-text: #b5d4f4;
    --accent: #85b7eb;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
h1, h2, h3 { font-weight: 600; margin: 0; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 44px;
}
button:active { transform: scale(0.98); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); font-weight: 600; }
button.danger { border-color: var(--bad); color: var(--bad); font-weight: 600; }
button.link { border: none; background: none; color: var(--accent); padding: 4px 6px; min-height: 0; }
input, select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 44px;
  width: 100%;
}
label { display: block; font-size: 14px; color: var(--muted); }
label > input, label > select { margin-top: 4px; color: var(--text); }
.icon { width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; color: var(--faint); }
.error { color: var(--bad); font-size: 14px; min-height: 1.2em; }
[hidden] { display: none !important; }

/* --------------------------------------------------- κάρτες, ετικέτες, λίστες */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
}
.pill.ok { background: var(--ok-soft); color: var(--ok-text); }
.pill.warn { background: var(--warn-soft); color: var(--warn-text); }
.pill.bad { background: var(--bad-soft); color: var(--bad-text); }
.pill.info { background: var(--info-soft); color: var(--info-text); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--info-soft); color: var(--info-text); font-weight: 700;
}
.timeline { display: flex; flex-direction: column; }
.timeline .ev { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.timeline .ev:first-child { border-top: none; }
.timeline .ev b { font-weight: 600; color: var(--muted); min-width: 44px; font-variant-numeric: tabular-nums; }
.week { display: flex; justify-content: space-between; gap: 4px; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }
.week .dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--faint);
}
.week .dot.ok { background: var(--ok-soft); color: var(--ok-text); }
.week .dot.missed { background: var(--bad-soft); color: var(--bad-text); }
.week .dot.resolved { background: var(--warn-soft); color: var(--warn-text); }
.week .dot.away { background: var(--info-soft); color: var(--info-text); }
.week .dot.today { box-shadow: 0 0 0 2px var(--text) inset; }

/* --------------------------------------------------- οθόνη ηλικιωμένου */
body.elder { min-height: 100vh; min-height: 100dvh; }
.elder-main {
  max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 18px;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
}
.elder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.elder-head .hello { font-size: clamp(26px, 7vw, 34px); font-weight: 700; line-height: 1.2; }
.elder-head .date { font-size: 19px; color: var(--muted); margin-top: 4px; }
.round {
  width: 60px; height: 60px; border-radius: 50%; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.round .icon { width: 30px; height: 30px; }
.elder-view { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.big {
  flex: 1; min-height: 46vh; width: 100%;
  border: none; border-radius: 30px;
  background: var(--ok); color: var(--ok-ink);
  font-size: clamp(34px, 10vw, 48px); font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.big .icon { width: 72px; height: 72px; }
.big.busy { opacity: 0.7; }
.big.waiting-start { background: var(--surface-2); color: var(--muted); font-size: clamp(26px, 7vw, 34px); }
.elder-note { font-size: 19px; text-align: center; color: var(--muted); min-height: 1.5em; }
.thanks { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.thanks .check {
  width: 132px; height: 132px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ok-soft); color: var(--ok-text);
}
.thanks .check .icon { width: 76px; height: 76px; }
.thanks .t1 { font-size: 34px; font-weight: 700; }
.thanks .t2 { font-size: 21px; color: var(--muted); }
.second {
  min-height: 72px; font-size: 20px; border-radius: 18px; border-width: 2px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.big, .big * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.big { touch-action: none; }
.big.done { background: var(--ok-soft); color: var(--ok-text); font-size: clamp(28px, 8vw, 38px); gap: 10px; }
.big.done .small-line { font-size: 20px; font-weight: 500; color: var(--ok-text); }
.sos-hint { text-align: center; font-size: 16px; color: var(--muted); margin-top: -6px; }
.ring-overlay {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.ring-box { position: relative; width: min(80vw, 340px); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: rgba(0, 0, 0, 0.85); stroke: rgba(255, 255, 255, 0.25); stroke-width: 22; }
.ring-fill { fill: none; stroke: #e53935; stroke-width: 22; stroke-linecap: round; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; }
.ring-title { font-size: 30px; font-weight: 800; }
.ring-count { font-size: 76px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-sub { font-size: 18px; opacity: 0.9; }
.sos-view { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.sos-view .badge {
  width: 132px; height: 132px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bad-soft); color: var(--bad-text); font-size: 40px; font-weight: 900; letter-spacing: 0.04em;
}
.sos-view .t1 { font-size: 32px; font-weight: 800; color: var(--bad-text); }
.sos-view .t2 { font-size: 20px; color: var(--muted); }
a.second { text-decoration: none; color: var(--text); border: 2px solid var(--line); background: var(--surface); }
a.second.sos-112 { border-color: var(--bad); color: var(--bad); font-weight: 800; font-size: 22px; }
.sos-card { border-color: var(--bad); background: var(--bad-soft); color: var(--bad-text); }
.sos-card .big-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.sos-card .big-actions > * { min-height: 54px; font-size: 18px; }
.pill.sos { background: var(--bad); color: #fff; }
.net { text-align: center; background: var(--warn-soft); color: var(--warn-text); border-radius: 12px; padding: 10px; }
.setup { border: 2px dashed var(--line); }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
label.check input { width: auto; min-height: 0; margin-top: 5px; }
label.check[hidden] { display: none; }
details.more > summary { cursor: pointer; color: var(--accent); }
.setup-open #view { position: relative; }
.setup-open #view button, .setup-open #view a { opacity: 0.35; pointer-events: none; filter: grayscale(0.6); }
.setup-open #view::after { content: "Πρώτα ολοκληρώστε τη ρύθμιση από πάνω"; display: block; text-align: center; font-weight: 700; color: var(--muted); padding: 10px; }
.setup-progress { font-weight: 700; margin: 0; }
.setup button:disabled { opacity: 0.45; cursor: not-allowed; }
.setup-progress.ok { color: var(--ok-text); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); }
.step[hidden] { display: none; }
.step .mark { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: var(--surface-2); color: var(--muted); }
.step .mark::before { content: counter(step); }
.step .body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.step .body p { margin: 0; }
.step.current { border-color: var(--text); }
.step.done { border-color: var(--ok); background: var(--ok-soft); }
.step.done .mark { background: var(--ok); color: #fff; }
.step.done .mark::before { content: "✓"; }

.construction {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--warn-soft); color: var(--warn-text);
  font-size: 15px; font-weight: 700; padding: 8px 16px; text-align: center;
}

/* --------------------------------------------------- σελίδες συγγενή */
.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
#account { flex-wrap: wrap; row-gap: 4px; min-width: 0; max-width: 100%; }
#account .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand .logo { width: 32px; height: 32px; display: flex; flex: none; }
.brand .logo img { width: 100%; height: 100%; display: block; }
.alert-card { border-color: var(--bad); background: var(--bad-soft); color: var(--bad-text); }
.alert-card .big-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.alert-card .big-actions > * { min-height: 54px; font-size: 18px; }
a.button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; border-radius: 10px; padding: 10px 16px;
}
a.button.primary { background: var(--ok); color: var(--ok-ink); font-weight: 600; }
.ok-card { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-text); }
.section-title { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: none; margin-bottom: 8px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; cursor: pointer; color: var(--text); font-size: 15px; }
.seg input { width: auto; min-height: 0; margin: 0; }
.qr { background: #fff; border-radius: 12px; padding: 8px; width: 180px; height: 180px; }
.qr img { width: 100%; height: 100%; display: block; }
.person-block { gap: 12px; }
.person-block .person-card { padding: 0; border: 0; background: none; }
.quick { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.card > .quick { border-top: 0; padding-top: 0; }
.person-more summary { cursor: pointer; }
.quick-pause { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-pause.on { background: var(--info-soft); color: var(--info-text); border-radius: 12px; padding: 10px 12px; justify-content: space-between; }
.quick-pause.on .icon { vertical-align: -4px; margin-right: 4px; }
.quick-pause button { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.quick label.check { align-items: center; }
.quick label.check input { margin-top: 0; width: 22px; height: 22px; }
.quick label.check .small { display: block; }
.quick .dim { opacity: .55; }
.person-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.person-card:hover { border-color: var(--faint); }

/* --------------------------------------------------- demo (/dev) */
.dev-page { max-width: 1240px; }
.phones { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.phone { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.phone iframe {
  width: 340px; height: 680px; border: 1px solid var(--line); border-radius: 28px;
  background: var(--bg);
}
.outbox { display: flex; flex-direction: column; }
.outbox .msg { display: grid; grid-template-columns: 48px 76px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.outbox .msg:first-child { border-top: none; }
.chan { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 6px; text-align: center; align-self: start; }
.chan.sms { background: var(--warn-soft); color: var(--warn-text); }
.chan.email { background: var(--info-soft); color: var(--info-text); }
.chan.push { background: var(--ok-soft); color: var(--ok-text); }
.chan.call { background: var(--bad-soft); color: var(--bad-text); }
.status-tag { font-size: 11px; color: var(--faint); }

/* --------------------------------------------------- η καρδιά σε δύο μισά */
:root { --heart: #e53950; --heart-soft: rgba(229, 57, 80, 0.12); }
.heart { display: block; overflow: visible; }
.heart-empty { fill: var(--heart-soft); }
.heart-fill { fill: var(--heart); }
.heart-outline { fill: none; stroke: var(--heart); stroke-width: 3.5; stroke-linejoin: round; }
.heart-seam { stroke: var(--heart); stroke-width: 2.5; stroke-dasharray: 4 5; opacity: 0.55; }
.heart.complete { animation: heart-beat 1.6s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.08); } 24% { transform: scale(0.98); } 36% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .heart.complete { animation: none; } }
.heart-card { display: flex; align-items: center; gap: 16px; }
.heart-card .heart { width: 74px; height: 74px; flex: none; }
.big-heart { width: min(64vw, 230px); height: auto; margin: 0 auto; }
.mini-hearts { display: flex; justify-content: space-between; gap: 4px; }
.mini-hearts .d { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }
.mini-hearts .heart { width: 30px; height: 30px; }
.mini-hearts .heart.complete { animation: none; }
button.heart-btn { background: var(--heart); border-color: var(--heart); color: #fff; font-weight: 700; }
.big.done .heart { width: 128px; height: 128px; }
.thanks .big-heart { width: min(52vw, 190px); }

/* --------------------------------------------------- «Τι θέλετε να φτιάξετε;» */
.chooser { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; }
.chooser:hover { border-color: var(--faint); }
.chooser-icon { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; }
.chooser-icon .heart { width: 50px; height: 50px; }
.chooser-icon .heart.complete { animation: none; }
.chooser-love { border-color: color-mix(in srgb, var(--heart) 45%, var(--line)); }

a.map-link { border: 2px solid currentColor; font-weight: 700; min-height: 50px; }

/* ---------------------------------------------------- οδηγός εγκατάστασης (#/guide) */
.g-note { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); color: var(--text); font-size: 16px; }
.g-toc { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.g-step h2 { font-size: 21px; display: flex; gap: 10px; align-items: center; }
.g-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: var(--ok-ink); display: inline-grid; place-items: center; font-size: 16px; font-weight: 700; }
.g-video { margin: 4px auto 0; max-width: 380px; width: 100%; }
.g-video video { width: 100%; aspect-ratio: 390 / 844; background: #000; border-radius: 22px; border: 6px solid #1b1f23; display: block; }
.g-video figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.g-video-box { position: relative; }
.g-play { position: absolute; inset: 6px; border: 0; border-radius: 16px; background: rgba(15, 20, 15, 0.38); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; }
.g-play-icon { width: 76px; height: 76px; border-radius: 50%; background: #fff; color: #1b1f23; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
.g-play-icon svg { width: 38px; height: 38px; margin-left: 4px; }
.g-play-text { background: rgba(0, 0, 0, 0.62); padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.g-play:hover .g-play-icon, .g-play:focus-visible .g-play-icon { transform: scale(1.06); }
.g-video-box.playing .g-play { display: none; }
.g-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.g-help { margin-top: 4px; }
.g-help summary { cursor: pointer; color: var(--accent); }
.g-help .g-list { margin-top: 10px; }
.g-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.g-tabs button { flex: 1; font-weight: 600; }
.g-tabs button[aria-selected="true"] { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); }
.g-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px 12px; margin-bottom: 12px; }
.g-scene { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.g-phone { width: 100%; max-width: 190px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18)); }
.g-scene figcaption { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; max-width: 190px; }
.g-scene figcaption b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: var(--ok-ink); display: inline-grid; place-items: center; font-size: 13px; }
.g-pulse { animation: g-pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes g-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .g-pulse { animation: none; } }
.g-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.g-feature { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
a.chooser.g-start { border-color: var(--ok); }

/* ---------------------------------------------------- πακέτα χρόνου */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; text-align: center; line-height: 1.25; }
.pack b { font-size: 16px; }
.pack span { font-size: 20px; font-weight: 700; }
.pack small { font-size: 12px; color: var(--ok-text); font-weight: 600; }
.pack.best { border-color: var(--ok); background: var(--ok-soft); }


/* =====================================================================================================
   Η εφαρμογή του κατόχου (/app): πιο απλή και πιο ήρεμη. Ισχύει μόνο με body.mgr.
   ===================================================================================================== */
.mgr {
  --radius: 22px;
  --shadow: 0 1px 2px rgba(20, 20, 15, 0.05), 0 10px 28px -14px rgba(20, 20, 15, 0.18);
  --track: #c9c7bf;
  font-size: 17px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mgr { --track: #4a4a46; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -14px rgba(0,0,0,.6); } }
.mgr .page { max-width: 560px; gap: 14px; padding-top: 12px; }

/* επάνω γραμμή */
.mgr .topbar { flex-wrap: nowrap; align-items: center; position: relative; }
.mgr .brand { font-size: 20px; }
.mgr #account { display: block; }
.mgr .menu { position: relative; }
.mgr .menu > summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: var(--surface); border: 1px solid var(--line); }
.mgr .menu > summary::-webkit-details-marker { display: none; }
.mgr .menu-pop { position: absolute; right: 0; top: 52px; z-index: 20; min-width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.mgr .menu-pop a, .mgr .menu-pop button { padding: 10px 6px; font-size: 17px; text-align: left; justify-content: flex-start; text-decoration: none; }
.mgr .menu-pop p { padding: 2px 6px 8px; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; }

/* τίτλος σελίδας */
.mgr .page-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 0; }
.mgr .page-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.mgr .page-sub { color: var(--muted); font-size: 15px; }

/* κάρτες */
.mgr .card { border-radius: var(--radius); box-shadow: var(--shadow); border-color: transparent; padding: 18px; }
.mgr .person-block { display: flex; flex-direction: column; gap: 14px; }
.mgr .person-top { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.mgr .person-top .avatar { width: 52px; height: 52px; font-size: 22px; }
.mgr .person-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mgr .person-name b { font-size: 21px; font-weight: 700; }
.mgr .person-name span { color: var(--muted); font-size: 15px; }
.mgr .chev { color: var(--faint); display: inline-flex; }
.mgr .chev .icon { width: 1.3em; height: 1.3em; }
.mgr .person-status { gap: 6px; margin-top: -4px; }
.mgr .pill { font-size: 15px; padding: 6px 12px; }

/* ο έλεγχος: ένα segmented control */
.mgr .quick { display: flex; flex-direction: column; gap: 4px; border-top: 0; padding-top: 0; }
.mgr .quick-head { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 2px 2px 6px; }
.mgr .pause-seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 16px; }
.mgr .pause-seg button { min-height: 46px; border: 0; background: transparent; border-radius: 12px; padding: 6px 4px; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.2; text-align: center; }
.mgr .pause-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 20, 15, 0.18); }
.mgr .pause-seg button[aria-pressed="true"]:first-child { color: var(--ok-text); }
.mgr .pause-seg button.is-paused[aria-pressed="true"] { background: var(--info-soft); color: var(--info-text); box-shadow: none; }
.mgr .quick-note { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--info-text); background: var(--info-soft); padding: 8px 12px; border-radius: 12px; margin: 6px 0 2px; }

/* διακόπτες αντί για τικ */
.mgr label.check { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; margin: 0; color: var(--text); font-size: 17px; border-top: 1px solid var(--line); }
.mgr .quick > label.check:first-of-type { margin-top: 10px; }
.mgr label.check > span { flex: 1; min-width: 0; line-height: 1.3; }
.mgr label.check > span > b { font-weight: 600; display: block; }
.mgr label.check > span .small { display: block; margin-top: 2px; font-size: 14px; }
.mgr label.check > input[type="checkbox"] {
  order: 2; flex: none; appearance: none; -webkit-appearance: none; position: relative; margin: 0;
  width: 54px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: var(--track); cursor: pointer;
  transition: background .18s ease;
}
.mgr label.check > input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform .18s ease;
}
.mgr label.check > input[type="checkbox"]:checked { background: var(--ok); }
.mgr label.check > input[type="checkbox"]:checked::after { transform: translateX(22px); }
.mgr label.check > input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
.mgr label.check > input[type="checkbox"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mgr label.check[data-sos-only] { margin-left: 0 !important; padding-left: 14px; }
.mgr label.check.dim { opacity: .7; }
@media (prefers-reduced-motion: reduce) { .mgr label.check > input[type="checkbox"], .mgr label.check > input[type="checkbox"]::after { transition: none; } }

.mgr .row-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text); }
.mgr .row-select select { width: auto; max-width: 62%; min-height: 40px; }

/* σειρές που ανοίγουν */
.mgr .person-more { border-top: 1px solid var(--line); padding-top: 2px; }
.mgr .person-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; font-weight: 600; }
.mgr .person-more > summary::-webkit-details-marker { display: none; }
.mgr .person-more[open] > summary .chev { transform: rotate(90deg); }
.mgr .person-more form { padding: 6px 0 4px; gap: 14px; }
.mgr .person-link { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-top: 1px solid var(--line); text-decoration: none; color: var(--accent); font-weight: 600; font-size: 16px; }

/* φόρμες */
.mgr input, .mgr select { border-radius: 14px; min-height: 48px; background: var(--surface); }
.mgr label { font-size: 15px; }
.mgr .seg { border-radius: 14px; background: var(--surface-2); border: 0; padding: 3px; gap: 3px; }
.mgr .seg label { border-radius: 11px; padding: 9px 14px; }
.mgr button.primary { border-radius: 14px; min-height: 50px; font-size: 17px; }
.mgr .button.add-person { align-self: stretch; justify-content: center; min-height: 54px; border-radius: 18px; border: 1.5px dashed var(--line); background: transparent; color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.mgr .person-block .quick-pause { display: none; }

/* φόρμα ρυθμίσεων ατόμου */
.mgr .modes { display: grid; gap: 8px; }
.mgr label.mode { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.mgr label.mode:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.mgr label.mode input { width: 20px; min-height: 0; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ok); }
.mgr label.mode > span { display: flex; flex-direction: column; gap: 2px; }
.mgr .form-group { margin: 10px 0 -4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mgr .seg { display: flex; width: 100%; }
.mgr .seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 15px; color: var(--text); cursor: pointer; }
.mgr .seg label { color: var(--muted); }
.mgr .seg label:has(input:checked) { background: var(--ok); color: #fff; box-shadow: 0 1px 3px rgba(20, 20, 15, 0.25); font-weight: 700; }
.mgr .seg label:has(input:checked)::before { content: "✓"; }
.mgr .unsaved { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--info-soft); color: var(--info-text); font-size: 15px; font-weight: 600; }
.mgr .seg input[type="radio"] { appearance: none; -webkit-appearance: none; width: 0; height: 0; min-height: 0; margin: 0; padding: 0; border: 0; position: absolute; opacity: 0; }
.mgr form .stack { gap: 8px; }
.mgr form label.check:first-of-type { border-top: 0; }

/* σελίδα ατόμου */
.mgr .back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 40px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 15px; font-weight: 600; }
.mgr .person-hero { display: flex; align-items: center; gap: 14px; padding: 2px 2px 0; }
.mgr .person-hero .avatar { width: 60px; height: 60px; font-size: 26px; }
.mgr .person-hero h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.mgr .person-hero p { font-size: 15px; }
.mgr #person-settings { padding-top: 6px; padding-bottom: 6px; }
.mgr .card > .person-more { border-top: 0; }
.mgr .card > .person-more > summary { min-height: 44px; }
.mgr .section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.mgr .list-row { padding: 12px 0; }
.mgr .stack > .tiny { padding-left: 2px; }
.g-tip { background: var(--info-soft); color: var(--info-text); border: 1px solid transparent; }
.g-tip b { color: inherit; }

/* η Έξοδος: τελευταία στο μενού, χωρισμένη και χωρίς έμφαση, για να μη πατιέται κατά λάθος */
.mgr .menu-pop #logout { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

/* στενές οθόνες: οι σειρές με κουμπί δεξιά δεν στριμώχνουν το κείμενο */
@media (max-width: 480px) {
  #settings .list-row { flex-wrap: wrap; }
  #settings .list-row > .button, #settings .list-row > button { width: 100%; }
  .list-row { align-items: flex-start; }
}


/* =====================================================================================================
   Κοινά για τις οθόνες κινητού: κάρτες συναγερμού με το χρώμα τους (το .mgr .card δεν τις σβήνει)
   ===================================================================================================== */
.mgr .alert-card, .mgr .sos-card { border-color: var(--bad); }
.mgr .ok-card { border-color: var(--ok); }
.mgr .card.alert-card, .mgr .card.sos-card, .mgr .card.ok-card { border-width: 1.5px; }
.mgr .heart-card { border-color: transparent; }

/* σελίδα επαφής */
.mgr .alert-card, .mgr .sos-card { box-shadow: 0 10px 30px -14px rgba(179, 38, 30, 0.45); }
.mgr .ok-card { background: linear-gradient(180deg, var(--ok-soft), color-mix(in srgb, var(--ok-soft) 70%, var(--surface))); }
.mgr .week { gap: 6px; }
.mgr #name { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.mgr #initials.avatar { width: 56px; height: 56px; font-size: 22px; }
.mgr .big-actions > .button, .mgr .big-actions > button { border-radius: 16px; }
.mgr .round { background: var(--surface); box-shadow: var(--shadow); border-color: transparent !important; }

/* =====================================================================================================
   Οθόνη του ατόμου (/e): το ίδιο απλή, αλλά πιο ζεστή. Ένα μεγάλο κουμπί με βάθος, δεν αλλάζει τίποτα στη χρήση.
   ===================================================================================================== */
body.elder {
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--ok) 9%, transparent), transparent 70%),
    var(--bg);
}
.elder-head .hello { letter-spacing: -0.01em; }
.big {
  border-radius: 38px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--ok) 80%, #fff) 0%, var(--ok) 48%, color-mix(in srgb, var(--ok) 86%, #000) 100%);
  box-shadow:
    0 22px 44px -20px color-mix(in srgb, var(--ok) 75%, transparent),
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 24px rgba(0, 0, 0, 0.12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.big:active { transform: scale(0.985); box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--ok) 75%, transparent), inset 0 2px 0 rgba(255,255,255,.2); }
.big > .icon:first-child, .big > .heart:first-child {
  box-sizing: content-box; padding: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.16);
}
.big.waiting-start { background: var(--surface-2); box-shadow: none; }
.big.waiting-start > .icon:first-child { background: rgba(0, 0, 0, 0.05); }
.big.done {
  background: linear-gradient(180deg, var(--ok-soft), color-mix(in srgb, var(--ok-soft) 70%, var(--surface)));
  box-shadow: 0 16px 36px -22px color-mix(in srgb, var(--ok) 60%, transparent), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.big.done > .icon:first-child, .big.done > .heart:first-child { background: rgba(255, 255, 255, 0.55); }
.thanks .check { box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--ok) 70%, transparent); }
.elder-note { line-height: 1.4; }
.second { background: var(--surface); border-color: var(--line); box-shadow: 0 6px 18px -12px rgba(20, 20, 15, 0.25); }
@media (prefers-reduced-motion: reduce) { .big { transition: none; } }


/* αναδιπλούμενες ενότητες (σελίδα επαφής): λιγότερο scroll */
.mgr details.fold { padding-top: 4px; padding-bottom: 4px; }
.mgr details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; font-weight: 600; font-size: 17px; }
.mgr details.fold > summary::-webkit-details-marker { display: none; }
.mgr details.fold > summary .chev { font-size: 26px; line-height: 1; color: var(--faint); transition: transform .15s ease; }
.mgr details.fold[open] > summary .chev { transform: rotate(90deg); }
.mgr details.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }


/* ρυθμίσεις που δεν ανήκουν στον τρόπο χρήσης που διάλεξε ο κάτοχος (βλ. applyModeView στο app.js) */
[data-mode-hidden] { display: none !important; }

/* «Περισσότερες ρυθμίσεις» στη φόρμα νέου ατόμου: φαίνεται ότι πατιέται */
.more-fields > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }

/* κάρτα προόδου στη σελίδα του ατόμου */
.setup-card { border-color: var(--ok); background: var(--ok-soft); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.setup-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.35; color: var(--muted); }
.setup-steps li.next { color: var(--text); font-weight: 700; }
.setup-steps li.done { color: var(--ok-text); }
.setup-steps .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid currentColor; }
.setup-steps li.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }

/* QR: ένα χρώμα για κάθε κινητό, και μεγάλη προβολή για να σκανάρεται εύκολα */
.qr-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }
.qr-chip-elder { background: var(--ok); }
.qr-chip-contact { background: #b26a00; }
.qr-elder { border: 4px solid var(--ok); }
.qr-contact { border: 4px solid #b26a00; }
.qr-dialog { border: 0; border-radius: 20px; padding: 0; max-width: 92vw; width: 440px; background: #fff; color: #1d1d1b; }
.qr-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 18px; text-align: center; }
.qr-label { margin: 0; font-size: 20px; font-weight: 700; }
.qr-big { width: min(80vw, 360px); height: auto; aspect-ratio: 1; display: block; }
.qr-dialog[data-kind="elder"] .qr-big { outline: 6px solid var(--ok); outline-offset: 6px; border-radius: 4px; }
.qr-dialog[data-kind="contact"] .qr-big { outline: 6px solid #b26a00; outline-offset: 6px; border-radius: 4px; }
.qr-text { margin: 0; font-size: 18px; font-weight: 600; }
.qr-dialog .muted { color: #5f5e5a; }
