/* ERProxenos · Αγορές. Χρώμα ενότητας: καφέ-χρυσό (Apple brown). */
:root[data-section="purchases"] { --sec: #8a5a2b; --sec-bg: #f7efe6; --sec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5h12v17l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"][data-section="purchases"] { --sec: #c8a27a; --sec-bg: rgba(200, 162, 122, .13); }
/* Ανάγκες παραγγελίας: ίδιο χρώμα με τις Αγορές (01/12/2026) */
:root[data-section="reorder"], :root[data-section="offers"] { --sec: #8a5a2b; --sec-bg: #f7efe6; }
:root[data-theme="dark"][data-section="reorder"], :root[data-theme="dark"][data-section="offers"] { --sec: #c8a27a; --sec-bg: rgba(200, 162, 122, .13); }

.pu-sub { margin: -12px 0 14px; color: var(--muted); }
.pu-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; background: var(--panel); transition: border-color .15s ease, background-color .15s ease; }
.pu-drop.over { border-color: var(--sec); background: color-mix(in srgb, var(--sec) 8%, var(--panel)); }
.pu-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* Ανέβασμα πρώτο, με μεγάλο κουμπί (23/11/2026) */
.pu-hero { align-items: center; text-align: center; gap: 10px; padding: 22px 18px; margin-bottom: 20px; border-color: color-mix(in srgb, var(--sec) 40%, var(--line)); }
.pu-bigbtn { display: flex; align-items: center; justify-content: center; gap: 16px; width: min(560px, 100%); min-height: 96px; padding: 18px 26px; border: 0; border-radius: 12px; background: var(--sec); color: #fff; font: inherit; cursor: pointer; box-shadow: 0 4px 14px rgba(17, 24, 39, .16); transition: transform .12s ease, filter .15s ease; }
.pu-bigbtn:hover { filter: brightness(1.07); }
.pu-bigbtn:active { transform: scale(.98); }
.pu-bigbtn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sec) 55%, transparent); outline-offset: 3px; }
.pu-bigicon { font-size: 34px; line-height: 1; }
.pu-bigtext { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.pu-bigtext b { font-size: 20px; font-weight: 650; }
.pu-bigtext span { font-size: 13.5px; opacity: .9; }
:root[data-theme="dark"] .pu-bigbtn { color: #1b140d; }
.pu-drophint { max-width: 70ch; font-size: 13px; }
.pu-sections { margin: 0 0 14px; flex-wrap: wrap; }
.pu-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pu-cardhead h2 { margin: 0; }
.pu-top { margin-bottom: 14px; }
.pu-tabs { margin: 4px 0 12px; }
.pu-tabs .tabs { flex-wrap: wrap; }
.pu-mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.pu-mini th, .pu-mini td { padding: 5px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pu-mini .num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 10px; white-space: nowrap; }
.pu-mini .pu-sum td { font-weight: 600; border-bottom: 0; }
.pu-scroll { overflow-x: auto; }
.pu-mini .pu-exp { cursor: pointer; }
.pu-mini .pu-exp:hover td, .pu-mini .pu-exp.open td { background: var(--hover, rgba(127, 127, 127, .08)); }
.pu-mini .pu-exp:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.pu-caret { display: inline-block; width: 1em; color: var(--muted, inherit); }
.pu-mini .pu-sub td { padding: 4px 0 8px 1.2em; }
.pu-docs { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.pu-docs li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.pu-docs li:last-child { border-bottom: 0; }
.pu-docs .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pu-due { margin: 0; padding-left: 18px; }
.pu-due li { margin: 4px 0; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Αρχείο αριστερά και μεγάλο, κουμπιά από κάτω (απόφαση Mike 19/11/2026). */
.drawer.pu-drawer { width: 100vw; }
.pu-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); gap: 20px; align-items: start; }
.pu-viewer { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - 110px); }
.pu-files { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.pu-pdf { width: 100%; flex: 1; min-height: calc(100dvh - 130px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
/* Δεξιά στήλη: η φόρμα κυλά μέσα της και τα κουμπιά μένουν από κάτω, χωρίς φόντο και χωρίς να πέφτουν πάνω στη φόρμα (19/11/2026). */
.pu-right { position: sticky; top: 0; display: flex; flex-direction: column; height: calc(100dvh - 110px); min-width: 0; }
.pu-right .pu-form { flex: 1; min-height: 0; overflow: auto; padding-right: 8px; }
.pu-bar { flex: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); }
.pu-bar .btn.primary { min-width: 140px; }
.pu-img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.pu-form h3 { font-size: 14px; margin: 12px 0 6px; }
.pu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
/* Μαζεμένη φόρμα (27/11/2026): 3-5 στήλες, μικρότερα κενά. */
.pu-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pu-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pu-grid5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pu-span2 { grid-column: span 2; min-width: 0; }
.pu-span2 > .f { width: 100%; }
.pu-form label.f > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-form label.f { margin-bottom: 0; }
.pu-form label.f > span:first-child { font-size: 12px; margin-bottom: 3px; }
.pu-form label.f .help { font-size: 11.5px; margin-top: 3px; }
.pu-origin-box { margin: 4px 0 0; font-size: 13px; }
.pu-origin-box summary { cursor: pointer; color: var(--muted, #888); }
.pu-origin-box .pu-origin { margin-top: 6px; }
.pu-line { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 6px; }
.pu-line-top { display: flex; gap: 8px; align-items: center; }
.pu-line-top input { flex: 1; min-width: 0; }
.pu-line-nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 8px; }
.pu-new { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; margin-top: 4px; }
.pu-item { display: flex; flex-direction: column; gap: 6px; }
.pu-item-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pu-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 12px; align-items: start; }
.pu-actions { margin-top: 16px; }

@media (max-width: 860px) {
  .pu-split { grid-template-columns: minmax(0, 1fr); }
  .pu-viewer { position: static; height: auto; }
  .pu-pdf { min-height: 0; height: 70dvh; }
  .pu-right { position: static; height: auto; }
  .pu-right .pu-form { overflow: visible; padding-right: 0; }
  .pu-pick { grid-template-columns: minmax(0, 1fr); }
  .pu-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .pu-split.has-bar { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .pu-grid, .pu-grid3, .pu-grid4, .pu-grid5, .pu-line-nums { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pu-new { grid-template-columns: minmax(0, 1fr); }
}
/* Σύνολα από το SoftOne: όταν δεν φορτώθηκαν, ένδειξη μέσα στην κάρτα (δεν κρύβεται, fix 18/11/2026). */
.pu-totals-note { margin: 6px 0 10px; font-size: 13px; color: var(--warn, #b26b00); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pu-totals[data-state="loading"] .pu-mini { opacity: .6; }

/* Προέλευση τιμολογίου (19/11/2026) */
.pu-origin { display: grid; gap: 2px; font-size: 13.5px; overflow-wrap: anywhere; }
td .muted.small { font-size: 12px; font-weight: normal; margin-top: 2px; }

/* Οθόνη αναμονής τιμολογίου (22/11/2026): σκελετός με το σχήμα της σελίδας. */
.pu-sk { border-radius: 8px; background: linear-gradient(100deg, var(--fill) 30%, var(--fill-press) 50%, var(--fill) 70%) 0 0 / 300% 100%; animation: px-shine 1.4s linear infinite; }
.pu-loading { animation: px-fade .3s var(--ease) both; }
.pu-sk-doc { flex: 1; min-height: calc(100dvh - 130px); display: grid; place-items: center; }
.pu-sk-msg { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 320px; padding: 20px 24px; text-align: center; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-lg); }
.pu-sk-msg .spin { width: 22px; height: 22px; border-width: 3px; }
.pu-sk-msg .muted { font-size: 13px; }
.pu-sk-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.pu-sk-bar { height: 14px; }
.pu-sk-field { height: 36px; }
@media (max-width: 860px) { .pu-sk-doc { min-height: 50dvh; } }
@media (prefers-reduced-motion: reduce) { .pu-sk, .pu-loading { animation: none; } }

/* Ανάγκες παραγγελίας (απόφαση Mike 01/12/2026) */
.ro-intro { max-width: 75ch; margin: 0 0 6px; }
.ro-card { margin-top: 14px; }
.ro-wrap { overflow-x: auto; }
.ro-table { min-width: 760px; }
.ro-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-in { width: 96px; text-align: right; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; }
.ro-name { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ro-name:hover { text-decoration: underline; }
.ro-why td { background: var(--fill, transparent); font-size: 13px; }
.ro-whybody { display: grid; gap: 4px; }
.ro-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ro-bar { display: flex; justify-content: flex-end; margin: -6px 0 6px; }

/* Σύγκριση προσφορών (απόφαση Mike 01/12/2026) */
.of-sub { font-size: 17px; font-weight: 600; margin: 26px 0 4px; }
.of-advice { max-width: 80ch; margin: 0 0 6px; }
.of-mark { color: var(--sec); font-weight: 600; }
.ro-card p { max-width: 80ch; }

/* Κεφαλίδα, επεξήγηση και κενές καταστάσεις των σελίδων «Ανάγκες» και «Σύγκριση προσφορών» (απόφαση Mike 01/12/2026:
   πιο προσεγμένη εμφάνιση, μεγάλα γράμματα, εικόνα, επεξηγήσεις που ανοίγουν με πάτημα). web/pagekit.js */
.np-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; margin: 4px 0 18px; }
.np-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sec); margin-bottom: 8px; }
.np-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; font-weight: 600; letter-spacing: -.028em; margin: 0 0 12px; text-wrap: balance; }
.np-lead { font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 58ch; margin: 0 0 20px; }
.np-stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0 0 20px; }
.np-stats > div { display: flex; flex-direction: column-reverse; gap: 2px; }
.np-stats dt { font-size: 13px; color: var(--muted); }
.np-stats dd { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.np-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.np-art { width: 250px; flex: none; color: var(--muted); }
.np-art svg { display: block; width: 100%; height: auto; }
.np-art .np-a { stroke: var(--sec); }
.np-art .np-b { stroke: currentColor; opacity: .45; }
.np-art .np-f { fill: var(--sec-bg); }
.np-art .np-p { fill: var(--panel); }
.np-how { margin: 0 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.np-how summary { cursor: pointer; padding: 12px 2px; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.np-how summary::-webkit-details-marker { display: none; }
.np-how summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 50%; font-weight: 500; color: var(--muted); }
.np-how[open] summary::before { content: "−"; }
.np-how summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.np-how-body { padding: 0 2px 14px 30px; display: grid; gap: 8px; max-width: 76ch; }
.np-how-body p { margin: 0; line-height: 1.55; }
.np-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 24px 48px; margin-top: 14px; }
.np-empty .np-art { width: 210px; margin-bottom: 6px; }
.card.np-empty h2 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.card.np-empty p { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 56ch; margin: 0; }
.np-steps { text-align: left; max-width: 56ch; margin: 6px 0 4px; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; }
.np-empty .btn { margin-top: 8px; }
.np-loading { padding: 36px 0; color: var(--muted); font-size: 15px; }
.card h2.np-cardtitle { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 2px; }
.np-summary p { font-size: 17px; line-height: 1.55; margin: 0; max-width: 72ch; }
.of-advice { font-size: 15.5px; line-height: 1.55; }
@media (max-width: 860px) {
  .np-hero { grid-template-columns: 1fr; gap: 8px; }
  .np-hero > .np-art { display: none; }
  .np-lead { font-size: 16px; }
  .np-stats dd { font-size: 26px; }
  .np-stats { gap: 12px 24px; }
  .np-empty { padding: 32px 16px 36px; }
}

/* Επικόλληση κειμένου προσφοράς (01/12/2026) */
.of-paste { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; resize: vertical; min-height: 220px; }
.np-empty .np-actions { justify-content: center; margin-top: 8px; }
.np-empty .np-actions .btn { margin-top: 0; }

/* Email παραγγελίας στον προμηθευτή (01/12/2026) */
.ro-mailrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.ro-mail { flex: 1 1 240px; max-width: 360px; font: inherit; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; }

/* Προεπισκόπηση email προς προμηθευτή (01/12/2026) */
.ro-mailbox { max-height: 92vh; overflow: auto; }
.ro-field { display: grid; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ro-field input, .ro-field textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.ro-mailbox .rich-text table { border-collapse: collapse; margin: 4px 0 14px; }
.ro-mailbox .rich-text td { padding: 6px 12px; }
.ro-mailbox .actions .grow { flex: 1; }

/* Ανάγκες: εκτίμηση και σχόλια AI (01/12/2026) */
.ro-days { width: auto; flex: 0 0 auto; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; }
.ro-ai { margin-top: 14px; }
.ro-ai p { margin: 4px 0 0; max-width: 80ch; }
.ro-ailoading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.ro-ailoading .spin { width: 18px; height: 18px; border-width: 2.5px; color: var(--brand); opacity: 1; }
.ro-note { margin-top: 3px; min-width: 240px; max-width: 48ch; white-space: normal; }
/* Σύγκριση προσφορών: loader κάτω από τα κουμπιά όσο διαβάζεται η προσφορά (01/12/2026) */
.of-reading { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; color: var(--ink); }
.of-reading .spin { width: 20px; height: 20px; border-width: 3px; color: var(--brand); opacity: 1; }
.np-empty .of-reading { justify-content: center; }
/* Σύγκριση προσφορών: συνολικά ανά προμηθευτή (01/12/2026) */
.of-webarea { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.of-webbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
/* Σύγκριση προμηθευτών σε στήλες με κουτάκια ανά ενότητα (απόφαση Mike 01/12/2026). Οι σειρές ευθυγραμμίζονται με subgrid. */
.of-lead { margin: 2px 0 0; max-width: 70ch; }
.of-scroll { overflow-x: auto; margin: 16px -4px 0; padding: 4px; }
.of-cmp { display: grid; grid-template-columns: 7.5rem repeat(var(--n, 1), minmax(240px, 1fr)); grid-template-rows: repeat(6, auto); column-gap: 12px; row-gap: 8px; }
.of-cmp-labels, .of-col { display: grid; grid-row: 1 / span 6; grid-template-rows: subgrid; }
.of-rowlabel { padding: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.of-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; min-width: 0; }
.of-cell p { margin: 0; line-height: 1.5; }
.of-cell p + p { margin-top: 6px; }
.of-cell-label { display: none; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.of-col-top .of-cell-head { border: 2px solid var(--ink); padding: 12px 14px; }
.of-rankno { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.of-col-top .of-rankno { color: var(--ink); font-weight: 600; }
.of-name { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.of-verdict { margin-top: 8px !important; font-size: 14.5px; }
.of-facts { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.of-facts dt { color: var(--muted); }
.of-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.of-none { color: var(--muted); }
.of-quiet { color: var(--muted); font-size: 13px; }
.of-trust { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.of-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.of-trust-high .of-dot { background: var(--ok); }
.of-trust-medium .of-dot { background: var(--warn); }
.of-trust-low .of-dot { background: var(--bad); }
.of-sources { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.of-cell-act { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.of-sent { font-size: 12.5px; color: var(--muted); }
.of-websum { margin-top: 18px; max-width: 75ch; }
.of-websum h3, .of-alts h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.of-alts { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.of-alts > p { margin: 0 0 10px; max-width: 75ch; }
.of-altgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.of-alt { border: 1px dashed var(--border-strong, var(--line)); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.of-alt h4 { margin: 0; font-size: 15px; font-weight: 600; }
.of-alt p { margin: 0; line-height: 1.45; }
.of-altlink { margin-top: auto; padding-top: 4px; font-size: 13px; }
/* Δευτερεύουσα ενέργεια ως σύνδεσμος, όχι τρίτο κουμπί στο κουτί. */
.of-remove { margin-top: auto; padding: 2px 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.of-remove:hover { color: var(--bad); }
@media (max-width: 760px) {
  .of-scroll { overflow: visible; margin: 12px 0 0; padding: 0; }
  .of-cmp { display: block; }
  .of-cmp-labels { display: none; }
  .of-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
  .of-cell-label { display: block; }
  .of-lead { display: none; }
}
