/* CRM Care — σχεδιαστικό σύστημα Apple (ίδιο με Finance Care) */

:root {
  --accent: #015B99;
  --accent-tint: rgba(1, 91, 153, 0.12);
  --on-accent: #fff;
  --bg: #F2F2F7;
  --bg-elevated: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --text: #000000;
  --text-2: rgba(60, 60, 67, 0.62);
  --text-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.18);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --bar: rgba(249, 249, 249, 0.78);
  --red: #FF3B30;
  --green: #34C759;
  --orange: #FF9500;
  --yellow: #FFCC00;
  --purple: #AF52DE;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.18);
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar-w: 248px;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #3D9BE0;
    --accent-tint: rgba(61, 155, 224, 0.18);
    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --card: #1C1C1E;
    --card-2: #2C2C2E;
    --text: #FFFFFF;
    --text-2: rgba(235, 235, 245, 0.62);
    --text-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.34);
    --bar: rgba(22, 22, 24, 0.78);
    --red: #FF453A;
    --green: #30D158;
    --orange: #FF9F0A;
    --yellow: #FFD60A;
    --purple: #BF5AF2;
    --shadow: none;
    --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #3D9BE0;
  --accent-tint: rgba(61, 155, 224, 0.18);
  --bg: #000000;
  --bg-elevated: #1C1C1E;
  --card: #1C1C1E;
  --card-2: #2C2C2E;
  --text: #FFFFFF;
  --text-2: rgba(235, 235, 245, 0.62);
  --text-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.6);
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.34);
  --bar: rgba(22, 22, 24, 0.78);
  --red: #FF453A;
  --green: #30D158;
  --orange: #FF9F0A;
  --yellow: #FFD60A;
  --purple: #BF5AF2;
  --shadow: none;
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.fill { fill: currentColor; stroke: none; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── Σκελετός ───────── */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-right: 0.5px solid var(--sep);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--text-2); letter-spacing: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px;
  color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; border: 0; background: none; text-align: left; width: 100%;
}
.nav-item svg { color: var(--accent); }
.nav-item:hover { background: var(--fill); }
.nav-item.active { background: var(--accent); color: var(--on-accent); }
.nav-item.active svg { color: var(--on-accent); }
.nav-spacer { flex: 1; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px;
  background: var(--fill); color: var(--text-2); border: 0; cursor: pointer; font-size: 15px; width: 100%;
}
.search-trigger kbd { margin-left: auto; font: 12px var(--font); color: var(--text-3); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.page { max-width: 1080px; margin: 0 auto; padding: 28px 32px 120px; animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabbar { display: none; }

@media (max-width: 899px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .page { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(var(--tabbar-h) + var(--safe-b) + 90px); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--sep);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--text-2); background: none; border: 0; cursor: pointer; }
  .tab.active { color: var(--accent); }
  .tab svg { width: 25px; height: 25px; }
}

/* ───────── Επικεφαλίδες ───────── */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.page-head .sub { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); background: none; border: 0; padding: 4px 0; margin-bottom: 6px; cursor: pointer; font-size: 17px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-2); margin: 26px 16px 7px; font-weight: 400; }
.section-title.lg { font-size: 22px; text-transform: none; color: var(--text); font-weight: 700; margin: 30px 0 12px; letter-spacing: -0.02em; }

/* ───────── Κουμπιά ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; background: var(--accent); color: var(--on-accent);
  transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(0.97); opacity: .85; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.secondary { background: var(--accent-tint); color: var(--accent); }
.btn.plain { background: none; color: var(--accent); padding: 0 8px; font-weight: 400; }
.btn.danger { background: rgba(255,59,48,.12); color: var(--red); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; background: var(--fill); color: var(--accent); }
.icon-btn:active { opacity: .6; }

/* ───────── Κάρτες και λίστες iOS ───────── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.pad { padding: 16px; }
.list { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; position: relative;
  background: var(--card); cursor: default; border: 0; width: 100%; text-align: left; color: var(--text);
}
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.list-row.indent + .list-row.indent::before { left: 72px; }
a.list-row, button.list-row, .list-row.link { cursor: pointer; }
a.list-row:active, button.list-row:active, .list-row.link:active { background: var(--fill); }
@media (hover: hover) { a.list-row:hover, button.list-row:hover, .list-row.link:hover { background: color-mix(in srgb, var(--fill) 50%, var(--card)); } }
.list-row .chev { color: var(--text-3); margin-left: auto; }
.list-row .label { flex: none; min-width: 140px; color: var(--text); }
.list-row .value { flex: 1; text-align: right; color: var(--text-2); overflow-wrap: anywhere; }
.list-row .value.left { text-align: left; }
.empty { padding: 36px 20px; text-align: center; color: var(--text-2); }
.empty svg { width: 44px; height: 44px; color: var(--text-3); margin-bottom: 8px; }

/* ───────── Αναζήτηση / segmented ───────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.searchbox { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; height: 38px; flex: 1; min-width: 200px; color: var(--text-2); }
.searchbox input { border: 0; background: none; outline: none; flex: 1; font-size: 17px; color: var(--text); min-width: 0; }
.segmented { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.segmented button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text); white-space: nowrap; }
.segmented button.on { background: var(--bg-elevated); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
.segmented .count { color: var(--text-2); font-weight: 400; margin-left: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; border-radius: 999px; padding: 6px 13px; background: var(--fill); font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text); }
.chip.on { background: var(--accent); color: var(--on-accent); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tag.accent { background: var(--accent-tint); color: var(--accent); }
.tag.green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.tag.orange { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.tag.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.tag.purple { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }

/* ───────── Ακίνητα ───────── */
.prop-row { align-items: flex-start; padding: 12px 16px; }
.thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); }
.thumb svg { width: 30px; height: 30px; }
.prop-main { flex: 1; min-width: 0; }
.prop-top { display: flex; align-items: baseline; gap: 8px; }
.prop-code { font-weight: 700; font-variant-numeric: tabular-nums; }
.prop-title { font-weight: 600; }
.prop-price { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prop-meta { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.prop-flags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.flag { color: var(--text-3); display: inline-flex; }
.flag.on.fav { color: var(--yellow); }
.flag.on.keys { color: var(--orange); }
.flag.on.pub { color: var(--green); }
.flag.on.excl { color: var(--purple); }
.flag svg { width: 18px; height: 18px; }
.flag-toggle { border: 0; background: var(--fill); border-radius: 10px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); }
.flag-toggle.on { color: var(--text); }
.flag-toggle.on.fav svg { color: var(--yellow); fill: var(--yellow); }
.flag-toggle.on.keys svg { color: var(--orange); }
.flag-toggle.on.pub svg { color: var(--green); }
.flag-toggle.on.lock { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }

.hero { display: flex; gap: 18px; align-items: center; padding: 18px; }
.hero .thumb { width: 84px; height: 84px; border-radius: 18px; }
.hero .thumb svg { width: 40px; height: 40px; }
.hero h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.hero .price { font-size: 22px; font-weight: 700; margin-top: 2px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--orange) 14%, var(--card)); margin-bottom: 14px; }
.banner.lock { background: color-mix(in srgb, var(--red) 12%, var(--card)); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.grid-2 > * { min-width: 0; }
@media (max-width: 1099px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ───────── Πελάτες ───────── */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: #fff; background: linear-gradient(180deg, #A5ABB7, #858994); }
.avatar.lg { width: 76px; height: 76px; font-size: 28px; }
.contact-actions { display: flex; gap: 10px; margin-top: 14px; }
.contact-actions a, .contact-actions button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: var(--card); color: var(--accent); font-size: 12px; font-weight: 500; box-shadow: var(--shadow); border: 0; cursor: pointer; }
.contact-actions .disabled { color: var(--text-3); pointer-events: none; }

/* ───────── Αρχική ───────── */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; border: 0; text-align: left; color: var(--text); }
.stat:active { transform: scale(.98); }
.stat .n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .t { font-size: 14px; color: var(--text-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.stat .ic { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 10px; }
.stat .ic svg { width: 18px; height: 18px; }

/* ───────── Ημερολόγιο ───────── */
.cal { margin-bottom: 20px; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 6px 16px; flex-wrap: wrap; }
.cal-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; gap: 2px; }
.cal-title svg { color: var(--text-3); }
.cal-month { color: var(--text-2); font-size: 15px; margin-left: 6px; }
.cal-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px 10px 10px; border-bottom: 0.5px solid var(--sep); }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--text); }
.cal-day:hover { background: var(--fill); }
.cal-day .wd { font-size: 12px; color: var(--text-2); font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.cal-day .num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-day.today .num { color: var(--accent); font-weight: 700; }
.cal-day.sel .num { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal-day .dots { display: flex; gap: 3px; height: 5px; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.cal-day.sel .dots i { background: var(--accent); }
.cal-day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 4px; font-weight: 600; }
.cal-list { min-height: 92px; padding-bottom: 6px; }
.cal-empty { display: block; width: 100%; border: 0; background: none; color: var(--text-2); padding: 18px 16px 20px; text-align: left; cursor: pointer; font-size: 15px; }
.cal-empty:hover { color: var(--accent); }
.cal-group { padding: 10px 16px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--card); }
.appt { gap: 12px; }
.appt-time { width: 46px; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.appt-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.appt-title { font-weight: 600; }
.appt.done .appt-title { text-decoration: line-through; color: var(--text-2); }
.appt-when { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
@media (max-width: 899px) {
  .cal-head { padding: 12px 10px 4px 14px; gap: 4px; flex-wrap: nowrap; }
  .cal-month { display: none; }
  .cal-today { padding: 0 6px; }
  .cal-day .num { width: 32px; height: 32px; font-size: 17px; }
  .appt-when { grid-template-columns: 1fr 1fr; }
  .appt-when > :first-child { grid-column: 1 / -1; }
}

/* ───────── Φόρμες ───────── */
.form-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; position: relative; background: var(--card); }
.form-row + .form-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.form-row > label:not(.switch) { flex: none; width: 170px; font-size: 16px; }
.form-row > label .req { color: var(--red); margin-left: 2px; }
.form-row.stack { flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 16px; }
.form-row.stack > label:not(.switch) { width: auto; font-size: 13px; color: var(--text-2); }
.form-row .ctl { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.form-row.stack .ctl { justify-content: flex-start; }
.form-row.invalid > label { color: var(--red); }
.inp {
  width: 100%; border: 0; outline: none; background: none; text-align: right; font-size: 17px; padding: 8px 0; color: var(--text);
}
.form-row.stack .inp { text-align: left; }
.inp::placeholder { color: var(--text-3); }
textarea.inp { min-height: 110px; resize: vertical; line-height: 1.45; text-align: left; }
select.inp { -webkit-appearance: none; appearance: none; cursor: pointer; color: var(--text-2); direction: rtl; }
select.inp option, select.inp optgroup { direction: ltr; }
.form-row.stack select.inp { direction: ltr; }
.unit { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.field-input { width: 100%; height: 44px; border-radius: 10px; border: 0; background: var(--fill); padding: 0 12px; font-size: 17px; outline: none; color: var(--text); }
.field-input:focus { box-shadow: 0 0 0 3px var(--accent-tint); }
textarea.field-input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.lbl { display: block; font-size: 13px; color: var(--text-2); margin: 12px 4px 6px; }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill-2); transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; cursor: default; }

.file-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--fill); font-size: 15px; }
.file-item button { margin-left: auto; }

/* ───────── Φύλλα (sheets) και διάλογοι ───────── */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.32); display: flex; align-items: center; justify-content: center; animation: fade .2s ease-out; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: min(620px, 100%); max-height: min(86vh, 900px); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .24s cubic-bezier(.2,.9,.3,1.1); overflow: hidden; }
.sheet.narrow { width: min(420px, 100%); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.sheet-head .btn.plain { min-width: 80px; }
.sheet-head .btn.plain:last-child { justify-content: flex-end; font-weight: 600; }
.sheet-head .btn.plain:first-child { justify-content: flex-start; }
.sheet-body { overflow: auto; padding: 4px 16px 20px; -webkit-overflow-scrolling: touch; }
@media (max-width: 899px) {
  .overlay { align-items: flex-end; padding: 0; }
  .sheet, .sheet.narrow { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; animation: slideUp .3s cubic-bezier(.2,.9,.3,1); padding-bottom: var(--safe-b); }
  @keyframes slideUp { from { transform: translateY(100%); } }
}
.alert { background: var(--bg-elevated); width: min(300px, 100%); border-radius: 14px; text-align: center; overflow: hidden; animation: pop .2s ease-out; align-self: center; }
.alert .body { padding: 18px 16px 16px; }
.alert h4 { margin: 0 0 4px; font-size: 17px; }
.alert p { margin: 0; font-size: 13px; color: var(--text-2); }
.alert .actions { display: flex; border-top: 0.5px solid var(--sep); }
.alert .actions button { flex: 1; border: 0; background: none; height: 44px; font-size: 17px; color: var(--accent); cursor: pointer; }
.alert .actions button + button { border-left: 0.5px solid var(--sep); font-weight: 600; }
.alert .actions button.danger { color: var(--red); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; z-index: 200; animation: toastIn .25s ease-out; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.toast.error { background: var(--red); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 28px; left: calc(50% + var(--sidebar-w) / 2); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ───────── Spotlight ───────── */
.spotlight { align-items: flex-start; padding-top: 12vh; }
.spotlight .panel { width: min(640px, 100%); background: var(--bg-elevated); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out; }
.spotlight .panel .searchbox { background: none; height: 56px; border-bottom: 0.5px solid var(--sep); border-radius: 0; padding: 0 16px; }
.spotlight .panel .searchbox input { font-size: 20px; }
.spotlight .results { max-height: 50vh; overflow: auto; }
.spotlight .results .list-row.sel { background: var(--accent-tint); }
@media (max-width: 899px) { .spotlight { padding: 0; align-items: stretch; } .spotlight .panel { border-radius: 0; padding-top: env(safe-area-inset-top, 0px); } .spotlight .results { max-height: none; } }

/* ───────── Ρυθμίσεις πεδίων ───────── */
.sections { display: flex; flex-direction: column; gap: 16px; }
.sec-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sec-card.unsectioned { background: transparent; box-shadow: none; border: 1.5px dashed var(--sep); }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 8px; border-bottom: 0.5px solid var(--sep); }
.sec-head h4 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.sec-head .count { color: var(--text-2); font-weight: 400; font-size: 14px; }
.handle { cursor: grab; color: var(--text-3); padding: 6px; display: inline-flex; touch-action: none; }
.handle:active { cursor: grabbing; }
.field-list { min-height: 48px; }
.field-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 8px; background: var(--card); position: relative; cursor: pointer; }
.unsectioned .field-row { background: var(--card); border-radius: 10px; margin: 6px; box-shadow: var(--shadow); }
.field-row + .field-row::before { content: ""; position: absolute; top: 0; left: 44px; right: 0; border-top: 0.5px solid var(--sep); }
.unsectioned .field-row + .field-row::before { display: none; }
.field-row .name { flex: 1; min-width: 0; font-size: 16px; }
.field-row .badges { display: flex; gap: 4px; align-items: center; color: var(--text-3); }
.field-row .badges svg { width: 16px; height: 16px; }
.field-row .badges .on { color: var(--accent); }
.drop-hint { padding: 14px; text-align: center; color: var(--text-3); font-size: 14px; }
.field-list:not(:empty) + .drop-hint { display: none; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: var(--shadow-lg); }
.sortable-drag { opacity: .95; }

.opt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.opt-row .field-input { height: 38px; font-size: 15px; }
.opt-row.archived .field-input { opacity: .45; text-decoration: line-through; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin: 0 4px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend svg { width: 15px; height: 15px; color: var(--accent); }

/* ───────── Φωνητικός βοηθός ───────── */
.mic-fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 6px rgba(0,0,0,.18);
  transition: transform .12s ease;
}
.mic-fab:active { transform: scale(.92); }
.mic-fab svg { width: 28px; height: 28px; }
@media (max-width: 899px) { .mic-fab { right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); width: 56px; height: 56px; } }
.mic-big { width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); transition: background .2s, transform .1s; }
.mic-big svg { width: 38px; height: 38px; }
.mic-big:disabled { opacity: .35; cursor: default; }
.mic-big.on { background: var(--red); animation: micPulse 1.4s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); } 50% { box-shadow: 0 0 0 16px transparent; } }

/* ───────── Είσοδος ───────── */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: min(380px, 100%); text-align: center; }
.login .logo { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 16px; box-shadow: var(--shadow); }
.login h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.login p { color: var(--text-2); margin: 6px 0 26px; }
.login .list { text-align: left; margin-bottom: 16px; }
.login .list input { width: 100%; border: 0; outline: none; background: none; font-size: 17px; padding: 14px 16px; color: var(--text); }
.login .list input + input { border-top: 0.5px solid var(--sep); }
.login .err { color: var(--red); font-size: 14px; min-height: 20px; margin-bottom: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 16px; font-size: 14px; position: relative; }
.timeline li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.timeline .when { color: var(--text-2); font-size: 12px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
