/* CRM · χτίζει πάνω στα χρώματα του style.css. Κάθε κατάσταση ενέργειας έχει τον δικό της τόνο. */
:root {
  --crm-start: #0071e3; --crm-hold: #c76a00; --crm-bill: #a347d1; --crm-done: #248a3d; --crm-off: #8e8e93;
  --crm-col: rgba(118, 118, 128, .08);
}
:root[data-theme="dark"] {
  --crm-start: #0a84ff; --crm-hold: #ff9f0a; --crm-bill: #bf5af2; --crm-done: #30d158; --crm-off: #98989d;
  --crm-col: rgba(0, 0, 0, .24);
}
.tone-start { --tone: var(--crm-start); }
.tone-hold { --tone: var(--crm-hold); }
.tone-bill { --tone: var(--crm-bill); }
.tone-done { --tone: var(--crm-done); }
.tone-off { --tone: var(--crm-off); }

.crm { display: grid; gap: 14px; }
.crm .grow, .crm-drawer .grow { flex: 1; }
.crm .muted, .crm-drawer .muted { color: var(--muted); }
.crm-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.crm-head h1 { font: 700 28px/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -.022em; margin: 0 6px 0 0; }
.crm-content { display: grid; gap: 12px; min-width: 0; }
.crm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-bar h3 { margin: 0; font-size: 15px; font-weight: 600; }
.crm-note { margin: 0; color: var(--muted); max-width: 70ch; }

/* Σύνοψη σε μία γραμμή: γεγονότα, όχι κάρτες */
.crm-strip { display: flex; align-items: center; gap: 0; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.crm-fact { padding: 0 18px 0 0; margin-right: 18px; border-right: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.crm-fact b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 2px; }
.crm-fact.grow, .crm-fact.load { border-right: 0; margin-right: 0; }
.crm-fact.load { display: flex; align-items: center; gap: 12px; padding-right: 0; }
.crm-fact .late { color: var(--bad); font-weight: 600; }
.crm-load { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

/* Φίλτρα χειριστή και αναζήτηση */
.crm-filters { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.crm-filter { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--fill); color: var(--muted); border-radius: 999px; padding: 3px 12px 3px 4px; cursor: pointer; min-height: 30px; }
.crm-filter:first-child { padding-left: 12px; }
.crm-filter.on { background: var(--info-bg); color: var(--brand); font-weight: 600; }
.crm .crm-search { width: 300px; max-width: 100%; border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; background: var(--fill); }
.crm .crm-search:focus { background: var(--surface); }
.crm-find { width: min(520px, 100%); }
.crm-find input { width: 100%; }

/* Άβαταρ */
.crm-av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; font-weight: 600; flex: none;
  background: hsl(var(--hue) 70% 92%); color: hsl(var(--hue) 55% 32%); }
.crm-av.sm { width: 22px; height: 22px; font-size: 10px; }
.crm-av.none { background: var(--chip); color: var(--muted); }
:root[data-theme="dark"] .crm-av { background: hsl(var(--hue) 45% 24%); color: hsl(var(--hue) 80% 82%); }
:root[data-theme="dark"] .crm-av.none { background: var(--chip); color: var(--muted); }

/* Πίνακας */
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.crm-col { background: var(--crm-col); border-radius: 16px; padding: 10px; min-height: 180px; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .12s; }
.crm-col.over { outline-color: var(--tone); }
.crm-col > header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 13px; }
.crm-col > header h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.crm-col > header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.crm-col > header .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.crm-none { color: var(--muted); font-size: 13px; padding: 14px 6px; text-align: center; }

.crm-card { background: var(--panel); border: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--tone); border-radius: 10px; transition: box-shadow .15s ease, transform .1s ease; padding: 10px 10px 8px 11px; cursor: grab; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.crm-card:hover { box-shadow: var(--shadow-lg), inset 3px 0 0 var(--tone); }
.crm-card:active, .crm-slot:active { transform: scale(.985); }
.crm-card:focus-visible, .crm-slot:focus-visible, .crm-row:focus-visible, .crm-ev:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.crm-card.drag { opacity: .45; }
.crm-card .subj { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.crm-card .cust { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-card .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; min-height: 22px; }
.crm-when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-when.late { color: var(--bad); font-weight: 600; }
.crm-chip { font-size: 11.5px; line-height: 18px; padding: 0 8px; border-radius: 999px; font-weight: 500; background: var(--chip); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.crm-chip.hot { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.crm-chip.doc { background: var(--info-bg); color: var(--brand); }
.crm-state { font-size: 12px; color: var(--tone); font-weight: 600; }

/* Εβδομάδα */
.crm-weeknav { display: inline-flex; align-items: center; gap: 8px; }
.crm-weeknav b { min-width: 150px; text-align: center; font-variant-numeric: tabular-nums; }
.crm-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; align-items: start; }
.crm-day { background: var(--crm-col); border-radius: 16px; padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; min-height: 220px; align-content: start; }
.crm-day.weekend { opacity: .8; }
.crm-day > header { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; font-size: 12.5px; }
.crm-day .wd { color: var(--muted); }
.crm-day .dn { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.crm-day.today .dn { color: var(--brand); }
.crm-today { font-size: 11px; font-weight: 600; color: #fff; background: var(--brand); border-radius: 999px; padding: 0 8px; line-height: 18px; }
/* «Σήμερα»: η μέρα φωτίζεται για λίγο ώστε να φαίνεται ότι το πάτημα έπιασε */
.crm-day.flash { animation: crm-flash .7s cubic-bezier(.2, .8, .2, 1) 2; }
.crm-today.next { background: var(--fill-press); color: var(--ink); }
@keyframes crm-flash {
  0% { background-color: rgba(0, 113, 227, .28); }
  100% { background-color: var(--crm-col); }
}
.crm-slot { text-align: left; background: var(--panel); border: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--tone); border-radius: 10px; transition: box-shadow .15s ease, transform .1s ease; padding: 7px 8px; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; color: inherit; min-width: 0; font: inherit; }
.crm-slot:hover { box-shadow: var(--shadow-lg), inset 3px 0 0 var(--tone); }
.crm-slot .time { font-size: 12px; color: var(--tone); font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-slot .subj { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.crm-slot .foot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.crm-slot .cust { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Τεχνικοί */
.crm-techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.crm-techs > .crm-note, .crm-techs > .alert, .crm-techs > .empty { grid-column: 1 / -1; }
.crm-tech { display: grid; gap: 12px; text-align: left; width: 100%; background: var(--panel); color: inherit; font: inherit; border: 0; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .15s ease, transform .1s ease; }
.crm-tech:hover { box-shadow: var(--shadow-lg); }
.crm-tech:active { transform: scale(.99); }
.crm-tech.total, .crm-tech.solo { cursor: default; }
.crm-tech.total { background: var(--crm-col); box-shadow: none; }
.crm-tech.total:active, .crm-tech.solo:active { transform: none; }
.crm-tech > header { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.crm-tech > header .grow { flex: 1; }
.crm-tech .chev { color: var(--muted); font-size: 20px; line-height: 1; }
.crm-tfigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.crm-tfig { display: grid; gap: 1px; min-width: 0; }
.crm-tfig b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.crm-tfig span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.crm-tfig.warn b { color: var(--crm-hold); }
.crm-tfig.bad b { color: var(--bad); }
.crm-ord { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.crm-ord:last-child { border-bottom: 0; }
.crm-ord .who { display: grid; min-width: 0; }
.crm-ord .who b, .crm-ord .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-ord .who span { font-size: 12.5px; }
.crm-ord .hrs { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; min-width: 80px; text-align: right; }
.crm-tlist { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Λίστες πελατών */
.crm-rows { background: var(--panel); border: 0; box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; }
.crm-row { display: grid; grid-template-columns: 40px minmax(200px, 2.4fr) minmax(130px, 1fr) minmax(150px, 1.2fr) minmax(110px, auto); align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; cursor: pointer; color: inherit; }
.crm-row:last-child { border-bottom: 0; }
.crm-row:hover { background: var(--hover); }
.crm-row .who { display: grid; min-width: 0; }
.crm-row .who b, .crm-row .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-row .who span { font-size: 12.5px; }
.crm-row .col { font-size: 13px; }
.crm-row .col.end { justify-self: end; }
.crm-tile { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 700; font-size: 15px; background: hsl(var(--hue) 70% 92%); color: hsl(var(--hue) 55% 32%); flex: none; }
.crm-tile.big { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }
:root[data-theme="dark"] .crm-tile { background: hsl(var(--hue) 45% 24%); color: hsl(var(--hue) 80% 82%); }

/* Υπόλοιπο και ταξινόμηση στη λίστα πελατών */
.crm-rowhead { cursor: default; padding-top: 8px; padding-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.crm-rowhead:hover { background: none; }
.crm-rowhead .sort { border: 0; background: none; color: inherit; font: inherit; padding: 4px 8px; margin: -4px -8px; border-radius: 8px; cursor: pointer; text-align: left; }
.crm-rowhead .sort.end { text-align: right; }
.crm-rowhead .sort:hover { background: var(--hover); color: var(--ink); }
.crm-rowhead .sort.on { color: var(--brand); }
.crm-rowfoot { cursor: default; background: var(--crm-col); }
.crm-rowfoot:hover { background: var(--crm-col); }
.crm-row .col .sub { display: block; font-size: 12px; margin-top: 1px; }
.crm-bal { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.crm-bal.owes { color: var(--bad); }
.crm-bal.credit { color: var(--ok); }

/* Red flags πληρωμών */
.crm-flag { font-size: 13px; margin-left: 6px; }
.crm-flag.red { color: var(--bad); }
.crm-flag.orange { color: var(--crm-hold); }
.crm-flag.green { color: var(--ok); }
.crm-flagtexts { display: grid; gap: 4px; }
.crm-flagtext { font-size: 12.5px; line-height: 1.35; padding-left: 14px; position: relative; }
.crm-flagtext::before { content: ''; position: absolute; left: 2px; top: .45em; width: 7px; height: 7px; border-radius: 50%; }
.crm-flagtext.red { color: var(--bad-ink); }
.crm-flagtext.red::before { background: var(--bad); }
.crm-flagtext.orange { color: var(--warn-ink); }
.crm-flagtext.orange::before { background: var(--crm-hold); }
.crm-flagtext.green { color: var(--ok); }
.crm-flagtext.green::before { background: var(--ok); }
.crm-pay { background: var(--panel); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.crm-pay.red { box-shadow: var(--shadow), inset 3px 0 0 var(--bad); }
.crm-pay.orange { box-shadow: var(--shadow), inset 3px 0 0 var(--crm-hold); }
.crm-pay.green { box-shadow: var(--shadow), inset 3px 0 0 var(--ok); }
.crm-pay.green h3 { color: var(--ok); }
.crm-pay.orange h3 { color: var(--crm-hold); }
.crm-pay > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-pay h3 { margin: 0; font-size: 14px; font-weight: 600; }
.crm-pay.red h3 { color: var(--bad); }
.crm-pay .grow { flex: 1; }
.crm-unpaids { display: grid; }
.crm-unpaid { display: grid; grid-template-columns: minmax(0, 1fr) 90px 170px 120px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.crm-unpaid:last-child { border-bottom: 0; }
.crm-unpaid.head { font-size: 12px; color: var(--muted); font-weight: 600; }
.crm-unpaid .amt, .crm-unpaid .days { text-align: right; }
.crm-pay-text { margin: 0; line-height: 1.5; max-width: 80ch; }
.crm-pay-label { font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--grey-bg); color: var(--muted); }
.crm-pay-label.red { background: var(--bad-bg); color: var(--bad); }
.crm-pay-label.orange { background: var(--warn-bg); color: var(--warn); }
.crm-pay-label.green { background: var(--ok-bg); color: var(--ok); }
.crm-unpaid .days { color: var(--muted); }
.crm-unpaid.late .days, .crm-unpaid.late b { color: var(--bad); }

/* «ⓘ»: σύντομη εξήγηση του τι μετρά */
.crm-info-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.crm-info { border: 0; background: none; color: var(--muted); font-size: 13px; line-height: 1; padding: 0 3px; margin-left: 2px; cursor: pointer; border-radius: 50%; font-weight: 400; }
.crm-info:hover, .crm-info-wrap.open .crm-info { color: var(--brand); }
.crm-info-pop { display: none; position: absolute; z-index: 25; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: min(320px, 80vw); padding: 10px 12px; border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); font-size: 12.5px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; letter-spacing: 0; }
.crm-info-wrap.open .crm-info-pop { display: block; animation: px-pop .16s ease-out both; }
.crm-ev .amount.zero { color: var(--muted); font-weight: 400; }
.crm-info-pop.wide { width: min(420px, 88vw); max-height: 60vh; overflow: auto; }
.crm-sc-title { display: block; margin: 12px 0 4px; font-size: 13.5px; }
.crm-sc-title:first-child { margin-top: 0; }
.crm-sc { max-height: 86vh; overflow: auto; display: grid; gap: 2px; }
.crm-sc h2 { margin: 0 0 8px; }
.crm-sc .crm-sc-list { font-size: 13.5px; line-height: 1.45; }
.crm-sc .actions { margin-top: 14px; }
.crm-sc-btn { white-space: nowrap; }
.crm-pay > header .crm-sc-btn { margin-left: 4px; }
.crm-sc-title.red { color: var(--bad); }
.crm-sc-title.orange { color: var(--crm-hold); }
.crm-sc-title.green { color: var(--ok); }
.crm-sc-list { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.crm-sc-list.colors { list-style: none; padding-left: 0; }
.crm-sc-list.colors li { padding-left: 14px; position: relative; }
.crm-sc-list.colors li::before { content: ''; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.crm-sc-list.colors li.lvl-red::before { background: var(--bad); }
.crm-sc-list.colors li.lvl-orange::before { background: var(--crm-hold); }
.crm-sc-list.colors li.lvl-green::before { background: var(--ok); }
.crm-sc-src { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.crm-info .crm-flag { margin-left: 0; }
.crm-pay h3 .crm-info-wrap { margin-left: 4px; }

/* Καρτέλα πελάτη */
.crm-back { justify-self: start; border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 14px; }
.crm-360 { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 22px; align-items: start; }
.crm-profile { background: var(--panel); border: 0; box-shadow: var(--shadow); border-radius: 18px; padding: 20px; display: grid; gap: 8px; position: sticky; top: 16px; }
.crm-profile h2 { margin: 6px 0 0; font: 600 18px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; overflow-wrap: anywhere; }
.crm-profile h3 { margin: 12px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.crm-profile p { margin: 0; font-size: 13px; }
.crm-profile .job { line-height: 1.4; }
.crm-profile .lines { display: grid; gap: 6px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.crm-profile .ln { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.crm-contact { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.btn.wide { justify-content: center; margin-top: 10px; }
.crm-main { display: grid; gap: 16px; min-width: 0; }
.crm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.crm-kpis > div { padding: 12px 14px; border-right: 1px solid var(--line); display: grid; gap: 2px; }
.crm-kpis > div:last-child { border-right: 0; }
.crm-kpis b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-kpis span { font-size: 12.5px; color: var(--muted); }
.crm-kpis .owes b { color: var(--bad); }
.crm-brief { border: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--crm-bill); border-radius: 14px; padding: 14px 16px; background: var(--panel); }
.crm-brief header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.crm-brief h3 { margin: 0; font-size: 14px; font-weight: 600; }
.crm-brief-text { max-width: 72ch; line-height: 1.55; }
.crm-brief-text p { margin: 0 0 4px; }
.crm-brief-text h4 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--crm-bill); }

/* Ιστορικό: μία γραμμή χρόνου, ενέργειες και παραστατικά μαζί */
.crm-timeline { display: grid; position: relative; }
.crm-timeline .month { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.crm-timeline .month:first-child { margin-top: 0; }
.crm-ev { display: grid; grid-template-columns: 14px 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; width: 100%; background: none; border: 0; border-radius: 8px; padding: 8px 8px 8px 2px; color: inherit; position: relative; font: inherit; }
button.crm-ev { cursor: pointer; }
button.crm-ev:hover { background: var(--hover); }
.crm-ev::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.crm-ev .mark { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); margin: 6px 0 0 4px; position: relative; box-shadow: 0 0 0 3px var(--bg); }
.crm-ev.doc .mark { border-radius: 2px; background: var(--border-strong); }
.crm-ev .date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; display: grid; line-height: 1.35; padding-top: 1px; }
.crm-ev .date small { font-size: 11.5px; }
.crm-ev .what { display: grid; gap: 3px; min-width: 0; }
.crm-ev .what b { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.crm-ev.doc .what b { font-weight: 500; }
.crm-ev .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.crm-ev .amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; padding-top: 1px; }
.crm-ev .amount.neg { color: var(--bad); }

/* Συρτάρι ενέργειας και φόρμες */
.crm-drawer { width: min(620px, 100vw); }
.crm-code { font-size: 12px; font-weight: 600; color: var(--tone); border: 1px solid var(--tone); border-radius: 6px; padding: 1px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.crm-states { display: flex; gap: 6px; flex-wrap: wrap; }
.crm-states button { border: 0; background: var(--fill); color: var(--muted); border-radius: 999px; padding: 5px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.crm-states button:hover { background: var(--fill-press); color: var(--ink); }
.crm-states button:active { transform: scale(.97); }
.crm-states button.on { background: var(--tone); border-color: var(--tone); color: #fff; font-weight: 600; cursor: default; opacity: 1; }
:root[data-theme="dark"] .crm-states button.on { color: #000; }
.crm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; margin: 0; }
.crm-facts dt { font-size: 12px; color: var(--muted); }
.crm-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.crm-form { display: grid; gap: 12px; }
.crm-form textarea, .crm-modal textarea { width: 100%; resize: vertical; line-height: 1.5; }
.crm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.crm-form input[type="datetime-local"], .crm-modal input[type="datetime-local"], .crm-form input[type="text"], .crm-modal input[type="text"], .crm-form select, .crm-modal select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--ink); }
.crm-modal { display: grid; gap: 12px; max-height: 92vh; overflow: auto; }
.crm-modal h2 { margin: 0; }
.crm-picked { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 12px; background: var(--soft); }
.crm-picked b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

@media (max-width: 900px) {
  .crm-360 { grid-template-columns: 1fr; }
  .crm-profile { position: static; }
  .crm-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .crm-row .col:not(.end) { display: none; }
  .crm-two { grid-template-columns: 1fr; }
  .crm-fact.load { display: none; }
  /* Κινητό: όλα κυλάνε κάθετα (απόφαση Mike 15/11/2026)· στήλες και μέρες η μία κάτω από την άλλη */
  .crm-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .crm-col { min-height: 0; }
  .crm-week { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .crm-day { min-height: 0; scroll-margin-top: calc(64px + env(safe-area-inset-top)); }
  .crm-day > header { padding-bottom: 4px; }
  .crm-day .crm-none, .crm-col .crm-none { padding: 4px 6px 6px; text-align: left; }
  .crm-head h1 { font-size: 28px; }
  .crm .crm-search { width: 100%; }
  .crm-filters { flex-wrap: wrap; }
  .crm-row .col.crm-flagtexts { display: grid; grid-column: 2 / -1; grid-row: 2; }
  .crm-unpaid { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-unpaid > span:nth-child(2) { display: none; }
  .crm-unpaid .days { grid-column: 1 / -1; text-align: left; font-size: 12px; }
  .crm-techs { grid-template-columns: minmax(0, 1fr); }
  .crm-tfigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-ord { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-ord .who { grid-column: 1 / -1; }
  .crm-ord .who b, .crm-ord .who span { white-space: normal; }
  .crm-tlist { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .crm-col { transition: none; } .crm-day.flash { animation: none; } }
