/* ONIT! Grow — μαύρο / άσπρο / #F2F2F2. Χρώμα μόνο για κατάσταση (πράσινο = έγινε, κεχριμπαρί = σε εξέλιξη). */
:root {
  --bg: #ffffff;
  --surface: #f2f2f2;
  --line: #dcdcdc;
  --line-strong: #000000;
  --text: #000000;
  --muted: #5c5c5c;
  --inverse-bg: #000000;
  --inverse-text: #ffffff;
  --done: #1d7a3e;
  --done-bg: #e3f2e8;
  --doing: #8a5a00;
  --doing-bg: #fdf0d2;
  --danger: #a3221b;
  --danger-bg: #fbe7e5;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --surface: #1a1a1a;
    --line: #2e2e2e;
    --line-strong: #ffffff;
    --text: #f2f2f2;
    --muted: #a3a3a3;
    --inverse-bg: #f2f2f2;
    --inverse-text: #000000;
    --done: #5fc07f;
    --done-bg: #13281a;
    --doing: #e3b04b;
    --doing-bg: #2c2210;
    --danger: #f08c84;
    --danger-bg: #2d1412;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 6px 0 0; }
.muted { color: var(--muted); font-weight: 500; }
.small { font-size: 13px; }
.r { text-align: right; }

/* ---------- Κεφαλίδα */
.top { border-bottom: 1px solid var(--line-strong); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.brand span { font-weight: 500; }
.brand-lg { font-size: 28px; }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tabs a { text-decoration: none; padding: 7px 10px; font-weight: 600; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs a:hover { border-bottom-color: var(--line); }
.tabs a.on { border-bottom-color: var(--line-strong); }
.bell { margin-left: auto; }
.badge { background: var(--inverse-bg); color: var(--inverse-text); font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.who { display: flex; align-items: center; gap: 10px; margin: 0; }
.who-name { font-weight: 600; font-size: 14px; }
@media (max-width: 640px) {
  .top-in { gap: 6px 12px; }
  .bell-label, .who-name { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .who { margin-left: auto; }
}

/* ---------- Σελίδα */
.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 64px; }
.block { margin-bottom: 36px; }
.block-head { margin-bottom: 16px; }
.crumbs { margin: 0 0 12px; font-size: 14px; }
.flash { padding: 10px 12px; margin-bottom: 18px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; }
.flash-err { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }

/* ---------- Κουμπιά και φόρμες */
button { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line-strong); background: var(--bg); font-weight: 700; cursor: pointer; border-radius: 4px; white-space: nowrap; }
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--inverse-bg); color: var(--inverse-text); }
.btn-primary:hover { background: var(--inverse-bg); opacity: .85; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 20px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-quiet { color: var(--muted); font-weight: 500; font-size: 13px; }
.strong-link { font-weight: 700; text-decoration: none; }
.strong-link:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 1px; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { color: var(--text); font-size: 15px; font-weight: 500; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.grid-form .span2 { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
.fold { margin-top: 14px; }
.fold > summary { cursor: pointer; font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; display: inline-block; width: 14px; font-weight: 800; }
.fold[open] > summary::before { content: "−"; }
.fold-inline { margin-top: 6px; }
.fold-inline > summary { font-size: 13px; color: var(--muted); font-weight: 600; }
.log-form, .note-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.log-form input[type=date] { width: auto; flex: 0 0 auto; }
.log-form input[name=text] { flex: 1 1 220px; }
.note-form textarea { flex: 1 1 100%; }

/* ---------- Πρόοδος και στόχοι */
.progress-line { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 8px; }
.bar { height: 10px; background: var(--surface); display: flex; border: 1px solid var(--line); }
.bar-done { background: var(--done); }
.bar-doing { background: var(--doing); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.card { background: var(--surface); padding: 14px; border-radius: 4px; }
.card-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-v { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.card-v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.card-s { font-size: 14px; font-weight: 600; }
.now { margin-top: 12px; }

/* ---------- Πίνακες */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--surface); }
.table th.r, .table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table .note-cell { white-space: normal; min-width: 180px; color: var(--muted); }
.table .stage-form select { width: auto; padding: 4px 6px; font-size: 13px; }

/* ---------- Βήματα */
.steps-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.steps-head h2 { margin-bottom: 0; }
.filters { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; flex-wrap: wrap; }
.filters a { padding: 6px 12px; text-decoration: none; font-weight: 600; font-size: 14px; border-right: 1px solid var(--line-strong); }
.filters a:last-child { border-right: 0; }
.filters a.on { background: var(--inverse-bg); color: var(--inverse-text); }
.phase { margin-bottom: 22px; }
.phase h3 { padding-bottom: 6px; border-bottom: 1px solid var(--line-strong); margin-bottom: 4px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; scroll-margin-top: 120px; }
.step-status { margin: 0; flex: 0 0 auto; }
.status { border: 1px solid var(--line-strong); background: var(--bg); padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; width: 92px; border-radius: 4px; }
.status-doing { background: var(--doing-bg); color: var(--doing); border-color: var(--doing); }
.status-done { background: var(--done-bg); color: var(--done); border-color: var(--done); }
.step-body { flex: 1; min-width: 0; }
.step-title { font-weight: 600; overflow-wrap: anywhere; }
.st-done .step-title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.step-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.step-note { font-size: 13px; margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--line); }

/* ---------- Αποφάσεις, ευρήματα */
.log, .findings { list-style: none; margin: 0; padding: 0; }
.log li, .findings li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.log-date { flex: 0 0 82px; font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.log-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inline-del { margin: 0; }

/* ---------- Πωλήσεις */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; align-items: flex-start; }
.col { flex: 0 0 260px; background: var(--surface); padding: 10px; border-radius: 4px; scroll-snap-align: start; min-height: 120px; }
.col-head { font-size: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; }
.col-won .col-head { color: var(--done); }
.col-empty { margin: 4px 2px; }
.pcard { background: var(--bg); border: 1px solid var(--line); padding: 10px; margin-bottom: 8px; border-radius: 4px; }
.pcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pcard-name { font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.pcard-name:hover { text-decoration: underline; }
.pcard-meta { font-size: 13px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pcard-next { font-size: 13px; margin-top: 6px; font-weight: 600; }
.due { color: var(--doing); }
.pcard-next.due::before { content: "Ήρθε η ώρα · "; font-weight: 800; }
.stage-form { margin: 8px 0 0; }
.stage-form select { font-size: 13px; padding: 5px 6px; }
.score { font-weight: 800; font-size: 13px; border: 1px solid var(--line-strong); padding: 0 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.score-lg { font-size: 22px; padding: 4px 10px; }
.tag { font-size: 12px; font-weight: 600; background: var(--surface); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }
.tag-css-none { background: var(--inverse-bg); color: var(--inverse-text); border-color: var(--inverse-bg); }

.p-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.p-head p { overflow-wrap: anywhere; }
.stages { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.stages li { font-size: 12px; font-weight: 600; padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); border-radius: 4px; }
.stages li.past { color: var(--text); border-color: var(--text); }
.stages li.now { background: var(--inverse-bg); color: var(--inverse-text); border-color: var(--inverse-bg); }
.js .move-form .lost-field { display: none; }
.js .move-form.show-lost .lost-field { display: flex; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; background: var(--bg); border: 2px solid var(--line-strong); border-radius: 50%; }
.timeline li.tl-stage::before { background: var(--line-strong); }
.tl-when { font-size: 12px; color: var(--muted); font-weight: 600; }
.tl-what { overflow-wrap: anywhere; }

/* ---------- Ειδοποιήσεις */
.notifs { list-style: none; margin: 0; padding: 0; }
.notifs li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notifs li.unread { border-left: 3px solid var(--line-strong); padding-left: 10px; }
.notifs li:not(.unread) .n-title { font-weight: 500; color: var(--muted); }
.n-body { min-width: 0; }
.n-open { margin: 0; }
.n-title { font-weight: 700; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
div.n-title { text-decoration: none; cursor: default; }

/* ---------- Σύνδεση */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 6px; }
.login label { margin-top: 10px; }
.login .muted { margin: 0 0 14px; }

/* ---------- Λογαριασμός, χρήστες */
.narrow { max-width: 520px; }
.grid-form.one-col { grid-template-columns: minmax(0, 1fr); }
.newpass code { font-size: 16px; font-weight: 800; user-select: all; overflow-wrap: anywhere; }
.who .link.on { text-decoration-thickness: 2px; }
