/* Agenty CRM — design tokens & βασικά components.
   Χρήση πολλές ώρες την ημέρα (πάντα ανοιχτό tab) → πυκνό αλλά ήρεμο: ουδέτερα χρώματα, ένα μπλε accent.
   Brand: μπλε του λογότυπου + κρεμ #F6F3EC. Όλες οι αποστάσεις από την κλίμακα 4/8/12/16/24/32/48/64.
   Αντιθέσεις (σε λευκό): --ink 15.8:1, --ink-2 8.1:1, --ink-3 5.0:1, --accent-ink 7.4:1. */

@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/manrope/manrope-greek-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF,U+1F00-1FFF; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/manrope/manrope-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* Ουδέτερα (ζεστό γκρι προς το κρεμ του brand) */
  --n-0: #FFFFFF; --n-50: #FBFAF7; --n-100: #F6F3EC; --n-150: #EFEBE2; --n-200: #E6E1D6; --n-300: #D3CDC0;
  --n-400: #A9A397; --n-500: #7E7870; --n-600: #625D56; --n-700: #4A4640; --n-800: #2E2B27; --n-900: #1B1916;
  /* Brand μπλε */
  --b-50: #EEF3FE; --b-100: #DCE6FD; --b-200: #B9CDFB; --b-300: #8AABF6; --b-400: #5683EE; --b-500: #2F62E0;
  --b-600: #2350C4; --b-700: #1D409E; --b-800: #1B377D; --b-900: #172C5E;

  --bg: var(--n-100); --surface: var(--n-0); --surface-2: var(--n-50); --sunken: var(--n-150);
  --line: var(--n-200); --line-strong: var(--n-300);
  --ink: var(--n-900); --ink-2: var(--n-700); --ink-3: var(--n-600);
  --accent: var(--b-600); --accent-hover: var(--b-700); --accent-ink: var(--b-700); --accent-soft: var(--b-50); --accent-line: var(--b-200); --on-accent: #FFFFFF;
  --ok: #157347; --ok-soft: #E3F4EA; --ok-line: #A9DABF;
  --warn: #8A5300; --warn-soft: #FDF0D8; --warn-line: #F0CB86;
  --bad: #B42318; --bad-soft: #FDE8E6; --bad-line: #F4B2AB;
  --info: var(--b-700); --info-soft: var(--b-50); --info-line: var(--b-200);
  --violet: #5B3FB0; --violet-soft: #EEE9FB; --violet-line: #CFC2F3;
  --scrim: rgb(27 25 22 / .45);

  --av1-bg: #DCE6FD; --av1-fg: #1D409E; --av2-bg: #FBEBD3; --av2-fg: #77490A; --av3-bg: #DDF1E6; --av3-fg: #115E3B;
  --av4-bg: #F9E1DC; --av4-fg: #8F2818; --av5-bg: #E8E4F7; --av5-fg: #4A3A9A; --av6-bg: #DCEEF3; --av6-fg: #1A5768;

  --sh-xs: 0 1px 2px rgb(27 25 22 / .05);
  --sh-sm: 0 1px 3px rgb(27 25 22 / .08), 0 1px 2px rgb(27 25 22 / .05);
  --sh-md: 0 4px 6px rgb(27 25 22 / .08), 0 2px 4px rgb(27 25 22 / .05);
  --sh-lg: 0 10px 15px rgb(27 25 22 / .10), 0 4px 6px rgb(27 25 22 / .05);
  --sh-xl: 0 20px 25px rgb(27 25 22 / .12), 0 10px 10px rgb(27 25 22 / .04);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --t-12: .75rem; --t-14: .875rem; --t-16: 1rem; --t-18: 1.125rem; --t-20: 1.25rem; --t-24: 1.5rem; --t-30: 1.875rem;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-full: 999px;
  --f-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --side-w: 232px; --chat-w: 400px; --top-h: 56px;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110; --surface: #1A1917; --surface-2: #1F1E1B; --sunken: #262421; --line: #2F2D29; --line-strong: #423F39;
    --ink: #EFEDE8; --ink-2: #C3BFB6; --ink-3: #A29D93;
    --accent: #7FA2F5; --accent-hover: #A3BDF8; --accent-ink: #9DB8F7; --accent-soft: #1B2440; --accent-line: #2F4275; --on-accent: #0E1730;
    --ok: #5DCB93; --ok-soft: #12271C; --ok-line: #24543A;
    --warn: #F0B357; --warn-soft: #2B2010; --warn-line: #5C4417;
    --bad: #F58A7E; --bad-soft: #301714; --bad-line: #66302A;
    --info: #9DB8F7; --info-soft: #1B2440; --info-line: #2F4275;
    --violet: #BBA9F2; --violet-soft: #241D3D; --violet-line: #43377A;
    --scrim: rgb(0 0 0 / .6);
    --av1-bg: #1F2950; --av1-fg: #B5C3FF; --av2-bg: #33260F; --av2-fg: #F0C27E; --av3-bg: #123323; --av3-fg: #8FDDB5;
    --av4-bg: #3A1A14; --av4-fg: #F5A99A; --av5-bg: #28214A; --av5-fg: #C7BBF5; --av6-bg: #12313A; --av6-fg: #93D3E3;
    --sh-xs: none; --sh-sm: 0 1px 2px rgb(0 0 0 / .4); --sh-md: 0 4px 10px rgb(0 0 0 / .45); --sh-lg: 0 10px 24px rgb(0 0 0 / .5); --sh-xl: 0 20px 40px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

/* ── Βάση ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: var(--f-ui); font-size: var(--t-14); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--t-24); line-height: 1.2; font-weight: 700; }
h2 { font-size: var(--t-16); line-height: 1.3; font-weight: 700; }
h3 { font-size: var(--t-14); line-height: 1.35; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-2); top: -48px; z-index: 100; background: var(--surface); padding: var(--s-2) var(--s-3); border-radius: var(--r); box-shadow: var(--sh-md); }
.skip:focus { top: var(--s-2); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--t-12); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--f-mono); }

/* ── Κέλυφος ───────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-3); background: var(--surface); border-right: 1px solid var(--line); }
.brand, .brand-sm { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); padding: var(--s-1) var(--s-2); }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); background: var(--b-700); color: #fff; font-weight: 800; font-size: var(--t-16); flex: none; }
.brand-mark.lg { width: 48px; height: 48px; font-size: var(--t-24); border-radius: var(--r-lg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: var(--t-16); }
.brand-text small { color: var(--ink-3); font-size: var(--t-12); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-weight: 600; position: relative; }
.nav a:hover { background: var(--sunken); color: var(--ink); }
/* Τρέχουσα σελίδα: φόντο + μπάρα αριστερά + βάρος (δύο ενδείξεις, όχι μόνο χρώμα) */
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); font-size: var(--t-12); font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: var(--s-3); }
.me { display: flex; align-items: center; gap: var(--s-2); }
.me .t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.me .t b { font-size: var(--t-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .t small { color: var(--ink-3); font-size: var(--t-12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-5); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand-sm { display: none; padding: 0; }
.topbar .settings-m { display: none; }
.settings-m[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.spacer { flex: 1; }
.search { position: relative; display: flex; align-items: center; width: min(420px, 100%); }
.search svg { position: absolute; left: var(--s-3); color: var(--ink-3); pointer-events: none; }
.search input[type="search"] { width: 100%; height: 40px; padding: 0 var(--s-3) 0 40px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font-size: var(--t-14); }
.search input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.content { padding: var(--s-5); max-width: 1240px; width: 100%; margin: 0 auto; }
.content:focus { outline: none; }

/* Πάνελ βοηθού (το περιεχόμενο το γεμίζει το chat.js). Docked σε ≥1280px, συρτάρι από κάτω. */
.chat-panel { display: none; }
@media (min-width: 1280px) {
  .app.chat-open { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--chat-w); }
  .app.chat-open .chat-panel { display: flex; position: sticky; top: 0; height: 100dvh; border-left: 1px solid var(--line); background: var(--surface); }
}
@media (max-width: 1279.98px) {
  .app.chat-open .chat-panel { display: flex; position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--sh-xl); border-left: 1px solid var(--line); }
  .app.chat-open::after { content: ""; position: fixed; inset: 0; z-index: 55; background: var(--scrim); }
}

.tabbar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .brand-sm { display: flex; }
  .topbar .settings-m { display: inline-grid; }
  .topbar { padding: 0 var(--s-4); }
  .topbar .search { display: none; }
  .content { padding: var(--s-4) var(--s-4) calc(80px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: var(--ink-3); text-decoration: none; font-size: var(--t-12); font-weight: 600; position: relative; }
  .tabbar .tab[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
  .tabbar .tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tabbar .count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 11px; }
  .chat-toggle { padding: 0 var(--s-3); }
}

/* ── Κεφαλίδα σελίδας ──────────────────────────────────────────────────── */
.page-head { margin-bottom: var(--s-5); }
.page-head .back { display: inline-flex; align-items: center; gap: var(--s-1); margin-bottom: var(--s-2); color: var(--ink-3); text-decoration: none; font-weight: 600; font-size: var(--t-14); min-height: 32px; }
.page-head .back:hover { color: var(--ink); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-title .sub { margin-top: var(--s-1); color: var(--ink-3); font-size: var(--t-14); }
.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* ── Κουμπιά ───────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r); border: 1px solid transparent; font-weight: 700; font-size: var(--t-14); line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), box-shadow .15s var(--ease-out); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-sm); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--n-400); }
.btn.ghost { background: transparent; color: var(--accent-ink); padding: 0 var(--s-3); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--bad); padding: 0 var(--s-3); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.btn.sm { min-height: 32px; padding: 0 var(--s-3); font-size: var(--t-12); }
.btn.block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; position: relative; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Κάρτες / ενότητες ─────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.card-pad { padding: var(--s-4); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); min-height: 52px; }
.card-head h2 { font-size: var(--t-14); }
.card-body { padding: var(--s-4); }
.section + .section { margin-top: var(--s-6); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--s-5); align-items: start; }
@media (max-width: 1024px) { .grid-main, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* ── Badges, avatars, callouts ─────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: var(--s-1); height: 22px; padding: 0 var(--s-2); border-radius: var(--r-full); font-size: var(--t-12); font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.accent { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-line); }
.badge.muted { background: var(--sunken); color: var(--ink-2); border-color: var(--line); }
.av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: var(--t-12); font-weight: 800; flex: none; }
.av.lg { width: 48px; height: 48px; font-size: var(--t-16); }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av1 { background: var(--av1-bg); color: var(--av1-fg); } .av2 { background: var(--av2-bg); color: var(--av2-fg); } .av3 { background: var(--av3-bg); color: var(--av3-fg); }
.av4 { background: var(--av4-bg); color: var(--av4-fg); } .av5 { background: var(--av5-bg); color: var(--av5-fg); } .av6 { background: var(--av6-bg); color: var(--av6-fg); }
.callout { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r); border: 1px solid; font-size: var(--t-14); }
.callout svg { margin-top: 1px; }
.callout.info { background: var(--info-soft); border-color: var(--info-line); color: var(--ink); }
.callout.info svg { color: var(--info); }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--ink); }
.callout.warn svg { color: var(--warn); }
.callout.bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--ink); }
.callout.bad svg { color: var(--bad); }
.callout.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ink); }
.callout.ok svg { color: var(--ok); }

/* ── Φόρμες ────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: var(--s-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label, .label { font-weight: 700; font-size: var(--t-14); color: var(--ink); }
.field .opt { font-weight: 500; color: var(--ink-3); }
.field .hint { color: var(--ink-3); font-size: var(--t-12); }
.field .err { color: var(--bad); font-size: var(--t-12); font-weight: 600; display: flex; gap: var(--s-1); align-items: center; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 40px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font-size: var(--t-16); line-height: 1.4;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
input[disabled], select[disabled], textarea[disabled] { background: var(--sunken); color: var(--ink-3); }
.check { display: flex; align-items: flex-start; gap: var(--s-2); min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.form-actions { display: flex; gap: var(--s-2); margin-top: var(--s-5); flex-wrap: wrap; }
@media (min-width: 861px) { input, select, textarea { font-size: var(--t-14) !important; } }

/* Switch (role="switch"): θέση + χρώμα + κείμενο */
.switch { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; min-height: 40px; background: none; border: 0; padding: 0; font-weight: 600; }
.switch .track { width: 36px; height: 20px; border-radius: 10px; background: var(--n-400); position: relative; transition: background-color .15s var(--ease-out); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .15s var(--ease-out); }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .track::after { transform: translateX(16px); }

/* ── Λίστες / πίνακες ──────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); min-height: 56px; text-decoration: none; color: inherit; }
a.list-row:hover { background: var(--surface-2); }
.list-row .main-t { min-width: 0; flex: 1; }
.list-row .main-t b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .main-t small { display: block; color: var(--ink-3); font-size: var(--t-12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-14); }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover { background: var(--surface-2); }
.cell-main b { display: block; font-weight: 700; }
.cell-main small { display: block; color: var(--ink-3); font-size: var(--t-12); }

/* Φίλτρα ως chips */
.chips { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; padding: 0 var(--s-3); border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: var(--t-14); text-decoration: none; }
.chip:hover { border-color: var(--n-400); color: var(--ink); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .8; font-weight: 700; }

/* Κενή κατάσταση */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: var(--s-7) var(--s-5); color: var(--ink-2); }
.empty > svg { width: 32px; height: 32px; color: var(--ink-3); margin-bottom: var(--s-1); }
.empty p { max-width: 44ch; color: var(--ink-3); }
.empty .btn { margin-top: var(--s-3); }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--sunken) 25%, var(--surface-2) 37%, var(--sunken) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Markdown (απαντήσεις βοηθού, προσφορές) */
.md { line-height: 1.6; font-size: var(--t-14); }
.md > * + * { margin-top: var(--s-3); }
.md h2, .md h3, .md h4 { margin-top: var(--s-5); }
.md ul, .md ol { padding-left: var(--s-5); margin-bottom: 0; }
.md li + li { margin-top: var(--s-1); }
.md code { font-family: var(--f-mono); font-size: .9em; background: var(--sunken); padding: 1px 4px; border-radius: 4px; }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md-table { overflow-x: auto; }
.md table { border-collapse: collapse; width: 100%; font-size: var(--t-14); }
.md th, .md td { border: 1px solid var(--line); padding: var(--s-2) var(--s-3); text-align: left; }
.md th { background: var(--surface-2); }
.prose { max-width: 72ch; }

/* ── Toasts ────────────────────────────────────────────────────────────── */
.toasts { position: fixed; z-index: 90; bottom: var(--s-5); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s-2); width: min(520px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 860px) { .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--n-900); color: #fff; box-shadow: var(--sh-lg); animation: toast-in .25s var(--ease-out); }
.toast.error svg, .toast.warn svg { color: #F9A99F; }
.toast.ok svg { color: #8FE0B4; }
.toast .msg { flex: 1; }
.toast .t-act { background: none; border: 0; color: #B9CDFB; font-weight: 700; cursor: pointer; padding: var(--s-2); text-decoration: underline; }
.toast .t-x { background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); }
.toast .t-x:hover { opacity: 1; background: rgb(255 255 255 / .1); }
.toast form { margin: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── Σελίδες χωρίς κέλυφος ─────────────────────────────────────────────── */
.bare { min-height: 100dvh; display: grid; place-items: center; padding: var(--s-5) var(--s-4); }
.login { width: min(400px, 100%); display: flex; flex-direction: column; gap: var(--s-5); }
.login-brand { display: flex; align-items: center; gap: var(--s-3); }
.login-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.login-brand b { font-size: var(--t-18); }
.login-brand small { color: var(--ink-3); }
.login-card { padding: var(--s-5); display: flex; flex-direction: column; }
.login-card h1 { font-size: var(--t-20); margin-bottom: var(--s-4); }
.login-card .callout { margin-bottom: var(--s-4); }
.login-card .btn { margin-top: var(--s-5); min-height: 44px; }
.error-card { padding: var(--s-6); max-width: 480px; display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ════════════════════════════════════════════════════════════════════════
   Σελίδες (Σήμερα, Επαφές, Ραντεβού, Προσφορές, Follow-ups, Ρυθμίσεις)
   ════════════════════════════════════════════════════════════════════════ */

/* ── Κοινά βοηθητικά σελίδων ───────────────────────────────────────────── */
.stack-sm { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s-5); }
.narrow { max-width: 640px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }
.filter-bar { margin-bottom: var(--s-4); }
.list-search { position: relative; display: flex; align-items: center; width: min(320px, 100%); }
.list-search svg { position: absolute; left: var(--s-3); color: var(--ink-3); pointer-events: none; }
.list-search input { padding-left: 40px; }
.n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: var(--s-1); border-radius: var(--r-full); background: var(--sunken); color: var(--ink-2); font-size: var(--t-12); font-weight: 700; vertical-align: 1px; }
.label-sm { font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; margin-bottom: var(--s-1); }
.sub-h { font-size: var(--t-14); margin-bottom: var(--s-2); }
.lead-text { font-size: var(--t-14); line-height: 1.6; color: var(--ink); }
.pre { white-space: pre-wrap; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.kv { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--ink-2); min-width: 0; }
.kv svg { margin-top: 3px; color: var(--ink-3); }
.kv a, .kv span { min-width: 0; overflow-wrap: anywhere; }
.warn-t { color: var(--warn); } .warn-t svg { color: var(--warn); }
.bad-t { color: var(--bad); font-weight: 600; }
.muted-b { color: var(--ink-2); font-weight: 600; }
.wrap2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.err-line { display: flex; align-items: center; gap: var(--s-1); color: var(--bad); font-size: var(--t-12); font-weight: 600; margin-top: var(--s-1); }
.sep-top { border-top: 1px solid var(--line); }
.inline-form { margin: 0; }
.input-row { display: flex; gap: var(--s-2); align-items: stretch; }
.input-row > select, .input-row > input { flex: 1; min-width: 0; }
.affix { position: relative; display: flex; align-items: center; }
.affix input { padding-right: 32px; }
.affix span { position: absolute; right: var(--s-3); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.list.bordered { border: 1px solid var(--line); border-radius: var(--r); }
.list-row > svg { color: var(--ink-3); }
.amt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.av-empty { background: var(--sunken); color: var(--ink-3); border: 1px dashed var(--line-strong); }
.who { display: flex; align-items: center; gap: var(--s-3); }
.who-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-t a { color: var(--ink); text-decoration: none; }
.who-t a:hover { text-decoration: underline; }
.who-t small { color: var(--ink-3); }
.who-t > span { margin-top: var(--s-1); }
.who-inline { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.contact-lines { display: flex; flex-direction: column; gap: var(--s-1); }
.contact-lines a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; overflow-wrap: anywhere; }
.status-line { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--t-12); font-weight: 600; white-space: nowrap; }
.status-line.ok { color: var(--ok); } .status-line.muted { color: var(--ink-3); }
.mini-empty { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); color: var(--ink-3); }
.mini-empty svg { color: var(--ok); margin-top: 2px; }
.mini-empty b { color: var(--ink-2); }
.danger-zone { border-color: var(--line); background: var(--surface-2); box-shadow: none; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 0; padding: var(--s-3) 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (max-width: 860px) { .sticky-actions { bottom: calc(56px + env(safe-area-inset-bottom)); } }

/* Disclosure (<details>) */
.disclosure > summary { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; cursor: pointer; font-weight: 700; color: var(--accent-ink); list-style: none; border-radius: var(--r-sm); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary svg { transition: transform .15s var(--ease-out); }
.disclosure[open] > summary svg { transform: rotate(90deg); }
.disclosure.inline-edit { margin-top: var(--s-3); }
.disclosure.inline-edit > summary svg { transform: none; }
.disclosure.inline-edit form { margin-top: var(--s-2); }

/* Πίνακες: ολόκληρη η γραμμή κλικάρεται μέσω του κύριου συνδέσμου */
.tbl tbody tr { position: relative; }
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-link:focus-visible { outline: none; }
.row-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-sm); }
.tbl a:not(.row-link) { position: relative; z-index: 1; }
.tbl .cell-main b { overflow-wrap: anywhere; }
.tbl .cell-main small svg { vertical-align: -2px; }
.th-sort { display: inline-flex; align-items: center; gap: var(--s-1); color: inherit; text-decoration: none; min-height: 24px; }
.th-sort:hover { color: var(--ink); }
.th-sort.is-active { color: var(--ink); }
.tbl-foot { padding: var(--s-2) var(--s-4); border-top: 1px solid var(--line); }
.tel { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tel:hover { color: var(--accent-ink); text-decoration: underline; }
.contacts-tbl .c-who { min-width: 220px; }
.contacts-tbl .c-next { max-width: 320px; }

@media (max-width: 720px) {
  .tbl-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
  .tbl-cards tr:last-child { border-bottom: 0; }
  .tbl-cards td { padding: 0; border: 0; text-align: left; }
  .tbl-cards td + td { margin-top: var(--s-2); }
  .tbl-cards td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }
  .tbl-cards .r { text-align: left; }
  .contacts-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); }
  .contacts-tbl .c-who { grid-column: 1; min-width: 0; }
  .contacts-tbl .c-stage { grid-column: 2; grid-row: 1; margin: 0; align-self: start; }
  .contacts-tbl .c-next, .contacts-tbl .c-meet, .contacts-tbl .c-phone { grid-column: 1 / -1; }
  .contacts-tbl .c-meet, .contacts-tbl .c-phone { display: inline-block; width: auto; }
  .contacts-tbl .c-phone { margin-left: var(--s-5); }
  .list-search { width: 100%; }
}

/* Tabs τύπου segmented */
.seg { display: inline-flex; padding: 2px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; min-height: 32px; padding: 0 var(--s-3); border-radius: var(--r-sm); font-weight: 600; font-size: var(--t-12); color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); font-weight: 700; }
.seg button[disabled] { opacity: .5; cursor: not-allowed; }

/* ── SMS chips & σχέδιο υπενθυμίσεων ───────────────────────────────────── */
.sms-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 24px; padding: 0 var(--s-2); border-radius: var(--r-sm); font-size: var(--t-12); font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.sms-chip.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.sms-chip.info { color: var(--info); border-color: var(--info-line); background: var(--info-soft); }
.sms-chip.bad { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.sms-chip.muted { color: var(--ink-3); }
.sms-chip.link { color: var(--accent-ink); }
.sms-chip.link:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.sms-plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.sms-step-h { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.sms-step-h .badge { margin-left: auto; }
.sms-bubble { margin-top: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-sm); background: var(--sunken); color: var(--ink); font-size: var(--t-14); line-height: 1.45; overflow-wrap: anywhere; max-width: 52ch; }

/* ── Σήμερα ────────────────────────────────────────────────────────────── */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.today-side { display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: calc(var(--top-h) + var(--s-4)); }
@media (max-width: 1100px) { .today { grid-template-columns: minmax(0, 1fr); } .today-side { position: static; } }
.app.chat-open .today { grid-template-columns: minmax(0, 1fr); }
.app.chat-open .today-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.section-title h2 { font-size: var(--t-16); }
.today-main > .section { margin-top: var(--s-6); }

.tl-wrap { padding: var(--s-2) 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 72px 24px minmax(0, 1fr); padding: 0 var(--s-4) 0 var(--s-3); }
.tl-time { padding-top: var(--s-4); text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.tl-time b { font-size: var(--t-18); font-weight: 700; letter-spacing: -.01em; }
.tl-time small { color: var(--ink-3); font-size: var(--t-12); font-weight: 600; margin-top: 2px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item:first-child .tl-rail::before { top: var(--s-5); }
.tl-item:last-child .tl-rail::before { bottom: calc(100% - var(--s-5)); }
.tl-dot { position: relative; margin-top: 21px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.tl-card { margin: var(--s-2) 0 var(--s-2) var(--s-2); padding: var(--s-3) var(--s-4); border: 1px solid transparent; border-radius: var(--r-lg); min-width: 0; }
.tl-item.is-next .tl-card { border-color: var(--accent-line); background: var(--accent-soft); }
.tl-item.is-next .tl-dot, .tl-item.is-live .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item.is-live .tl-card { border-color: var(--ok-line); background: var(--ok-soft); }
.tl-item.is-live .tl-dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.tl-item.is-past .tl-time b, .tl-item.is-past .tl-who h3, .tl-item.is-past .tl-who h3 a { color: var(--ink-3); }
.tl-item.is-past .tl-dot { background: var(--line-strong); border-color: var(--line-strong); }
.tl-item.is-past .tl-card { padding-top: var(--s-3); padding-bottom: var(--s-3); }
.tl-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.tl-who { flex: 1; min-width: 0; }
.tl-who h3 { font-size: var(--t-16); line-height: 1.3; }
.tl-who h3 a { color: var(--ink); text-decoration: none; }
.tl-who h3 a:hover { text-decoration: underline; }
.tl-who .co { color: var(--ink-3); font-weight: 600; }
.tl-title { margin-top: 2px; font-size: var(--t-14); }
.tl-title a { color: var(--ink-2); text-decoration: none; }
.tl-title a:hover { color: var(--accent-ink); text-decoration: underline; }
.tl-badges { display: flex; gap: var(--s-1); flex-wrap: wrap; justify-content: flex-end; }
.tl-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0 0 44px; }
.tl-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0 0 44px; }
.tl-item.is-next .tl-actions .btn.ghost:hover { background: var(--surface); }
.prep-out { margin: var(--s-3) 0 0 44px; padding: var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.card-body > .prep-out { margin: var(--s-3) 0 0; }
.prep-loading { display: flex; flex-direction: column; gap: var(--s-2); }
.prep-head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.prep-out .callout { align-items: center; justify-content: space-between; }
.tl-now { display: grid; grid-template-columns: 72px 24px minmax(0, 1fr); align-items: center; padding: var(--s-1) var(--s-4) var(--s-1) var(--s-3); }
.tl-now-t { text-align: right; font-size: var(--t-12); font-weight: 700; color: var(--bad); }
.tl-now-line { position: relative; height: 2px; background: var(--bad); margin: 0 -12px 0 0; }
.tl-now-line::before { content: ""; position: absolute; left: 50%; top: -4px; width: 10px; height: 10px; margin-left: -6px; border-radius: 50%; background: var(--bad); }
.tl-now-l { margin-left: var(--s-2); padding-left: var(--s-3); font-size: var(--t-12); font-weight: 700; color: var(--bad); letter-spacing: .05em; text-transform: uppercase; border-left: 0; position: relative; }
.tl-now-l::before { content: ""; position: absolute; left: -8px; right: auto; top: 50%; width: 16px; height: 2px; background: var(--bad); }
@media (max-width: 560px) {
  .tl-item, .tl-now { grid-template-columns: 52px 20px minmax(0, 1fr); padding: 0 var(--s-3) 0 var(--s-2); }
  .tl-time b { font-size: var(--t-16); }
  .tl-card { margin-left: var(--s-1); padding: var(--s-3); }
  .tl-head .av { display: none; }
  .tl-chips, .tl-actions, .prep-out { margin-left: 0; }
  .tl-badges { flex-direction: column; align-items: flex-end; }
  .tl-actions .btn { min-height: 44px; }
}

.pc-list { list-style: none; margin: 0; padding: 0; }
.pc-item { padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.pc-item + .pc-item { border-top: 1px solid var(--line); }
.pc-head { display: flex; align-items: center; gap: var(--s-3); }
.pc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pc-who a { color: var(--ink); text-decoration: none; }
.pc-who a:hover { text-decoration: underline; }
.pc-who small { color: var(--ink-3); font-size: var(--t-12); }
.pc-result { display: flex; gap: var(--s-2); align-items: flex-start; padding-left: 36px; color: var(--ink-2); }
.pc-result svg { color: var(--violet); margin-top: 2px; }
.pc-act { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding-left: 36px; }
.pc-item > p { padding-left: 36px; }
@media (max-width: 560px) { .pc-head { flex-wrap: wrap; } .pc-head .status-line { width: 100%; padding-left: 36px; } }

.week { list-style: none; margin: 0; padding: var(--s-1) 0; }
.week-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; gap: var(--s-2); padding: var(--s-2) var(--s-4); color: inherit; text-decoration: none; min-height: 40px; }
.week-row:hover { background: var(--surface-2); }
.week-d b { font-size: var(--t-14); font-weight: 700; }
.week-n { justify-self: start; font-weight: 700; color: var(--accent-ink); }
.week-who { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); font-size: var(--t-12); color: var(--ink-2); min-width: 0; }
.week-who .tnum { color: var(--ink-3); }
.week li.is-empty .week-d b { color: var(--ink-3); font-weight: 600; }

/* ── Follow-ups ────────────────────────────────────────────────────────── */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.tasks > .task + .task { border-top: 1px solid var(--line); }
.task form { margin: 0; }
.task-check { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; padding: 0; border-radius: 6px; border: 2px solid var(--line-strong); background: var(--surface); color: transparent; cursor: pointer; position: relative; transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out); }
.task-check::after { content: ""; position: absolute; inset: -11px; }
.task-check:hover { border-color: var(--accent); color: var(--accent); }
.task-check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.task.is-done .task-title, .is-done-t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--n-400); }
.task-meta { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); font-size: var(--t-12); }
.task-meta a { color: var(--ink-2); text-decoration: none; }
.task-meta a:hover { color: var(--accent-ink); text-decoration: underline; }
.due { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--ink-2); font-weight: 600; font-size: var(--t-12); white-space: nowrap; }
.due.bad { color: var(--bad); } .due.warn { color: var(--warn); } .due.muted { color: var(--ink-3); font-weight: 500; }
.task .badge { margin-top: 1px; }
.task .icon-btn { width: 32px; height: 32px; margin: -5px -8px -5px 0; color: var(--ink-3); }
.task-group { margin-top: var(--s-5); }
.group-h { display: flex; align-items: center; gap: var(--s-1); font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; margin-bottom: var(--s-2); }
.group-h.bad { color: var(--bad); }
.group-h .n { text-transform: none; letter-spacing: 0; }
@media (max-width: 860px) { .task-check { width: 24px; height: 24px; } .task .icon-btn { width: 44px; height: 44px; margin: -10px -12px -10px 0; } }

.quick-add { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) 150px 110px auto; gap: var(--s-3); align-items: end; }
.quick-add .field + .field { margin-top: 0; }
.quick-add.compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.quick-add.compact .qa-title { grid-column: 1 / -1; }
.quick-add.compact .qa-submit { grid-column: 1 / -1; }
.quick-add.compact .qa-submit .btn { width: 100%; }
@media (max-width: 1024px) { .quick-add:not(.compact) { grid-template-columns: 1fr 1fr; } .quick-add:not(.compact) .qa-title, .quick-add:not(.compact) .qa-contact { grid-column: 1 / -1; } .quick-add:not(.compact) .qa-submit { grid-column: 1 / -1; } .quick-add .qa-submit .btn { width: 100%; min-height: 44px; } }

/* ── Ραντεβού ──────────────────────────────────────────────────────────── */
.day-h { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); font-size: var(--t-14); }
.day-h small { font-weight: 500; }
.day-n { margin-left: auto; font-size: var(--t-12); color: var(--ink-3); font-weight: 600; }
.mt-row { display: grid; grid-template-columns: 56px 32px minmax(0, 1fr) auto 14px; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); color: inherit; text-decoration: none; min-height: 60px; }
.mt-row:hover { background: var(--surface-2); }
.mt-row > svg { color: var(--ink-3); }
.mt-time { display: flex; flex-direction: column; line-height: 1.2; }
.mt-time b { font-size: var(--t-16); }
.mt-time small { color: var(--ink-3); font-size: var(--t-12); }
.mt-main { min-width: 0; }
.mt-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-main small { display: block; color: var(--ink-3); font-size: var(--t-12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-meta { display: flex; gap: var(--s-2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.mt-row.is-past .mt-time b { color: var(--ink-2); }
@media (max-width: 720px) {
  .mt-row { grid-template-columns: 48px minmax(0, 1fr) 14px; row-gap: var(--s-2); }
  .mt-row > .av { display: none; }
  .mt-meta { grid-column: 2 / 3; justify-content: flex-start; }
  .mt-row > svg { grid-row: 1; grid-column: 3; }
}
.transcript { margin-top: var(--s-3); max-height: 420px; overflow: auto; padding: var(--s-3) var(--s-4); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-14); }
.transcript b { color: var(--ink); margin-right: var(--s-1); }
.transcript b::after { content: ":"; }

/* ── Επαφή ─────────────────────────────────────────────────────────────── */
.contact-head .page-head-row { align-items: center; }
.ch-id { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.ch-id h1 { overflow-wrap: anywhere; }
.ch-bar { display: flex; align-items: center; gap: var(--s-2) var(--s-4); flex-wrap: wrap; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.stage-form { display: flex; align-items: center; gap: var(--s-2); margin: 0; }
.stage-form label { font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; }
.stage-sel { width: auto; min-width: 150px; font-weight: 700; padding-right: var(--s-6); border-radius: var(--r-full); }
.stage-sel.stage-lead { background-color: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.stage-sel.stage-followup { background-color: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.stage-sel.stage-client { background-color: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.stage-sel.stage-partner { background-color: var(--violet-soft); border-color: var(--violet-line); color: var(--violet); }
.stage-sel.stage-lost { background-color: var(--sunken); color: var(--ink-2); }
.stage-sel option { background: var(--surface); color: var(--ink); }
.ch-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; color: var(--ink-2); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
a.ch-link:hover { color: var(--accent-ink); text-decoration: underline; }
.ch-link svg { color: var(--ink-3); }
.next-card { border-color: var(--accent-line); }
.next-card .card-head { background: var(--accent-soft); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.next-card.is-overdue { border-color: var(--bad-line); }
.next-card.is-overdue .card-head { background: var(--bad-soft); }
.ns-form { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: var(--s-3); align-items: end; }
.ns-form .field + .field { margin-top: 0; }
.ns-hint { grid-column: 1 / -1; color: var(--ink-3); font-size: var(--t-12); }
@media (max-width: 720px) { .ns-form { grid-template-columns: 1fr; } .ns-save .btn { width: 100%; min-height: 44px; } }
.note-form { display: flex; flex-direction: column; gap: var(--s-2); border-bottom: 1px solid var(--line); }
.note-form textarea { min-height: 64px; }
.note-actions { justify-content: flex-end; }
.events { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); }
.ev { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); position: relative; padding-top: var(--s-3); }
.ev:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 40px; bottom: -12px; width: 2px; background: var(--line); }
.ev-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line); }
.ev-ai .ev-dot { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-line); }
.ev-meeting .ev-dot { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.ev-prop .ev-dot { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.ev-body { min-width: 0; padding-bottom: var(--s-1); }
.ev-h { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-height: 28px; }
.ev-h a { color: var(--ink); text-decoration: none; }
.ev-h a:hover { text-decoration: underline; }
.ev-h a.muted { color: var(--ink-3); font-size: var(--t-12); }
.ev-h time { margin-left: auto; color: var(--ink-3); font-size: var(--t-12); font-weight: 600; white-space: nowrap; }
.ev-text { margin-top: 2px; color: var(--ink-2); overflow-wrap: anywhere; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; min-height: 40px; border-radius: var(--r); background: var(--sunken); line-height: 1.15; flex: none; }
.date-tile b { font-size: var(--t-12); }
.date-tile small { font-size: var(--t-12); color: var(--ink-2); font-weight: 600; }

/* ── Προσφορά ──────────────────────────────────────────────────────────── */
.md-field { margin-top: var(--s-4); }
.md-field textarea { font-family: var(--f-mono); font-size: var(--t-14) !important; line-height: 1.6; min-height: 420px; }
.doc-preview { padding: var(--s-5) var(--s-6); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-width: 72ch; }
.doc-preview h2, .doc-preview h3 { font-size: var(--t-16); padding-bottom: var(--s-1); border-bottom: 1px solid var(--line); }
.doc-preview > :first-child { margin-top: 0; }
.email-preview .doc-preview { border: 0; padding: var(--s-4); max-width: none; }
@media (max-width: 560px) { .doc-preview { padding: var(--s-4); } }
.save-state { align-self: center; }

/* ── Ρυθμίσεις ─────────────────────────────────────────────────────────── */
.settings { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.subnav { position: sticky; top: calc(var(--top-h) + var(--s-4)); display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-weight: 600; position: relative; }
.subnav a:hover { background: var(--sunken); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--sh-xs); border: 1px solid var(--line); }
.subnav a[aria-current="page"]::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.subnav a svg { color: var(--ink-3); }
.subnav a[aria-current="page"] svg { color: var(--accent-ink); }
.settings-body { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; max-width: 980px; }
.sec-head { margin-bottom: var(--s-4); }
.sec-head h2 { font-size: var(--t-18); }
.sec-head p { margin-top: var(--s-1); max-width: 70ch; }
.settings-grid { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); }
@media (max-width: 1100px) { .settings { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); } .subnav { position: static; flex-direction: row; overflow-x: auto; gap: var(--s-1); padding-bottom: var(--s-1); margin: 0 calc(-1 * var(--s-4)); padding-left: var(--s-4); padding-right: var(--s-4); scrollbar-width: none; } .subnav a { white-space: nowrap; flex: none; min-height: 40px; } .subnav a[aria-current="page"]::before { left: 12px; right: 12px; top: auto; bottom: -1px; width: auto; height: 3px; } }
.narrow-f { max-width: 200px; }
.fs { border: 0; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-direction: column; gap: var(--s-1); }
.fs legend { font-weight: 700; padding: 0; margin-bottom: var(--s-2); }
.fs .hint { color: var(--ink-3); font-size: var(--t-12); }
.fs + .field-row { margin-top: var(--s-5); }

.svc-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: flex; flex-direction: column; }
.svc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) 40px; gap: var(--s-3); align-items: end; padding: var(--s-3) 0; }
.svc-row + .svc-row { border-top: 1px solid var(--line); }
.svc-row .field + .field { margin-top: 0; }
.svc-row:not(:first-child) label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.svc-del { color: var(--ink-3); }
.svc-del:hover { color: var(--bad); background: var(--bad-soft); }
@media (max-width: 860px) { .svc-row { grid-template-columns: minmax(0, 1fr) 44px; } .svc-row .svc-name { grid-column: 1; } .svc-row .svc-price, .svc-row .svc-note { grid-column: 1; } .svc-row .svc-del { grid-column: 2; grid-row: 1; width: 44px; height: 44px; } .svc-row:not(:first-child) label { position: static !important; width: auto; height: auto; clip: auto; } }

.sms-master { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.sms-master h2 { font-size: var(--t-16); }
.sms-master p { margin-top: var(--s-1); max-width: 60ch; }
.var-bar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; padding: var(--s-3); border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: var(--s-4); }
.var-bar .label-sm { margin: 0 var(--s-1) 0 0; }
.var-chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; padding: 0 var(--s-2); border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: var(--t-12); color: var(--ink-2); }
.var-chip:hover { border-color: var(--accent); color: var(--ink); }
.var-chip code { font-family: var(--f-mono); font-size: var(--t-12); color: var(--accent-ink); font-weight: 600; }
.sms-grid { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sms-grid-head, .sms-grid-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr); }
.sms-grid-head { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sms-grid-head span { padding: var(--s-2) var(--s-4); font-size: var(--t-12); font-weight: 700; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; }
.sms-grid-head span:first-child { padding: 0; }
.sms-grid-row + .sms-grid-row { border-top: 1px solid var(--line); }
.sms-stage { padding: var(--s-4); display: flex; align-items: flex-start; }
.sms-cell { padding: var(--s-3) var(--s-4) var(--s-4); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.sms-cell-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.sms-cell-h > label:first-child { font-weight: 700; font-size: var(--t-12); color: var(--ink-2); }
.sm-check { min-height: 24px; font-size: var(--t-12); font-weight: 600; color: var(--ink-2); align-items: center; }
.sm-check input { margin-top: 0; width: 16px; height: 16px; }
.sms-cell textarea { min-height: 76px; }
.sms-count { font-size: var(--t-12); font-weight: 600; min-height: 18px; }
.sms-preview { margin-top: 0; font-size: var(--t-12); max-width: none; }
@media (max-width: 860px) {
  .sms-grid-head { display: none; }
  .sms-grid-row { grid-template-columns: minmax(0, 1fr); }
  .sms-stage { padding: var(--s-3) var(--s-4) 0; }
  .sms-cell { border-left: 0; }
  .sms-cell + .sms-cell { border-top: 1px dashed var(--line); }
  .sms-master { flex-direction: column; align-items: flex-start; }
}

.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--s-4); align-items: start; }
.int-meta { display: flex; flex-direction: column; gap: var(--s-1); color: var(--ink-2); }
.int-meta:empty { display: none; }
.int-meta span { display: inline-flex; align-items: center; gap: var(--s-1); }
.int-meta svg { color: var(--ok); }
.int-meta .muted svg { color: var(--ink-3); }
.int-form .field + .field { margin-top: 0; }
.int-actions { padding-top: var(--s-2); border-top: 1px solid var(--line); }
.int-actions form { margin: 0; }
.secret-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-1) 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.masked { color: var(--ink-2); letter-spacing: .05em; }
.log-body { max-width: 420px; color: var(--ink-2); }
.log-body > span { display: block; overflow-wrap: anywhere; }
@media (max-width: 720px) { .log-body { max-width: none; } }

/* ── Διορθώσεις μετά τον έλεγχο ────────────────────────────────────────── */
.field-row > .field + .field { margin-top: 0; }
.form-1col .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
.form-1col .field-row > .field + .field { margin-top: var(--s-4); }
.cell-main b.clamp { display: -webkit-box; }
.contacts-tbl .c-meet { white-space: nowrap; }
.md-field textarea { font-family: var(--f-ui); }
@media (min-width: 1101px) { .settings { grid-template-columns: 200px minmax(0, 1fr); } }
.ev-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s-3); }
.ev-t { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-height: 28px; }
.ev-h time { margin-left: 0; line-height: 28px; }
.ns-form { grid-template-columns: minmax(0, 1fr) auto; }
.ns-form .ns-text { grid-column: 1 / -1; }
.tl-now { grid-template-columns: 72px 24px minmax(0, 1fr); }
.tl-now-t { grid-column: 1; }
.tl-now-line { grid-column: 2 / 4; grid-row: 1; margin: 0; height: 2px; }
.tl-now-line::before { left: 12px; margin-left: -5px; }
.tl-now-l { grid-column: 3; grid-row: 1; justify-self: end; margin: 0; padding: 0 0 0 var(--s-2); background: var(--surface); position: relative; }
.tl-now-l::before { content: none; }
@media (max-width: 560px) { .tl-now { grid-template-columns: 52px 20px minmax(0, 1fr); } .tl-now-line::before { left: 10px; } }
.sms-grid-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sms-stage { grid-column: 1 / -1; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sms-grid-row .sms-cell:nth-child(2) { border-left: 0; }
.sms-cell textarea { min-height: 96px; }
@media (max-width: 860px) { .sms-grid-row { grid-template-columns: minmax(0, 1fr); } .sms-stage { padding: var(--s-3) var(--s-4); } }
@media (max-width: 560px) {
  .tl-head { flex-wrap: wrap; row-gap: var(--s-2); }
  .tl-who { flex-basis: 100%; }
  .tl-badges { order: -1; flex-direction: row; justify-content: flex-start; width: 100%; }
  .section-title .muted.small { display: none; }
  .tl-actions { gap: var(--s-1) var(--s-2); }
}
@media (max-width: 720px) {
  .contacts-tbl td.is-empty { display: none; }
  .contacts-tbl .c-next, .contacts-tbl .c-meet, .contacts-tbl .c-phone { padding-left: 44px; }
  .contacts-tbl .c-meet .cell-main { display: inline-flex; gap: var(--s-1); align-items: baseline; }
  .contacts-tbl .c-meet .cell-main b, .contacts-tbl .c-meet .cell-main small { display: inline; font-size: var(--t-12); }
  .contacts-tbl .c-phone { margin-left: 0; }
  .contacts-tbl .c-meet + .c-phone:not(.is-empty) { padding-left: var(--s-3); }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--s-4)); margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4) var(--s-1); scrollbar-width: none; }
  .toolbar .chip { flex: none; }
  .card-head .muted.small { display: none; }
}
@media (max-width: 720px) {
  .contacts-tbl .c-meet, .contacts-tbl .c-phone { display: block; width: 100%; }
  .contacts-tbl .c-meet + .c-phone:not(.is-empty) { padding-left: 44px; }
  .contacts-tbl td + td { margin-top: var(--s-1); }
}
.settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.log-body { max-width: none; min-width: 240px; }
.log-body > b { display: block; font-weight: 700; color: var(--ink); }
.clamp2 { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.log-tbl td:last-child { white-space: nowrap; }
.log-when { display: table-cell; }
.log-when > span { display: block; }
.log-when > span + span { margin-top: var(--s-1); }
.log-tbl td:last-child { white-space: normal; }
.log-tbl small { overflow-wrap: anywhere; }

/* ── Mobile fixes (UI review) ── */
.tl-earlier > details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-2); margin-left: 88px; color: var(--ink-3); font-weight: 600; font-size: var(--t-14); border-radius: var(--r); }
.tl-earlier > details > summary::-webkit-details-marker { display: none; }
.tl-earlier > details > summary:hover { color: var(--ink); background: var(--surface-2); }
.tl-earlier > details > summary svg { transition: transform .15s var(--ease-out); }
.tl-earlier > details[open] > summary svg { transform: rotate(180deg); }
.tl-earlier .timeline { padding: 0; }
@media (max-width: 860px) {
  .chip { min-height: 40px; }
  .ch-link { min-height: 44px; }
  .sm-btn, .icon-btn.sm-btn { width: 44px; height: 44px; }
  .tl-earlier > details > summary { margin-left: 0; }
  .page-actions { width: 100%; }
}
@media (max-width: 860px) {
  /* Long labels wrap instead of pushing the page sideways */
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .due { white-space: normal; }
  .mt-main b, .mt-main small { white-space: normal; overflow-wrap: anywhere; }
  .card-head { flex-wrap: wrap; }
  .seg button { min-height: 40px; }
  .quick-add:not(.compact) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  /* Bigger tap targets: checkbox rows, task checkboxes, timeline chips, sort links */
  .check { min-height: 44px; align-items: center; }
  .tl-chips a { min-height: 40px; }
  th a, .sort a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 400px) {
  .quick-add:not(.compact) { grid-template-columns: minmax(0, 1fr) !important; }
  .quick-add .qa-date, .quick-add .qa-time { grid-column: 1 / -1; }
}
@media (max-width: 860px) { .sms-chip { white-space: normal; height: auto; min-height: 24px; max-width: 100%; } }
/* Λογότυπο ως εικόνα στο brand mark */
img.brand-mark { display: block; object-fit: cover; background: #000; }
