/* ==========================================================================
   Εφαρμογή επιπλοποιείου — εμφάνιση
   Λευκό και ουδέτερα γκρι, ανθρακί για τα κύρια στοιχεία. Mobile-first.
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --line: #E4E5E7;
  --text: #1F2023;
  --muted: #6B6E74;
  --primary: #2B2D31;
  --on-primary: #FFFFFF;
  --brass: #8E9198;
  --brass-text: #5F636A;
  --terra: #A3461F;
  --terra-bg: #F8E9E1;
  --olive: #4A6642;
  --olive-bg: #E8EFE4;
  --chip: #F2F3F5;
  --hero-bg: #2E3034;
  --hero-text: #FFFFFF;
  --hero-muted: #C2C5CB;
  --hero-line: rgba(255, 255, 255, .18);
  --nav-bg: rgba(255, 255, 255, .88);
  --overlay: rgba(15, 16, 18, .45);
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .06);
  --shadow-btn: 0 8px 20px rgba(20, 22, 26, .22);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --radius-sm: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121315; --card: #1C1D20; --line: #2E3034; --text: #F1F2F4; --muted: #A3A6AD;
    --primary: #E6E7EA; --on-primary: #17181A; --brass: #A9ACB3; --brass-text: #B9BCC2;
    --terra: #EE9A72; --terra-bg: rgba(238, 154, 114, .12); --olive: #9DBE92; --olive-bg: rgba(157, 190, 146, .12);
    --chip: #26282C; --hero-bg: #26282C; --hero-text: #FFFFFF; --hero-muted: #B3B6BC; --hero-line: rgba(255, 255, 255, .16);
    --nav-bg: rgba(28, 29, 32, .88); --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 10px 28px rgba(0, 0, 0, .35); --shadow-btn: 0 8px 20px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121315; --card: #1C1D20; --line: #2E3034; --text: #F1F2F4; --muted: #A3A6AD;
  --primary: #E6E7EA; --on-primary: #17181A; --brass: #A9ACB3; --brass-text: #B9BCC2;
  --terra: #EE9A72; --terra-bg: rgba(238, 154, 114, .12); --olive: #9DBE92; --olive-bg: rgba(157, 190, 146, .12);
  --chip: #26282C; --hero-bg: #26282C; --hero-text: #FFFFFF; --hero-muted: #B3B6BC; --hero-line: rgba(255, 255, 255, .16);
  --nav-bg: rgba(28, 29, 32, .88); --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 10px 28px rgba(0, 0, 0, .35); --shadow-btn: 0 8px 20px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* --- Βάση ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: -.4px; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 17px; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--sans); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.terra { color: var(--terra); }
.olive { color: var(--olive); }
.brass { color: var(--brass-text); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i-lg { width: 24px; height: 24px; }

/* --- Διάταξη ---------------------------------------------------------------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 120px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 8px; }
.page-head .title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 600; color: var(--brass-text); text-transform: uppercase; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head a:not(.btn) { font-size: 14px; font-weight: 600; color: var(--brass-text); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.btn-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.btn-row .btn { padding-left: 8px; padding-right: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }

/* --- Κορυφή (μάρκα) --------------------------------------------------------- */
.brand { display: flex; align-items: center; gap: 12px; }
.monogram {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 22px; font-weight: 500; color: var(--brass-text); flex-shrink: 0;
}
.brand-name { font-size: 11px; letter-spacing: 2.4px; font-weight: 600; color: var(--brass-text); text-transform: uppercase; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 0 4px; }

/* --- Κάρτες ------------------------------------------------------------------ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card.flat { box-shadow: none; }
.card-link { display: block; transition: transform .15s ease, box-shadow .15s ease; }
.card-link.row, .card-link.item { display: flex; }
.card-link:active { transform: scale(.985); }
@media (hover: hover) { .card-link:hover { box-shadow: 0 2px 4px rgba(20,22,26,.05), 0 16px 36px rgba(20,22,26,.10); } }

.hero {
  background: var(--hero-bg); color: var(--hero-text); border: 1px solid var(--hero-line);
  border-radius: 22px; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 6px;
}
.hero .label { font-size: 12px; letter-spacing: 1.6px; font-weight: 600; color: var(--hero-muted); }
.hero .amount { font-family: var(--sans); font-size: 38px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hero .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--hero-line); font-size: 14px; color: var(--hero-muted); }
.hero .foot a { color: var(--hero-text); font-weight: 600; display: flex; align-items: center; gap: 6px; }

.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-family: var(--sans); font-size: 20px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; font-weight: 600; color: var(--olive); }

/* --- Γραμμές λίστας ---------------------------------------------------------- */
.item { display: flex; align-items: center; gap: 14px; padding: 16px; }
.item .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item .name { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.when {
  width: 58px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 0; border-radius: 14px; background: var(--chip);
}
.when .d { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.when .t { font-family: var(--sans); font-size: 17px; font-weight: 600; }

/* --- Ετικέτες ---------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--brass-text); background: var(--chip); border: 1px solid var(--line);
}
.pill.terra { color: var(--terra); background: var(--terra-bg); border-color: transparent; }
.pill.olive { color: var(--olive); background: var(--olive-bg); border-color: transparent; }
.pill.dark { color: var(--on-primary); background: var(--primary); border-color: transparent; }
.pill.muted { color: var(--muted); }
.stage-in_progress { color: var(--brass-text); }
.stage-completed { color: var(--olive); background: var(--olive-bg); border-color: transparent; }
.stage-to_deliver { color: var(--on-primary); background: var(--primary); border-color: transparent; }
.stage-delivered { color: var(--muted); }
.stage-cancelled { color: var(--terra); background: var(--terra-bg); border-color: transparent; text-decoration: line-through; }

/* --- Κουμπιά ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: 600 15px var(--sans); cursor: pointer; transition: transform .12s ease, opacity .12s;
  -webkit-appearance: none; appearance: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); box-shadow: var(--shadow-btn); }
.btn-outline { background: transparent; border: 1.5px solid var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brass-text); }
.btn-danger { color: var(--terra); border-color: var(--terra); background: transparent; }
.btn-big { min-height: 58px; border-radius: 18px; font-size: 17px; width: 100%; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 99px; }

.sticky-action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.sticky-action .inner { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; }

/* --- Φόρμες ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .help { font-size: 12px; color: var(--muted); }
.field .err, .errorlist { color: var(--terra); font-size: 13px; font-weight: 600; list-style: none; padding: 0; margin: 0; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: 400 16px var(--sans); -webkit-appearance: none; appearance: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; border-radius: 99px; }

/* Επιλογές ως κουμπιά (radio) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.choices > div { display: contents; }
.choices label {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 48px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text);
}
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.choices label:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.choices.tall label { min-height: 72px; flex-direction: column; gap: 4px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); }
.segmented > div { display: contents; }
.segmented label { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; padding: 0 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.amount-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px; border-radius: 20px; background: var(--chip); }
.amount-box input {
  background: transparent; border: 0; text-align: center; font-family: var(--sans);
  font-size: 40px; font-weight: 500; min-height: 56px; padding: 0; outline: none;
}
.amount-box input:focus { outline: none; }

/* --- Στάδια (stepper) -------------------------------------------------------- */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 11.5px; line-height: 1.25; color: var(--muted); }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--chip); border: 1px solid var(--line); color: var(--muted); }
.step.done .dot { background: var(--olive-bg); color: var(--olive); border-color: transparent; }
.step.current { color: var(--text); font-weight: 600; }
.step.current .dot { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* --- Φωτογραφίες ------------------------------------------------------------- */
.pick-buttons { gap: 10px; margin-top: 4px; }
.pick-buttons .btn { min-height: 52px; }
.pick-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pick-thumbs:empty { display: none; }
.pick-thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--chip); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 99px; border: 0; background: rgba(0,0,0,.62); color: #fff; font-size: 18px; line-height: 26px; padding: 0; cursor: pointer; }
.photos { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.photo { flex: 0 0 112px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.photo .img { height: 136px; border-radius: 16px; border: 1px solid var(--line); background: var(--chip) center/cover no-repeat; overflow: hidden; }
.photo .img img { width: 100%; height: 100%; object-fit: cover; }
.photo .cap { font-size: 12px; font-weight: 600; color: var(--muted); }
.photo-add { flex: 0 0 112px; height: 136px; border-radius: 16px; border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.viewer { position: fixed; inset: 0; background: #0b0908; color: #f3ebe2; display: flex; flex-direction: column; z-index: 50; }
.viewer .bar { display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 12px 12px; gap: 8px; }
.viewer .bar .btn { background: rgba(255,255,255,.08); color: #f3ebe2; border-color: transparent; }
.viewer .stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.viewer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* --- Ποσά -------------------------------------------------------------------- */
.lines .ln { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lines .ln:last-child { border-bottom: 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; }
.total-row .v { font-family: var(--sans); font-size: 24px; font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--brass); }
.balance-box { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--terra-bg); color: var(--terra); font-weight: 600; }
.balance-box.ok { background: var(--olive-bg); color: var(--olive); }
.balance-box .v { font-family: var(--sans); font-size: 22px; }
.pay { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.pay .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--chip); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pay.void { opacity: .55; }
.pay.void .amt { text-decoration: line-through; }
.colorbox { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--chip); }
.alert { padding: 14px 16px; border-radius: 14px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--terra-bg); color: var(--terra); }
.form-errors { display: block; margin-bottom: 14px; }
.form-errors ul { margin: 6px 0 0; padding-left: 20px; font-weight: 500; }
.toast.error, .toast.warning { animation: toast-in .3s ease, toast-out .4s ease 11.6s forwards; }
.alert.info { background: var(--chip); color: var(--text); }
.alert.ok { background: var(--olive-bg); color: var(--olive); }
.alert-big { font-family: var(--sans); font-size: 26px; font-weight: 600; }

/* --- Ιστορικό ---------------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--muted); }
.timeline .t { display: flex; gap: 10px; }
.timeline .t::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-top: 7px; flex-shrink: 0; }

/* --- Καρτέλες φίλτρων -------------------------------------------------------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; padding: 8px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.tabs a.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* --- Ημερολόγιο -------------------------------------------------------------- */
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-block { margin-top: 18px; }
.day-block .dh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-weight: 600; }
.day-block.today .dh { color: var(--brass-text); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* --- Πλοήγηση ---------------------------------------------------------------- */
.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  height: 70px; border-radius: 24px; background: var(--nav-bg); border: 1px solid var(--line);
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }
.bottom-nav a.on { color: var(--text); font-weight: 600; }
.bottom-nav .plus { width: 52px; height: 52px; border-radius: 18px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-btn); }
/* Η κάτω μπάρα φαίνεται παντού· το κουμπί ενέργειας κάθεται ακριβώς πάνω της */
body.has-sticky .sticky-action { bottom: calc(82px + env(safe-area-inset-bottom)); padding: 10px 20px 8px; border-top: 0; background: linear-gradient(to bottom, transparent, var(--bg) 30%); }
body.has-sticky .shell { padding-bottom: 260px; }
.sheet-page { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
.sheet-page .sheet { border-radius: 28px; }
.top-nav { display: none; }

/* --- Μηνύματα ---------------------------------------------------------------- */
.toasts { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 460px; width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--hero-bg); color: var(--hero-text); box-shadow: 0 12px 30px rgba(0,0,0,.25); font-weight: 600; font-size: 14.5px; animation: toast-in .3s ease, toast-out .4s ease 4.6s forwards; }
.toast.error, .toast.warning { background: var(--terra); color: #fff; }
@keyframes toast-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(-12px); opacity: 0; visibility: hidden; } }

/* --- Φύλλο (bottom sheet) σε σελίδες ενεργειών ------------------------------ */
.sheet-page { min-height: 100vh; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; background: var(--card); border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column; gap: 16px; animation: sheet-in .28s ease;
}
.sheet .handle { align-self: center; width: 40px; height: 5px; border-radius: 99px; background: var(--line); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* --- Φόρμα γραμμών ----------------------------------------------------------- */
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px; grid-template-areas: "cat qty" "desc desc" "amt del"; gap: 8px; align-items: start; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.line-row .lr-cat { grid-area: cat; } .line-row .lr-qty { grid-area: qty; display: flex; align-items: center; gap: 6px; }
.line-row .lr-qty .x { color: var(--muted); font-weight: 600; }
.line-row .lr-desc { grid-area: desc; } .line-row .lr-amt { grid-area: amt; } .line-row .lr-del { grid-area: del; justify-self: end; }
.line-row select, .line-row input { width: 100%; min-width: 0; }
@media (min-width: 900px) {
  .line-row { grid-template-columns: 150px minmax(0, 1fr) 70px 112px 44px; grid-template-areas: "cat desc qty amt del"; border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
}
.line-row input[type=checkbox] { display: none; }
.line-row.removed { display: none; }
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-title .n { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* --- Πίνακες (υπολογιστής) --------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--chip); }
.table .r { text-align: right; }
.desktop-only { display: none; }

/* --- Σύνδεση ----------------------------------------------------------------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.login .monogram { width: 72px; height: 72px; font-size: 36px; align-self: center; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }

/* --- Υπολογιστής ------------------------------------------------------------- */
@media (min-width: 900px) {
  body { font-size: 15px; }
  .shell { padding: 0 32px 64px; }
  .bottom-nav { display: none; }
  .top-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: sticky; top: 0; z-index: 40; padding: 14px 32px;
    background: var(--nav-bg); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .top-nav nav { display: flex; gap: 4px; }
  .top-nav nav a { padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); }
  .top-nav nav a.on { color: var(--text); background: var(--chip); }
  .topbar.mobile-only { display: none; }
  .mobile-only { display: none !important; }
  .desktop-only { display: block; }
  table.desktop-only { display: table; }
  .sticky-action, body.has-sticky .sticky-action { position: static; background: transparent; border: 0; padding: 0; margin-top: 18px; }
  .sticky-action .inner { max-width: none; }
  body.has-sticky .shell { padding-bottom: 64px; }
  .tabs { margin: 0; padding-left: 0; padding-right: 0; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .dash { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .sheet-page { align-items: center; padding-bottom: 0; }
  .sheet { border-radius: 28px; }
  .sheet .handle { display: none; }
  .photos { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 899px) { .desktop-only { display: none !important; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- Αποθήκη ----------------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-grid .cat { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 92px; padding: 16px; }
.cat-grid .cat .name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.cat-grid .cat .meta { font-size: 12.5px; color: var(--muted); }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stock-item .thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; background: var(--chip); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.stock-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stock-item .meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stock-item .qty { font-size: 22px; font-weight: 700; line-height: 1; }
.stock-item.out { opacity: .6; }
.qty-big { font-size: 30px; font-weight: 700; }
.stock-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 12px; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; align-items: center; }
.cat-row input { width: 100%; min-width: 0; }
.card.dim { opacity: .6; }
.stock-item .name { white-space: normal; }

/* --- Ταμείο / Αναφορές ------------------------------------------------------- */
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.method-grid .stat { padding: 12px; } .method-grid .stat .v { font-size: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .report-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .method-grid .stat .v { font-size: 20px; } }
.ico-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.print-only { display: none; }

/* --- Εκτύπωση / PDF ---------------------------------------------------------- */
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #444; --line: #ccc; --hero-bg: #fff; --hero-text: #000; --hero-muted: #444; --hero-line: #ccc; }
  body { background: #fff !important; font-size: 12px; }
  .top-nav, .bottom-nav, .no-print, .toasts, .sticky-action { display: none !important; }
  .print-only { display: block; }
  .shell, main { padding: 0 !important; max-width: none !important; }
  .card, .hero { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .hero { padding: 12px 14px; } .hero .amount { font-size: 26px; }
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .report-grid { grid-template-columns: repeat(4, 1fr); }
  .table td, .table th { padding: 6px 10px; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 14mm; }
}
.table td.r { white-space: nowrap; }

/* Διεύθυνση που ανοίγει στους χάρτες */
.addr-link { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.addr-link .i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.addr-link:hover, .addr-link:active { color: var(--text); }
.grid-2.grid-pc { grid-template-columns: minmax(96px, 1fr) 2fr; }
.is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 899px) { .hide-mobile { display: none !important; } }

/* Χώρος αποθήκευσης */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.store-photo { display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.store-photo input { position: absolute; opacity: 0; pointer-events: none; }
.store-photo .img { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--chip); border: 2px solid transparent; }
.store-photo .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-photo .tick { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: transparent; }
.store-photo input:checked + .img { border-color: var(--terra); }
.store-photo input:checked + .img .tick { background: var(--terra); border-color: var(--terra); color: #fff; }
.store-photo input:focus-visible + .img { outline: 2px solid var(--primary); outline-offset: 2px; }
.store-photo .cap { font-size: 12.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) { .store-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.quota.warn .progress > span { background: #C9862B; }
.quota.full .progress > span { background: var(--terra); }
.progress > span { max-width: 100%; }
.pick-row { cursor: pointer; }
.pick-row input { position: absolute; opacity: 0; pointer-events: none; }
.pick-row .pick { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: transparent; }
.pick-row input:checked + .pick { background: var(--terra); border-color: var(--terra); color: #fff; }
.pick-row:has(input:checked) { border-color: var(--terra); }
