/* ERProxenos · εμφάνιση στο πνεύμα των Apple Human Interface Guidelines:
   γραμματοσειρά συστήματος με tracking ανά μέγεθος, χρώματα συστήματος, υλικά με διαφάνεια (backdrop-filter),
   άμεση ανταπόκριση στο πάτημα, κινήσεις χωρίς υπερβολή και σεβασμός στις ρυθμίσεις προσβασιμότητας. */
:root {
  /* Χρώματα συστήματος (φωτεινό) */
  --bg: #f5f5f7; --panel: #ffffff; --ink: #1d1d1f; --muted: #6e6e73; --line: rgba(60, 60, 67, .14);
  --brand: #0071e3; --brand-ink: #ffffff; --brand-press: #0062c4;
  --ok: #248a3d; --warn: #b25000; --bad: #d70015;
  --ok-bg: rgba(52, 199, 89, .14); --warn-bg: rgba(255, 149, 0, .14); --bad-bg: rgba(255, 59, 48, .12); --info-bg: rgba(0, 113, 227, .10);
  --surface: #ffffff; --hover: rgba(0, 0, 0, .035); --chip: rgba(118, 118, 128, .12); --grey-bg: rgba(118, 118, 128, .12);
  --soft: #fbfbfd; --border-strong: rgba(60, 60, 67, .29); --switch-off: rgba(120, 120, 128, .2);
  --warn-ink: #8a3c00; --bad-ink: #a5000f; --info-ink: #0058b0; --them: #8944ab; --toast: rgba(29, 29, 31, .86);
  --fill: rgba(118, 118, 128, .08); --fill-press: rgba(118, 118, 128, .16);
  /* Υλικά */
  --side-bg: rgba(242, 242, 247, .78); --side-ink: #1d1d1f; --side-muted: #6e6e73; --side-active: rgba(0, 113, 227, .12);
  --bar-bg: rgba(255, 255, 255, .72); --scrim: rgba(0, 0, 0, .24);
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 1px rgba(0, 0, 0, .03), 0 4px 16px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  /* Κίνηση: κρίσιμα αποσβεσμένη (χωρίς υπερβολή) για ό,τι δεν πετάει ο χρήστης */
  --ease: cubic-bezier(.25, .1, .25, 1); --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.45; letter-spacing: -.003em; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: rgba(0, 113, 227, .22); }
.boot { padding: 40px; color: var(--muted); }

/* ---------- Διάταξη ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
/* Πλαϊνή στήλη: υλικό με διαφάνεια, το περιεχόμενο μένει πρωταγωνιστής */
.side {
  background: var(--side-bg); color: var(--side-ink); padding: 18px 10px 12px;
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh;
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; color: var(--side-ink); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand svg { flex: none; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.brand small { display: block; font-weight: 400; color: var(--side-muted); font-size: 12px; letter-spacing: 0; }
.nav {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-ink);
  cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-size: 13.5px;
  transition: background-color .15s var(--ease), transform .1s var(--ease-out);
}
.nav:hover { background: var(--hover); text-decoration: none; }
.nav:active { transform: scale(.98); background: var(--fill-press); }
.nav.active { background: var(--side-active); color: var(--brand); font-weight: 600; }
.nav .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 600; line-height: 19px; font-variant-numeric: tabular-nums; }
.side .spacer { flex: 1; }
.side .who { font-size: 12px; color: var(--side-muted); padding: 10px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.side .who b { color: var(--side-ink); font-weight: 600; }
.main { padding: 28px 32px 64px; min-width: 0; max-width: 1480px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
/* Μεγάλοι τίτλοι: αρνητικό tracking, σφιχτό line-height */
.head h1 { font-size: 28px; line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -.022em; }
.head .grow { flex: 1; }
.page-intro { margin: -10px 0 16px; color: var(--muted); max-width: 80ch; line-height: 1.5; }
.about .about-steps { margin: 4px 0 12px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.about p { margin: 0; line-height: 1.5; color: var(--muted); }
.about .actions { margin-top: 16px; }

/* ---------- Στοιχεία ---------- */
.card { background: var(--panel); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px 22px; }
.card h2 { font-size: 17px; line-height: 1.25; margin: 0 0 6px; font-weight: 600; letter-spacing: -.012em; }
.card .intro { color: var(--muted); margin: 0 0 16px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 20px; }
.stat { padding: 16px 18px; }
.stat .v { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }

/* Κουμπιά: κάψουλες, ανταπόκριση πάνω στο πάτημα */
.btn {
  border: 0; background: var(--fill); color: var(--ink); padding: 7px 15px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; font-size: 13.5px;
  transition: background-color .15s var(--ease), transform .1s var(--ease-out), opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--fill-press); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .nav:focus-visible, .tabs button:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-press); }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); color: #fff; }
.privacy p { margin: 6px 0; }
.privacy details { margin-top: 8px; }
.privacy summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.privacy ul { margin: 8px 0; padding-left: 20px; }
.privacy li { margin: 4px 0; }
.btn.danger-fill:hover { background: var(--bad); filter: brightness(1.08); }
.btn.small { padding: 4px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

/* Segmented control */
.tabs { display: inline-flex; background: var(--chip); border-radius: 9px; padding: 2px; gap: 0; }
.tabs button { border: 0; background: none; padding: 5px 14px; border-radius: 7px; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 500; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.tabs button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
.tabs .count { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.tabs .count[hidden] { display: none; }

/* Πεδία */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], input[type=date], input[type=datetime-local], select, textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 11px; background: var(--surface); width: 100%;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input.search { width: 280px; border-radius: 999px !important; padding-left: 14px !important; background: var(--fill) !important; border-color: transparent !important; }
input.search:focus { background: var(--surface) !important; border-color: var(--brand) !important; }
label.f { display: block; margin-bottom: 16px; }
label.f > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
label.f .help { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 5px; display: block; }
.req::after { content: " *"; color: var(--bad); }

/* Διακόπτης τύπου iOS */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input {
  width: 42px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--switch-off); border-radius: 999px;
  position: relative; cursor: pointer; transition: background-color .25s var(--ease); flex: none; margin: 0;
}
.switch input::after {
  content: ""; position: absolute; width: 22px; height: 22px; top: 2px; left: 2px; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .3s var(--ease-out);
}
.switch input:checked { background: #34c759; }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- Πίνακες ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 12px 16px 8px; border-bottom: 1px solid var(--line); letter-spacing: .01em; }
table.list td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.row { cursor: pointer; transition: background-color .12s var(--ease); }
table.list tr.row:hover td { background: var(--hover); }
table.list tr.row:active td { background: var(--fill-press); }
table.list tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.clip { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--brand); }
.pill.grey { background: var(--grey-bg); color: var(--muted); }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert.bad { background: var(--bad-bg); color: var(--bad-ink); }
.alert.info { background: var(--info-bg); color: var(--info-ink); }
.alert .grow { flex: 1; }

/* ---------- Συρτάρι (sheet από δεξιά) ---------- */
.drawer-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 20; animation: px-fade .25s var(--ease) both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 100vw); background: var(--bg); z-index: 21; overflow: auto;
  box-shadow: var(--shadow-lg); animation: px-sheet .38s var(--ease-out) both;
}
/* Γραμμή με υλικό: το περιεχόμενο κυλά από κάτω */
.drawer .top {
  position: sticky; top: 0; background: var(--bar-bg); border-bottom: 1px solid var(--line); padding: 14px 24px;
  display: flex; gap: 10px; align-items: center; z-index: 2;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.drawer .top h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.012em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .body { padding: 20px 24px 44px; display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.lines td input { padding: 5px 8px; }
.lines td.qty { width: 90px; }
.transcript { white-space: pre-wrap; line-height: 1.6; max-height: 380px; overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.transcript .me { color: var(--brand); font-weight: 600; }
.transcript .them { color: var(--them); font-weight: 600; }
audio { width: 100%; height: 36px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.files a { background: var(--fill); border-radius: 999px; padding: 6px 13px; font-size: 13px; transition: background-color .15s var(--ease); }
.files a:hover { background: var(--fill-press); text-decoration: none; }
.warnlist { margin: 0; padding-left: 18px; color: var(--warn-ink); }
.picker { position: relative; }
.picker .menu {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--bar-bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 5; max-height: 280px; overflow: auto; margin-top: 6px; padding: 4px;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  transform-origin: top center; animation: px-pop .18s var(--ease-out) both;
}
.picker .menu div { padding: 7px 10px; cursor: pointer; border-radius: 8px; }
.picker .menu div:hover { background: var(--brand); color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Σύνδεση / οδηγός ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, rgba(0, 113, 227, .10), transparent 60%), var(--bg); }
.login { width: 400px; max-width: 100%; padding: 36px 32px 30px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.login svg { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 4px 14px rgba(0, 113, 227, .3); }
.login h1 { font-size: 26px; line-height: 1.15; margin: 16px 0 6px; font-weight: 700; letter-spacing: -.022em; }
.login p { color: var(--muted); margin: 0 0 22px; }
.steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.steps span { padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.steps span.on { background: var(--brand); color: #fff; }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.checks div { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.checks div:last-child { border-bottom: 0; }
.checks b { min-width: 230px; font-weight: 600; }
.log { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; max-height: 360px; overflow: auto; background: #1d1d1f; color: #f5f5f7; border-radius: 12px; padding: 14px 16px; }

/* Ειδοποίηση: σκούρο υλικό σε κάψουλα */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px) scale(.98); background: var(--toast); color: #fff;
  padding: 10px 20px; border-radius: 999px; opacity: 0; pointer-events: none; z-index: 50; max-width: 90vw; font-weight: 500;
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--shadow-lg);
  transition: opacity .25s var(--ease), transform .35s var(--ease-out);
}
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast.bad { background: rgba(215, 0, 21, .92); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; vertical-align: -2px; opacity: .8; }
@keyframes s { to { transform: rotate(360deg); } }

/* Παράθυρο: ξεκινά λίγο μικρότερο και «έρχεται» */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 30; width: min(440px, 92vw);
  border-radius: 18px; box-shadow: var(--shadow-lg); animation: px-modal .32s var(--ease-out) both;
}
.modal.wide { width: min(680px, 94vw); }
.modal .actions .grow { flex: 1; }
.lines td:nth-child(3) { width: 38%; }

.sideacts { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 10px 34px; }
.sideact {
  background: var(--fill); border: 0; color: var(--side-ink); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background-color .15s var(--ease), transform .1s var(--ease-out);
}
.sideact:hover { background: var(--fill-press); }
.sideact:active { transform: scale(.98); }
.sideact:disabled { opacity: .6; cursor: default; transform: none; }

/* Πρόοδος «Έλεγχος τώρα» */
.proglog { max-height: 52vh; overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 12px 0 16px; font-size: 13px; }
.progline { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; line-height: 1.45; }
.progline .time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 12px; }
.progline .ico { flex: none; width: 12px; text-align: center; font-weight: 700; }
.progline.ok .ico { color: var(--ok); }
.progline.warn .ico, .progline.warn { color: var(--warn-ink); }
.progline.error .ico, .progline.error { color: var(--bad); }

/* ---------- Κινήσεις (μόνο transform / opacity) ---------- */
@keyframes px-fade { from { opacity: 0; } }
@keyframes px-sheet { from { transform: translateX(40px); opacity: 0; } }
@keyframes px-pop { from { transform: scale(.96) translateY(-4px); opacity: 0; } }
@keyframes px-modal { from { transform: translate(-50%, -48%) scale(.96); opacity: 0; } }

/* ---------- Κινητό: γραμμή πάνω, καρτέλες κάτω, κάρτες αντί για πίνακες ---------- */
.content { min-width: 0; }
.topbar, .tabbar { display: none; }
.nav svg { flex: none; opacity: .9; }
.nav.active svg { opacity: 1; }
.iconbtn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill);
  color: var(--brand); cursor: pointer; transition: background-color .15s var(--ease), transform .1s var(--ease-out);
}
.iconbtn:active { transform: scale(.92); background: var(--fill-press); }
.iconbtn:disabled { opacity: .5; }
/* Φύλλο «Περισσότερα» (από κάτω, όπως στο iOS) */
.sheet {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 21; display: grid; gap: 8px;
  max-width: 520px; margin: 0 auto; animation: px-up .36s var(--ease-out) both;
}
.sheet-grab { display: none; }
.sheet-who { text-align: center; color: #fff; font-size: 12.5px; padding: 4px 0 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.sheet-group { background: var(--bar-bg); border-radius: 14px; overflow: hidden; -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-lg); }
.sheet-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--ink); text-align: left;
  padding: 14px 16px; font-size: 16px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.sheet-item:last-child { border-bottom: 0; }
.sheet-item svg { color: var(--brand); }
.sheet-item.on { font-weight: 600; }
.sheet-item.danger, .sheet-item.danger svg { color: var(--bad); }
.sheet-item:active { background: var(--fill-press); }
.sheet-cancel { border: 0; border-radius: 14px; padding: 15px; font-size: 16px; font-weight: 600; color: var(--brand); background: var(--panel); box-shadow: var(--shadow-lg); cursor: pointer; }
@keyframes px-up { from { transform: translateY(24px); opacity: 0; } }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  /* Γραμμή πάνω: υλικό με διαφάνεια, το περιεχόμενο κυλά από κάτω */
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 15;
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--bar-bg); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  }
  .topbar > svg { width: 28px; height: 28px; border-radius: 7px; }
  .topbar b { font-size: 16px; letter-spacing: -.01em; }
  .topbar .grow { flex: 1; }
  /* Μπάρα καρτελών κάτω */
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--bar-bg); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  }
  .tabbar button {
    position: relative; display: grid; justify-items: center; gap: 2px; border: 0; background: none; color: var(--muted);
    font-size: 10px; font-weight: 500; padding: 4px 2px; cursor: pointer; -webkit-tap-highlight-color: transparent; min-width: 0;
    transition: transform .1s var(--ease-out);
  }
  .tabbar button span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar button svg { width: 24px; height: 24px; }
  .tabbar button.on { color: var(--brand); }
  .tabbar button:active { transform: scale(.92); }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 6px); background: var(--bad); color: #fff; border-radius: 999px; min-width: 17px; padding: 0 5px; font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center; }

  .main { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .head { margin-bottom: 14px; gap: 10px; }
  .head h1 { font-size: 28px; }
  /* Επιλογές που δεν χωράνε: αναδιπλώνονται (στο κινητό τίποτα δεν κυλά οριζόντια) */
  .tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
  .tabs button { flex: 1 1 auto; }
  input.search { width: 100%; }
  /* 16px στα πεδία: το iOS δεν κάνει zoom όταν τα πατάς */
  input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], input[type=date], input[type=datetime-local], select, textarea { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 24px; }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .card.pad { padding: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .checks div { flex-wrap: wrap; gap: 4px 10px; }
  .checks b { min-width: 0; }
  .clip { max-width: none; white-space: normal; }
  .alert { flex-wrap: wrap; }

  /* Πίνακες λίστας → κάρτες: 1η και 2η στήλη στην πρώτη γραμμή, οι υπόλοιπες από κάτω */
  table.list, table.list tbody { display: block; }
  table.list thead { display: none; }
  table.list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
  table.list tr:last-child { border-bottom: 0; }
  table.list td { display: block; padding: 0; border: 0; min-width: 0; width: auto !important; text-align: left !important; }
  table.list td:nth-child(n+3) { grid-column: 1 / -1; }
  table.list td:first-child { color: var(--muted); font-size: 12.5px; }
  table.list td:has(> .nolines) { display: none; }
  /* Η 2η στήλη μπαίνει δίπλα στην ημερομηνία μόνο όταν είναι μικρή (σήμα)· ποτέ δεν στριμώχνει την ημερομηνία */
  table.list td:nth-child(2) { max-width: 60vw; }
  /* Κλήσεις: ημερομηνία και κατάσταση πάνω, μετά πελάτης/περίληψη, μετά η ηχογράφηση */
  table.list.calls td:nth-child(2), table.list.calls td:nth-child(3) { grid-column: 1 / -1; max-width: none; }
  table.list.calls td:nth-child(4) { grid-row: 1; grid-column: 2; }
  table.list.calls audio { margin-top: 4px; }
  table.list tr.row:hover td { background: none; }
  table.list tr.row:active { background: var(--fill-press); }

  /* Συρτάρι = πλήρης οθόνη */
  .drawer { width: 100vw; }
  .drawer .top { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .drawer .body { padding: 14px 16px calc(32px + env(safe-area-inset-bottom)); }
  .modal { width: calc(100vw - 24px); max-height: 88vh; overflow: auto; }
  #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- Σκοτεινό θέμα ---------- */
:root[data-theme="dark"] {
  --bg: #1c1c1e; --panel: #2c2c2e; --ink: #f5f5f7; --muted: #98989d; --line: rgba(84, 84, 88, .55);
  --brand: #0a84ff; --brand-press: #339cff;
  --ok: #30d158; --warn: #ff9f0a; --bad: #ff453a;
  --ok-bg: rgba(48, 209, 88, .16); --warn-bg: rgba(255, 159, 10, .16); --bad-bg: rgba(255, 69, 58, .16); --info-bg: rgba(10, 132, 255, .18);
  --surface: #3a3a3c; --hover: rgba(255, 255, 255, .05); --chip: rgba(118, 118, 128, .24); --grey-bg: rgba(118, 118, 128, .24);
  --soft: #242426; --border-strong: rgba(255, 255, 255, .22); --switch-off: rgba(120, 120, 128, .32);
  --warn-ink: #ffcc80; --bad-ink: #ff9e97; --info-ink: #8ec5ff; --them: #da8fff; --toast: rgba(58, 58, 60, .9);
  --fill: rgba(118, 118, 128, .2); --fill-press: rgba(118, 118, 128, .32);
  --side-bg: rgba(38, 38, 40, .78); --side-ink: #f5f5f7; --side-muted: #98989d; --side-active: rgba(10, 132, 255, .22);
  --bar-bg: rgba(44, 44, 46, .78); --scrim: rgba(0, 0, 0, .5);
  --shadow: 0 0 0 .5px rgba(255, 255, 255, .06);
  --shadow-lg: 0 0 0 .5px rgba(255, 255, 255, .08), 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="dark"] .nav.active { color: #4da3ff; }
:root[data-theme="dark"] .tabs button.on { background: #6c6c70; box-shadow: none; }
:root[data-theme="dark"] .log { background: #0d0d0f; }
:root[data-theme="dark"] .center { background: radial-gradient(1200px 600px at 50% -10%, rgba(10, 132, 255, .16), transparent 60%), var(--bg); }

/* ---------- Χρώμα ανά ενότητα (απόφαση Mike 15/11/2026): για να φαίνεται αμέσως πού βρίσκεσαι ----------
   data-section στο <html> το ορίζει το app.js. Χρησιμοποιείται για φόντο, εικονίδιο τίτλου, επιλεγμένο μενού και καρτέλα κινητού.
   Τα κουμπιά ενεργειών μένουν στο μπλε της εφαρμογής. */
:root { --sec: var(--brand); --sec-bg: var(--bg); --sec-icon: none; }
:root[data-section="drafts"] { --sec: #c2255c; --sec-bg: #ffeef4; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2.5'/%3E%3Cpath d='M9 4.5V3h6v1.5M8.5 10h7M8.5 14h7M8.5 18h4'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="drafts"] { --sec: #ff6482; --sec-bg: rgba(255, 55, 95, .13); }
:root[data-section="crm"] { --sec: #5e5ce6; --sec-bg: #efeeff; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.5' r='3.2'/%3E%3Cpath d='M3.5 19.5c.6-3 2.8-4.7 5.5-4.7s4.9 1.7 5.5 4.7'/%3E%3Ccircle cx='17' cy='9.5' r='2.4'/%3E%3Cpath d='M15.8 14.9c2.3.2 4 1.7 4.6 4.6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="crm"] { --sec: #7d7aff; --sec-bg: rgba(94, 92, 230, .18); }
:root[data-section="calls"] { --sec: #1f8a4c; --sec-bg: #e6f6ec; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.8l2.8.6 1.1 3.8-1.9 1.4a12 12 0 0 0 5.4 5.4l1.4-1.9 3.8 1.1.6 2.8c-.2 1.3-1.3 2.2-2.6 2.1A15.5 15.5 0 0 1 4.9 6.4C4.8 5.1 5.7 4 7 3.8z'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="calls"] { --sec: #30d158; --sec-bg: rgba(48, 209, 88, .13); }
:root[data-section="status"] { --sec: #c45a00; --sec-bg: #fff1e3; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12.5h4l2.5-6.5 5 13 2.5-6.5H21'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="status"] { --sec: #ff9f0a; --sec-bg: rgba(255, 159, 10, .13); }
:root[data-section="users"] { --sec: #0071e3; --sec-bg: #e8f1ff; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M5 20c.8-3.6 3.6-5.6 7-5.6s6.2 2 7 5.6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="users"] { --sec: #409cff; --sec-bg: rgba(10, 132, 255, .16); }
:root[data-section="settings"] { --sec: #4a5d75; --sec-bg: #edf1f6; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M17 7h3M4 17h3M11 17h9'/%3E%3Ccircle cx='15' cy='7' r='2.2'/%3E%3Ccircle cx='9' cy='17' r='2.2'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="settings"] { --sec: #8e9fb5; --sec-bg: rgba(142, 159, 181, .14); }
:root[data-section="wizard"] { --sec: #4a5d75; --sec-bg: #edf1f6; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l1.7 5L19 10l-5.3 1.6L12 17l-1.7-5.4L5 10l5.3-1.5z'/%3E%3Cpath d='M18.5 15.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="wizard"] { --sec: #8e9fb5; --sec-bg: rgba(142, 159, 181, .14); }
body { background: linear-gradient(180deg, var(--sec-bg) 0, var(--bg) 440px) no-repeat, var(--bg); transition: background-color .3s ease; }
:root[data-theme="dark"] body { background: linear-gradient(180deg, var(--sec-bg) 0, transparent 440px) no-repeat, var(--bg); }
.side { background: color-mix(in srgb, var(--sec-bg) 55%, var(--side-bg)); }
.nav.active { background: color-mix(in srgb, var(--sec) 14%, transparent); color: var(--sec); }
:root[data-theme="dark"] .nav.active { color: var(--sec); }
.nav.active .count { background: var(--sec); }
.head h1::before, .crm-head h1::before {
  content: ''; display: inline-block; width: .82em; height: .82em; margin-right: .32em; vertical-align: -.06em;
  background: var(--sec); -webkit-mask: var(--sec-icon) center / contain no-repeat; mask: var(--sec-icon) center / contain no-repeat;
}
.drawer .head h1::before, .modal .head h1::before { content: none; }
@media (max-width: 860px) {
  .topbar { background: color-mix(in srgb, var(--sec-bg) 70%, var(--bar-bg)); }
  .tabbar button.on { color: var(--sec); }
}
@media (prefers-contrast: more) { body { background: var(--bg); } }

/* ---------- Προσβασιμότητα ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spin { animation: s 1.6s linear infinite !important; }
  .btn:active, .nav:active, .sideact:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .side { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .drawer .top, .picker .menu { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
  #toast { background: #1d1d1f; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(0, 0, 0, .45); --muted: #3a3a3c; }
  :root[data-theme="dark"] { --line: rgba(255, 255, 255, .5); --muted: #d1d1d6; }
  .card, .btn { border: 1px solid var(--line); }
}

/* ---------- Παραγγελίες (νέα σελίδα, απόφαση Mike 15/11/2026) ----------
   Πάνω: δείκτες και οι εκκρεμείς παραγγελίες του SoftOne σε κάρτες. Κάτω: τα εισερχόμενα σε λίστα. */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 28px; }
.kpi {
  display: grid; gap: 2px; text-align: left; padding: 16px 18px; border: 0; border-radius: 16px; color: var(--ink);
  background: color-mix(in srgb, var(--panel) 82%, transparent); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.022em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.link { cursor: pointer; transition: transform .12s var(--ease-out), box-shadow .2s var(--ease); }
.kpi.link .v { color: var(--sec); }
.kpi.link:hover { box-shadow: var(--shadow-lg); }
.kpi.link:active { transform: scale(.98); }
.kpi.link.on { box-shadow: 0 0 0 2px var(--sec), var(--shadow-lg); }

.osec { margin-bottom: 34px; }
.sec-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.018em; margin: 0; }
.sec-note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sec-head .grow, .sec-tools .grow { flex: 1; }
.sec-head input.search { width: 240px; }
.sec-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

/* Φίλτρο ανά τεχνικό */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chipbtn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; padding: 4px 12px 4px 6px; border-radius: 999px;
  background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 500; transition: background-color .15s var(--ease), transform .1s var(--ease-out);
}
.chipbtn:first-child { padding-left: 12px; }
.chipbtn:hover { background: var(--fill-press); }
.chipbtn:active { transform: scale(.97); }
.chipbtn .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.chipbtn.on { background: var(--ink); color: var(--panel); }
.chipbtn.on .n { color: inherit; opacity: .7; }

/* Avatar τεχνικού */
.av {
  --av: 24px; width: var(--av); height: var(--av); flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  color: #fff; font-size: calc(var(--av) * .4); font-weight: 600; letter-spacing: 0; line-height: 1; box-shadow: 0 0 0 2px var(--panel);
}
.av.none { background: var(--fill-press); color: var(--muted); }
.avs { display: flex; }
.avs .av + .av { margin-left: -7px; }

/* Μικρές ετικέτες */
.chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.chip.info { background: var(--info-bg); color: var(--info-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }

/* Κάρτες εκκρεμών παραγγελιών */
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ocard {
  display: flex; flex-direction: column; gap: 8px; text-align: left; border: 0; cursor: pointer; padding: 16px 18px 14px;
  border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); min-width: 0;
  transition: transform .18s var(--ease-out), box-shadow .2s var(--ease);
}
.ocard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ocard:active { transform: scale(.985); }
.ocard:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }
.ocard-top { display: flex; align-items: center; gap: 8px; }
.ocard-top .grow { flex: 1; }
.ocode { font-weight: 700; font-size: 13px; letter-spacing: .01em; color: var(--sec); font-variant-numeric: tabular-nums; }
.ocode.big { font-size: 14px; }
.osrc { color: var(--muted); font-size: 13px; }
.odate { color: var(--muted); font-size: 12.5px; }
.ocust { font-size: 16px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ocust.big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.osum { color: var(--muted); font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.olines { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.olines li { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.olines .oln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olines .olq { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.olines li.more { color: var(--muted); font-size: 12.5px; }
.obar { height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.obar span { display: block; height: 100%; background: var(--warn); border-radius: 4px; }
.ocard-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.ocard-foot .grow { flex: 1; }
.oval { display: grid; text-align: right; line-height: 1.2; }
.oval b { font-size: 17px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.oval small { color: var(--muted); font-size: 11.5px; }
.oempty { grid-column: 1 / -1; padding: 36px; text-align: center; color: var(--muted); background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.oempty b { color: var(--ink); font-size: 15px; }
.skeleton { height: 210px; border-radius: 18px; background: linear-gradient(100deg, var(--fill) 30%, var(--fill-press) 50%, var(--fill) 70%) 0 0 / 300% 100%; animation: px-shine 1.4s linear infinite; }
@keyframes px-shine { to { background-position: -150% 0; } }

/* Εισερχόμενα */
.inbox { overflow: hidden; }
.irow {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); padding: 12px 18px; cursor: pointer;
  transition: background-color .12s var(--ease);
}
.irow:last-child { border-bottom: 0; }
.irow:hover { background: var(--hover); }
.irow:active { background: var(--fill-press); }
.iico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: var(--fill); color: var(--muted); }
.iico.call { background: var(--info-bg); color: var(--info-ink); }
.imain { display: grid; gap: 2px; min-width: 0; }
.it { display: flex; align-items: center; gap: 6px; min-width: 0; }
.it b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imeta { display: grid; justify-items: end; gap: 2px; color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.istat { display: grid; justify-items: end; gap: 3px; min-width: 150px; }
.iw { color: var(--warn-ink); font-size: 12px; }

/* Προβολή παραγγελίας (SoftOne) */
.osheet { padding: 22px 24px; display: grid; gap: 18px; }
.osheet-head { display: flex; gap: 16px; align-items: flex-start; }
.osheet-head .grow { flex: 1; min-width: 0; }
.osheet-total { display: grid; text-align: right; padding: 10px 16px; border-radius: 14px; background: color-mix(in srgb, var(--sec) 10%, transparent); }
.osheet-total span { font-size: 12px; color: var(--muted); font-weight: 500; }
.osheet-total b { font-size: 26px; font-weight: 700; letter-spacing: -.022em; color: var(--sec); font-variant-numeric: tabular-nums; white-space: nowrap; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: grid; padding: 8px 14px; border-radius: 12px; background: var(--fill); min-width: 110px; }
.fact span { font-size: 11.5px; color: var(--muted); }
.fact b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.olist { display: grid; }
.olist-h, .olist-r { display: grid; grid-template-columns: minmax(0, 1fr) 96px 90px 100px 190px; gap: 12px; align-items: center; padding: 10px 4px; }
.olist-h { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 0; }
.olist-r { border-bottom: 1px solid var(--line); }
.olist-h span:nth-child(2), .olist-h span:nth-child(3), .olist-h span:nth-child(4), .olist-r .c-qty, .olist-r .c-price, .olist-r .c-val { text-align: right; font-variant-numeric: tabular-nums; }
.c-name { display: grid; gap: 1px; min-width: 0; }
.c-name b { font-weight: 600; }
.c-name small, .c-qty small { color: var(--muted); font-size: 12px; }
.c-qty { display: grid; }
.c-val { font-weight: 600; }
.c-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.c-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ototals { display: grid; justify-content: end; gap: 4px; }
.ototals div { display: flex; gap: 24px; justify-content: space-between; min-width: 260px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ototals div b { color: var(--ink); font-weight: 600; }
.ototals .grand { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; color: var(--ink); font-weight: 600; }
.ototals .grand b { font-size: 20px; font-weight: 700; letter-spacing: -.018em; color: var(--sec); }
.lines .c-who { white-space: nowrap; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .kpis { gap: 10px; margin-bottom: 22px; }
  .kpi { padding: 12px 14px; }
  .kpi .v { font-size: 22px; }
  .ogrid { grid-template-columns: minmax(0, 1fr); }
  .sec-head input.search, .sec-tools input.search { width: 100%; }
  .irow { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .iico { width: 32px; height: 32px; grid-row: 1 / span 2; }
  .imeta { grid-column: 3; grid-row: 1; }
  .istat { grid-column: 2 / -1; justify-items: start; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .osheet { padding: 16px; }
  .osheet-head { flex-direction: column; }
  .osheet-total { text-align: left; width: 100%; }
  .olist-h { display: none; }
  .olist-r { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; }
  .olist-r .c-name { grid-column: 1 / -1; }
  .olist-r .c-qty { text-align: left; grid-column: 1; }
  .olist-r .c-price { display: none; }
  .olist-r .c-val { grid-column: 2; grid-row: 2; }
  .olist-r .c-who { grid-column: 1 / -1; }
  .ototals { justify-content: stretch; }
  .ototals div { min-width: 0; }
}
:root[data-theme="dark"] .chipbtn.on { background: #f5f5f7; color: #1c1c1e; }
@media (prefers-reduced-motion: reduce) { .ocard:hover { transform: none; } .skeleton { animation: none; } }

/* Αλλαγή ποσότητας γραμμής στην προβολή παραγγελίας */
.qtybtn { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-align: inherit; }
.qtybtn:hover { text-decoration: underline; }
.osheet-total .btn { margin-top: 8px; }
.count[hidden] { display: none !important; }

/* Loader της προβολής παραγγελίας (αλλαγή ποσότητας, ολοκλήρωση) */
.osheet-wrap { position: relative; }
.osheet-wrap.busy > * { opacity: .45; pointer-events: none; transition: opacity .2s var(--ease); }
.osheet-wrap.busy::after { content: ''; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; }
.qtybtn .spin { width: 11px; height: 11px; }

/* Ενημέρωση πελάτη με email και υπογραφή (απόφαση Mike 16/11/2026) */
.modal.notify-modal { width: min(980px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; }
.notify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.notify-grid textarea { width: 100%; font: inherit; }
.notify-preview { width: 100%; min-height: 360px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: 6px; }
.notify-preview.sig { min-height: 140px; }
.notify-again { display: flex; gap: 8px; margin: 4px 0 8px; }
.notify-again input { flex: 1; min-width: 0; }
.notify-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.notify-banner > span { flex: 1; min-width: 200px; }
.sig-editor textarea.mono, textarea.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 12.5px; width: 100%; }
@media (max-width: 860px) { .notify-grid { grid-template-columns: 1fr; } .notify-preview { min-height: 260px; } }

/* Συνδεδεμένες συνομιλίες email (απόφαση Mike 16/11/2026) */
.threads .sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.threads .sec-head h2 { margin: 0; }
.thread { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.thread-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.thread-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.thread-log li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: start; font-size: 13px; }
.thread-pick { display: grid; gap: 4px; max-height: 55vh; overflow: auto; margin: 10px 0; }
.thread-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.thread-row:hover { border-color: var(--brand); }
.thread-row small { display: block; color: var(--muted, #8a8a8e); }
.tr-date { color: var(--muted, #8a8a8e); font-size: 12px; white-space: nowrap; }
.tr-acc { font-size: 12px; }
@media (max-width: 860px) { .thread-log li, .thread-row { grid-template-columns: 1fr; gap: 2px; } }
