/* Εμφάνιση του «Overwatch Capital».
   Χρώματα: η παλέτα GT Plumbing, ίδια με το εργαλείο παραγγελιών (TZORTZATOSAE/public/style.css),
   ώστε τα δύο προγράμματα να μοιάζουν «της ίδιας εταιρείας». */

:root {
  --brand-navy: #283554;
  --brand-navy-deep: #1e2942;
  --brand-blue: #71b3e1;
  --accent: #2b6fa8;
  --accent-soft: #e8f2fb;

  --bg: #f3f5f9;
  --panel: #ffffff;
  --text: #1d2433;
  --muted: #637083;
  --line: #e1e6ee;

  --warn: #9a6700;
  --warn-soft: #fff4dc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --good: #1a7f37;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 41, 66, .06), 0 4px 14px rgba(30, 41, 66, .05);
  --sidebar: 248px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.2px; }
h2 { font-size: 15px; margin: 0 0 14px; color: var(--brand-navy); text-transform: uppercase; letter-spacing: .6px; }
.sub { color: var(--muted); margin: 0 0 22px; }

.ico {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ───────────── Διάταξη: στήλη αριστερά + περιεχόμενο ───────────── */

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%);
  color: #dbe4f2;
  padding: 20px 14px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; text-decoration: none; }
.brand .logo { width: 42px; height: 42px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 18px; font-weight: 800; color: var(--brand-blue); letter-spacing: .3px; }
.brand-name b { color: #fff; font-weight: 800; }
.brand-tagline { font-size: 9.5px; color: #aebcd3; letter-spacing: .2px; text-transform: uppercase; white-space: nowrap; }
.auth .brand .logo { width: 54px; height: 54px; }
.auth .brand-name { font-size: 24px; }
.auth .brand-tagline { font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  color: #dbe4f2; text-decoration: none; font-weight: 500;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: rgba(113, 179, 225, .16); color: #fff; border-left-color: var(--brand-blue); }
.nav-item.active .ico { color: var(--brand-blue); }
.nav-item.soon { color: #7f8ea8; cursor: default; }
.nav-item.soon:hover { background: none; color: #7f8ea8; }
/* Το «σύντομα» πάει σε ΔΕΥΤΕΡΗ γραμμή κάτω από τον τίτλο: δίπλα του ξεχείλιζε τη στήλη
   (μετρημένο 01/10: έως 58px έξω από τα 248px). */
.nav-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav-item .soon-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #6f7f9a; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar-foot form { margin: 0; }
.sidebar-foot button.nav-item { width: 100%; background: none; border-top: 0; border-right: 0; border-bottom: 0; font: inherit; cursor: pointer; text-align: left; }
.who { padding: 4px 12px 2px; font-size: 13px; color: #aebcd3; }
.who b { color: #fff; font-weight: 600; display: block; font-size: 14px; }
.env-badge {
  margin: 4px 8px 0; padding: 6px 10px; border-radius: 8px; font-size: 12px; line-height: 1.35;
  background: rgba(255, 255, 255, .06); color: #aebcd3;
}
.env-badge.test { background: rgba(255, 196, 0, .14); color: #ffd666; }
.exit { display: flex; flex-direction: column; gap: 6px; }
/* Το ίδιο «Αποσύνδεση + Capital» στο τέλος της σελίδας: μόνο στο κινητό (βλ. @media 820px). */
.page-foot { display: none; }

.content { min-width: 0; padding: 32px 40px 56px; }
.content-inner { max-width: 1180px; margin: 0 auto; }

/* ───────────── Κοινά στοιχεία ───────────── */

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px;
}

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
input[type=text], input[type=password], input[type=search] {
  width: 100%; padding: 11px 13px; font-size: 16px; color: var(--text);
  border: 1px solid #cfd7e3; border-radius: 9px; background: #fff;
}
input:focus { outline: 3px solid rgba(43, 111, 168, .25); border-color: var(--accent); }

button, .button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; font-size: 15px; font-weight: 600; border-radius: 9px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: #245d8d; }
.button.secondary { background: #fff; color: var(--accent); }
.button.secondary:hover { background: var(--accent-soft); }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 500; font-size: 14px; }

.error { background: var(--bad-soft); color: var(--bad); border-radius: 9px; padding: 10px 14px; margin: 12px 0; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 9px; padding: 10px 14px; margin: 12px 0; }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--muted); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.order { background: var(--accent-soft); color: var(--accent); }
.tag.invoice { background: #e9ecf4; color: var(--brand-navy); }
.tag.credit { background: var(--warn-soft); color: var(--warn); }

.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; margin-bottom: 14px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.dim td { color: var(--muted); }
.scroll { overflow-x: auto; }

/* ───────────── Αρχική ───────────── */

.hero {
  background: linear-gradient(120deg, var(--brand-navy) 0%, #34508a 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 30px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.hero h1 { color: #fff; }
.hero p { margin: 0 0 18px; color: #c9d6ea; }
.hero form { display: flex; gap: 10px; max-width: 620px; }
.hero input { flex: 1; border: 0; }
.hero button { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--brand-navy-deep); }
.hero button:hover { background: #8cc3e8; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text); margin: 0; }
.tile:hover { border-color: var(--brand-blue); }
.tile .tile-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.tile .tile-ico .ico { width: 22px; height: 22px; }
.tile .t { font-weight: 700; margin-bottom: 3px; }
.tile .d { color: var(--muted); font-size: 14px; }
.tile.soon { opacity: .6; box-shadow: none; }
/* Ενημερώσεις της αρχικής (πιστωτικό όριο, 06/10/2026). */
.notice { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; text-decoration: none; color: var(--text); }
.notice .notice-t { font-weight: 700; }
.notice .notice-d { display: block; color: var(--muted); font-size: 14px; }
.notice:not(.bad) .notice-d { display: inline; margin-left: 8px; }
a.notice:hover { border-color: var(--brand-blue); }
.notice.bad { border-color: #f3b4ae; background: var(--bad-soft); }
.notice.bad .notice-t, .notice.bad .notice-n { color: var(--bad); }
/* Υπόλοιπα παραγγελιών (06/10/2026): λίστα και όχι πίνακας — ο αποθηκάριος τη βλέπει στο κινητό. */
.bo { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px solid var(--line); }
.bo:first-of-type { border-top: 0; }
.bo-main { flex: 1 1 320px; min-width: 0; }
.bo-t, .bo-d { overflow-wrap: anywhere; }
.bo-d { margin-top: 2px; }
.bo-code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brand-navy); }
.bo-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.bo-tags:empty { display: none; }
.bo-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bo-actions .bo-note { width: 190px; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.bo.boxed { background: #f1faf4; }
.bo-incoming { margin-top: 4px; font-size: 14px; }
.email-copy { margin-top: 8px; font-size: 14px; }
.email-copy summary { cursor: pointer; color: var(--accent); }
.email-copy pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 13px/1.45 Consolas, monospace; }
.bo-incoming.late b { color: var(--bad); }
.bo-decide { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sup-options { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.sup-opt { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; cursor: pointer; }
.sup-opt .sup-name { overflow-wrap: anywhere; }
.sup-options .bo-note { margin-top: 3px; }
.bo.closed { opacity: .75; }
.arrived { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.arrived-head { padding-bottom: 6px; }
.arrived-sum { margin-top: 2px; }
.arrived-sum.short b { color: var(--bad); }
.order-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding-bottom: 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .bo-actions .button.small { padding: 9px 12px; font-size: 14px; }
  .bo-actions .bo-note { width: 100%; }
}
.notice .notice-n { font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile.soon .tile-ico { background: #eef1f6; color: var(--muted); }

/* ───────────── Αναζήτηση πελάτη ───────────── */

.searchbar { display: flex; gap: 10px; }
.searchbar input { flex: 1; }
.results td:first-child { width: 90px; font-variant-numeric: tabular-nums; }
.results a { text-decoration: none; font-weight: 600; }
.results a:hover { text-decoration: underline; }

/* ───────────── Καρτέλα πελάτη ───────────── */

.card-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.card-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.chip b { color: var(--text); font-weight: 600; }
a.chip { text-decoration: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.year-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
/* Καρτέλες των Υπολοίπων (08/10/2026): μεγάλες, για δάχτυλο στο κινητό. */
.bo-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bo-tabs .chip { font-size: 15px; padding: 8px 16px; }
.bo-tabs .chip b { margin-left: 4px; }
.bo-tabs .chip.on b { color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; white-space: nowrap; }
.kpi.primary { background: linear-gradient(135deg, var(--brand-navy) 0%, #34508a 100%); border-color: transparent; color: #fff; }
.kpi.primary .k { color: #b9c8e0; }
.kpi.primary .s, .kpi.primary .s b { color: #c9d6ea; }
.kpi.alert { border-color: #f3b4ae; background: var(--bad-soft); }
.kpi.alert .v { color: var(--bad); }

.facts-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; padding: 0; }
.fact .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fact { padding: 14px 18px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.fact .v { font-weight: 600; margin-top: 3px; }
.fact.alert .v { color: var(--bad); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 18px; align-items: start; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14px; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.comment {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55;
  background: #fffaf0; border: 1px solid #f3e2bd; border-left: 4px solid #e8b44a;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
}
.empty { color: var(--muted); margin: 0; }
/* Τα σχόλια ενός πελάτη μπορεί να είναι 40+ γραμμές (ο πίνακας εκπτώσεών του). Χωρίς όριο
   έσπρωχναν τα παραστατικά μία οθόνη κάτω· τώρα κυλάνε μέσα στο δικό τους κουτί. */
.comments-box { max-height: 440px; overflow-y: auto; padding-right: 4px; }
.comments-box .comment:last-child { margin-bottom: 0; }

/* Παραστατικά + καρτέλα κινήσεων, δίπλα-δίπλα (ζήτημα Παναγιώτη 01/10). Κυλάνε μέσα στο κουτί
   τους, με την κεφαλίδα του πίνακα να μένει ορατή — αλλιώς ένας χρόνος κινήσεων είναι 3 οθόνες. */
.cols-even { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 18px; align-items: start; }
.tall-box { max-height: 620px; overflow: auto; }
table.compact { font-size: 14px; }
table.compact th, table.compact td { padding: 8px 8px; }
table.compact thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; box-shadow: 0 1px 0 var(--line); }
table.compact .tag { margin-top: 3px; font-size: 11px; }

.ledger-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ledger-head > div { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.ledger-head .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.ledger-head .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ledger-head .v.good { color: var(--good); }
.ledger-head .s { font-size: 13px; color: var(--muted); }
.ledger td.num { font-variant-numeric: tabular-nums; }
.ledger td.bal { font-weight: 600; }
.ledger .kind { font-size: 12px; color: var(--muted); }
.ledger tr.month td { background: #eef3fa; color: var(--brand-navy); font-size: 13px; position: sticky; top: 37px; }
.ledger .month-end { margin-left: 10px; color: var(--muted); }
.ledger .month-end b { color: var(--brand-navy); }
.ledger .month-paid { margin-left: 10px; color: var(--good); font-weight: 600; }
.ledger tr.pay td { background: #f0f9f3; }
.ledger tr.pay .kind { color: var(--good); font-weight: 600; }
.ledger tr.opening .kind { font-style: italic; }
/* Επιταγές σε αναμονή: πρώτη η πιο κοντινή λήξη (ζήτημα Παναγιώτη 01/10). */
.cheques { border: 1px solid #d7e5f5; background: #f5f9fd; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.cheques-title { font-size: 12px; font-weight: 700; color: var(--brand-navy); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.chq-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid #e3ecf6; font-size: 14px; }
.chq-row:first-of-type { border-top: 0; }
.chq-left { font-size: 12px; color: var(--accent); font-weight: 600; }
.chq-left.late { color: var(--bad); }
.chq-sub { font-size: 12px; color: var(--muted); }
.chq-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chq-state { font-size: 11px; font-weight: 600; }
.chq-state.pending { color: var(--accent); }
.chq-state.paid { color: var(--good); }
.chq-state.returned { color: var(--warn); }
.kpi .s b { color: var(--text); }

/* Στο κινητό «Χρέωση» και «Πίστωση» γίνονται μία στήλη «Ποσό» (+ / −): με πέντε στήλες η καρτέλα
   ξέφευγε 54px από το κουτί της (μετρημένο 01/10, 375px). */
.ledger .amt { display: none; }
.ledger .cr { color: var(--good); }

/* Γραφήματα προϊόντων: SVG από τον σέρβερ, χωρίς βιβλιοθήκη. Στο κινητό κυλάνε οριζόντια μέσα στο
   κουτί τους — σε 320px τα γράμματα των αξόνων δεν θα διαβάζονταν. */
.chart-box { overflow-x: auto; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { font-size: 11px; fill: var(--muted); text-anchor: end; }
.chart .xl { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.chart .xl.year { font-weight: 700; fill: var(--brand-navy); }
.chart .bar.s, .sw.s { fill: var(--accent); background: var(--accent); }
.chart .bar.p, .sw.p { fill: #e8a33d; background: #e8a33d; }
.chart .mark { stroke: var(--brand-navy); stroke-width: 3; stroke-linecap: round; }
.legend .sw.mark { background: var(--brand-navy); height: 3px; }
.chart .bar.y0, .sw.y0 { fill: #dbe8f5; background: #dbe8f5; }
.chart .bar.y1, .sw.y1 { fill: #c0d8ee; background: #c0d8ee; }
.chart .bar.y2, .sw.y2 { fill: #a5c7e6; background: #a5c7e6; }
.chart .bar.y3, .sw.y3 { fill: #8ab6de; background: #8ab6de; }
.chart .bar.y4, .sw.y4 { fill: #6fa4d3; background: #6fa4d3; }
.chart .bar.y5, .sw.y5 { fill: #5592c8; background: #5592c8; }
.chart .bar.y6, .sw.y6 { fill: #3f80b9; background: #3f80b9; }
.chart .bar.y7, .sw.y7 { fill: #356fa3; background: #356fa3; }
/* Έως 8 παλιές χρονιές + η τελευταία (--accent). Πριν είχε 3: από την 4η χρονιά οι μπάρες δεν είχαν χρώμα. */
.chart .bar.ylast, .sw.ylast { fill: var(--accent); background: var(--accent); }
/* Ζώνη ανά μήνα για το συννεφάκι (static/charts.js) — αόρατη, φωτίζεται ελαφρά όταν είναι ενεργή. */
/* Τζίρος ανά έτος: μεταβολή — πράσινο αν ανέβηκε, κόκκινο αν έπεσε. */
.up { color: #1d7a46; }
.down { color: #b3261e; }
.muted { color: var(--muted); font-size: 12px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
/* Διαθεσιμότητα ειδών */
.stock-table tr.low td { background: var(--bad-soft); }
/* Πολύ μεγάλη λέξη σε περιγραφή («ΣΥΣΤΗΜΑΤΑ/ΘΕΡΜΑΝΣΗΣ») φάρδαινε τη στήλη στο κινητό (Παπάκος: +20px). */
.stock-table td:not(.num) { overflow-wrap: anywhere; }
/* Οι επικεφαλίδες σπάνε σε γραμμές («Ανοιχτά δελτία πωλήσεων»)· σε μία γραμμή, με 8 στήλες, ο πίνακας
   του γραφείου ξεχείλιζε 177px στα 1345px (μετρημένο 02/10). Τα νούμερα μένουν σε μία γραμμή. */
.stock-table th.num { white-space: normal; }
/* «Ανοιχτά δελτία» (μετράνε ήδη στο υπόλοιπο) μόνο σε μεγάλη οθόνη: στα 1345px η περιγραφή έμενε 136px
   και έσπαγε σε 3 γραμμές. */
@media (max-width: 1500px) { .xwide { display: none; } }
.level-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.level-form input { width: 6.5em; text-align: right; padding: 5px 7px; }
.button.small { padding: 5px 9px; font-size: 13px; }
.tag.ok { background: #e8f6ec; color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
/* «Τι έρχεται» στο «Για παραγγελία»: γέφυρα και ξεχασμένες παραγγελίες (02/10/2026) */
.ri-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: #f6f8fb; font-size: 14px; line-height: 1.5; }
.ri-note.bridge { background: var(--warn-soft); }
.mr-note { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.reorder-item .ri-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.ri-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ri-facts > div { background: #f6f8fb; border-radius: 9px; padding: 8px 10px; }
.ri-facts .k { display: block; font-size: 12px; color: var(--muted); }
.ri-facts .v { font-weight: 600; }
.sup-table tr.best td { background: #f1faf4; }
/* Προμηθευτές — κάρτες και καθαρές γραμμές αντί για πυκνή λίστα και πίνακα 607 γραμμών
   (02/10/2026: «πολύ αποπνικτικό»). */
[hidden] { display: none !important; }
.note.slim { padding: 8px 12px; font-size: 14px; }
.sub.tight { margin-bottom: 10px; }
.calm { color: var(--muted); margin: 0; }
/* Έτοιμα για προμηθευτές */
.ready-button b { font-variant-numeric: tabular-nums; }
.ready-row { padding: 12px 0; border-top: 1px solid var(--line); }
.ready-row:first-of-type { border-top: 0; }
.ready-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ready-head .sup-name { font-weight: 700; color: var(--brand-navy); }
.ready-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.ready-lines { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.ready-lines li { margin: 2px 0; overflow-wrap: anywhere; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.small { font-size: 12px; }
.count { display: inline-block; min-width: 24px; padding: 1px 8px; margin-left: 6px; border-radius: 999px;
  background: #eef1f6; color: var(--muted); font-size: 12px; text-align: center; vertical-align: 2px; letter-spacing: 0; }
.sup-section { margin: 26px 0; }
.sup-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.sup-section-head h2 { margin: 0; }
.filter { width: 100%; max-width: 280px; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sup-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.sup-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.sup-card .sup-name { font-weight: 700; color: var(--brand-navy); line-height: 1.3; }
.sup-card .sup-meta { font-size: 13px; color: var(--muted); }
.sup-card.urgent { border-left: 4px solid var(--bad); }
.sup-badge { align-self: flex-start; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: 13px; }
.sup-grid.compact .sup-card { padding: 11px 14px; box-shadow: none; }
.sup-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 28px; }
.sup-hero-main { flex: 1 1 380px; min-width: 0; }
.sup-hero-action { flex: 0 1 280px; }
.contact-lines { display: flex; flex-wrap: wrap; gap: 8px; }
.button.big { display: block; text-align: center; padding: 13px 18px; font-size: 16px; }
.missing-list { list-style: none; margin: 0; padding: 0; }
.missing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 8px 22px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line); }
.missing-row:first-child { padding-top: 2px; }
.missing-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.mr-code { display: block; font-weight: 700; color: var(--brand-navy); }
.stock-table .kind, .mr-code .kind { font-size: 12px; font-weight: 400; color: var(--muted); }
.mr-descr { display: block; overflow-wrap: anywhere; }
.mr-stock { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 3px 10px; border-radius: 999px; background: #eef1f6; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pill.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.mr-price { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
details.all-items > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
details.all-items > summary::-webkit-details-marker { display: none; }
details.all-items > summary h2 { margin: 0; }
details.all-items > summary h2::before { content: "▸ "; color: var(--muted); }
details.all-items[open] > summary h2::before { content: "▾ "; }
details.all-items > summary .hint { margin: 0; }
details.all-items .filter { margin: 14px 0 6px; max-width: 320px; }
/* Χώρες προμηθευτών: κουμπιά-φίλτρα και ομάδες (02/10/2026) */
.country-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.country-tab { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--brand-navy); cursor: pointer; }
.country-tab:hover { background: var(--accent-soft); border-color: var(--accent); }
.country-tab[aria-pressed="true"] { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.country-tab[aria-pressed="true"] .count { background: rgba(255, 255, 255, .2); color: #fff; }
.country-group { margin-bottom: 24px; }
.country-group h3 { margin: 0 0 10px; font-size: 16px; color: var(--brand-navy); }
/* Μεσαίες οθόνες (μικρό laptop, tablet): το «Αποθήκευση» γίνεται «✓» — αλλιώς η στήλη του κατώτατου
   (212px) έσπρωχνε τον πίνακα του προμηθευτή 294px έξω (μετρημένο 02/10). */
.show-md { display: none; }
@media (max-width: 1200px) {
  /* Κωδικός πάνω από την περιγραφή, όχι δική του στήλη: στα 1024px η διαθεσιμότητα ξεχείλιζε 42px
     και ο προμηθευτής 204px (μετρημένο 02/10). */
  .hide-md { display: none; }
  .show-md { display: inline; }
  .level-form .long { display: none; }
  .level-form .short { display: inline; }
  .level-form input { width: 5em; }
}
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.on { fill: rgba(30, 52, 98, .07); }
.chart-tip {
  position: fixed; z-index: 50; display: none; pointer-events: none; white-space: nowrap;
  background: var(--brand-navy); color: #fff; padding: 7px 10px; border-radius: 8px;
  font-size: 13px; line-height: 1.45; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.chart-tip b { display: block; margin-bottom: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.legend .hint { margin-left: auto; font-size: 12px; }
.note.ok { background: #e8f6ec; color: var(--good); }
.short { display: none; }

/* Αγορές ανά κατηγορία: οριζόντιες μπάρες — με 62 κατηγορίες η «πίτα» δεν διαβάζεται. */
.cat-table td { vertical-align: middle; }
.cat-table .cat-name { font-weight: 600; }
.cat-table .bar-track { margin-top: 6px; max-width: 520px; }
.bar-track { height: 10px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--brand-blue)); }
.cat-table .credit { font-size: 12px; color: var(--warn); margin-top: 2px; }
.cat-total td { font-weight: 700; border-top: 2px solid var(--line); }
.cat-sub td { color: var(--muted); border-bottom: 0; padding-top: 4px; padding-bottom: 4px; }
.kpi .v.wrap { white-space: normal; font-size: 17px; line-height: 1.25; }
.kpi .s { font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }

footer.source { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ───────────── Σύνδεση ───────────── */

.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 20% 10%, #34508a 0%, var(--brand-navy) 45%, var(--brand-navy-deep) 100%);
}
.auth-box { width: 100%; max-width: 420px; }
.auth .brand { justify-content: center; padding-bottom: 20px; }
.auth .panel { padding: 26px 26px 20px; }
.auth h1 { font-size: 22px; }
.auth ol { padding-left: 20px; margin: 0 0 6px; }
.auth li { margin-bottom: 8px; }
.key {
  font: 600 19px/1.3 Consolas, monospace; letter-spacing: 1px; word-spacing: 6px; overflow-wrap: anywhere;
  background: var(--accent-soft); color: var(--brand-navy); padding: 10px 12px; border-radius: 8px; margin: 8px 0 4px;
}
.qr { display: block; width: fit-content; background: #fff; border-radius: 8px; margin: 10px auto 6px; line-height: 0; }
.qr svg { display: block; width: 200px; height: 200px; max-width: 100%; }
.auth .manual { font-size: 13px; color: var(--muted, #5b6472); margin: 8px 0 0; }
.auth .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.auth .actions form { margin: 0; }

/* ───────────── Μικρότερες οθόνες ───────────── */

@media (max-width: 1150px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-right: 0; }
  .fact:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols-even { grid-template-columns: minmax(0, 1fr); }
}

/* Κινητό: η στήλη γίνεται μπάρα στην κορυφή. Σειρά (Παναγιώτης 08/10/2026): λογότυπο → όνομα χρήστη +
   Διαχείριση → τα κουμπιά σε μία σειρά που κυλάει οριζόντια. «Αποσύνδεση» και «Capital» στο τέρμα κάτω. */
@media (max-width: 820px) {
  /* Γραμμές: μπάρα / περιεχόμενο / κάτω λωρίδα. Το περιεχόμενο (1fr) παίρνει τον κενό χώρο — χωρίς
     αυτό, σε σελίδα με λίγο περιεχόμενο η μπάρα φούσκωνε ~280px κενό (Αιτήματα πελατών, 08/10/2026). */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .sidebar { position: static; height: auto; padding: 12px 12px 8px; }
  .brand { order: 0; padding: 0 4px 8px; }
  .brand .logo { width: 34px; height: 34px; }
  .sidebar-foot { order: 1; margin-top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; border-top: 0; padding: 0 0 8px; gap: 4px 8px; }
  .sidebar-foot .exit { display: none; }
  .nav { order: 2; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px 0 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .nav-item { border-left: 0; border-bottom: 3px solid transparent; padding: 8px 10px; flex-shrink: 0; }
  .nav-item.active { border-bottom-color: var(--brand-blue); }
  .nav-item.soon { display: none; }
  .who { padding: 0 4px; }
  .who b { display: inline; }
  .sidebar-foot .nav-item { width: auto; padding: 6px 8px; }
  .env-badge { margin: 0; }
  .page-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
    padding: 12px 14px; background: var(--brand-navy-deep); color: #dbe4f2;
  }
  .page-foot form { margin: 0; }
  .page-foot button.nav-item { background: none; border: 0; font: inherit; cursor: pointer; padding: 8px 10px; }
  .content { padding: 18px 14px 40px; }
  h1 { font-size: 22px; }
  .hero { padding: 20px 18px; }
  .hero form, .searchbar { flex-direction: column; }
  .kpi .v { font-size: 22px; }
  .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { border-right: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: 0; }
  .fact:nth-child(odd) { border-right: 1px solid var(--line); }
  dl.facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
  .cat-table th, .cat-table td { padding: 9px 6px; }
  .turnover-table th, .turnover-table td { padding: 9px 5px; font-size: 13px; }
  .stock-table th, .stock-table td { padding: 9px 5px; }
  /* Γραφείο στο κινητό: η στήλη «Κατώτατο» δεν αφήνει χώρο — Αναμενόμενα/Δεσμευμένα μόνο στον
     υπολογιστή. Ο πωλητής (χωρίς κατώτατο) τα βλέπει και στο κινητό. */
  .stock-table.with-levels .opt { display: none; }
  .level-form input { width: 4.5em; }
  .ri-facts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .missing-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mr-price { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; text-align: left; }
  .sup-hero-action { flex-basis: 100%; }
  .sup-table th, .sup-table td { padding: 8px 5px; }
  /* «πιστωτικά −88,86 €» σε μία γραμμή φάρδαινε τη στήλη και ο πίνακας ξέφευγε 8px (μετρημένο). */
  .cat-table .credit { white-space: normal; }
  /* 4px και όχι 5: με επιταγές 12.000 € η καρτέλα ξέφευγε 3px (μετρημένο 01/10, πελάτης 0457). */
  table.compact th, table.compact td { padding: 7px 4px; }
  table.compact { font-size: 13px; }
  .ledger-head { grid-template-columns: minmax(0, 1fr); }
  .ledger .month-end, .ledger .month-paid { display: block; margin-left: 0; }
  .ledger .dc { display: none; }
  .chart { min-width: 620px; }
  /* Πίνακες προϊόντων: στο κινητό φεύγουν οι λιγότερο απαραίτητες στήλες (μετρημένο 01/10: ξέφευγαν 57-153px). */
  .hide-sm, .long { display: none; }
  .short { display: inline; }
  .sup-table .kind.short { display: block; }
  .results td, .results th { padding: 8px 4px; }
  .legend .hint { display: none; }
  .chq-row { grid-template-columns: 96px minmax(0, 1fr) auto; font-size: 13px; }
  .ledger .amt { display: table-cell; }
  .panel { padding: 16px 14px; }
}

/* Τιμολόγια προμηθευτών (12/10/2026) */
.sd-upload { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.sd-upload label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 0; max-width: 100%; }
.sd-upload select { max-width: 100%; }
.sd-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.sd-more { margin-top: 10px; }
.sd-more summary, .sd-agree summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.sd-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.sd-inline .sd-code { width: 190px; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.sd-inline .sd-note { width: 260px; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.sd-lines td { vertical-align: top; }
.sd-lines td.sd-item { min-width: 260px; overflow-wrap: anywhere; }
.sd-group { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.sd-group:first-of-type { border-top: 0; margin-top: 0; }
.sd-agreed { margin-top: 4px; font-size: 13px; }
