/* Averto CRM — ένα στρώμα· καμία ιδιότητα δεν δηλώνεται δύο φορές για τον ίδιο
   selector στο ίδιο πλαίσιο, και κάθε χρώμα έρχεται από το :root.
   Κάτω από 760px οι πίνακες γίνονται λίστα δύο στηλών (.c-main / .c-aside)·
   οι στήλες .c-desk κρύβονται και το .mobile-only δείχνει τη σύνοψή τους. */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --sidebar: #f4f4f2;
  --text: #17201c;
  --text-2: #444d49;
  --muted: #7b8480;
  --hairline: #ecece8;
  --border: #dfe1dc;
  --border-strong: #c9ccc6;
  --hover: #f5f6f3;
  --active: #ebece8;
  --accent: #1f5a49;
  --accent-strong: #163d32;
  --accent-soft: #eaf2ee;
  --accent-line: #cfe0d8;
  --focus: rgba(31, 90, 73, .22);
  --danger: #b4453c;
  --danger-soft: #fcefee;
  --danger-line: #f3c9c5;
  --warn: #93601d;
  --warn-soft: #fcf5e6;
  --warn-line: #efdcae;
  --ok: #287552;
  --ok-soft: #eaf5ef;
  --ok-line: #c3e3d0;
  --neutral-soft: #f0f1ee;
  --ink: #27312d;
  --on-ink: #f4f4f2;
  --brand-mark: #e9b98f;
  --on-accent: #ffffff;
  --overlay: rgba(255, 255, 255, .86);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 1px rgba(23, 32, 28, .04);
  --shadow-sm: 0 1px 2px rgba(23, 32, 28, .05), 0 0 0 1px rgba(23, 32, 28, .02);
  --shadow-lg: 0 12px 32px -8px rgba(23, 32, 28, .14), 0 2px 6px rgba(23, 32, 28, .05);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 15px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-bold: 600;
  --sidebar-w: 232px;
  --topbar-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-lg);
  line-height: 1.5;
  letter-spacing: -.003em;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1 { margin: 0; line-height: 1.25; font-weight: var(--fw-bold); font-size: var(--fs-xl); letter-spacing: -.02em; }
h2 { margin: 0; line-height: 1.25; font-weight: var(--fw-bold); font-size: var(--fs-md); letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.icon { flex: none; display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.strong { font-weight: var(--fw-bold); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ── Κέλυφος ─────────────────────────────────────────────── */
.app-shell { min-height: 100vh; }
.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-w);
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--hairline);
  padding: 14px 10px 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}
.brand:hover { color: var(--text); }
.sidebar .brand { padding: 4px 8px 16px; }
.brand-mark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  background: var(--accent-strong);
  color: var(--brand-mark);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-copy strong { font-size: var(--fs-md); letter-spacing: -.01em; }
.brand-copy small { color: var(--muted); font-size: var(--fs-xs); }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
}
.side-nav a .icon { color: var(--muted); }
.side-nav a:hover { background: var(--active); color: var(--text); }
.side-nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.side-nav a.active .icon { color: var(--accent); }
.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 0 8px;
  border-top: 1px solid var(--hairline);
}
.user-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.user-copy strong { font-size: var(--fs-sm); font-weight: var(--fw-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy small { color: var(--muted); font-size: var(--fs-xs); }
.icon-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.icon-btn:hover { background: var(--active); color: var(--text); }
.avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--neutral-soft);
  color: var(--text-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-lg { width: 44px; height: 44px; font-size: var(--fs-md); }

.workspace { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 24;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  background: var(--overlay);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.brand-compact { font-size: var(--fs-lg); white-space: nowrap; }
.brand-compact strong { font-weight: var(--fw-bold); letter-spacing: -.01em; }
.topbar-logout { margin-left: auto; }
.global-search { display: none; position: relative; flex: 1; max-width: 440px; }
.global-search .icon, .search-field .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.global-search input[type=search] {
  height: 32px;
  min-height: 32px;
  padding: 0 56px 0 32px;
  background: var(--hover);
  border-color: transparent;
  font-size: var(--fs-sm);
}
.global-search input[type=search]:hover { border-color: var(--border); }
.global-search input[type=search]:focus { background: var(--surface); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
}
.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 25;
  display: grid;
  /* Πέντε θέσεις· η μεσαία («Ενδιαφερόμενοι») παίρνει περισσότερο πλάτος. */
  grid-template-columns: 1fr 1fr 1.45fr 1fr 1fr;
  background: var(--overlay);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--hairline);
  padding: 6px 4px max(6px, env(safe-area-inset-bottom));
}
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0 3px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
}
.mobile-nav a.active { color: var(--accent-strong); }

/* ── Επικεφαλίδα σελίδας ─────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.page-title { min-width: 0; }
.sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.count {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 0 6px;
  min-width: 20px;
  border-radius: 99px;
  background: var(--neutral-soft);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 20px;
  text-align: center;
  letter-spacing: 0;
}
.eyebrow { font-size: var(--fs-sm); margin-bottom: 4px; }
.eyebrow a { color: var(--muted); }
.eyebrow a:hover { color: var(--text); }
.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--fs-sm);
  min-width: 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section { margin-top: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head h2 { font-size: var(--fs-sm); color: var(--text-2); }

/* ── Επιφάνειες ──────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.panel-pad { padding: 14px 16px; }
.form-panel { max-width: 720px; padding: 18px 16px 16px; }

/* ── Πίνακες / λίστες ────────────────────────────────────── */
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table th {
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: var(--fw-medium);
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--text-2);
}
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { position: relative; transition: background-color .12s ease; }
.list-contacts td { vertical-align: middle; }
.table .col-narrow { width: 1%; }
.table th.num { text-align: right; }
.c-main { color: var(--text); }
.c-main a, .row-link { color: var(--text); font-weight: var(--fw-medium); }
@media (hover: hover) {
  .table tbody tr:hover { background: var(--hover); }
  .c-main a:hover, .row-link:hover { color: var(--accent); }
}
.row-link::after { content: ''; position: absolute; inset: 0; }
.over-link { position: relative; z-index: 1; }
.c-aside { white-space: nowrap; }
.clamp-cell { max-width: 360px; }
.row-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}
.c-desk .row-link { font-weight: var(--fw-normal); color: var(--text-2); }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { margin-top: 1px; font-size: var(--fs-sm); color: var(--muted); }
/* Η τελεία μένει στο τέλος της γραμμής όταν αναδιπλώνεται, όχι στην αρχή της επόμενης. */
.row-sub > *:not(:last-child)::after,
.inline-meta > *:not(:last-child)::after,
.timeline-meta > *:not(:last-child)::after { content: '\00a0\00a0·\00a0 '; color: var(--border-strong); }
.is-due, .is-due time { color: var(--warn); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-copy { min-width: 0; }
.call-who { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.call-who .dir { margin-top: 1px; }
.dir {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--neutral-soft);
  color: var(--muted);
}
.dir-in { color: var(--accent); }
.aside-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: var(--fs-sm); color: var(--text-2); }
.desk-only { display: inline-block; }
.mobile-only { display: none; }

/* ── Ετικέτες ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-new { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.badge-wait { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-closed { background: var(--neutral-soft); color: var(--muted); border-color: var(--hairline); }
.badge-source { color: var(--muted); background: transparent; border-color: var(--hairline); }

/* ── Καρτέλες φίλτρου ────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
  padding: 2px;
  background: var(--neutral-soft);
  border-radius: var(--radius);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ── Κουμπιά ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-panel .actions-row { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--hairline); }

/* ── Φόρμες ──────────────────────────────────────────────── */
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); margin-bottom: 5px; }
.hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 5px; }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color .12s ease, box-shadow .12s ease;
  -webkit-appearance: none;
  appearance: none;
}
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=search], input[type=datetime-local], input:not([type]), select { height: 40px; }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=search], input[type=datetime-local], input:not([type]) { padding: 0 11px; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
select {
  padding: 0 32px 0 11px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8480' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
textarea { min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}
::placeholder { color: var(--muted); opacity: 1; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field input[type=search] { padding-left: 32px; }
.filter-note { margin: -4px 0 12px; font-size: var(--fs-sm); }

/* ── Μηνύματα ────────────────────────────────────────────── */
.flash {
  padding: 9px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.flash-info { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.empty { text-align: center; color: var(--muted); padding: 18px 16px; font-size: var(--fs-sm); }

.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-soft);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.notice-head h2 { color: var(--warn); font-size: var(--fs-md); }
.notice-head .count { background: var(--surface); color: var(--warn); }
.notice-head p { color: var(--text-2); font-size: var(--fs-sm); margin-top: 2px; }
.review-list { list-style: none; margin: 10px 0 0; padding: 0; }
.review-list li { padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--warn-line); font-size: var(--fs-sm); }
.review-list li:first-child { margin-top: 0; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text); font-weight: var(--fw-medium); }
.review-meta code { color: var(--muted); font-weight: var(--fw-normal); }
.review-list p { margin-top: 2px; color: var(--text-2); overflow-wrap: break-word; word-break: break-word; }

/* ── Σύνδεση ─────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.auth-container { width: 100%; max-width: 380px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 32px; height: 32px; font-size: var(--fs-md); }
.auth-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand strong { font-size: var(--fs-lg); }
.auth-brand small { color: var(--muted); font-size: var(--fs-xs); }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px 22px;
}
.auth-card h1 { font-size: var(--fs-xl); text-align: center; }
.auth-subtitle { text-align: center; color: var(--muted); margin: 6px 0 20px; font-size: var(--fs-sm); }
.auth-card .btn { width: 100%; height: 40px; margin-top: 4px; font-size: var(--fs-md); }

/* ── Καρτέλα επαφής ──────────────────────────────────────── */
.profile-head { align-items: center; }
.person-lg { gap: 14px; }
.person-lg h1 { font-size: var(--fs-2xl); overflow-wrap: break-word; }
.inline-meta { margin-top: 3px; }
.inline-meta a { color: var(--text-2); }
.inline-meta a:hover { color: var(--accent); }
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
.profile-main, .profile-side { min-width: 0; }
.profile-main > .section:first-child { margin-top: 4px; }
.meta-list { margin: 0; display: grid; gap: 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: var(--fs-sm); }
.meta-list div:first-child { padding-top: 0; }
.meta-list dt { color: var(--muted); white-space: nowrap; }
.meta-list dd { margin: 0; color: var(--text); text-align: right; overflow-wrap: break-word; min-width: 0; }
.notes {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  color: var(--text-2);
  overflow-wrap: break-word;
}
.side-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 10px 16px; }
.timeline li + li::before {
  content: '';
  position: absolute;
  left: 25px;
  top: -10px;
  height: 20px;
  border-left: 1px solid var(--hairline);
}
.timeline-body { min-width: 0; flex: 1; }
.timeline-meta { font-size: var(--fs-sm); color: var(--muted); }
.timeline-meta strong { color: var(--text); font-weight: var(--fw-medium); }
.timeline-body p { margin-top: 3px; color: var(--text-2); overflow-wrap: break-word; }


/* ── Ακίνητα ─────────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.toolbar .tabs { margin-bottom: 0; }
.toolbar-search { flex: 0 1 260px; }
.toolbar-search input[type=search] { height: 34px; padding-left: 32px; }
.strong-num { color: var(--text); font-weight: var(--fw-medium); }
.table tbody tr.is-closed .row-link, .table tbody tr.is-closed .strong-num { color: var(--muted); }
.title-lg { font-size: var(--fs-2xl); overflow-wrap: break-word; }
.price { color: var(--text); font-weight: var(--fw-bold); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge .icon { margin-right: 4px; }
.badge-vis-public { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.badge-vis-selective { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.badge-vis-private { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--hairline); color: var(--text-2); }
.status-list li:last-child { border-bottom: 0; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 9px 16px; border-bottom: 1px solid var(--hairline); }
.history li:last-child { border-bottom: 0; }
.history-what { color: var(--text-2); overflow-wrap: break-word; }
.history-field { color: var(--muted); margin-right: 6px; }
.history li.is-key .history-field { color: var(--text); font-weight: var(--fw-medium); }
.history-old { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.history-arrow { color: var(--muted); margin: 0 4px; }
.history li.is-key .history-new { color: var(--text); font-weight: var(--fw-medium); }
.history-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 1px; }
.public-view { border-top: 3px solid var(--border); }
.public-view-selective { border-top-color: var(--accent-line); }
.public-view-private { border-top-color: var(--ink); }
.public-none { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.owner-list { list-style: none; margin: 0; padding: 0; }
.owner-list li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--hairline); }
.owner-list li:last-child { border-bottom: 0; }
.owner-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.owner-copy a { color: var(--text); font-weight: var(--fw-medium); }
.owner-copy small { color: var(--muted); font-size: var(--fs-xs); }
.link-btn { border: 0; background: none; padding: 4px 0; font: inherit; font-size: var(--fs-xs); color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--text); text-decoration: underline; }
.inline-form { display: flex; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--hairline); background: var(--bg); }
.inline-form select { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--neutral-soft);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.chip:hover { background: var(--active); color: var(--text); }
.chip-text { color: var(--text-2); font-weight: var(--fw-medium); }
.c-main .sub-link { display: block; margin-top: 1px; font-weight: var(--fw-normal); color: var(--text-2); }
.desk-block { display: block; }
.plain-list { margin: 8px 0 14px; padding-left: 18px; color: var(--text-2); }

/* Φόρμα ακινήτου: γρήγορα πεδία πάνω, τα δευτερεύοντα σε κλειστές ενότητες. */
.label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); margin-bottom: 5px; }
.segmented { display: grid; grid-template-columns: 1fr; gap: 6px; }
.segment { position: relative; display: block; cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment > span {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.segment strong { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); }
.segment small { font-size: var(--fs-xs); color: var(--muted); }
.segment:hover > span { border-color: var(--border-strong); }
.segment input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-section { border-top: 1px solid var(--hairline); padding: 2px 0; }
.form-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-2);
}
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::before { content: '▸'; color: var(--muted); font-size: var(--fs-xs); transition: transform .12s ease; }
.form-section[open] > summary::before { transform: rotate(90deg); }
.form-section[open] { padding-bottom: 6px; }
.form-grid.cols-4 { grid-template-columns: 1fr 1fr; }
.hint-block { margin: -4px 0 10px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.pick-list { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.pick-list > legend { padding: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); margin-bottom: 5px; }
.pick-list .pick {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-bottom-width: 0;
  background: var(--surface);
  cursor: pointer;
}
.pick-list .pick:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.pick-list .pick:last-of-type { border-bottom-width: 1px; border-radius: 0 0 var(--radius) var(--radius); }
.pick-list .pick:only-of-type { border-radius: var(--radius); }
.pick-list .pick:hover { background: var(--hover); }
.pick input { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.pick-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.pick-copy strong { font-weight: var(--fw-medium); font-size: var(--fs-sm); }
.pick-copy small { color: var(--muted); font-size: var(--fs-xs); }


/* ── Σήμερα, follow-ups ──────────────────────────────────── */
.side-nav a .nav-count { margin-left: auto; }
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--warn);
  color: var(--on-accent);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  line-height: 1;
}
.nav-icon { position: relative; display: inline-flex; }
.nav-icon .nav-count { position: absolute; top: -5px; right: -11px; height: 16px; min-width: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
.section-head h2.is-due { color: var(--warn); }
.btn-sm { height: 28px; padding: 0 9px; font-size: var(--fs-xs); border-radius: var(--radius-sm); gap: 4px; }
.btn-quiet { background: transparent; box-shadow: none; color: var(--text-2); }
.fu-list { list-style: none; margin: 0; padding: 0; }
.fu-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); }
.fu-item:last-child { border-bottom: 0; }
.fu-done { flex: none; margin: 0; }
.fu-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.fu-check:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.fu-item.is-overdue .fu-check { border-color: var(--warn-line); }
.fu-body { flex: 1; min-width: 0; }
.fu-title { color: var(--text); font-weight: var(--fw-medium); overflow-wrap: break-word; }
a.fu-title:hover { color: var(--accent); }
.sub-a { color: var(--text-2); }
.sub-a:hover { color: var(--accent); }
.fu-later { flex: none; display: flex; gap: 2px; }
.fu-later form { margin: 0; }
.fu-note { margin-top: 4px; }
.row-sub > .fu-note { display: inline; margin: 0; }
.fu-note > summary { display: inline; cursor: pointer; list-style: none; color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.fu-note > summary::-webkit-details-marker { display: none; }
.fu-note > summary:hover { color: var(--text); }
.fu-note form, .fu-note > p, .fu-note > pre { margin-top: 6px; }
.fu-note form { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fu-note textarea { min-height: 60px; }
.quick-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  margin-bottom: 4px;
}
.settings-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 24px; font-size: var(--fs-sm); color: var(--muted); }
.settings-line label { color: var(--muted); }
.settings-line input { width: 64px; text-align: center; }
.subtle { font-size: var(--fs-xs); color: var(--muted); }
.plain-link { color: inherit; }
.plain-link:hover { color: var(--accent); }

/* ── Matching ────────────────────────────────────────────── */
.match-list { list-style: none; margin: 0; padding: 0; }
.match { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--hairline); }
.match:last-child { border-bottom: 0; }
.match-score {
  flex: none;
  width: 44px;
  padding: 3px 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-align: center;
}
.match-body { flex: 1; min-width: 0; }
.match-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.match-title { color: var(--text); font-weight: var(--fw-medium); }
.match-title:hover { color: var(--accent); }
.match-meta { color: var(--muted); font-size: var(--fs-sm); }
.match-checks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  border: 1px solid var(--hairline);
  color: var(--text-2);
  background: var(--surface);
}
.mc b { font-weight: var(--fw-bold); }
.mc-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.mc-near { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.mc-unknown { color: var(--muted); border-style: dashed; }
.mc-miss { color: var(--muted); background: var(--neutral-soft); }
.mc-miss b { color: var(--muted); }
.sent-tag { color: var(--accent-strong); font-weight: var(--fw-medium); }
.send-text {
  margin: 0;
  padding: 10px 12px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.match-actions { flex: none; display: flex; gap: 4px; }
.match-actions form { margin: 0; }
.dir-note { color: var(--ok); }
.type-pick { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.type-pick > legend { padding: 0; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-2); }
.type-pick .tag-check { position: relative; margin: 0; cursor: pointer; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-check span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.tag-check input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: var(--fw-medium); }
.tag-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ── Φάση 3: χρονολόγιο, ραντεβού, διπλά, εισαγωγή, αναζήτηση ── */
.side-tools { margin-top: 16px; }
.side-label { padding: 0 10px 4px; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  pointer-events: none;
}
.topbar-search { margin-left: auto; }
.topbar-search + .topbar-logout { margin-left: 0; }
.tl { list-style: none; margin: 0; padding: 4px 0; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 9px 16px; }
.tl-item + .tl-item::before { content: ''; position: absolute; left: 27px; top: -9px; height: 18px; border-left: 1px solid var(--hairline); }
.tl-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--neutral-soft);
  color: var(--muted);
}
.tl-note .tl-icon { background: var(--accent-soft); color: var(--accent); }
.tl-change-key .tl-icon, .tl-merge .tl-icon { background: var(--warn-soft); color: var(--warn); }
.tl-followup-done .tl-icon { background: var(--ok-soft); color: var(--ok); }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: var(--fs-xs); color: var(--muted); }
.tl-meta > *:not(:last-child)::after { content: '\00a0\00a0·\00a0 '; color: var(--border-strong); }
.tl-source { text-transform: lowercase; }
.tl-title { color: var(--text); font-weight: var(--fw-medium); overflow-wrap: break-word; }
.tl-title a { color: var(--text); }
.tl-title a:hover { color: var(--accent); }
.tl-change .tl-title { font-weight: var(--fw-normal); color: var(--text-2); }
.tl-text { margin-top: 2px; color: var(--text-2); overflow-wrap: break-word; }
.versions { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--hairline); }
.versions li + li { margin-top: 6px; }
.versions .tl-text { color: var(--muted); }
.note-form { display: flex; gap: 8px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--hairline); background: var(--bg); }
.note-form textarea { min-height: 36px; height: 36px; padding: 7px 11px; resize: vertical; }
.note-form textarea:focus { min-height: 72px; }
.ap-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); }
.ap-item:last-child { border-bottom: 0; }
.ap-when { flex: none; width: 64px; display: flex; flex-direction: column; line-height: 1.25; }
.ap-when strong { font-size: var(--fs-lg); color: var(--text); }
.ap-when span { font-size: var(--fs-xs); color: var(--muted); }
.ap-item.is-overdue .ap-when strong { color: var(--warn); }
.ap-fu { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 6px; width: 100%; }
.segmented-2 { grid-template-columns: 1fr 1fr; }
.dup-list { list-style: none; margin: 0; padding: 0; }
.dup { padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.dup:last-child { border-bottom: 0; }
.dup-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: start; }
.dup-side { min-width: 0; }
.dup-vs { color: var(--muted); font-size: var(--fs-sm); padding-top: 2px; }
.dup-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.dup-actions { display: flex; gap: 4px; align-items: center; }
.dup-actions form { margin: 0; }
.merge-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
.merge-card { position: relative; display: block; cursor: pointer; }
.merge-card input { position: absolute; opacity: 0; pointer-events: none; }
.merge-card-body {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.merge-keep-label { display: none; margin-bottom: 4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--accent); }
.merge-card input:checked + .merge-card-body { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.merge-card input:checked + .merge-card-body .merge-keep-label { display: block; }
.merge-card input:focus-visible + .merge-card-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.merge-name { display: block; margin-bottom: 8px; font-size: var(--fs-lg); }
.merge-confirm p { color: var(--text-2); font-size: var(--fs-sm); margin-bottom: 10px; }
.import-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-title { margin-bottom: 12px; font-size: var(--fs-sm); color: var(--text-2); }
.import-actions { margin-top: 14px; }
.import-actions form { margin: 0; }
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-list li + li { border-top: 1px solid var(--hairline); }
.sr-list a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: var(--text); }
.sr-list a:hover { background: var(--hover); color: var(--text); }
.sr-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sr-copy strong { font-weight: var(--fw-medium); }
.sr-copy small { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; }
.sr-when { flex: none; font-size: var(--fs-xs); color: var(--muted); }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.head-tool { color: var(--text-2); }

/* ── Κινητό: πίνακας → λίστα ─────────────────────────────── */
@media (max-width: 759px) {
  .table.list thead { display: none; }
  .table.list, .table.list tbody { display: block; }
  .table.list tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    align-items: start;
    padding: 11px 16px;
    border-bottom: 1px solid var(--hairline);
  }
  .table.list tbody tr:last-child { border-bottom: 0; }
  .table.list td { display: block; padding: 0; border: 0; }
  .table.list td.c-desk { display: none; }
  .table.list td.c-main { padding: 0; max-width: none; }
  .table.list td.c-aside { padding: 0; text-align: right; }
  .mobile-only { display: block; }
  .aside-stack.mobile-only { display: flex; }
  .desk-only { display: none; }
  .c-main .row-text { margin-top: 2px; color: var(--text-2); font-weight: var(--fw-normal); }
  .table.list .c-main .row-link.row-text { color: var(--text-2); font-weight: var(--fw-normal); }
  .row-sub { margin-top: 3px; }
  .person .row-sub { margin-top: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .page-head .btn-primary { height: 32px; padding: 0 10px; }
  .profile-head { flex-direction: column; align-items: stretch; }
  .profile-head .actions-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr; }
  .profile-head .actions-row .btn { height: 36px; padding: 0 8px; }
  .form-panel .actions-row { display: grid; grid-template-columns: 1fr 1fr; }
  .form-panel .actions-row .btn { height: 40px; }
  .form-panel .actions-row .btn-primary { order: 2; }
  .desk-block { display: none; }
  .head-tool span { display: none; }
  .dup-pair { grid-template-columns: 1fr; gap: 4px; }
  .dup-vs { display: none; }
  .ap-item { flex-wrap: wrap; }
  .ap-item .fu-later { width: 100%; padding-left: 76px; }
  .note-form { padding: 10px 14px; }
  .fu-item { flex-wrap: wrap; padding: 11px 14px; }
  .fu-later { width: 100%; padding-left: 32px; }
  .match { flex-wrap: wrap; padding: 11px 14px; }
  .match-actions { width: 100%; padding-left: 56px; }
  .mobile-nav a { font-size: 10px; letter-spacing: -.01em; }
  .toolbar-search { flex: 1 1 100%; }
  .toolbar-search input[type=search] { height: 40px; }
  .title-lg { font-size: var(--fs-xl); }
  .table.list .row-sub .badge { height: 18px; font-size: var(--fs-2xs); }
}

@media (min-width: 760px) {
  body { font-size: var(--fs-md); }
  input[type=text], input[type=password], input[type=email], input[type=tel],
  input[type=search], input[type=datetime-local], input:not([type]), select { height: 36px; }
  input[type=text], input[type=password], input[type=email], input[type=tel],
  input[type=search], input[type=datetime-local], input:not([type]), select, textarea { font-size: var(--fs-md); }
  .global-search input[type=search] { height: 32px; font-size: var(--fs-sm); }
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
  .form-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .segmented { grid-template-columns: repeat(3, 1fr); }
  .quick-add { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 150px 110px auto; align-items: center; }
  .form-panel { padding: 22px 24px 20px; }
  .container { padding: 24px 24px 96px; }
  .global-search { display: block; }
  .topbar-search { display: none; }
  .merge-grid { grid-template-columns: 1fr 1fr; }
  .page-head { margin-bottom: 16px; align-items: flex-end; }
  .profile-head { align-items: center; }
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .workspace { margin-left: var(--sidebar-w); }
  .brand-compact, .topbar-logout, .mobile-nav { display: none; }
  .topbar { padding: 0 32px; }
  .container { padding: 28px 32px 48px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .profile-side > .section:first-child { margin-top: 4px; }
}

/* ── Διορθώσεις φάσης 3: τι εμποδίζει μια αναίρεση ───────── */
.flash-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-weight: var(--fw-normal);
  line-height: 1.45;
}
.flash-list li + li { margin-top: 3px; }
