:root {
  --brand: #0f766e;
  --on-brand: #ffffff;
  --ink: #111827;
  --muted: #5b6472;
  --line: #e3e6ec;
  --sunken: #f4f5f8;
  --surface: #ffffff;
  --bg: #f7f8fa;
  --ok: #0f7a3d;
  --ok-bg: #e7f6ed;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --info-bg: #eef3ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 1px 3px rgba(17, 24, 39, 0.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--brand); }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2, h3 { margin: 0; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.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; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── κεφαλίδα / μενού ── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { height: 34px; width: auto; max-width: 140px; object-fit: contain; border-radius: 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.brand-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-item:hover { background: var(--sunken); color: var(--ink); }
.nav-item.is-on { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.nav-item .lbl-short { display: none; }
.top-end { display: flex; align-items: center; gap: 10px; }
.top-end form { margin: 0; }
.who { font-size: 13px; color: var(--muted); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-switch select { height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 14px; background: var(--surface); max-width: 200px; }

.main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 20px 32px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.foot { text-align: center; padding: 18px 16px 28px; color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .top { padding: 10px 14px; gap: 10px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; z-index: 30; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; min-width: 0; flex: 1; text-align: center; }
  .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item .lbl { display: none; }
  .nav-item .lbl-short { display: block; }
  .nav.is-single { display: none; }
  .top-end { margin-left: auto; }
  .who { display: none; }
  .store-switch select { max-width: 150px; }
  .main { padding: 16px 14px 96px; }
  .foot { padding-bottom: 96px; }
  body:has(.nav.is-single) .main, body:has(.nav.is-single) .foot { padding-bottom: 24px; }
  h1 { font-size: 21px; }
}

/* ── κουμπιά / φόρμες ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--sunken); }
.btn.is-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.is-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.is-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.is-danger:hover { background: var(--bad-bg); }
.btn.is-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.is-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn.is-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.is-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn.is-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.inline { display: inline; margin: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; border: 0; padding: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.field small { font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cfd4dc; border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface); color: var(--ink); }
.field textarea { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); outline-offset: 0; }
.field.grow { flex: 1 1 220px; }
.hint { font-size: 13px; color: var(--muted); min-height: 1em; }
.hint.is-ok { color: var(--ok); }
.hint:empty { display: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-31 { display: grid; grid-template-columns: 3fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } .grid-31 { grid-template-columns: 2fr 1fr; } }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #cfd4dc; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.seg label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }

.combo { position: relative; }
.combo-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 15; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12); max-height: 300px; overflow: auto; }
.combo-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.combo-list li.is-empty { color: var(--muted); cursor: default; background: none; }

/* ── κάρτες ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; margin: 4px 0 10px; }
.sub-title { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 0 1 170px; }
.filters .field.grow { flex: 1 1 220px; }
.empty-state { text-align: center; padding: 36px 16px; }
.empty-state h1 { margin-bottom: 8px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.flash { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.flash.is-ok { background: var(--ok-bg); color: var(--ok); }
.flash.is-err { background: var(--bad-bg); color: var(--bad); }
.flash.is-info { background: var(--info-bg); color: #1e3a8a; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpis.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .kpis { gap: 8px; }
  .kpis.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 10px 12px; }
  .kpi > b { font-size: 20px; }
  .kpi > span, .kpi > small { font-size: 12px; }
}
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.kpi > span { font-size: 13px; color: var(--muted); }
.kpi > b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi > small { font-size: 12px; color: var(--muted); }
.kpi.is-accent { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.kpi.is-accent > b { color: var(--brand); }
.kpi.is-bad > b { color: var(--bad); }
.kpi.is-warn > b { color: var(--warn); }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; margin: 0; }
.pill.is-wait { background: var(--warn-bg); color: var(--warn); }
.pill.is-go { background: var(--info-bg); color: #1d4ed8; }
.pill.is-done { background: var(--ok-bg); color: var(--ok); }
.pill.is-bad { background: var(--bad-bg); color: var(--bad); }

/* ── παραγγελίες ── */
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .orders { grid-template-columns: 1fr; } }
.order { display: flex; flex-direction: column; gap: 8px; }
.order.is-past { opacity: 0.85; }
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-addr { font-size: 16px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.order-meta .cod { color: var(--warn); font-weight: 700; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.order-form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: var(--sunken); font-size: 14px; }
.quote b { font-size: 22px; font-variant-numeric: tabular-nums; }
.quote .warn { color: var(--warn); font-weight: 600; width: 100%; }
.quote .bad { color: var(--bad); font-weight: 600; width: 100%; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── πίνακες ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tfoot th { border-top: 2px solid var(--line); border-bottom: 0; color: var(--ink); font-size: 14px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 8px 0 0; overflow-x: auto; margin-bottom: 8px; }
.bar { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar-fill { width: 100%; max-width: 36px; min-height: 2px; background: var(--brand); border-radius: 6px 6px 2px 2px; display: flex; flex-direction: column; overflow: hidden; }
.bar-bad { width: 100%; background: #f59e9e; }
.bar small { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ── σύνδεση ── */
body.is-bare { background: color-mix(in srgb, var(--brand) 6%, var(--bg)); }
.login { width: 100%; max-width: 400px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login .stack { text-align: left; }
.login-logo { max-height: 64px; max-width: 200px; margin: 0 auto; object-fit: contain; }
.login-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 26px; font-weight: 800; }

/* ── παρακολούθηση ── */
.track { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.track-head { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.track-card { display: flex; flex-direction: column; gap: 8px; }
.track-card .pill { align-self: flex-start; }
.track-eta { font-size: 18px; font-weight: 700; color: var(--brand); margin: 0; }
.track-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.steps li::before { content: ""; height: 6px; border-radius: 6px; background: var(--line); }
.steps li.is-done::before { background: var(--brand); }
.steps li.is-current::before { background: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.steps li.is-fail::before { background: var(--bad); }
.steps li b { color: var(--ink); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
@media (max-width: 760px) { .toast { bottom: 90px; } }
