/* ppia — mobile first, pastel boutique */
:root {
  --petal: #FFF4F6;
  --paper: #FFFFFF;
  --ink: #3A1E31;
  --ink-2: #7A5A6E;
  --line: #F1D6DF;
  --rose: #D6436F;
  --rose-deep: #B8305A;
  --blush: #FBE3EA;
  --lilac: #ECE5FD;  --lilac-ink: #6646C0;
  --butter: #FFF1CC; --butter-ink: #8D6200;
  --mint: #DBF3E6;   --mint-ink: #1F7A52;
  --grey: #EEE8EC;   --grey-ink: #6F6570;

  --r-xl: 28px; --r-lg: 20px; --r-md: 14px;
  --font: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Comfortaa", "Commissioner", system-ui, sans-serif;
  --font-logo: "DM Serif Display", Georgia, "Times New Roman", serif; /* το p με πατούρα: διαβάζεται λατινικό, όχι ρ */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button, a, label, input, select, textarea, .pick { touch-action: manipulation; } /* όχι zoom με γρήγορα διπλά tap στο iOS */
body {
  margin: 0; min-height: 100vh;
  background: var(--petal); color: var(--ink);
  font: 400 16px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(24px + var(--safe-bot));
}
img { max-width: 100%; display: block; }
a { color: var(--rose-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(255, 244, 246, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-back {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); flex: none;
}
.brand { font: italic 400 26px/1 var(--font-logo); color: var(--rose); letter-spacing: -.01em; text-decoration: none; }
.topbar-title { flex: 1; margin: 0; font: 700 18px/1.2 var(--font-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip {
  display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 3px;
  font-size: 14px; font-weight: 600; flex: none;
}
.dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
}
@media (max-width: 380px) { .user-name { display: none; } .user-chip { padding-right: 3px; } }

/* ---------- home tiles (το «αστέρι» της εφαρμογής) ---------- */
.hello { margin: 8px 4px 18px; font: 700 26px/1.2 var(--font-brand); letter-spacing: -.02em; }
.hello small { display: block; font: 500 15px/1.4 var(--font); color: var(--ink-2); letter-spacing: 0; margin-top: 4px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 168px; padding: 18px; border-radius: var(--r-xl);
  text-decoration: none; color: var(--ink); overflow: hidden;
  transition: transform .12s ease;
}
.tile:active { transform: scale(.97); }
.tile svg.ico { width: 46px; height: 46px; }
.tile b { display: block; font: 700 19px/1.15 var(--font-brand); letter-spacing: -.01em; }
.tile span { display: block; font-size: 13.5px; color: inherit; opacity: .78; margin-top: 4px; }
.tile .big {
  position: absolute; right: 14px; top: 10px;
  font: 700 44px/1 var(--font-brand); opacity: .9; letter-spacing: -.04em;
}
.tile-receive { background: var(--blush); color: var(--rose-deep); }
.tile-order   { background: var(--rose); color: #fff; }
.tile-orders  { background: var(--lilac); color: var(--lilac-ink); }
.tile-stock   { background: var(--mint); color: var(--mint-ink); }
.tile-order b, .tile-order span { color: #fff; }
.tile-receive b, .tile-orders b, .tile-stock b { color: var(--ink); }

@media (min-width: 560px) { .tile { min-height: 200px; } }

/* ---------- cards & lists ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.card + .card { margin-top: 12px; }
.section-title { font: 700 16px/1.3 var(--font-brand); margin: 24px 4px 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack > * + * { margin-top: 14px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 10px; padding-right: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink);
}
.thumb { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; background: var(--blush); flex: none; }
.thumb-lg { width: 100%; aspect-ratio: 1; height: auto; border-radius: var(--r-lg); object-fit: cover; background: var(--blush); }
.item-title { font-weight: 600; }
.item-meta { font-size: 13.5px; color: var(--ink-2); }
.price { font-weight: 700; white-space: nowrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font: 700 17px/1.3 var(--font-brand); margin-bottom: 6px; }

/* ---------- forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px 4px; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 17px; outline: none; -webkit-appearance: none; appearance: none;
}
.field input:focus, .field textarea:focus, .input:focus { border-color: var(--rose); box-shadow: 0 0 0 4px var(--blush); }
.field textarea { min-height: 80px; resize: vertical; }
.other-input {
  width: 100%; min-height: 48px; margin-top: 8px; padding: 10px 14px; font-size: 17px;
  border: 1.5px solid var(--rose); border-radius: var(--r-md); background: var(--paper); outline: none;
  box-shadow: 0 0 0 4px var(--blush);
}
.field select, select.input {
  padding-right: 40px; cursor: pointer;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23B8305A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 20px;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--rose); }

.stepper { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.stepper button { width: 54px; border: 0; background: var(--blush); color: var(--rose-deep); font-size: 24px; font-weight: 700; cursor: pointer; }
.stepper input { flex: 1; min-width: 0; border: 0; text-align: center; font-size: 20px; font-weight: 700; min-height: 52px; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.photo-drop {
  position: relative; display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3; border: 2px dashed #EBB7C7; border-radius: var(--r-lg);
  background: var(--paper); color: var(--rose-deep); font-weight: 600; cursor: pointer; overflow: hidden;
}
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop svg { width: 44px; height: 44px; margin: 0 auto 6px; }

.photo-sm { aspect-ratio: 1; font-size: 14px; }
.photo-sm svg { width: 34px; height: 34px; }
.photo-sm small { font-weight: 500; }

.courier-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.courier-pick label { position: relative; cursor: pointer; }
.courier-pick input { position: absolute; opacity: 0; inset: 0; }
.courier-pick span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 72px; padding: 8px 6px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  font-weight: 700; font-size: 14.5px; line-height: 1.2;
}
.courier-pick span::before {
  content: ""; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #D9B8C4; background: #fff;
}
.courier-pick input:checked + span { background: var(--mint); border-color: var(--mint-ink); color: var(--mint-ink); }
.courier-pick input:checked + span::before {
  border-color: var(--mint-ink);
  background: var(--mint-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.courier-pick input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }

.docs { display: flex; gap: 10px; margin-top: 10px; }
.doc { position: relative; width: 110px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); }
.doc img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.doc span { display: block; padding: 6px 8px; font-size: 13px; font-weight: 600; }

/* ---------- edit rows ---------- */
.edit-row { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.edit-row.removed { opacity: .45; }
.edit-row.removed .edit-fields { display: none; }
.edit-row .two { margin-top: 10px; }
.edit-row .stepper { margin-top: 10px; }
.edit-row .field select { min-height: 46px; font-size: 16px; }
.edit-row .stepper input, .edit-row .stepper button { min-height: 44px; }
.pill-new { background: var(--blush); color: var(--rose-deep); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { min-height: 58px; font-size: 17px; width: 100%; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:active { background: var(--rose-deep); }
.btn-soft { background: var(--blush); color: var(--rose-deep); }
.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-lilac { background: var(--lilac-ink); color: #fff; }
.btn-mint { background: var(--mint-ink); color: #fff; }
.btn-danger { background: var(--paper); border-color: #F0C2C2; color: #B3261E; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }

/* sticky action bar στο κάτω μέρος */
.actionbar {
  position: sticky; bottom: 0; z-index: 10; margin: 20px -16px 0;
  padding: 12px 16px calc(12px + var(--safe-bot));
  background: linear-gradient(to top, var(--petal) 70%, rgba(255,244,246,0));
}

/* big round + (scan) */
.fab-scan {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 26px 16px; border-radius: var(--r-xl);
  border: 2px dashed #EBB7C7; background: var(--paper); color: var(--rose-deep);
  font-weight: 700; cursor: pointer;
}
.fab-scan .plus {
  width: 72px; height: 72px; border-radius: 50%; background: var(--rose); color: #fff;
  display: grid; place-items: center; font-size: 44px; line-height: 1; font-weight: 400;
  box-shadow: 0 10px 24px -10px rgba(214, 67, 111, .7);
}

/* ---------- pills / tabs ---------- */
.pill { flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill-open      { background: var(--butter); color: var(--butter-ink); }
.pill-picking   { background: var(--lilac);  color: var(--lilac-ink); }
.pill-ready     { background: var(--mint);   color: var(--mint-ink); }
.pill-cancelled { background: var(--grey);   color: var(--grey-ink); }
.pill-zero      { background: #FDE2E0; color: #B3261E; }
.pill-low       { background: var(--butter); color: var(--butter-ink); }
.pill-ok        { background: var(--mint); color: var(--mint-ink); }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px;
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink-2);
  background: var(--paper); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px;
}
.tab b { font: 700 26px/1 var(--font-brand); color: var(--ink); }
.tab.on.t-open    { background: var(--butter); border-color: #F3D684; color: var(--butter-ink); }
.tab.on.t-picking { background: var(--lilac);  border-color: #CDBDF6; color: var(--lilac-ink); }
.tab.on.t-ready   { background: var(--mint);   border-color: #A9E0C3; color: var(--mint-ink); }
.tab.on b { color: inherit; }

.lockline { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--lilac-ink); margin-top: 4px; }
.lockline .dot { width: 22px; height: 22px; font-size: 11px; }

/* ---------- order detail ---------- */
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-no { font: 700 30px/1 var(--font-brand); letter-spacing: -.03em; }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-lg); font-weight: 600; margin-bottom: 12px; }
.banner-lock { background: var(--lilac); color: var(--lilac-ink); }
.banner-ready { background: var(--mint); color: var(--mint-ink); }
.pick { cursor: pointer; }
.pick .tick {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: grid; place-items: center; color: transparent; transition: .15s;
}
.pick.done { background: #FAFFFC; border-color: #BFE7D2; }
.pick.done .tick { background: var(--mint-ink); border-color: var(--mint-ink); color: #fff; }
.pick.done .item-title { text-decoration: line-through; text-decoration-color: rgba(31,122,82,.5); }
.totals { display: flex; justify-content: space-between; padding: 14px 4px 0; font-weight: 700; font-size: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 600; }

/* ---------- stock grid ---------- */
.search { position: relative; margin-bottom: 14px; }
.search input { padding-left: 44px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.prod { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.prod img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--blush); }
.prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prod-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.prod-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.summary { display: flex; gap: 10px; margin-bottom: 14px; }
.summary div { flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.summary b { display: block; font: 700 22px/1.1 var(--font-brand); }
.summary span { font-size: 13px; color: var(--ink-2); }

.code { font-family: var(--font); font-weight: 700; letter-spacing: .08em; }
.qr-box { display: flex; gap: 14px; align-items: center; }
.qr-box .qr { background: #fff; padding: 8px; border-radius: 14px; border: 1px solid var(--line); flex: none; }
.qr canvas, .qr img { width: 96px; height: 96px; }

/* ---------- toasts ---------- */
.toast { padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; margin-bottom: 14px; animation: drop .25s ease; }
.toast-ok  { background: var(--mint); color: var(--mint-ink); }
.toast-err { background: #FDE2E0; color: #B3261E; }
.toast a { color: inherit; }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } }

/* ---------- autocomplete ---------- */
.suggest { margin-top: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.suggest button { display: flex; width: 100%; justify-content: space-between; gap: 10px; text-align: left; padding: 12px 14px; border: 0; background: none; border-bottom: 1px solid var(--line); cursor: pointer; }
.suggest button:last-child { border-bottom: 0; }
.suggest button:active { background: var(--blush); }
.picked-customer { display: flex; align-items: center; gap: 12px; background: var(--blush); border-radius: var(--r-lg); padding: 12px 14px; }
.picked-customer .dot { background: var(--rose); width: 40px; height: 40px; font-size: 17px; }

/* ---------- sheet / scanner overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(58, 30, 49, .55); display: none; align-items: flex-end; justify-content: center; }
.overlay.show { display: flex; }
.sheet {
  width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--petal); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 16px calc(16px + var(--safe-bot));
  animation: up .22s ease;
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
#reader { width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #000; min-height: 280px; }
#reader video { object-fit: cover; }
.sheet-title { font: 700 19px/1.2 var(--font-brand); margin: 4px 0 12px; }

/* ---------- auth ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; background:
  radial-gradient(120% 60% at 50% -10%, #FAD3DF 0%, rgba(250,211,223,0) 70%), var(--petal); }
body.auth .wrap { width: 100%; padding: 0; }
.auth-card { max-width: 380px; margin: 0 auto; text-align: center; }
.auth-card form { text-align: left; }
.auth-logo { font: italic 400 68px/1 var(--font-logo); color: var(--rose); letter-spacing: -.02em; }
.auth-sub { color: var(--ink-2); margin: 8px 0 26px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 6px 0 4px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rose); transition: .12s; }
.pin-dots i.on { background: var(--rose); transform: scale(1.1); }
.pin-err { min-height: 22px; color: #B3261E; font-weight: 600; text-align: center; margin: 8px 0 14px; }
.shake { animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 300px; margin: 0 auto; }
.keypad button {
  aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--paper);
  font: 600 28px/1 var(--font); color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 0 var(--line), inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
}
.keypad button:active { background: var(--blush); }
.keypad[aria-disabled] { opacity: .5; pointer-events: none; }
.link-quiet { display: inline-block; margin-top: 28px; color: var(--ink-2); font-size: 14px; }

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

/* ---------- print labels ---------- */
@media print {
  body { background: #fff; padding: 0; }
  .topbar, .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
}

/* όταν μπει φωτό, το όνομα (Απόδειξη/Voucher) μένει ως ετικέτα πάνω της */
.photo-drop.has-img > div { position: absolute; left: 8px; bottom: 8px; z-index: 1; background: rgba(255,255,255,.92); padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.photo-drop.has-img > div svg, .photo-drop.has-img > div small, .photo-drop.has-img > div br { display: none; }

/* ---------- admin λίστες ---------- */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--blush); padding: 4px; border-radius: 999px; }
.seg a { text-align: center; padding: 10px 4px; border-radius: 999px; text-decoration: none; color: var(--rose-deep); font-weight: 700; font-size: 13.5px; }
.seg a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.opt-row { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 6px 6px 4px; }
.opt-row.off .opt-input { color: var(--ink-2); text-decoration: line-through; }
.opt-input { width: 100%; border: 0; background: transparent; font-size: 17px; font-weight: 600; padding: 8px 10px; border-radius: 10px; outline: none; }
.opt-input:focus { background: var(--blush); }
.opt-actions { display: flex; gap: 4px; flex: none; }
.opt-actions button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 17px; font-weight: 700; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.opt-actions button:disabled { opacity: .3; }
.opt-actions .danger { color: #B3261E; }

/* ---------- κατηγορίες (chips) & αναζήτηση ειδών ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 8px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; font-size: 14.5px; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.chip.on { background: var(--rose); border-color: var(--rose); color: #fff; }
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
@media (min-width: 560px) { .pick-grid { grid-template-columns: repeat(3, 1fr); } }
.pick-grid button { text-align: left; padding: 0; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.pick-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--blush); }
.pick-grid .pb { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; width: 100%; }
.pick-grid .pb b { font-size: 14.5px; line-height: 1.25; font-weight: 600; }
.pick-grid .pf { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
/* αναζήτηση ειδών: ολόκληρη οθόνη (στο iPhone το vh δεν υπολογίζει τις μπάρες του Safari, γι' αυτό dvh) */
.overlay-full { align-items: stretch; background: var(--petal); }
.sheet-tall {
  height: 100vh; height: 100dvh; max-height: none; max-width: 640px;
  border-radius: 0; padding-top: 0; animation: none;
}
.sheet-tall::before { display: none; }
.sheet-head {
  position: sticky; top: 0; z-index: 2; margin: 0 -16px; padding: calc(10px + var(--safe-top)) 16px 8px;
  background: var(--petal); border-bottom: 1px solid var(--line);
}
.sheet-head .chips { padding-bottom: 4px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.add-row .fab-scan { padding: 18px 10px; }
.add-row .plus { width: 56px; height: 56px; font-size: 30px; }
.chips-radio label { position: relative; flex: none; display: block; }
.chips-radio .chip { display: inline-flex; align-items: center; }
.chips-radio input { position: absolute; opacity: 0; inset: 0; }
.chips-radio input:checked + .chip { background: var(--rose); border-color: var(--rose); color: #fff; }
.chips-radio input:focus-visible + .chip { outline: 3px solid var(--rose); outline-offset: 2px; }

/* ---------- σκανάρισμα εγγράφου ---------- */
.docscan { background: #2A1622; }
.ds-wrap { display: flex; flex-direction: column; width: 100%; max-width: 640px; height: 100vh; height: 100dvh; margin: 0 auto; }
.ds-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 16px 6px; color: #fff; }
.ds-head .topbar-title { color: #fff; }
.ds-hint { margin: 0 16px 8px; color: #F3CFDB; font-size: 14px; }
.ds-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 8px; touch-action: none; }
.ds-canvas, .ds-svg { grid-area: 1 / 1; display: block; }
.ds-svg { touch-action: none; overflow: visible; }
.ds-poly { fill: rgba(214, 67, 111, .18); stroke: #FF7FA6; stroke-linejoin: round; }
.ds-h { fill: rgba(255,255,255,.9); stroke: #D6436F; }
.ds-bar { padding: 12px 16px calc(14px + var(--safe-bot)); background: var(--petal); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.ds-bar .check { margin-bottom: 10px; }

.sms-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--rose-deep); flex: none; }
.sms-card .btn { min-height: 42px; }
.opt-row:has(.opt-extra) { flex-wrap: wrap; }
.opt-extra { order: 3; flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 0 6px 4px; }
.opt-extra .opt-input { font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--petal); }

/* ακυρωμένο είδος μέσα σε παραγγελία */
.item-x { background: #FAF6F8; border-style: dashed; }
.item-x .thumb { filter: grayscale(1); opacity: .55; }
.item-x .item-title { text-decoration: line-through; color: var(--ink-2); }
.x-note { font-size: 12.5px; font-weight: 700; color: #B3261E; margin-top: 2px; }
.item-act { margin-top: 4px; }
.link-btn { border: 0; background: none; padding: 6px 0; font-weight: 700; font-size: 13.5px; color: var(--rose-deep); cursor: pointer; }
.link-btn.danger { color: #B3261E; }

/* λογότυπο μαγαζιού */
.brand { display: flex; align-items: center; min-width: 0; flex: 1; }
.brand-logo { display: block; height: 20px; width: auto; max-width: 100%; }
.auth-logo-img { display: block; width: min(86%, 320px); height: auto; margin: 4px auto 6px; }

/* chips: block-level ώστε οι σειρές να μην πέφτουν η μία πάνω στην άλλη (iOS) */
.chip { display: inline-flex; align-items: center; line-height: 1.2; }
/* εικονίδιο κάμερας πάνω από το κείμενο, κεντραρισμένο */
.photo-drop > div { display: flex; flex-direction: column; align-items: center; }
.photo-drop svg { display: block; }
.input-err, .field input.input-err { border-color: #B3261E !important; box-shadow: 0 0 0 4px #FDE2E0 !important; }
.live-status { font: 700 16px/1.3 var(--font-brand); margin: 6px 0 8px; color: var(--lilac-ink); }
.live-status.ok { color: var(--mint-ink); }
.live-ev { list-style: none; margin: 0 0 8px; padding: 0; }
.live-ev li { padding: 0 0 8px; }
.live-ev b { display: block; font-weight: 600; font-size: 14.5px; }
.live-ev span { font-size: 12.5px; color: var(--ink-2); }
.live-note { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; background: var(--butter); color: var(--butter-ink); font-weight: 700; font-size: 13px; }
.live-pickup { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-md); background: var(--petal); border: 1px solid var(--line); font-size: 14px; }
.live-pickup a { font-weight: 700; color: var(--rose-deep); }

/* αριθμός αποστολής: πεδίο + κουμπί σκαναρίσματος + μήνυμα ελέγχου */
.trk-row { display: flex; gap: 8px; }
.trk-row input { flex: 1; min-width: 0; letter-spacing: .04em; font-weight: 600; }
.trk-row .btn { flex: none; min-height: 52px; padding: 0 14px; }
.trk-info { display: block; min-height: 18px; margin: 6px 4px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.trk-info.ok { color: var(--mint-ink); }
.trk-info.err { color: #B3261E; }
.field input.input-ok { border-color: var(--mint-ink); box-shadow: 0 0 0 4px var(--mint); }

/* έξοδα αποστολής */
.cp-price { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.courier-pick input:checked + span .cp-price { color: var(--mint-ink); }
.subtotals { padding: 12px 4px 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--ink-2); }
.subtotals div { display: flex; justify-content: space-between; gap: 10px; }
.opt-row:has(.opt-extra) .opt-extra + .opt-extra { order: 4; }
.field input.flash { background: var(--mint); transition: background .6s; }

/* παραγγελίες: αναζήτηση 3 πεδίων + ποιος μαζεύει/ετοίμασε */
.osearch { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.osearch .field input { min-height: 48px; }
.tab-who { display: flex; justify-content: center; gap: 2px; margin-top: 4px; min-height: 22px; }
.tab-who .dot { width: 22px; height: 22px; font-size: 11px; font-style: normal; color: #fff; }

/* χρήστες */
.user-row .item-title .pill { vertical-align: middle; margin-left: 4px; }
.color-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.color-pick label { position: relative; }
.color-pick input { position: absolute; opacity: 0; inset: 0; }
.color-pick span { display: block; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.color-pick input:checked + span { box-shadow: 0 0 0 3px var(--ink); }

/* εκτύπωση ετικετών */
.print-box { display: flex; gap: 10px; }
.print-box .stepper { flex: 1; }
.print-box .print-btn { flex: none; min-height: 52px; }
.print-msg { min-height: 18px; margin: 8px 4px 0; font-weight: 600; color: var(--ink-2); }
.print-msg.ok { color: var(--mint-ink); }
.print-msg.err { color: #B3261E; }

/* TikTok live στη νέα παραγγελία */
.tt-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden; }
.tt-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; cursor: pointer; }
.tt-head b { display: block; font-size: 15.5px; }
.tt-head small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.tt-logo { width: 32px; height: 32px; border-radius: 9px; background: #111; color: #fff; display: grid; place-items: center; flex: none; box-shadow: -2px -2px 0 #25F4EE inset, 2px 2px 0 #FE2C55 inset; }
.tt-logo.sm { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; }
.tt-dot { width: 8px; height: 8px; border-radius: 50%; background: #FE2C55; animation: ttpulse 1.2s infinite; }
@keyframes ttpulse { 50% { opacity: .3; } }
.tt-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); font-weight: 700; font-size: 13px; text-align: center; }
.tt-count:empty { display: none; }
.tt-chev { color: var(--ink-2); transition: transform .15s; }
.tt-head[aria-expanded="true"] .tt-chev { transform: rotate(180deg); }
.tt-body { padding: 0 12px 12px; }
.tt-body .input { min-height: 44px; font-size: 16px; margin-bottom: 8px; }
.tt-list { max-height: 50vh; max-height: 50dvh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.tt-user { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--petal); cursor: pointer; }
.tt-user:active { background: var(--blush); }
.tt-user.done { opacity: .7; }
.tt-nick { font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.tt-nick .pill { font-style: normal; margin-left: 4px; vertical-align: middle; }
.tt-comment { font-size: 15px; color: var(--ink); }
.tt-meta { font-size: 12px; color: var(--ink-2); }
.tt-cust { display: block; color: var(--mint-ink); font-size: 12.5px; margin-top: 2px; }
.tt-picked { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-radius: var(--r-md); background: #111; color: #fff; }
.tt-picked small { color: #bbb; }
.tt-picked .link-btn { color: #fff; }

/* αναμονή + πληρωμή */
.pill-hold { background: #FFE2C7; color: #9A4A00; }
.banner-hold { background: #FFE9D4; color: #8A4300; }
.tab.on.t-hold { background: #FFE9D4; border-color: #F5C08F; color: #8A4300; }
.tabs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tab { padding: 10px 2px; font-size: 12.5px; }
.tab b { font-size: 22px; }
.pay-pick, .hold-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hold-pick { grid-template-columns: 1fr; }
.pay-pick label, .hold-pick label { position: relative; cursor: pointer; }
.pay-pick input, .hold-pick input { position: absolute; opacity: 0; inset: 0; }
.pay-pick span, .hold-pick span {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); font-weight: 700;
}
.pay-pick span::before, .hold-pick span::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid #D9B8C4; background: #fff; }
.pay-pick input:checked + span, .hold-pick input:checked + span { background: var(--blush); border-color: var(--rose); color: var(--rose-deep); }
.pay-pick input:checked + span::before, .hold-pick input:checked + span::before { border: 6px solid var(--rose); }
.courier-status { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--lilac-ink); }
.courier-status.ok { color: var(--mint-ink); }

/* αναφορά */
.rep-users { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rep-user { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--paper); text-decoration: none; color: var(--ink); position: relative; }
.rep-user.on { border-color: var(--rose); background: var(--blush); }
.rep-n { position: absolute; top: 12px; right: 14px; font: 700 28px/1 var(--font-brand); }
.rep-table { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rep-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table th, .rep-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rep-table th { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.rep-table tbody tr { cursor: pointer; }
.rep-table tbody tr:active { background: var(--blush); }
.rep-table tfoot td { font-weight: 700; border-bottom: 0; }

.rep-table th, .rep-table td { padding: 10px 8px; }
.rep-table td:last-child { white-space: nowrap; }

/* ένδειξη TikTok live κάτω από το logo */
.brand-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; flex: 1; }
.brand-wrap .brand { flex: none; }
.live-ind { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--grey); color: var(--grey-ink); }
.live-ind i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.live-ind.on { background: #FE2C55; color: #fff; box-shadow: 0 2px 10px -3px rgba(254,44,85,.7); }
.live-ind.on i { background: #fff; opacity: 1; animation: ttpulse 1.2s infinite; }

.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.amounts-hint { margin: -6px 4px 0; }

.tt-hint { margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: #111; color: #fff; font-size: 13.5px; }
.phone-later { border-color: #F5C08F; background: #FFF6EC; }

.tt-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--petal); border: 1px solid var(--line); padding: 4px; border-radius: 999px; margin-bottom: 8px; }
.tt-modes button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tt-modes button.on { background: #111; color: #fff; }
.tt-modes .tt-dot { display: inline-block; }
.tt-time { font-weight: 500; font-size: 11.5px; color: var(--ink-2); margin-left: 4px; }
.tt-msg .tt-comment { font-size: 15.5px; }

/* YouTube live κάρτα */
.yt-logo { width: 32px; height: 32px; border-radius: 9px; background: #FF0000; color: #fff; display: grid; place-items: center; flex: none; }
.yt-logo.sm { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
.tt-picked.yt { background: #C4302B; }
.lc-connect { display: flex; gap: 8px; margin-bottom: 4px; }
.lc-connect .input { flex: 1; min-height: 44px; font-size: 15px; }
.lc-connect .btn { flex: none; min-height: 44px; }
.lc-msg { min-height: 16px; margin: 2px 4px 8px; font-weight: 600; color: var(--ink-2); }
.lc-msg.ok { color: var(--mint-ink); } .lc-msg.err { color: #B3261E; }
.lc-end { display: block; margin: 10px auto 0; }

/* δύο ενδείξεις live κάτω από το logo */
.live-inds { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.live-ind.li-tiktok { background: #EDEDED; color: #555; }
.live-ind.li-tiktok.on { background: #111; color: #fff; box-shadow: -2px 0 0 #25F4EE, 2px 0 0 #FE2C55; }
.live-ind.li-tiktok.on i { background: #FE2C55; }
.live-ind.li-youtube { background: #F3E3E3; color: #8A5A5A; }
.live-ind.li-youtube.on { background: #FF0000; color: #fff; box-shadow: 0 2px 10px -3px rgba(255,0,0,.6); }
.live-ind.li-youtube.on i { background: #fff; }
.live-ind { white-space: nowrap; flex: none; }
.brand-wrap { flex: 1 1 auto; overflow: visible; }

/* πελάτες */
.tile-wide { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 16px 18px; border-radius: var(--r-xl); background: var(--butter); color: var(--butter-ink); text-decoration: none; }
.tile-wide b { display: block; font: 700 18px/1.2 var(--font-brand); color: var(--ink); }
.tile-wide small { font-size: 13px; }
.cust-head { display: flex; align-items: center; gap: 14px; }
.cust-name { font: 700 22px/1.2 var(--font-brand); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat-grid div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.stat-grid b { display: block; font: 700 21px/1.15 var(--font-brand); }
.stat-grid span { font-size: 12.5px; color: var(--ink-2); }
.tag-tt { font-weight: 700; color: #111; }
.tag-yt { font-weight: 700; color: #C4302B; }
.confirm-card { border: 2px solid var(--rose); background: var(--blush); }

.lc-pick { min-height: 44px; font-size: 15px; margin-bottom: 8px; padding-right: 36px; }

.seg.seg5 { grid-template-columns: repeat(5, 1fr); }
.seg.seg5 a { font-size: 12px; padding: 9px 2px; }

/* λέξεις-κλειδιά live */
.tt-modes.lc-modes { grid-template-columns: repeat(3, 1fr); }
.tt-modes button { font-size: 13px; padding: 8px 4px; }
.tt-user.hot { background: #FFF4E5; border-color: #F5B66B; }
.tt-user.hot .tt-comment { font-weight: 700; color: #7A3E00; }
.hot-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #FF8A00; color: #fff; font: 700 11px/1.5 var(--font); font-style: normal; vertical-align: middle; }
.mode-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #FF8A00; color: #fff; font-size: 11px; line-height: 18px; }
.mode-count:empty { display: none; }
