/* =====================================================================
   SmartByte Tracker — app.css
   Λογική χρωμάτων:
   · Ζεστό ουδέτερο φόντο, λευκές κάρτες, σχεδόν μαύρο κύριο κουμπί.
   · Κάθε κατάσταση έχει ΕΝΑ παστέλ χρώμα, με σκούρο κείμενο πάνω του:
       Εμφανίζεται = μέντα · Εκτός = ροζ · Αναμονή = βούτυρο · Αναστολή = λεβάντα
       «Το είδα» = ροδάκινο (η μόνη «προσωπική» σήμανση)
   · Dark mode: σκούρο γκρι (όχι μπλε), ίδια παστέλ, λίγο πιο μαλακά.
   Δομή: 1 tokens · 2 base · 3 shell · 4 components · 5 dashboard · 6 dialogs · 7 auth · 8 responsive
   ===================================================================== */

/* 1. TOKENS ----------------------------------------------------------- */
:root {
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bg:          #f4f2ee;
  --sidebar:     #ebe8e1;
  --surface:     #ffffff;
  --surface-2:   #faf9f6;
  --surface-3:   #f0ede7;
  --line:        #e7e3db;
  --line-strong: #d6d0c4;
  --ink:         #1c1c1e;
  --ink-2:       #46454b;
  --muted:       #85817a;
  --faint:       #b3aea4;

  --dark:        #1c1c1e;     /* κύριο κουμπί */
  --on-dark:     #ffffff;

  /* Παστέλ: φόντο & πιο έντονη απόχρωση για εικονίδια */
  --rose:        #f8d3e3;  --rose-ink:     #a8395f;
  --lavender:    #e1d9fa;  --lavender-ink: #5b48b6;
  --butter:      #f7e8a6;  --butter-ink:   #8a6900;
  --mint:        #cdecda;  --mint-ink:     #1f7a4e;
  --peach:       #fde2cc;  --peach-ink:    #9a4d12;
  --pill-ink:    #2a292e;  /* κείμενο πάνω σε παστέλ */

  /* Πιο γεμάτοι τόνοι μόνο για τη λεπτή λωρίδα αναλογίας */
  --bar-visible: #9fd9b8;
  --bar-hidden:  #f2a9c6;
  --bar-pending: #efd76f;

  --nav-active:  linear-gradient(90deg, #f6d6e6 0%, #ece0f8 100%);
  --row-hidden:  #fdf4f8;
  --row-viewed:  #fff3e8;

  --ring: 0 0 0 3px rgba(28, 28, 30, .14);
  --shadow-sm: 0 1px 2px rgba(40, 32, 20, .04);
  --shadow-md: 0 12px 32px -14px rgba(40, 32, 20, .22);
  --shadow-lg: 0 30px 80px -24px rgba(30, 24, 15, .40);

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --sidebar-w: 264px;
  --topbar-h: 70px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:          #09090b;
  --sidebar:     #060607;
  --surface:     #121214;
  --surface-2:   #18181b;
  --surface-3:   #202024;
  --line:        #222226;
  --line-strong: #313137;
  --ink:         #ececee;
  --ink-2:       #c4c4ca;
  --muted:       #94949c;
  --faint:       #63636b;

  --dark:        #ececee;
  --on-dark:     #18181a;

  /* Πιο μαλακά παστέλ για σκούρο φόντο */
  --rose:        #d9adc0;  --rose-ink:     #e4b9cc;
  --lavender:    #bdb4e3;  --lavender-ink: #c8c0ec;
  --butter:      #dccd90;  --butter-ink:   #e6d89b;
  --mint:        #a2ceb6;  --mint-ink:     #aed8c1;
  --peach:       #e0bb9e;  --peach-ink:    #eac6aa;
  --pill-ink:    #1b1b1d;

  --bar-visible: #a2ceb6;
  --bar-hidden:  #d9adc0;
  --bar-pending: #dccd90;

  --nav-active:  linear-gradient(90deg, rgba(217, 173, 192, .15) 0%, rgba(189, 180, 227, .11) 100%);
  --row-hidden:  rgba(217, 173, 192, .05);
  --row-viewed:  rgba(224, 187, 158, .08);

  --ring: 0 0 0 3px rgba(236, 236, 238, .16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .9);

  color-scheme: dark;
}

/* 2. BASE ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
.theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease !important;
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em; padding: .1em .4em; border-radius: 6px;
  background: var(--surface-3); color: var(--ink-2);
}
.ph { line-height: 1; }
:focus-visible { outline: none; box-shadow: var(--ring); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.theme-icon--dark { display: none; }
[data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="dark"] .theme-icon--dark { display: inline-block; }

/* 3. SHELL: sidebar + topbar ------------------------------------------ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; flex: none;
  width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin;
  transition: width .2s ease;
}
.sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 4px 0 6px; margin-bottom: 14px; }
.sidebar .sidebar__close { display: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--dark); color: var(--on-dark); font-size: 19px;
}
.brand__name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__logo { display: block; flex: none; max-height: 40px; max-width: 72px; width: auto; object-fit: contain; border-radius: 10px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav__label {
  margin: 14px 10px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.side-nav__label:first-child { margin-top: 0; }
.side-nav__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 42px; padding: 0 10px 0 12px;
  border: 0; border-radius: 12px; background: transparent;
  color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.side-nav__item > .ph { font-size: 19px; flex: none; color: var(--muted); transition: color .15s; }
.side-nav__item:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink); }
.side-nav__item:hover > .ph { color: var(--ink); }
.side-nav__item[aria-current="page"] { background: var(--nav-active); color: var(--ink); }
.side-nav__item[aria-current="page"] > .ph { color: var(--ink); }
.side-nav__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav__count {
  min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.side-nav__item--hidden .side-nav__count { background: var(--rose); color: var(--pill-ink); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint-ink) 50%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.scrim { display: none; }

/* Συμπτυγμένο sidebar (desktop) */
@media (min-width: 1025px) {
  [data-sidebar="collapsed"] { --sidebar-w: 78px; }
  [data-sidebar="collapsed"] .sidebar { padding-left: 12px; padding-right: 12px; }
  [data-sidebar="collapsed"] .sidebar__head { flex-direction: column; justify-content: center; gap: 10px; padding: 0; }
  [data-sidebar="collapsed"] .brand { justify-content: center; }
  [data-sidebar="collapsed"] .brand__logo { max-width: 46px; max-height: 46px; }
  [data-sidebar="collapsed"] .brand__name,
  [data-sidebar="collapsed"] .side-nav__text,
  [data-sidebar="collapsed"] .side-nav__count { display: none; }
  [data-sidebar="collapsed"] .side-nav__label { height: 1px; margin: 12px 10px; padding: 0; overflow: hidden; color: transparent; background: var(--line); }
  [data-sidebar="collapsed"] .side-nav__item { justify-content: center; padding: 0; }
}

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .topbar__menu { display: none; }
.topbar .topbar__collapse { display: inline-grid; flex: none; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search { position: relative; flex: 1; max-width: 440px; display: flex; align-items: center; }
.search input {
  width: 100%; height: 44px; padding: 0 42px 0 44px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--line-strong); box-shadow: var(--ring); }
.search__icon { position: absolute; left: 16px; font-size: 18px; color: var(--muted); pointer-events: none; }
.search__kbd {
  position: absolute; right: 12px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px;
  font: 700 11px/1 var(--font); color: var(--faint); background: var(--surface-2);
}
.search input:focus ~ .search__kbd, .search input:not(:placeholder-shown) ~ .search__kbd { display: none; }

.round-btn {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 18px; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.round-btn:hover { background: var(--surface-3); color: var(--ink); }
.round-btn.is-on { color: var(--pill-ink); background: var(--butter); border-color: transparent; }

/* Κατάσταση bot (πάνω δεξιά): εικονίδιο με πράσινη κουκκίδα + «radar» σε κάθε νέο κύκλο */
.bot-btn { position: relative; }
.bot-btn__dot {
  position: absolute; right: 6px; bottom: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--butter-ink); border: 2px solid var(--surface);
}
.bot-btn.bot-status--on .bot-btn__dot { background: var(--mint-ink); }   /* σταθερή· το «radar» (motion.js) δείχνει τους κύκλους */

/* Μόνο για κινητό: κάτω μπάρα & «Θέμα» στο μενού χρήστη — κρυμμένα στο desktop */
.tabbar, .tabbar-fade { display: none; }
.menu__panel .menu__item--theme { display: none; }

/* Μενού χρήστη */
.menu { position: relative; }
.user-chip {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .15s;
}
.user-chip::-webkit-details-marker { display: none; }
.user-chip:hover, .menu[open] .user-chip { background: var(--surface); border-color: var(--line); }
.user-chip__text { display: grid; line-height: 1.25; }
.user-chip__text strong { font-size: 14px; font-weight: 700; white-space: nowrap; }
.user-chip__text span { font-size: 12px; color: var(--muted); }
.user-chip__caret { font-size: 14px; color: var(--muted); transition: transform .15s; }
.menu[open] .user-chip__caret { transform: rotate(180deg); }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 280px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-md);
}
.menu__who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu__who > div { min-width: 0; }
.menu__who strong { display: block; font-size: 14.5px; }
.menu__who span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu__item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
}
.menu__item .ph { font-size: 18px; color: var(--muted); }
.menu__item:hover { background: var(--surface-3); }
.menu__item--danger, .menu__item--danger .ph { color: var(--rose-ink); }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--line); }

.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; object-fit: cover;
  background: var(--lavender); color: var(--pill-ink);
  font-weight: 800; font-size: 15px;
}
.avatar--md { width: 44px; height: 44px; font-size: 16px; }
.avatar--lg { width: 46px; height: 46px; font-size: 17px; }
.avatar--xl { width: 92px; height: 92px; font-size: 32px; }

.page { width: 100%; padding: 28px 28px 56px; }

/* 4. COMPONENTS ------------------------------------------------------- */
.btn {
  --b-bg: var(--surface); --b-ink: var(--ink); --b-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid var(--b-line); border-radius: 999px;
  background: var(--b-bg); color: var(--b-ink);
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn .ph { font-size: 18px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--dark  { --b-bg: var(--dark); --b-ink: var(--on-dark); --b-line: var(--dark); }
.btn--dark:hover { --b-bg: color-mix(in srgb, var(--dark) 86%, var(--bg)); }
.btn--light:hover { --b-bg: var(--surface-3); }
.btn--rose { --b-bg: var(--rose); --b-ink: var(--pill-ink); --b-line: transparent; }
.btn--rose:hover { --b-bg: color-mix(in srgb, var(--rose) 82%, var(--pill-ink)); }
.btn--ghost { --b-bg: transparent; --b-line: transparent; --b-ink: var(--ink-2); }
.btn--ghost:hover { --b-bg: var(--surface-3); }
.btn--block { width: 100%; }
.btn--lg { height: 50px; font-size: 15px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }

.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.is-loading > * { visibility: hidden; }
.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--b-ink, var(--ink)); border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 0; background: transparent; color: var(--muted);
  font-size: 18px; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn--danger:hover { background: var(--rose); color: var(--pill-ink); }
.icon-btn--resume { color: var(--mint-ink); }
.icon-btn--resume:hover { background: var(--mint); color: var(--pill-ink); }

.pill-btn {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border: 0; border-radius: 999px;
  background: var(--rose); color: var(--pill-ink);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.pill-btn:hover { background: color-mix(in srgb, var(--rose) 82%, var(--pill-ink)); }

.link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link--sm { font-size: 13px; }

/* Παστέλ «χάπια» κατάστασης */
.pill {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--pill-ink); white-space: nowrap;
}
.pill--visible  { background: var(--mint); }
.pill--hidden   { background: var(--rose); }
.pill--pending  { background: var(--butter); }
.pill--paused, .pill--lavender { background: var(--lavender); }
.pill--neutral  { background: var(--surface-3); color: var(--ink-2); }

/* Στρογγυλά εικονίδια με παστέλ φόντο */
.chip-icon {
  --c: var(--surface-3); --ci: var(--ink-2);
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 20px;
  background: var(--c); color: var(--ci);
}
.chip-icon--rose     { --c: var(--rose);     --ci: var(--rose-ink); }
.chip-icon--lavender { --c: var(--lavender); --ci: var(--lavender-ink); }
.chip-icon--butter   { --c: var(--butter);   --ci: var(--butter-ink); }
.chip-icon--mint     { --c: var(--mint);     --ci: var(--mint-ink); }
[data-theme="dark"] .chip-icon { background: color-mix(in srgb, var(--c) 18%, transparent); }

/* Μηνύματα */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px 13px 16px; margin-bottom: 18px;
  border-radius: var(--r); color: var(--pill-ink);
  font-size: 14px; font-weight: 600; line-height: 1.45;
  transition: opacity .3s, transform .3s;
}
.alert > .ph { font-size: 19px; }
.alert > span { flex: 1; }
.alert__close { border: 0; background: none; color: inherit; opacity: .55; cursor: pointer; padding: 2px 4px; font-size: 16px; }
.alert__close:hover { opacity: 1; }
.alert.is-hiding { opacity: 0; transform: translateY(-4px); }
.alert--success { background: var(--mint); }
.alert--error   { background: var(--rose); }
.alert--warning { background: var(--butter); }
.alert--info    { background: var(--lavender); }

/* Φόρμες */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field__label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field__opt { font-weight: 500; color: var(--faint); margin-left: 4px; }
.field__help { font-size: 12.5px; color: var(--muted); }

.input { position: relative; display: flex; align-items: center; }
.input input, .textarea, .select select {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.input input::placeholder, .textarea::placeholder { color: var(--faint); }
.input input:focus, .textarea:focus, .select select:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.input__icon { position: absolute; left: 14px; color: var(--muted); font-size: 18px; pointer-events: none; }
.input__icon ~ input { padding-left: 42px; }
.input__action {
  position: absolute; right: 5px; width: 36px; height: 36px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.input__action:hover { color: var(--ink); background: var(--surface-3); }
.input:has(.input__action) input { padding-right: 46px; }

.textarea { resize: vertical; line-height: 1.5; }
.textarea--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg); pointer-events: none;
}
.select--pill { display: inline-flex; align-items: center; }
.select--pill select { min-height: 40px; height: 40px; padding: 0 38px 0 40px; border-radius: 999px; border-color: var(--line); font-size: 13.5px; font-weight: 600; }
.select__icon { position: absolute; left: 14px; font-size: 17px; color: var(--muted); pointer-events: none; }
.select--role select { min-height: 32px; height: 32px; padding: 0 34px 0 14px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); border-color: transparent; color: var(--ink-2); }
.select--role.is-admin select { background: var(--lavender); color: var(--pill-ink); }
.select--role::after { right: 14px; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--dark); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline; }

.strength { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.strength__bar { flex: 0 0 90px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.strength__bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s, background-color .2s; }
.strength[data-level="0"] .strength__bar span { width: 12%; background: var(--bar-hidden); }
.strength[data-level="1"] .strength__bar span { width: 30%; background: var(--bar-hidden); }
.strength[data-level="2"] .strength__bar span { width: 55%; background: var(--bar-pending); }
.strength[data-level="3"] .strength__bar span { width: 80%; background: var(--bar-visible); }
.strength[data-level="4"] .strength__bar span { width: 100%; background: var(--bar-visible); }

/* Κάρτα */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px 16px; }
.card__title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.card__sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.card__tools { display: flex; align-items: center; gap: 8px; }

/* 5. DASHBOARD -------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head__title { font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.page-head__sub { margin-top: 6px; color: var(--muted); max-width: 64ch; }
.page-head__actions { display: flex; gap: 10px; flex: none; }

/* Σύνοψη: ποσοστό αριστερά · λωρίδα & υπόμνημα στη μέση · επανέλεγχος δεξιά */
.overview {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 30px;
  padding: 24px 28px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.overview__rate { display: flex; align-items: center; gap: 16px; padding-right: 30px; border-right: 1px solid var(--line); }
.overview__icon { width: 52px; height: 52px; font-size: 24px; }
.overview__number { display: block; font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.overview__number small { font-size: .45em; font-weight: 700; margin-left: 2px; letter-spacing: 0; }
.overview__caption { display: block; margin-top: 6px; max-width: 19ch; font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 600; }
.overview__main { display: grid; gap: 14px; min-width: 0; }
.overview__cta { flex: none; }

.strip { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.strip__seg { display: block; height: 100%; min-width: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.strip__seg.is-zero { display: none; }
.strip__seg--visible { background: var(--bar-visible); }
.strip__seg--hidden  { background: var(--bar-hidden); }
.strip__seg--pending { background: var(--bar-pending); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 14px; color: var(--ink-2); }
.legend__item { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; text-decoration: none; }
.legend__item strong { font-weight: 800; color: var(--ink); }
.legend__item:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.legend__key { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend__key--visible { background: var(--bar-visible); }
.legend__key--hidden  { background: var(--bar-hidden); }
.legend__key--pending { background: var(--bar-pending); }
.legend__total { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend__total .link { color: var(--muted); }

/* Πίνακας */
.live-notice {
  display: flex; align-items: center; gap: 10px;
  margin: 0 22px 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--lavender); color: var(--pill-ink); font-size: 13.5px; font-weight: 600;
}
.live-notice .link { color: var(--pill-ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 10px 16px; text-align: left;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background-color .25s ease; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }

.row--hidden td { background: var(--row-hidden); }
.row--viewed td { background: var(--row-viewed) !important; }
.row--paused .product__name, .row--paused .product__thumb, .row--paused .uid, .row--paused .meta-link { opacity: .55; }
.row--changed td { animation: row-flash 2.6s ease-out; }
@keyframes row-flash { 0%, 35% { background-color: color-mix(in srgb, var(--lavender) 55%, transparent); } }
.row--gone { opacity: .35; pointer-events: none; }
.is-updated { animation: live-flash 1.4s ease-out; border-radius: 6px; }
@keyframes live-flash {
  0%, 25% { background-color: color-mix(in srgb, var(--butter) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--butter) 70%, transparent); }
  100%    { background-color: transparent; box-shadow: 0 0 0 3px transparent; }
}

.col-status, .col-role { width: 136px; }
.col-time { width: 128px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.col-price { width: 112px; }
.col-yield { width: 156px; white-space: nowrap; }
.col-min { width: 142px; }
.col-actions { width: 166px; text-align: right; white-space: nowrap; }
.col-actions .icon-btn { width: 30px; height: 30px; font-size: 16px; }

/* Μικρή γραμμή κάτω από τιμές/κατάσταση */
.status-time { display: none; }

/* Τελευταίος έλεγχος + μικρό εικονίδιο για το ιστορικό τιμής του προϊόντος */
.time-cell { display: inline-flex; align-items: center; gap: 6px; }
.history-link {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 15px;
  color: var(--faint); text-decoration: none; transition: background-color .15s, color .15s;
}
.history-link:hover { background: var(--surface-3); color: var(--ink); }
.history-link--mobile { display: none; }   /* εμφανίζεται μόνο στο κινητό, δίπλα στην κατάσταση */
.cell-note { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cell-note--warn { color: var(--rose-ink); }

/* Πεδίο ποσού (τιμή / ελάχιστη) */
.money-input { position: relative; display: inline-flex; align-items: center; width: 96px; }
.money-input--wide { width: 160px; }
.money-input input {
  width: 100%; height: 38px; padding: 0 28px 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; text-align: right; font-feature-settings: "tnum" 1;
  transition: border-color .15s, box-shadow .15s, background-color .2s;
}
.money-input input::placeholder { color: var(--faint); font-weight: 600; }
.money-input input:hover { border-color: var(--line-strong); }
.money-input input:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.money-input__unit { position: absolute; right: 11px; font-size: 13px; font-weight: 600; color: var(--muted); pointer-events: none; }
.money-input.is-pending input { background: color-mix(in srgb, var(--lavender) 45%, var(--surface)); border-color: color-mix(in srgb, var(--lavender-ink) 35%, transparent); }
.money-input.is-warn input { background: color-mix(in srgb, var(--rose) 55%, var(--surface)); border-color: color-mix(in srgb, var(--rose-ink) 45%, transparent); }
.money-input.is-saved input { animation: saved-flash 1.2s ease-out; }
.money-input.is-error input { border-color: var(--rose-ink); }
@keyframes saved-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--mint); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* Απόδοση + εικονίδιο info */
.yield-wrap { display: inline-flex; align-items: center; gap: 6px; }
.info-tip {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  color: var(--faint); font-size: 16px; cursor: help;
  transition: color .15s, background-color .15s;
}
.info-tip:hover, .info-tip:focus-visible, .info-tip.is-active { color: var(--ink); background: var(--surface-3); outline: none; }

button.info-tip { border: 0; background: none; padding: 0; font: inherit; }

/* Φύλλο από κάτω (κινητό): ανάλυση απόδοσης */
.tip-sheet { position: fixed; inset: 0; z-index: 300; }
.tip-sheet__backdrop { position: absolute; inset: 0; background: rgba(15, 15, 18, .45); opacity: 0; transition: opacity .22s; }
.tip-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.tip-sheet.is-open .tip-sheet__backdrop { opacity: 1; }
.tip-sheet.is-open .tip-sheet__panel { transform: none; }
.tip-sheet__handle { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 4px auto 10px; }
.tip-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tip-sheet__head strong { display: block; font-size: 17px; }
.tip-sheet__sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.tip-sheet__body { display: grid; gap: 2px; }
.tip-sheet__row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 2px; font-size: 14.5px; color: var(--ink-2); border-bottom: 1px dashed var(--line); }
.tip-sheet__row strong { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tip-sheet__row.is-total { border-bottom: 0; font-weight: 800; color: var(--ink); font-size: 15.5px; }
.tip-sheet__row.is-total strong { font-weight: 800; }
.tip-sheet__row.is-profit strong { color: var(--mint-ink); }
.tip-sheet__sep { border: 0; height: 1px; background: var(--line); margin: 6px 0; }

/* Tooltip (ένα για όλη τη σελίδα, το τοποθετεί το app.js) */
.tooltip {
  position: fixed; z-index: 200; max-width: 260px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--dark); color: var(--on-dark);
  font-size: 12.5px; font-weight: 600; line-height: 1.55; white-space: pre-line;
  box-shadow: var(--shadow-md); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tooltip.is-visible { opacity: 1; transform: none; }

.yield { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.yield.is-neg { color: var(--rose-ink); }

/* Διακόπτης αυτόματης τιμολόγησης (μόνο εικαστικό προς το παρόν) */
.icon-btn--bot.is-on { background: var(--mint); color: var(--pill-ink); }
.icon-btn--bot.is-on:hover { background: color-mix(in srgb, var(--mint) 80%, var(--pill-ink)); }
/* Αυτόματη αύξηση τιμής: λεβάντα όταν είναι ενεργή · αχνή όσο το bot του προϊόντος είναι σβηστό */
.icon-btn--raise.is-on { background: var(--lavender); color: var(--pill-ink); }
.icon-btn--raise.is-on:hover { background: color-mix(in srgb, var(--lavender) 80%, var(--pill-ink)); }
.icon-btn--raise.is-inactive { opacity: .35; }
.icon-btn--raise.is-inactive.is-on { background: transparent; color: var(--lavender-ink); }

/* Εισαγωγή */
.dropzone--lg { padding: 30px 16px; }
.import-kinds { display: grid; gap: 10px; }
.import-kind { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.import-kind strong { display: block; font-size: 14px; }
.import-kind span:not(.chip-icon) { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.import-kind .chip-icon { width: 34px; height: 34px; font-size: 16px; }
.import-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.import-rules li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.import-rules .chip-icon { width: 32px; height: 32px; font-size: 15px; }

.cell-product { min-width: 260px; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.product { display: flex; align-items: center; gap: 14px; min-width: 0; }
.product__thumb { position: relative; width: 58px; height: 58px; flex: none; }
.product__thumb-link {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 13px; overflow: hidden;
  background: #fff; color: #46454b;            /* πάντα λευκό, και στο σκοτεινό θέμα */
  border: 1px solid var(--line);
  font-size: 19px; font-weight: 800; text-decoration: none;
}
.product__thumb img {
  position: absolute; inset: 6px;               /* εσωτερικό κενό γύρω από την εικόνα */
  width: calc(100% - 12px); height: calc(100% - 12px);
  object-fit: contain; background: #fff;
}
a.product__thumb-link { transition: box-shadow .15s, transform .15s; }
a.product__thumb-link:hover { box-shadow: 0 0 0 3px var(--line-strong); }
.thumb-refresh {
  position: absolute; right: -7px; bottom: -7px; z-index: 2;
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
  border: 2px solid var(--surface); background: var(--dark); color: var(--on-dark);
  cursor: pointer; opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s;
}
.product__thumb:hover .thumb-refresh, .thumb-refresh:focus-visible { opacity: 1; transform: none; }

.product__body { min-width: 0; }
.product__name {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--ink); text-decoration: none;
}
a.product__name:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.uid { color: var(--muted); font-weight: 600; }
.meta-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; }
.meta-link .ph { font-size: 13px; }
.meta-link:hover { color: var(--ink); }
.you { font-weight: 500; color: var(--faint); }

.viewed-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 3px 0 9px; border-radius: 999px;
  background: var(--peach); color: var(--pill-ink);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.viewed-chip > .ph { font-size: 12px; }
.viewed-chip__x {
  width: 19px; height: 19px; padding: 0; border: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: inherit; font-size: 11px; opacity: .55; cursor: pointer;
}
.viewed-chip__x:hover { opacity: 1; background: color-mix(in srgb, var(--pill-ink) 12%, transparent); }
.main-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.main-chip .ph { font-size: 12px; }
.main-chip.is-us { background: var(--mint); color: var(--pill-ink); }
.auto-note {
  flex-basis: 100%; display: flex; align-items: flex-start; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--lavender-ink); line-height: 1.4;
}
.auto-note .ph { font-size: 13px; margin-top: 1px; flex: none; }

.paused-note { font-size: 12px; color: var(--lavender-ink); font-weight: 600; }

/* Κενή κατάσταση */
.empty { padding: 60px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; border-top: 1px solid var(--line); }
.empty__icon { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 6px; display: grid; place-items: center; font-size: 26px; background: var(--surface-3); color: var(--muted); }
.empty h2 { font-size: 17px; font-weight: 800; }
.empty p { color: var(--muted); max-width: 44ch; }
.empty__actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }

/* Σελιδοποίηση */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; padding: 10px 18px 10px 22px; border-top: 1px solid var(--line); }
.pager__info { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pager__nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.pager__compact { display: none; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0 8px; white-space: nowrap; }
.pager__btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  text-decoration: none; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.pager__btn:hover { background: var(--surface-3); }
.pager__btn[aria-current="page"] { background: var(--dark); color: var(--on-dark); }
.pager__btn[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.pager__gap { color: var(--faint); padding: 0 2px; }

/* Ιστορικό αλλαγών */
.segmented.segmented--inline { margin: 0; }
.segmented--inline a[role="tab"] {
  display: inline-flex; align-items: center; text-decoration: none;
  color: var(--muted); font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
}
.segmented--inline a[role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.history { border-top: 1px solid var(--line); }
.history__day {
  padding: 10px 22px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.history__row {
  display: grid; grid-template-columns: 52px auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
}
.history__row:last-child { border-bottom: 0; }
.history__time { font-size: 13.5px; font-weight: 700; color: var(--ink-2); font-feature-settings: "tnum" 1; }
.history__icon { width: 34px; height: 34px; font-size: 16px; }
.history__product { min-width: 0; }
.product__thumb--sm { width: 44px; height: 44px; }
.product__thumb--sm .product__thumb-link { border-radius: 11px; font-size: 16px; }
.product__thumb--sm img { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
.history__change { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }

/* Ελάχιστη: πεδίο + ✏️ κόστους */
.min-wrap { display: flex; align-items: center; gap: 2px; }
.icon-btn--xs { width: 28px; height: 28px; font-size: 15px; }
.icon-btn--xs.has-cost { color: var(--mint-ink); }
.icon-btn--xs.has-cost:hover { background: var(--mint); color: var(--pill-ink); }
.min-source { color: var(--faint); }
.min-source .is-manual { color: var(--lavender-ink); }

/* Popup κόστους */
.dialog__sub { margin-top: 3px; font-size: 13px; color: var(--muted); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-preview { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.cost-preview__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.cost-preview__row strong { font-weight: 800; color: var(--ink); white-space: nowrap; }
.cost-preview__row--main { padding-top: 8px; border-top: 1px dashed var(--line-strong); font-size: 15px; }
.cost-preview__row--main strong { font-size: 18px; }
.cost-preview__note { font-size: 12.5px; color: var(--muted); }

/* =====================================================================
   Επισκόπηση
===================================================================== */
/* Παλέτα γραφημάτων: τα ίδια 4 χρώματα του site, σε «μεσαίο» τόνο ώστε να διαβάζονται ως γεμίσματα */
:root {
  --c-lav: #8f7ff0;  --c-lav-deep: #6553d6;  --c-mint: #5fc697;  --c-mint-deep: #2f9c6c;
  --c-rose: #ee88ad; --c-butter: #efc55a;
}
[data-theme="dark"] {
  --c-lav: #a798f7;  --c-lav-deep: #8a78f2;  --c-mint: #6fd3a5;  --c-mint-deep: #44bc88;
  --c-rose: #f39cbd; --c-butter: #f3cf70;
}
.kpis { display: grid; grid-template-columns: 1.15fr 1.25fr 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px 16px; min-height: 0; text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.kpi:hover, .kpi__half:hover { transform: translateY(-2px); }
a.kpi:hover { box-shadow: var(--shadow-md); }
.kpi__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi__label .ph { font-size: 15px; }
.kpi__value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); position: relative; z-index: 1; }
.kpi__value small { font-size: .5em; font-weight: 700; margin-left: 2px; color: var(--muted); }
.kpi__value--visible { color: var(--mint-ink); }
.kpi__value--hidden  { color: var(--rose-ink); }
.kpi__sub { font-size: 12px; color: var(--muted); font-weight: 600; position: relative; z-index: 1; }
.kpi__delta { font-size: 11.5px; font-weight: 800; color: var(--muted); position: relative; z-index: 1; }
.kpi__delta.is-up   { color: var(--mint-ink); }
.kpi__delta.is-down { color: var(--rose-ink); }
.kpi__link { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--lavender-ink); text-decoration: none; position: relative; z-index: 1; }
.kpi__spark { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; pointer-events: none; }
.kpi--accent { padding-bottom: 54px; }
.kpi--accent { background: linear-gradient(160deg, color-mix(in srgb, var(--c-lav) 13%, var(--surface)) 0%, var(--surface) 72%); }
.kpi--split { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 0; padding: 0; }
.kpi__half { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 12px; text-decoration: none; color: inherit; position: relative; z-index: 1; transition: transform .2s ease; }
.kpi__ratio {
  grid-column: 1 / -1; display: flex; gap: 4px; height: 8px; margin: 0 18px 18px;
  border-radius: 999px; overflow: hidden; background: var(--surface-3);
}
.kpi__ratio-seg { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.kpi__ratio-seg--visible { background: var(--c-mint); }
.kpi__ratio-seg--hidden  { background: var(--c-rose); }
.kpi__half + .kpi__half { border-left: 1px dashed var(--line-strong); }
.kpi__donut-row { display: flex; align-items: center; gap: 16px; }
.kpi__donut { position: relative; width: 104px; height: 104px; flex: none; }
.kpi__donut-total {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
}
.kpi__legend { display: grid; gap: 8px; font-size: 12.5px; min-width: 0; }
.kpi__legend a { display: flex; align-items: center; gap: 7px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.kpi__legend strong { font-weight: 800; color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot--rose { background: var(--c-rose); }
.dot--mint { background: var(--c-mint); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 28px; }
.chart-card { padding: 18px 20px 12px; min-width: 0; }
.chart-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.chart-card__note { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: 12.5px; color: var(--muted); }
.chart { min-height: 270px; margin: 0 -6px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 2px; }
.chart-legend__item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.chart-legend__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 240px; padding: 0 20px; text-align: center; font-size: 13px; color: var(--muted);
}
.chart-empty .ph { font-size: 28px; color: var(--faint); }
/* tooltip των γραφημάτων στο ύφος της εφαρμογής */
.apexcharts-tooltip { border-radius: 12px !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-md) !important; font-family: var(--font) !important; }
.apexcharts-tooltip-title { font-weight: 800 !important; font-family: var(--font) !important; }
.segmented--sm button[role="tab"] { padding: 6px 11px; font-size: 12.5px; font-weight: 700; border: 0; background: none; color: var(--muted); border-radius: 999px; cursor: pointer; font-family: inherit; }
.segmented--sm button[role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.bot-panel { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.bot-panel__status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.bot-panel__status strong { display: block; font-size: 14px; }
.bot-panel__status span { font-size: 12.5px; color: var(--muted); }
.bot-panel__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--butter-ink); flex: none; }
.bot-panel__status.bot-status--on .bot-panel__dot { background: var(--mint-ink); animation: pulse 2s infinite; }
.bot-panel__rows { display: grid; gap: 0; margin: 0; }
.bot-panel__rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.bot-panel__rows > div:last-child { border-bottom: 0; }
.bot-panel__rows dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.bot-panel__rows dd { margin: 0; font-size: 13.5px; text-align: right; }
.bot-panel__rows .is-bad { color: var(--rose-ink); }

.dash-section-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.attention { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.att { display: flex; flex-direction: column; padding: 16px 16px 12px; min-width: 0; }
.att__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.att__head .chip-icon { width: 36px; height: 36px; font-size: 17px; flex: none; }
.att__title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.att__title strong { font-size: 14.5px; }
.att__title span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.att__count { font-size: 20px; font-weight: 800; color: var(--ink); }
.att__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.att__list > li { min-width: 0; }
.att__item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.att__item:hover { background: var(--surface-3); }
.att__item .product__thumb--sm { width: 36px; height: 36px; }
.att__name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att__figure { display: grid; flex: none; text-align: right; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.att__figure small { font-size: 11px; font-weight: 600; color: var(--muted); }
.att__more { margin-top: auto; padding: 10px 6px 2px; font-size: 12.5px; font-weight: 700; color: var(--lavender-ink); text-decoration: none; }
.att__empty { display: flex; align-items: center; gap: 6px; margin: auto 0; padding: 18px 4px; font-size: 13px; color: var(--muted); }
.att__empty .ph { color: var(--mint-ink); font-size: 18px; }
.att__missing { display: grid; gap: 10px; margin-top: 4px; }
.att__missing a { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 600; transition: background-color .15s; }
.att__missing a:hover { background: var(--surface-3); }
.att__missing strong { font-size: 22px; font-weight: 800; color: var(--ink); }

/* εμφάνιση με απαλή κίνηση */
.kpi, .chart-card, .att { animation: dash-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.kpis > :nth-child(2), .dash-grid > :nth-child(2), .attention > :nth-child(2) { animation-delay: .06s; }
.kpis > :nth-child(3), .dash-grid > :nth-child(3), .attention > :nth-child(3) { animation-delay: .12s; }
.kpis > :nth-child(4), .dash-grid > :nth-child(4), .attention > :nth-child(4) { animation-delay: .18s; }
@keyframes dash-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kpi, .chart-card, .att { animation: none; } }

@media (max-width: 1280px) {
  .pd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attention { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .kpis, .attention { grid-template-columns: 1fr; gap: 12px; }
  .kpi { min-height: 0; }
  .kpi__value { font-size: 28px; }
  .kpi--accent { padding-bottom: 46px; }
  .kpi__spark { height: 40px; }
  .chart-card__head { flex-direction: column; }
  .chart { min-height: 240px; }
}

/* Πάνελ «Bot & proxy» από τα δεξιά (off-canvas) */
.drawer { position: fixed; inset: 0; z-index: 250; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(15, 15, 18, .38); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--bg);
  box-shadow: -18px 0 50px -20px rgba(0, 0, 0, .35);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.drawer__head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.drawer__sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.drawer__body { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.drawer__loading { display: flex; align-items: center; gap: 8px; padding: 30px 6px; color: var(--muted); font-size: 13.5px; }
.drawer__loading .ph { animation: spin 1s linear infinite; }
body.drawer-open { overflow: hidden; }

.dsec { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.dsec__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dsec__head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.dsec__head h3 span { font-weight: 600; color: var(--muted); font-size: 13px; }
.dsec__status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.dsec__status strong { display: block; font-size: 14.5px; }
.dsec__status span { font-size: 12.5px; color: var(--muted); }
.dsec__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--butter-ink); flex: none; }
.dsec__status.bot-status--on .dsec__dot { background: var(--mint-ink); animation: pulse 2s infinite; }
.dsec__link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--lavender-ink); text-decoration: none; }
.dsec__link:hover { text-decoration: underline; }
.dsec__chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.dsec__chart-head strong { font-size: 13.5px; }
.dsec__chart { min-height: 190px; margin: 0 -6px; }
.dsec__note { margin: 0; font-size: 12px; color: var(--muted); }
.dsec--hint { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.dsec--hint strong { display: block; font-size: 14px; margin-bottom: 2px; }
.dsec--hint span:not(.chip-icon) { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; }

/* Επισκόπηση: υπόλοιπο proxy (Evomi) */
.proxy-card { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; }
.proxy-card__balance { display: grid; gap: 6px; justify-items: start; padding: 4px 0 6px; }
.proxy-card__value { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.proxy-card__value small { font-size: .42em; font-weight: 700; margin-left: 4px; color: var(--muted); }
.proxy-card__days { font-size: 13px; color: var(--muted); font-weight: 600; }
.proxy-card__days b { color: var(--ink); }
.proxy-card--warn { background: linear-gradient(160deg, color-mix(in srgb, var(--c-butter) 16%, var(--surface)) 0%, var(--surface) 70%); }
.proxy-card--bad  { background: linear-gradient(160deg, color-mix(in srgb, var(--c-rose) 18%, var(--surface)) 0%, var(--surface) 70%); }
.proxy-card--bad .proxy-card__value { color: var(--rose-ink); }

/* Αναφορά εισαγωγής κόστους */
.report-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.report-sum__item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 600; border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.report-sum__item:hover { transform: translateY(-1px); }
.report-sum__item strong { display: block; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.report-sum__item.is-active { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.report-row { grid-template-columns: minmax(0, 1fr) auto; }
.report-row:has(> .history__icon) { grid-template-columns: auto minmax(0, 1fr) auto; }
.report-row__figures { display: grid; gap: 3px; justify-items: end; white-space: nowrap; }
.report-row__cost { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.report-row__min { font-size: 12px; font-weight: 600; color: var(--muted); }
.report-row__file { display: inline-flex; align-items: center; gap: 4px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); }

.turnstile { min-height: 65px; display: flex; justify-content: center; }

/* Σελίδα ρυθμίσεων: πλήρες πλάτος, κάθε ρύθμιση σε δική της γραμμή (εξήγηση αριστερά · πεδίο δεξιά) */
.settings-card { display: grid; gap: 0; padding: 0; margin-bottom: 18px; overflow: hidden; }
.settings-card__head { padding: 20px 26px 16px; border-bottom: 1px solid var(--line); }
.settings-card__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 26px; background: var(--surface-2); border-top: 1px solid var(--line); }
.set-row { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); gap: 28px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.set-row:last-of-type { border-bottom: 0; }
.set-row__info h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 800; }
.set-row__info p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.set-row__info code { font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
.set-row__field { display: grid; gap: 12px; align-content: start; max-width: 620px; }
.set-row__field .logo-upload { max-width: 340px; }
/* UID: πατιέται → αναζήτηση για αυτό το UID */
.uid--link { text-decoration: none; color: inherit; border-radius: 6px; padding: 0 3px; margin: 0 -3px; transition: background-color .15s, color .15s; }
.uid--link:hover { background: var(--surface-3); color: var(--ink); }
.input--short { max-width: 220px; }
/* Πεδίο αριθμού με μονάδα ΔΙΠΛΑ του (για μονάδες μεγαλύτερες από «€» / «%») */
.unit-field { display: flex; align-items: center; gap: 10px; }
.unit-field .input { width: 120px; flex: none; }
.unit-field input { text-align: right; font-weight: 700; }
.unit-field__unit { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.inline-field { display: flex; gap: 10px; align-items: center; }
.inline-field .input { flex: 1; }
.field__help--warn { color: var(--rose-ink); }
.cron-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 700; }
.cron-status span { width: 10px; height: 10px; border-radius: 50%; background: var(--rose-ink); }
.cron-status.is-ok span { background: var(--mint-ink); animation: pulse 2s infinite; }
.cron-status.is-bad { color: var(--rose-ink); }
.settings-card--test .set-row { border-bottom: 0; }
/* Ο λογαριασμός μου: οι δύο φόρμες σε πλήρες πλάτος */
.settings-card > .settings-block { padding: 22px 26px; }
.settings-card > .settings-block + .settings-block { border-top: 1px solid var(--line); }
.settings-card .settings-block__foot { display: flex; justify-content: flex-end; }

/* Ιστορικό τιμών */
.price-diff { min-width: 58px; height: 24px; padding: 0 9px; border-radius: 999px; display: inline-grid; place-items: center;
              font-size: 12px; font-weight: 800; margin-left: 6px; color: var(--pill-ink); }
.price-diff.is-down { background: var(--rose); }
.price-diff.is-up   { background: var(--mint); }

/* Ιστορικό προϊόντων (ενιαίο) */
.chip-icon--peach   { --c: var(--peach); --ci: var(--peach-ink); background: var(--peach); color: var(--peach-ink); }
.chip-icon--neutral { --c: var(--surface-3); --ci: var(--ink-2); background: var(--surface-3); color: var(--ink-2); }
.segmented--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented--scroll::-webkit-scrollbar { display: none; }
.segmented--scroll a[role="tab"] { flex: none; white-space: nowrap; gap: 6px; }
.ev-title { font-weight: 700; color: var(--ink-2); }
.ev-note { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.ev-text { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ev-text--strong { color: var(--ink); font-weight: 700; }
.ev-row--compact { grid-template-columns: 52px auto minmax(0, 1fr) auto; }
.ev-body { display: grid; gap: 2px; min-width: 0; }
.ev-body strong { font-size: 14px; }
.ev-body span { font-size: 12.5px; color: var(--muted); }

/* Φίλτρα ιστορικού (κοινά: «Ιστορικό προϊόντων» & καρτέλα προϊόντος) */
.evf { padding: 14px 22px; border-bottom: 1px solid var(--line); }

/* Desktop: γρήγορη επιλογή — όλες οι ομάδες ίδιο «segmented» στυλ */
.evf__desk { display: grid; gap: 10px; }
.evf__line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.evf__seg {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 4px;
  border-radius: 999px; background: var(--surface-3);
  overflow-x: auto; scrollbar-width: none;
}
.evf__seg::-webkit-scrollbar { display: none; }
.evf__seg--types { justify-self: start; }
.evf__seg--period { margin-left: auto; }
.evf__label { display: inline-flex; align-items: center; padding: 0 8px 0 10px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.evf__label .ph { font-size: 15px; }
.evf__opt {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap;
  font-size: 13px; font-weight: 700; transition: background-color .15s, color .15s;
}
.evf__opt .ph { font-size: 15px; }
.evf__opt:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.evf__opt[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
/* στον ενεργό τύπο, το εικονίδιο παίρνει το χρώμα του τύπου */
.evf__opt--rose[aria-current="true"] .ph     { color: var(--rose-ink); }
.evf__opt--lavender[aria-current="true"] .ph { color: var(--lavender-ink); }
.evf__opt--butter[aria-current="true"] .ph   { color: var(--butter-ink); }
.evf__opt--mint[aria-current="true"] .ph     { color: var(--mint-ink); }
.evf__opt--peach[aria-current="true"] .ph    { color: var(--peach-ink); }
[data-theme="dark"] .evf__opt[aria-current="true"] { background: var(--line-strong); }

/* Ανανέωση με ajax: η λίστα «σβήνει» λίγο μέχρι να έρθουν τα νέα */
[data-ev-region] .history, [data-ev-region] .empty, [data-ev-region] .pager { transition: opacity .15s; }
[data-ev-region].is-loading .history, [data-ev-region].is-loading .empty, [data-ev-region].is-loading .pager { opacity: .45; pointer-events: none; }
[data-ev-region].is-loading .evf__btn .ph { animation: spin .8s linear infinite; }

/* Καρτέλα προϊόντος */
.pd-head { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin: 12px 0 16px; }
.pd-head__img { position: relative; width: 84px; height: 84px; flex: none; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pd-head__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pd-head__img .product__initial { font-size: 26px; }
.pd-head__body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.pd-head__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.pd-head__status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pd-auto { gap: 5px; }
.pd-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.pd-kpi { display: grid; gap: 4px; padding: 14px 16px; }
.pd-kpi span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pd-kpi strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pd-kpi small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pd-kpi--accent { background: linear-gradient(160deg, color-mix(in srgb, var(--c-mint) 16%, var(--surface)) 0%, var(--surface) 75%); }
.chart-legend__dot--line { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--c-mint-deep); }
.vis-strip { margin: 10px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.vis-strip__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vis-strip__head strong { font-size: 14px; }
.vis-strip__head span { font-size: 13px; color: var(--muted); }
.vis-strip__head b { color: var(--ink); }
.vis-strip__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.vis-seg { display: block; height: 100%; min-width: 2px; }
.vis-seg--on   { background: var(--c-mint); }
.vis-seg--off  { background: var(--c-rose); }
.vis-seg--none { background: repeating-linear-gradient(45deg, var(--surface-3) 0 5px, transparent 5px 10px); }
.vis-strip__axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pd-timeline { margin-top: 16px; }

/* Ιστορικό ανταγωνισμού */
.comp-count { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.comp-card { margin-top: 18px; }
.comp-card__empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 18px 22px 22px; font-size: 13.5px; color: var(--muted); }
.comp-row { grid-template-columns: 52px auto minmax(0, 1fr); }
.comp-row__text { display: grid; gap: 2px; font-size: 14px; }
.comp-row__text span { font-size: 12.5px; color: var(--muted); }

/* Skroutz API & Bot */
.segmented.segmented--page { margin: 0 0 18px; }
.segmented--page a[role="tab"] { gap: 7px; }
.activity__row { grid-template-columns: 52px auto minmax(0, 1fr) auto; }
.activity__hour { font-size: 12px; color: var(--muted); font-weight: 600; }
.activity__msg { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity__price { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.activity__price--new { color: var(--ink); font-weight: 800; }
.history__change .pill { margin-left: 6px; }

.botlog { display: grid; gap: 14px; }
.botlog__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.botlog__head::-webkit-details-marker { display: none; }
.botlog__title { flex: 1; min-width: 0; display: grid; }
.botlog__title strong { font-size: 15px; }
.botlog__title span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botlog__caret { color: var(--muted); transition: transform .15s; }
.botlog__cycle[open] .botlog__caret { transform: rotate(180deg); }
.botlog__lines {
  margin: 0; padding: 16px 20px; max-height: 520px; overflow: auto;
  background: #1c1c1e; color: #d9d9de; border-top: 1px solid var(--line);
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}
.botlog__lines .is-warn { color: #ffb3c7; }
.botlog__lines .is-ok   { color: #9fe0bd; }
.botlog__lines .is-info { color: #c9bff5; }

/* Σύνδεσμος κωδικού (σελίδα χρηστών) */
.setup-link {
  display: grid; grid-template-columns: auto 1fr minmax(240px, 380px) auto; align-items: center; gap: 12px 16px;
  padding: 16px 18px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.setup-link__text strong { display: block; font-size: 14.5px; }
.setup-link__text span { display: block; font-size: 13px; color: var(--muted); }
.setup-link__field input { min-height: 40px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); }

/* 6. DIALOGS ---------------------------------------------------------- */
.dialog {
  width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--line); border-radius: 24px;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog--wide { width: min(740px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(20, 18, 14, .45); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog__box { display: flex; flex-direction: column; max-height: inherit; }
.dialog__box > form { display: flex; flex-direction: column; min-height: 0; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.dialog__head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.dialog__body { padding: 6px 22px 22px; overflow-y: auto; display: grid; gap: 18px; }
.dialog__foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 24px 24px;
}

.segmented { display: inline-flex; gap: 2px; margin: 0 22px 16px; padding: 4px; background: var(--surface-3); border-radius: 999px; align-self: flex-start; }
.segmented [role="tab"] {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.segmented [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.settings-block { display: grid; gap: 16px; }
.settings-block + .settings-block { padding-top: 20px; border-top: 1px solid var(--line); }
.settings-block__title { font-size: 15px; font-weight: 800; }
.settings-block__foot { display: flex; justify-content: flex-end; }

.profile-edit { display: flex; align-items: center; gap: 22px; }
.profile-edit__fields { flex: 1; display: grid; gap: 10px; }
.avatar-upload { position: relative; flex: none; cursor: pointer; border-radius: 50%; }
.avatar-upload img, .avatar-upload .avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.avatar-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-upload__badge {
  position: absolute; right: -2px; bottom: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px;
  background: var(--dark); color: var(--on-dark); border: 3px solid var(--surface);
  pointer-events: none;
}

.logo-upload {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 100px; padding: 12px; border-radius: var(--r);
  border: 1.5px dashed var(--line-strong); background: var(--surface-2);
  cursor: pointer; overflow: hidden;
}
.logo-upload img { max-height: 70px; max-width: 90%; object-fit: contain; border-radius: 10px; }
.logo-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.logo-upload__empty { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.logo-upload:hover { border-color: var(--ink); }

/* CSV */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; counter-reset: step; }
.step { counter-increment: step; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.step form { display: grid; gap: 12px; }
.step__title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.step__title::before {
  content: counter(step);
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--dark); color: var(--on-dark); font-size: 12.5px;
}
.step__text { font-size: 13px; color: var(--muted); line-height: 1.55; min-height: 60px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 12px; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r);
  background: var(--surface); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); }
.dropzone:focus-within { box-shadow: var(--ring); }
.dropzone__icon { font-size: 24px; color: var(--muted); }
.dropzone__text { font-size: 13px; color: var(--muted); word-break: break-all; }
.dropzone.has-file { border-style: solid; background: color-mix(in srgb, var(--mint) 35%, var(--surface)); }
.dropzone.has-file .dropzone__icon, .dropzone.has-file .dropzone__text { color: var(--ink); font-weight: 700; }

/* 7. AUTH ------------------------------------------------------------- */
.auth { min-height: 100vh; display: flex; background: var(--bg); }
.auth__theme { position: fixed; top: 18px; right: 18px; z-index: 5; }
.auth__wrap { width: 100%; max-width: 440px; margin: auto; padding: 48px 20px; display: grid; gap: 24px; justify-items: center; }
.brand--auth .brand__mark { width: 42px; height: 42px; font-size: 22px; border-radius: 13px; }
.brand--auth .brand__name { font-size: 21px; }
.brand--auth .brand__logo { max-height: 84px; max-width: 280px; border-radius: 16px; }
.auth__card {
  width: 100%; padding: 34px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow-md);
}
.auth__title { font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.auth__lead { margin: 8px 0 26px; color: var(--muted); }
.auth__switch { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.auth__switch .link .ph { margin-right: 4px; }
.auth__resend {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}

/* 8. RESPONSIVE ------------------------------------------------------- */
@media (max-width: 1280px) {
  .col-time { width: 140px; }
  .col-status, .col-role { width: 140px; }
  .table td, .table th { padding-left: 12px; padding-right: 12px; }
}

/* Tablet & κινητό: το sidebar γίνεται συρτάρι */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 80;
    width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar-open .sidebar { transform: none; }
  .sidebar .sidebar__close { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(20, 18, 14, .4); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sidebar-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar .topbar__menu { display: inline-grid; }
  .topbar .topbar__collapse { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .page { padding: 22px 18px 48px; }
}

@media (max-width: 900px) {
  .overview { grid-template-columns: auto minmax(0, 1fr); }
  .overview__cta { grid-column: 1 / -1; justify-self: start; }
  .setup-link { grid-template-columns: auto 1fr; }
  .setup-link__field, .setup-link .btn { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  :root { --topbar-h: 62px; }
  .user-chip__text, .user-chip__caret, .search__kbd { display: none; }
  .user-chip { padding: 0; }
  .round-btn { width: 38px; height: 38px; font-size: 17px; }
  .search input { height: 40px; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-head__title { font-size: 23px; }

  .overview { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .overview__rate { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .overview__number { font-size: 40px; }
  .overview__caption { max-width: none; }
  .overview__cta { width: 100%; }
  .legend__total { margin-left: 0; width: 100%; }

  /* ---- Πίνακες → κάρτες ---- */
  .card__head { padding: 16px; }

  /* Ταξινόμηση: στρογγυλό κουμπί-εικονίδιο δίπλα στον τίτλο (όχι σε δική της γραμμή).
     Το <select> μένει από κάτω αόρατο, οπότε το πάτημα ανοίγει την κανονική λίστα του κινητού. */
  .table-card .card__head { flex-wrap: nowrap; align-items: center; }
  .table-card .card__head > div:first-child { min-width: 0; }
  .card__tools .select--pill { width: 42px; height: 42px; flex: none; }
  .card__tools .select--pill select {
    width: 42px; height: 42px; min-height: 42px; padding: 0;
    border-radius: 50%; color: transparent; text-indent: -999px; cursor: pointer;
  }
  .card__tools .select--pill select option { color: var(--ink); text-indent: 0; }
  .card__tools .select--pill .select__icon { left: 50%; transform: translateX(-50%); font-size: 19px; color: var(--ink-2); }
  .card__tools .select--pill::after { display: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: auto; }
  .table tr {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px;
    padding: 16px; border-top: 1px solid var(--line);
  }
  /* μηδενίζει και το padding του πρώτου/τελευταίου κελιού του desktop (γι' αυτό η εικόνα δεν κολλούσε αριστερά) */
  .table td, .table td:first-child, .table td:last-child { padding: 0; border: 0; background: none !important; }
  .row--hidden { background: var(--row-hidden); }
  .row--viewed { background: var(--row-viewed) !important; }
  .cell-product { grid-column: 1 / -1; min-width: 0; }
  .col-status, .col-role, .col-time, .col-actions, .col-price, .col-yield, .col-min { width: auto; }
  .cell-note { white-space: normal; }

  /* Σελίδα Χρήστες: απλή διάταξη */
  .table-card .table tr:not([data-id]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table-card .table tr:not([data-id]) .col-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

  /* ---- Κάρτα προϊόντος ----
     γρ.1  [εικόνα]  Τίτλος σε 2 γραμμές
                     #UID · EAN · Skroutz
     γρ.2  [Κατάσταση] Πριν 1 λεπ.    [bot ↻ ❚❚ 🗑]
           ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
     γρ.3  Τιμή        Απόδοση        Ελάχιστη          */
  .table-card tr[data-id] { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 8px; padding: 16px; }

  .table-card tr[data-id] .cell-product { grid-column: 1 / -1; }
  .table-card tr[data-id] .product { align-items: flex-start; gap: 14px; }
  .table-card tr[data-id] .product__thumb { width: 66px; height: 66px; }
  .table-card tr[data-id] .product__name { -webkit-line-clamp: 2; font-size: 15px; line-height: 1.3; }
  .table-card tr[data-id] .product__meta { gap: 2px 10px; margin-top: 5px; font-size: 12px; }
  .thumb-refresh { display: none; }

  .table-card tr[data-id] .cell-product { grid-row: 1; }
  /* Κατάσταση & κουμπιά μοιράζονται όλη τη γραμμή: αριστερά κατάσταση + ώρα, δεξιά τα κουμπιά */
  .table-card tr[data-id] .col-status  { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 8px;
                                         min-width: 0; padding-right: 144px !important; }
  .table-card tr[data-id] .col-time    { display: none; }   /* η ώρα φαίνεται δίπλα στην κατάσταση */
  .table-card tr[data-id] .history-link--mobile { display: inline-grid; flex: none; margin-left: -4px; }
  .table-card tr[data-id] .status-time { display: block; min-width: 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .table-card tr[data-id] .col-actions { grid-column: 1 / -1; grid-row: 2; justify-self: end; align-self: center;
                                         display: flex; margin-right: -6px; }
  .table-card tr[data-id] .pill { height: 26px; padding: 0 10px; font-size: 12px; flex: none; }
  .table-card tr[data-id] .icon-btn { width: 28px; height: 32px; font-size: 16.5px; }

  /* Τιμές σε δικό τους «ράφι», με διακριτικές ετικέτες */
  .table-card tr[data-id] .col-price { grid-column: 1 / 5;  grid-row: 3; }
  .table-card tr[data-id] .col-yield { grid-column: 5 / 9;  grid-row: 3; }
  .table-card tr[data-id] .col-min   { grid-column: 9 / -1; grid-row: 3; }
  .table-card tr[data-id] .col-price,
  .table-card tr[data-id] .col-yield,
  .table-card tr[data-id] .col-min   { align-self: start; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
  .table-card tr[data-id] .col-price::before,
  .table-card tr[data-id] .col-yield::before,
  .table-card tr[data-id] .col-min::before {
    content: attr(data-label); display: block; margin-bottom: 5px;
    font-size: 12px; font-weight: 600; color: var(--muted);
  }
  .table-card tr[data-id] .money-input { width: 100%; }
  .table-card tr[data-id] .money-input input { height: 36px; padding-left: 8px; }
  .table-card tr[data-id] .yield-wrap { min-height: 36px; }
  .table-card tr[data-id] .yield { font-size: 15px; }
  .table-card tr[data-id] .cell-note { font-size: 11.5px; }

  /* Ιστορικό στο κινητό: ώρα & εικονίδιο αριστερά, προϊόν, και από κάτω η αλλαγή */
  .table-card .card__head:has(.segmented--inline) { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  .card__head .segmented--inline { width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .card__head .segmented--inline::-webkit-scrollbar { display: none; }
  .segmented--inline a[role="tab"] { flex: none; white-space: nowrap; padding: 8px 11px; }
  .segmented--inline a[role="tab"] { padding: 8px 10px; font-size: 12.5px; }
  .history__day { padding: 10px 16px; }
  .history__row { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 14px 16px; }
  .history__time { grid-column: 1; grid-row: 1; }
  .history__icon { display: none; }
  .history__product { grid-column: 2; grid-row: 1; }
  .history__change { grid-column: 2; grid-row: 2; }
  .history__change .pill { height: 24px; padding: 0 10px; font-size: 11.5px; }
  .history__change { flex-wrap: wrap; }
  .comp-count { width: 100%; margin: 2px 0 0; }
  .comp-row { grid-template-columns: auto minmax(0, 1fr); }
  .comp-row .comp-row__text { grid-column: 2; }
  .table-card.comp-card .card__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ev-row--compact { grid-template-columns: auto minmax(0, 1fr); }
  .ev-row--compact .ev-body { grid-column: 2; }
  .pd-head { flex-wrap: wrap; padding: 16px; gap: 14px; }
  .pd-head__img { width: 64px; height: 64px; }
  .pd-head__title { font-size: 16.5px; }
  .pd-head__status { flex-direction: row; align-items: center; width: 100%; }
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pd-kpi--accent { grid-column: 1 / -1; }
  .pd-kpi strong { font-size: 20px; }
    .activity__row { grid-template-columns: auto minmax(0, 1fr); }
  .activity__msg { max-width: 100%; white-space: normal; }
  .segmented--page { width: 100%; justify-content: stretch; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .settings-card__head, .settings-card__foot, .settings-card > .settings-block { padding-left: 16px; padding-right: 16px; }
  .inline-field { flex-direction: column; align-items: stretch; }
  .segmented--page { overflow-x: auto; scrollbar-width: none; }
  .segmented.segmented--page a[role="tab"] { flex: none; }
  .report-sum { gap: 8px; }
  .report-sum__item { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 10px; font-size: 11px; min-width: 0; }
  .report-sum__item > span { min-width: 0; overflow-wrap: anywhere; }
  .report-sum__item .chip-icon { display: none; }
  .report-row, .report-row:has(> .history__icon) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .report-row .history__product, .report-row .report-row__figures, .report-row > .product__body, .report-row > .meta-link { grid-column: 1; grid-row: auto; }
  .report-row__figures { justify-items: start; }
  .report-row__file { display: none; }
  .segmented--page a[role="tab"] { flex: 1; justify-content: center; }
  .botlog__head { padding: 14px 16px; }
  .botlog__lines { padding: 12px 14px; font-size: 11.5px; }
  
  /* ---- Πάνω μπάρα: το θέμα πάει στο μενού του χρήστη ---- */
  .topbar .topbar__theme { display: none; }
  .menu__panel .menu__item--theme { display: flex; }

  /* ---- Κάτω μπάρα τύπου iOS: γυαλί που «αιωρείται» + απαλό fade από πίσω ---- */
  .page { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }

  .tabbar-fade {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(130px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom,
      color-mix(in srgb, var(--bg) 0%, transparent) 0%,
      color-mix(in srgb, var(--bg) 75%, transparent) 55%,
      var(--bg) 100%);
    pointer-events: none;
  }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 50;
    left: 10px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom, 0px));
    height: 60px; padding: 6px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.8);
    backdrop-filter: blur(22px) saturate(1.8);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    box-shadow:
      0 10px 30px -10px rgba(30, 24, 15, .28),
      0 2px 6px rgba(30, 24, 15, .06),
      inset 0 1px 0 color-mix(in srgb, #fff 60%, transparent);
  }
  [data-theme="dark"] .tabbar {
    background: color-mix(in srgb, var(--surface) 58%, transparent);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 12px 34px -10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .tabbar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 20px; text-decoration: none; color: var(--muted);
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s, color .2s;
  }
  .tabbar__item:active { transform: scale(.96); }
  .tabbar__item[aria-current="page"] { color: var(--on-dark); background: var(--dark); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45); }
  [data-theme="dark"] .tabbar__item[aria-current="page"] { color: #141416; background: #f2f2f4; }
  .tabbar__badge { display: none; }
  .tabbar__icon { position: relative; display: grid; place-items: center; font-size: 22px; line-height: 1; }
  .tabbar__badge {
    position: absolute; top: -7px; left: 13px;
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center;
    background: var(--rose-ink); color: #fff; border: 2px solid var(--surface);
    font-size: 10.5px; font-weight: 800; line-height: 1;
  }
  [data-theme="dark"] .tabbar__badge { background: var(--rose); color: var(--pill-ink); }

  /* Όταν είναι ανοιχτό το μενού ☰ ή ένα παράθυρο, η μπάρα δεν ενοχλεί */
  .sidebar-open .tabbar, .sidebar-open .tabbar-fade { display: none; }

  .pager { padding: 10px 14px; }
  .pager__nav .pager__btn:not(.pager__arrow), .pager__gap { display: none; }
  .pager__compact { display: inline; }

  .steps, .grid-2 { grid-template-columns: 1fr; }
  .step__text { min-height: 0; }
  .dialog__foot .btn { flex: 1; }
  .profile-edit { flex-direction: column; align-items: flex-start; }

  .auth__card { padding: 26px 20px; }
}

/* =====================================================================
   9. MOBILE WEB-APP — φίλτρα σε φύλλο, συμπαγές ιστορικό, διάλογοι από κάτω,
      PWA (safe areas), αγγίγματα ≥ 40px. Μπαίνει τελευταίο ώστε να υπερισχύει.
   ===================================================================== */

/* Φίλτρα ιστορικού: η μπάρα «Φίλτρα» και το φύλλο είναι μόνο για το κινητό */
/* Μπάρα: κουμπί «Φίλτρα» + ενεργά φίλτρα */
.evf__bar { display: none; align-items: center; gap: 8px; min-width: 0; }
.evf__btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.evf__btn .ph { font-size: 18px; }
.evf__btn.is-active { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.evf__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--on-dark); color: var(--dark); font-size: 11.5px; font-weight: 800;
}
.evf__active { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.evf__active::-webkit-scrollbar { display: none; }
.evf__pill {
  transition: background-color .15s;
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 12px;
  border-radius: 999px; background: var(--surface-3); color: var(--ink);
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.evf__pill .ph { font-size: 14px; color: var(--muted); }
.evf__pill--muted { padding-right: 12px; color: var(--muted); }
.evf__btn:hover { border-color: var(--line-strong); }
.evf__btn.is-active:hover { background: color-mix(in srgb, var(--dark) 86%, var(--bg)); }
a.evf__pill:hover { background: var(--line); }

/* Πάνελ φίλτρων: από κάτω στο κινητό, από δεξιά στο desktop */
.fsheet { position: fixed; inset: 0; z-index: 320; }
.fsheet__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, .5); opacity: 0; transition: opacity .24s; }
.fsheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; max-height: 88vh; max-height: 88dvh;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.fsheet.is-open .fsheet__backdrop { opacity: 1; }
.fsheet.is-open .fsheet__panel { transform: none; }
.fsheet__handle { flex: none; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 4px; }
.fsheet__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px 6px; }
.fsheet__head strong { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.fsheet__head-tools { display: flex; align-items: center; gap: 6px; }
.fsheet__reset { font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 8px 4px; }
.fsheet__reset:hover { color: var(--ink); }
.fsheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 8px; display: grid; gap: 18px; }
.fsheet__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.fsheet__group legend { padding: 0; margin-bottom: 9px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fsheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fsheet__opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fsheet__opt input { position: absolute; opacity: 0; pointer-events: none; }
.fsheet__opt span {
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
  font-size: 14px; font-weight: 700; color: var(--ink-2); line-height: 1.25;
  transition: background-color .15s, border-color .15s, color .15s;
}
.fsheet__opt span .ph { font-size: 18px; color: var(--muted); flex: none; }
.fsheet__opt input:checked + span { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.fsheet__opt input:checked + span .ph { color: inherit; }
.fsheet__opt input:focus-visible + span { box-shadow: var(--ring); }
.fsheet__opt:active span { transform: scale(.98); }
.fsheet__foot {
  flex: none; display: grid; gap: 10px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
}
.fsheet__foot .btn { min-height: 48px; justify-content: center; }
html.has-sheet, html.has-sheet body { overflow: hidden; }



.ph-fill { line-height: 1; }

/* Πηγή γεγονότος με εικονίδιο */
.ev-src { display: inline-flex; align-items: center; gap: 4px; }
.ev-src .ph { font-size: 13px; }

@media (max-width: 680px) {
  /* ---- Κέλυφος: PWA & safe areas (iPhone με notch / home indicator) ---- */
  html { -webkit-tap-highlight-color: transparent; }
  body { overscroll-behavior-y: none; }
  .topbar {
    height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .sidebar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .page { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); padding-top: 18px; }

  /* iOS: πεδία κάτω από 16px κάνουν zoom στη σελίδα όταν τα πατάς */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea, .search input, .money-input input { font-size: 16px; }

  /* Κάρτες λίγο πιο «εφαρμογή»: λιγότερο περίγραμμα, πιο στρογγυλές */
  .card { border-radius: 20px; }

  /* ---- Κάτω μπάρα: 5 καρτέλες με μικρή ετικέτα ---- */
  .tabbar {
    height: 64px; padding: 5px;
    transition: height .28s cubic-bezier(.2, .8, .2, 1), left .28s cubic-bezier(.2, .8, .2, 1), right .28s cubic-bezier(.2, .8, .2, 1), border-radius .28s;
  }
  .tabbar__item { gap: 2px; border-radius: 21px; transition: background-color .2s, color .2s, border-radius .28s; }
  .tabbar__icon { font-size: 21px; transition: font-size .28s; }
  .tabbar__label {
    display: block; max-width: 100%; max-height: 12px; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 10px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1;
    transition: max-height .28s cubic-bezier(.2, .8, .2, 1), opacity .18s;
  }
  /* Scroll προς τα κάτω: η μπάρα μαζεύει (μόνο εικονίδια) · προς τα πάνω: ξανανοίγει */
  .tabbar.is-compact { height: 50px; left: 34px; right: 34px; border-radius: 22px; }
  .tabbar.is-compact .tabbar__item { gap: 0; border-radius: 17px; }
  .tabbar.is-compact .tabbar__icon { font-size: 20px; }
  .tabbar.is-compact .tabbar__label { max-height: 0; opacity: 0; }
  @media (prefers-reduced-motion: reduce) { .tabbar, .tabbar__label, .tabbar__icon { transition: none; } }

  /* ---- Φίλτρα ιστορικού: κουμπί + ενεργά chips (τα tabs του desktop κρύβονται) ---- */
  .evf { padding: 10px 14px 12px; }
  .evf__desk { display: none; }
  .evf__bar { display: flex; }

  /* ---- Ιστορικό: συμπαγείς κάρτες γεγονότων ----
       [εικόνα●] Τίτλος σε 2 γραμμές                14:32
                 #UID · Αλλαγή τιμής · 🤖
                 [12,90 €] → [12,49 €] −0,41        */
  .table-card:has(.history) { overflow: clip; }
  .history__day {
    position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); z-index: 3;
    padding: 8px 16px; font-size: 11.5px;
    background: color-mix(in srgb, var(--surface-2) 90%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .history__row:not(.ev-row--compact) {
    position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 13px 16px; align-items: start;
  }
  .history__row:not(.ev-row--compact) .history__product { grid-column: 1; grid-row: 1; align-items: flex-start; gap: 12px; }
  .history__row:not(.ev-row--compact) .history__time { grid-column: 2; grid-row: 1; padding-top: 1px; font-size: 12px; font-weight: 700; color: var(--muted); }
  .history__row:not(.ev-row--compact) .history__icon {
    display: grid; position: absolute; left: 46px; top: 41px; z-index: 1;
    width: 22px; height: 22px; font-size: 12px; border: 2px solid var(--surface);
  }
  /* Dark: το σήμα πάνω στην εικόνα θέλει συμπαγές παστέλ (το διάφανο χανόταν πάνω στη φωτογραφία) */
  [data-theme="dark"] .history__row:not(.ev-row--compact) .history__icon { background: var(--c); color: var(--pill-ink); border-color: var(--surface); }
  [data-theme="dark"] .history__row:not(.ev-row--compact) .history__icon.chip-icon--neutral { background: var(--line-strong); color: var(--ink); }
  .history__row:not(.ev-row--compact) .product__name { -webkit-line-clamp: 2; font-size: 14px; line-height: 1.3; }
  .history__row:not(.ev-row--compact) .product__meta { margin-top: 3px; font-size: 12px; gap: 2px 8px; }
  .history__row .ev-src { font-size: 0; gap: 0; }            /* στο κινητό μόνο το εικονίδιο της πηγής */
  .history__row .ev-src .ph { font-size: 14px; }
  .history__row:not(.ev-row--compact) .history__change { grid-column: 1 / -1; grid-row: 2; padding-left: 56px; }
  .history__change { flex-wrap: wrap; gap: 6px; row-gap: 4px; font-size: 13px; }
  .history__change .ph-arrow-right { font-size: 12px; }
  .history__change .pill { height: 24px; padding: 0 9px; font-size: 11.5px; }
  .history__change .activity__price { font-size: 13.5px; }
  .history__change .ev-note { margin-left: 0; font-size: 11.5px; }

  /* καρτέλα προϊόντος: [εικονίδιο] τίτλος … ώρα / από κάτω η αλλαγή */
  .ev-row--compact { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; padding: 13px 16px; align-items: start; }
  .ev-row--compact .history__icon { display: grid; grid-column: 1; grid-row: 1 / span 2; }
  .ev-row--compact .ev-body { grid-column: 2; grid-row: 1; }
  .ev-row--compact .ev-body strong { font-size: 14px; }
  .ev-row--compact .ev-body span { font-size: 12px; }
  .ev-row--compact .ev-body .ev-src { font-size: 12px; gap: 4px; }   /* εδώ υπάρχει χώρος για την ετικέτα */
  .ev-row--compact .history__time { grid-column: 3; grid-row: 1; font-size: 12px; color: var(--muted); }
  .ev-row--compact .history__change { grid-column: 2 / -1; grid-row: 2; }

  /* ---- Λίστα προϊόντων: πιο άνετα κουμπιά ---- */
  .table-card tr[data-id] .col-status { padding-right: 166px !important; }
  .table-card tr[data-id] .col-actions { gap: 1px; margin-right: -4px; }
  .table-card tr[data-id] .icon-btn { width: 32px; height: 38px; font-size: 18px; border-radius: 10px; }
  .table-card tr[data-id] .money-input input { height: 40px; }
  .table-card tr[data-id] { padding: 16px 16px 14px; }

  /* ---- Διάλογοι: φύλλο από κάτω, όπως στις εφαρμογές ---- */
  .dialog, .dialog--wide {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; max-height: 92dvh;
    border: 0; border-radius: 26px 26px 0 0;
  }
  .dialog[open] { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  .dialog__box::before {
    content: ""; display: block; flex: none; width: 40px; height: 4px; margin: 10px auto 0;
    border-radius: 4px; background: var(--line-strong);
  }
  .dialog__head { padding: 12px 18px 10px; }
  .dialog__body { padding: 4px 18px 18px; }
  .dialog__foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
  .dialog__foot .btn { min-height: 48px; justify-content: center; }

  /* Πάνελ bot: από κάτω, σε όλο το πλάτος */
  .drawer__panel { top: auto; width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .drawer__head { padding-top: 18px; border-radius: 26px 26px 0 0; }
  .drawer__body { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .fsheet__panel, .fsheet__backdrop { transition: none; } }

/* Ανοιχτό φύλλο: η κάτω μπάρα κρύβεται */
html.has-sheet .tabbar, html.has-sheet .tabbar-fade { display: none; }

/* =====================================================================
   10. BACKUP (Ρυθμίσεις → Backup)
   ===================================================================== */
.bk-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; }
.bk-hero__item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 18px 20px; }
.bk-hero__item + .bk-hero__item { border-left: 1px solid var(--line); }
.bk-hero__item .chip-icon { width: 38px; height: 38px; font-size: 18px; flex: none; }
.bk-hero__item div { min-width: 0; }
.bk-hero__item span:not(.chip-icon) { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.bk-hero__item strong { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bk-run { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-alert { display: flex; align-items: center; gap: 8px; margin: 0 22px 14px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--rose) 30%, var(--surface)); font-size: 13px; color: var(--ink-2); }

.bk-list { border-top: 1px solid var(--line); }
.bk-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
}
.bk-row:last-child { border-bottom: 0; }
.bk-row__icon { width: 38px; height: 38px; font-size: 18px; }
.bk-row__main strong { display: block; font-size: 14px; font-weight: 800; }
.bk-row__date { margin-left: 6px; font-weight: 600; color: var(--muted); }
.bk-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.bk-row__actions { display: flex; align-items: center; gap: 2px; grid-column: 4; grid-row: 1; }
.bk-row__actions form { margin: 0; }
.bk-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--ink-2); }
.bk-tag--manual { background: var(--lavender); color: var(--pill-ink); }
.bk-tag--auto   { background: var(--mint); color: var(--pill-ink); }
.bk-tag--safety { background: var(--butter); color: var(--pill-ink); }
.bk-loc { display: inline-flex; align-items: center; gap: 4px; }
.bk-loc .ph { font-size: 14px; }

.bk-restore {
  grid-column: 3; grid-row: 1;
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.bk-restore:hover { background: var(--surface-3); }
.bk-restore[aria-expanded="true"] { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.bk-restore__form {
  grid-column: 2 / -1; display: grid; gap: 10px; justify-items: start; margin: 4px 0 6px;
  padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}

.bk-guide { margin: 0 22px 6px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.bk-guide summary { display: flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.bk-guide ol { margin: 12px 0 2px; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.bk-guide a { color: var(--lavender-ink); font-weight: 700; }

.bk-drive { display: grid; gap: 12px; }
.bk-drive__who { display: flex; align-items: center; gap: 12px; }
.bk-drive__who > .ph { font-size: 28px; color: var(--mint-ink); }
.bk-drive__who strong { display: block; font-size: 14.5px; }
.bk-drive__who span { display: block; font-size: 12.5px; color: var(--muted); }
.bk-usage { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.bk-usage__bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bk-usage__bar span { display: block; height: 100%; border-radius: inherit; background: var(--c-lav, var(--lavender-ink)); }

.bk-log { border-top: 1px solid var(--line); }
.bk-log__row { display: grid; grid-template-columns: auto 82px 170px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bk-log__row:last-child { border-bottom: 0; }
.bk-log__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.bk-log__dot.is-ok { background: var(--c-mint, var(--mint-ink)); }
.bk-log__dot.is-bad { background: var(--c-rose, var(--rose-ink)); }
.bk-log__when { font-weight: 700; color: var(--ink-2); }
.bk-log__what { color: var(--ink-2); font-weight: 600; }
.bk-log__msg { color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .bk-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-hero__item:nth-child(3) { border-left: 0; }
  .bk-hero__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .bk-hero { grid-template-columns: 1fr; }
  .bk-hero__item { padding: 14px 16px; }
  .bk-hero__item + .bk-hero__item { border-left: 0; border-top: 1px solid var(--line); }
  .bk-run .btn { flex: 1 1 100%; justify-content: center; min-height: 46px; }
  .bk-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 14px 16px; }
  .bk-row__actions { grid-column: 3; grid-row: 1; }
  .bk-restore { grid-column: 2 / -1; grid-row: 2; justify-self: start; height: 36px; }
  .bk-restore__form { grid-column: 1 / -1; }
  .bk-guide, .bk-alert { margin-left: 16px; margin-right: 16px; }
  .bk-log__row { grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 10px 16px; }
  .bk-log__when, .bk-log__what { grid-column: 2; }
  .bk-log__dot { grid-row: 1 / span 3; align-self: start; margin-top: 6px; }
  .bk-log__msg { grid-column: 2; }
}

/* ---------------------------------------------------------------------
   ΕΝΗΜΕΡΩΣΕΙΣ & CHANGELOG (updates.php)
   --------------------------------------------------------------------- */
/* Κάτω μέρος sidebar: μόνο η έκδοση · πάτημα → popup Changelog */
.side-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: center; }
.side-ver {
  padding: 5px 12px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.side-ver:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); border-color: var(--line); color: var(--ink); }
[data-sidebar="collapsed"] .side-ver { padding: 4px 6px; font-size: 10.5px; }

/* Καμπανάκι «νέα ενημέρωση» πάνω δεξιά (desktop) */
.upd-btn { position: relative; background: var(--butter); color: var(--pill-ink); border-color: transparent; }
.upd-btn:hover { background: color-mix(in srgb, var(--butter) 82%, var(--pill-ink)); color: var(--pill-ink); }
.upd-btn .ph { animation: upd-ring 2.4s ease-in-out 1s 2; transform-origin: 50% 10%; }
@keyframes upd-ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(12deg); } 20%, 40% { transform: rotate(-12deg); } }
.upd-btn__dot {
  position: absolute; right: 5px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--rose-ink); border: 2px solid var(--surface);
}

/* Κινητό: σήμα πάνω στην εικόνα προφίλ + επιλογή στο μενού χρήστη */
.user-chip__avatar { position: relative; display: inline-flex; flex: none; }
.user-chip__badge { display: none; }
.menu__item--update { background: color-mix(in srgb, var(--butter) 34%, var(--surface)); }
.menu__item--update:hover { background: color-mix(in srgb, var(--butter) 55%, var(--surface)); }
.menu__item--update .ph-fill { font-size: 18px; color: var(--butter-ink); }
.menu__item--update > span:first-of-type, .menu__item--version > span:first-of-type { flex: 1; }
.menu__badge { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--butter); color: var(--pill-ink); }

/* Popups ενημερώσεων: κεφαλίδα/πόδι σταθερά, το περιεχόμενο κάνει scroll */
/* Μία μόνο μπάρα κύλισης: το παράθυρο δεν κυλάει, κυλάει μόνο το περιεχόμενο */
.dialog--scroll[open] { display: flex; flex-direction: column; overflow: hidden; }
.dialog--scroll .dialog__box { flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden; }
.dialog--scroll .dialog__body {
  min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.dialog--scroll .dialog__body::-webkit-scrollbar { width: 10px; }
.dialog--scroll .dialog__body::-webkit-scrollbar-track { background: transparent; }
.dialog--scroll .dialog__body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--surface); }
.dialog--scroll .dialog__body::-webkit-scrollbar-button { display: none; height: 0; }
#dlg-changelog .dialog__body { border-top: 1px solid var(--line); }
.menu__panel .menu__item--version { display: none; }
.menu__item--version .menu__badge { background: var(--surface-3); color: var(--ink-2); }
.dialog__body--flush { padding: 0 0 6px; gap: 0; }
.dialog__body--flush .changelog { padding: 4px 22px 10px; }
#dlg-changelog .segmented { margin: 0 22px 10px; }
.upd-dlg__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.upd-dlg__title .chip-icon { width: 40px; height: 40px; font-size: 20px; flex: none; }
.upd-dlg__title .dialog__sub b { color: var(--ink); }
.upd-dlg__name { font-size: 15px; font-weight: 800; }
.upd-notes--dlg { padding: 0; border: 0; }
.upd-dlg__safe { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.upd-dlg__safe .ph { font-size: 18px; color: var(--mint-ink); flex: none; margin-top: 1px; }
.upd-dlg__safe code { font-size: 11.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 6px; }

/* Κινητό/tablet: η έκδοση φεύγει από το sidebar (για να μη χρειάζεται scroll) και μπαίνει στο μενού χρήστη */
@media (max-width: 1024px) {
  .side-foot { display: none; }
  .menu__panel .menu__item--version { display: flex; }
}
@media (max-width: 680px) {
  .topbar .upd-btn { display: none; }
  .user-chip__badge {
    display: grid; place-items: center; position: absolute; right: -3px; top: -3px;
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--butter); color: var(--pill-ink); font-size: 13px;
    border: 2px solid var(--bg);
  }
  .dialog__body--flush .changelog { padding: 2px 18px 10px; }
  #dlg-changelog .segmented { margin: 0 18px 8px; }
}

/* Κάρτα κατάστασης */
.upd-card .upd-status { display: flex; align-items: center; gap: 16px; padding: 20px 26px; }
.upd-status .chip-icon { width: 44px; height: 44px; font-size: 21px; flex: none; }
.upd-status__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.upd-status__main h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.upd-status__main p { font-size: 13px; color: var(--muted); }
.upd-status form { margin: 0; flex: none; }
.upd-muted { font-size: 12.5px; }
.upd-warn { color: var(--rose-ink) !important; }
.upd-card--new { border-color: color-mix(in srgb, var(--butter) 70%, var(--line)); }
.upd-card--new .upd-status { background: color-mix(in srgb, var(--butter) 26%, var(--surface)); }
.upd-card--ok .upd-status { background: color-mix(in srgb, var(--mint) 26%, var(--surface)); }
.upd-card--bad .upd-status { background: color-mix(in srgb, var(--rose) 24%, var(--surface)); }

.upd-notes { padding: 16px 26px 4px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.upd-notes h4 { margin: 10px 0 4px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.upd-notes ul { margin: 4px 0 10px; padding-left: 20px; display: grid; gap: 3px; }
.upd-notes p { margin: 0 0 8px; }
.upd-notes code, .upd-install code { font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }

.upd-install { display: grid; gap: 12px; justify-items: start; padding: 16px 26px 20px; border-top: 1px solid var(--line); }
.upd-install p { font-size: 13px; color: var(--muted); max-width: 70ch; }
.upd-spin { display: inline-block; animation: upd-spin 1s linear infinite; }
@keyframes upd-spin { to { transform: rotate(360deg); } }

/* Changelog: κάθετη γραμμή χρόνου */
.upd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.upd-head .segmented { margin: 0; }
.changelog { list-style: none; margin: 0; padding: 10px 26px 14px; }
.changelog__ver { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; }
.changelog__rail { position: relative; display: flex; justify-content: center; }
.changelog__rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.changelog__ver:first-child .changelog__rail::before { top: 22px; }
.changelog__ver:last-child .changelog__rail::before { bottom: auto; height: 22px; }
.changelog__dot {
  position: relative; margin-top: 16px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.changelog__ver.is-current .changelog__dot { background: var(--mint-ink); border-color: var(--mint-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 60%, transparent); }
.changelog__body { padding: 10px 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.changelog__ver:last-child .changelog__body { border-bottom: 0; }
.changelog__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.changelog__head h3 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.changelog__tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--dark); color: var(--on-dark);
}
.changelog__ver:not(.is-current) .changelog__tag { background: var(--surface-3); color: var(--ink); }
.changelog__date { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.changelog__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.changelog__items li { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.upd-type {
  display: inline-flex; justify-content: center; height: 21px; align-items: center; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: var(--pill-ink); background: var(--surface-3);
}
.upd-type--mint     { background: var(--mint); }
.upd-type--lavender { background: var(--lavender); }
.upd-type--rose     { background: var(--rose); }
.upd-type--neutral  { color: var(--ink-2); }
.bk-tag--update { background: var(--peach); color: var(--pill-ink); }
.dialog__head > div { min-width: 0; }

@media (max-width: 680px) {
  .upd-card .upd-status { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .upd-status form { flex: 1 1 100%; }
  .upd-status form .btn { width: 100%; justify-content: center; }
  .upd-notes, .upd-install { padding-left: 16px; padding-right: 16px; }
  .upd-install .btn { width: 100%; justify-content: center; min-height: 46px; }
  .changelog { padding: 6px 16px 10px; }
  .changelog__ver { grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
  .changelog__dot { width: 10px; height: 10px; }
  .changelog__date { margin-left: 0; flex-basis: 100%; }
  .changelog__items li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .upd-type { justify-self: start; }
}

/* =====================================================================
   v2.13 — Ρυθμίσεις για όλους τους χρήστες
   ===================================================================== */
/* Κωδικός/token που αλλάζει μόνο ο διαχειριστής */
.locked-field {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 13.5px; color: var(--muted);
}
.locked-field .ph { font-size: 17px; flex: none; color: var(--faint); }
/* Νέα έκδοση: μήνυμα προς τον χρήστη αντί για κουμπί εγκατάστασης */
.upd-admin-note {
  display: flex; align-items: center; gap: 10px; margin: 12px 26px 22px; padding: 12px 14px;
  border-radius: 14px; background: color-mix(in srgb, var(--butter) 28%, var(--surface)); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600;
}
.upd-admin-note .ph { font-size: 18px; flex: none; }
/* Backup: ένδειξη ότι η λίστα ενημερώνεται από το Drive */
.bk-sync { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.bk-sync .ph { animation: spin .9s linear infinite; }
@media (max-width: 680px) {
  .upd-admin-note { margin: 0 16px 16px; }
}

/* =====================================================================
   v2.14 — Μηνύματα (toasts), popup επιβεβαίωσης, ετικέτες συμπτυγμένου sidebar
   ===================================================================== */

/* Μηνύματα πάνω δεξιά, κάτω από την μπάρα */
.toasts {
  position: fixed; z-index: 400; top: calc(var(--topbar-h) + 14px); right: 24px;
  display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  position: relative; overflow: hidden; pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 12px 14px 14px;
  border-radius: 16px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  animation: toast-in .38s cubic-bezier(.2, .9, .25, 1.15) both;
}
.toast.is-leaving { animation: toast-out .28s ease-in both; }
.toast__icon {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px;
  font-size: 18px; background: var(--c); color: var(--pill-ink);
}
.toast__msg { flex: 1; min-width: 0; padding-top: 5px; overflow-wrap: anywhere; }
.toast__close {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: 1px -2px 0 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font-size: 15px;
}
.toast__close:hover { background: var(--surface-3); color: var(--ink); }
/* λεπτή μπάρα που δείχνει πότε θα κλείσει */
.toast__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); opacity: .7; transform-origin: left;
  animation: toast-life var(--life, 5500ms) linear forwards; }
.toast.is-paused .toast__bar { animation-play-state: paused; }
.toast--success { --c: var(--mint); }
.toast--error   { --c: var(--rose); }
.toast--warning { --c: var(--butter); }
.toast--info    { --c: var(--lavender); }
@keyframes toast-in  { from { opacity: 0; transform: translateX(28px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(28px) scale(.97); } }
@keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Popup επιβεβαίωσης (αντί για το confirm του browser) */
.cfm { width: min(440px, calc(100vw - 32px)); }
.cfm__body { display: flex; gap: 14px; padding: 22px 22px 18px; }
.cfm__icon { width: 42px; height: 42px; font-size: 20px; flex: none; }
.cfm__text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.cfm__title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.cfm__msg { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.cfm__details {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 0; padding: 12px 14px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px;
}
.cfm__details dt { color: var(--muted); font-weight: 600; }
.cfm__details dd { margin: 0; text-align: right; font-weight: 800; font-feature-settings: "tnum" 1; }
.cfm__details dd:nth-of-type(2) { color: var(--lavender-ink); }
.cfm__warn {
  display: grid; gap: 6px; margin: 2px 0 0; padding: 10px 14px 10px 30px; border-radius: 12px;
  background: color-mix(in srgb, var(--butter) 35%, var(--surface)); color: var(--ink-2); font-size: 13px; line-height: 1.45;
}
.cfm__foot { border-radius: 0 0 24px 24px; }
.cfm__foot .btn { min-width: 110px; justify-content: center; }
.cfm__foot .btn:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.cfm[open] { animation: cfm-in .2s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes cfm-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Ετικέτα δίπλα στα εικονίδια όταν το sidebar είναι συμπτυγμένο */
.side-tip {
  position: fixed; z-index: 450; top: 0; left: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 12px; background: var(--dark); color: var(--on-dark);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .35);
  opacity: 0; transform: translate(-6px, -50%) scale(.96); transform-origin: left center;
  transition: opacity .16s ease, transform .22s cubic-bezier(.2, .9, .3, 1.2);
}
.side-tip::before {           /* μικρό «βελάκι» προς το εικονίδιο */
  content: ""; position: absolute; left: -4px; top: 50%; width: 10px; height: 10px; border-radius: 2px;
  background: inherit; transform: translateY(-50%) rotate(45deg);
}
.side-tip.is-visible { opacity: 1; transform: translate(0, -50%) scale(1); }
.side-tip__count {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--on-dark) 16%, transparent); font-size: 11.5px; font-weight: 800;
}
.side-tip__count.is-alert { background: var(--rose); color: var(--pill-ink); }

@media (max-width: 680px) {
  .toasts { top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 10px); right: 12px; left: 12px; width: auto; }
  .toast { border-radius: 18px; }
  @keyframes toast-in  { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes toast-out { to { opacity: 0; transform: translateY(-14px) scale(.97); } }
  .cfm { width: 100%; }
  .cfm__foot { border-radius: 0; }
  .cfm__foot .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving, .cfm[open] { animation: none; }
  .side-tip { transition: none; }
}


/* =====================================================================
   v2.15 — Κίνηση (anime.js · assets/js/motion.js)
   ===================================================================== */
/* Bot: δαχτυλίδια «radar» (τα κινεί το motion.js μόνο όταν τρέχει νέος κύκλος) */
.bot-btn__radar {
  position: absolute; inset: 2px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--c-mint, var(--mint-ink)); opacity: 0; transform: scale(.55);
}
/* Αλλαγή κατάστασης: το pill «γυρίζει» */
.col-status { perspective: 420px; }
.col-status .pill { transform-origin: 50% 50%; backface-visibility: hidden; }

/* Αλλαγή τιμής: παλιά τιμή ↑, νέα ↓ */
.price-roll {
  position: absolute; inset: 1px 28px 1px 12px; overflow: hidden; pointer-events: none;
  font-size: 14px; font-weight: 700; font-feature-settings: "tnum" 1; color: var(--ink);
}
.price-roll__old, .price-roll__new { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; }
.price-roll__old { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--rose-ink) 70%, transparent); }
.price-roll__new { color: var(--lavender-ink); }
.money-input.is-rolling input { color: transparent; }

/* ✓ που «ζωγραφίζεται» δίπλα στο πεδίο */
.m-check {
  position: absolute; right: -9px; top: -9px; width: 20px; height: 20px; pointer-events: none; z-index: 2;
  animation: m-check-out .4s ease-in 1.4s forwards;
}
.m-check circle { fill: var(--mint); stroke: var(--surface); stroke-width: 2; transform-origin: center; animation: m-check-pop .35s cubic-bezier(.2, .9, .3, 1.4) both; }
.m-check path {
  fill: none; stroke: var(--pill-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16; stroke-dashoffset: 16; animation: m-check-draw .38s ease-out .18s forwards;
}
@keyframes m-check-pop  { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes m-check-draw { to { stroke-dashoffset: 0; } }
@keyframes m-check-out  { to { opacity: 0; transform: translateY(-4px); } }
html[data-motion="soft"] .m-check { animation-delay: .8s; }

/* Ρυθμίσεις → Εμφάνιση: επιλογή Πλήρης / Ήπια / Καμία */
.segmented--choice { margin: 0; }
.segmented--choice label { position: relative; cursor: pointer; }
.segmented--choice input { position: absolute; opacity: 0; pointer-events: none; }
.segmented--choice span { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: background-color .15s, color .15s; }
.segmented--choice input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .segmented--choice input:checked + span { background: var(--line-strong); }
.segmented--choice input:focus-visible + span { box-shadow: var(--ring); }

/* «Καμία» κίνηση: σταματούν και οι κινήσεις του CSS (όπως η «Μείωση κίνησης» της συσκευής) */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  animation-delay: 0s !important; transition-duration: .01ms !important;
}

/* Συσκευές bot (Ρυθμίσεις → Bot & proxy): το νέο κλειδί μέσα στην κάρτα */
.setup-link--inset { margin: 0 22px 16px; background: var(--surface-2); }
@media (max-width: 720px) { .setup-link--inset { margin: 0 16px 14px; } }

/* =====================================================================
   v2.17 — Price Optimizer (ανταγωνιστής που απαντά αμέσως σε κάθε πτώση τιμής)
   ===================================================================== */
.po-badge {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; margin-left: 4px;
  border-radius: 8px; background: var(--butter); color: var(--pill-ink); font-size: 13px; text-decoration: none;
  vertical-align: middle; transition: transform .15s;
}
.po-badge:hover { transform: scale(1.08); }
.po-badge--text {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; padding: 0 11px; margin: 0;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.po-badge--text small { font-size: 11.5px; font-weight: 600; opacity: .75; }
.po-badge--text:hover { transform: none; }
.ev-row .po-badge--text { height: 24px; padding: 0 9px; font-size: 11.5px; }
.po-head { display: inline-flex; align-items: center; gap: 2px; margin: 0; }

/* Ιστορικό: διακόπτης «Μόνο Price Optimizer» */
.evf__toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.evf__toggle .ph-fill { font-size: 15px; color: var(--butter-ink); }
.evf__toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.evf__toggle[aria-pressed="true"] { background: var(--butter); border-color: transparent; color: var(--pill-ink); }
.evf__toggle[aria-pressed="true"] .ph-fill { color: inherit; }
.fsheet__opt--wide { grid-column: 1 / -1; }
.fsheet__opt input[type="checkbox"]:checked + span { background: var(--butter); border-color: transparent; color: var(--pill-ink); }
.fsheet__opt input[type="checkbox"]:checked + span .ph-fill { color: inherit; }
.fsheet__opt span .ph-fill { font-size: 18px; color: var(--butter-ink); flex: none; }

/* v2.17.2 — Price Optimizer: ⚡ μέσα στην ετικέτα κατάστασης της λίστας */
.pill--po { padding-right: 5px; gap: 7px; cursor: help; }
.pill__po {
  display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%;
  background: var(--butter); color: var(--pill-ink); font-size: 11px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 55%, transparent);
}
.pill--pending .pill__po { background: var(--surface); }
@media (max-width: 680px) {
  .table-card tr[data-id] .pill--po { padding-right: 4px; }
  .table-card tr[data-id] .pill__po { width: 18px; height: 18px; font-size: 10.5px; }
}

