/* Simple ERP — tokens */
:root {
  --ink: #15202b;
  --ink-2: #2a3845;
  --navy: #1f4e79;
  --navy-2: #2e75b6;
  --paper: #eef1f4;
  --surface: #ffffff;
  --line: #d6dde4;
  --line-2: #e6ebf0;
  --muted: #5a6774;
  --volt: #f5c400;
  --ok: #1e7a4c;
  --ok-bg: #e7f4ec;
  --err: #b42318;
  --err-bg: #fdecea;
  --info-bg: #e8f0f8;
  --r: 6px;
  --font: "Commissioner", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
a { color: var(--navy); }
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.lead { max-width: 70ch; margin: -.5rem 0 1.25rem; }
.strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }

/* Shell */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #cfd8e1; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 0 8px 22px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--volt); color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -0.03em; }
.brand-name { font-weight: 600; font-size: 15px; }
.brand-dark { color: var(--ink); padding: 0 0 24px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { color: #cfd8e1; text-decoration: none; padding: 9px 10px; border-radius: var(--r); border-left: 3px solid transparent; }
.side-nav a:hover { background: var(--ink-2); color: #fff; }
.side-nav a.is-active { background: var(--ink-2); color: #fff; border-left-color: var(--volt); }
.side-sep { height: 1px; background: #2c3a47; margin: 10px 6px; }
.side-user { margin-top: auto; border-top: 1px solid #2c3a47; padding: 14px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.side-user-name { text-decoration: none; color: #fff; display: flex; flex-direction: column; }
.side-user-name span { color: #93a3b3; font-size: 13px; }
.side-user .link-btn { color: #93a3b3; padding: 0; }
.main { padding: 28px 36px 60px; min-width: 0; max-width: 1280px; }

/* Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 500; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #b7c3ce; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: #193f62; border-color: #193f62; }
.btn-block { width: 100%; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--navy); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger, .danger { color: var(--err); }
.link-btn.small { font-size: 13px; }
.link { color: var(--muted); }
.icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: #b7c3ce; }
.icon-btn.danger:hover { color: var(--err); border-color: var(--err); }

/* Notices */
.notice { padding: 11px 14px; border-radius: var(--r); margin-bottom: 16px; border: 1px solid transparent; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice-ok { background: var(--ok-bg); border-color: #bfe1cc; color: #134e31; }
.notice-error { background: var(--err-bg); border-color: #f5c2bd; color: #7a1a12; }
.notice-info { background: var(--info-bg); border-color: #c5d6e8; color: #1b3a57; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.field .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { max-width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(46, 117, 182, .18); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.span-2 { grid-column: span 2; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px 20px; margin: 0 0 18px; min-width: 0; }
.panel legend { font-weight: 600; font-size: 1rem; padding: 0 6px; margin-left: -6px; }
.panel.narrow { max-width: 640px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 500; cursor: pointer; }
.toggle input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.radios { border: 0; padding: 0; margin: 0; flex-direction: row; gap: 10px; flex-wrap: wrap; }
.radios legend { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.radio { flex: 1 1 220px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; font-weight: 400; }
.radio span { display: flex; flex-direction: column; color: var(--muted); }
.radio strong { color: var(--ink); }
.radio:has(input:checked) { border-color: var(--navy); background: #f3f7fb; }
.sub-h { margin: 22px 0 10px; font-size: 1rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.cols .panel { margin: 0; }
.texts summary { cursor: pointer; font-weight: 600; }
.texts[open] summary { margin-bottom: 14px; }
.logo-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.logo-preview { max-height: 56px; max-width: 200px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px; background: #fff; }

/* Offer lines — ο «πίνακας» της προσφοράς */
.lines-panel { margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lines-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 20px; background: var(--navy); color: #fff; }
.lines-head .muted { color: #bcd0e3; font-size: 13px; }
.line { display: grid; grid-template-columns: 112px minmax(0, 1fr) 200px 34px; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); align-items: start; }
.line:nth-child(even) { background: #f7f9fb; }
.no-photos .line { grid-template-columns: minmax(0, 1fr) 200px 34px; }
.no-photos .line-photo { display: none; }
.line-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-slot { position: relative; width: 112px; height: 96px; border: 1.5px dashed #b7c3ce; border-radius: var(--r); display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); cursor: pointer; background: #fff; overflow: hidden; }
.photo-slot:hover, .photo-slot:focus-within { border-color: var(--navy-2); color: var(--navy); }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.photo-slot.has-photo { border-style: solid; border-color: var(--line); }
.photo-slot.has-photo .photo-hint { visibility: hidden; }
.line-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.line-title { font-weight: 600; color: var(--navy); }
.line-sub { font-style: italic; color: var(--navy-2); font-size: 14px; }
.line-main textarea { font-size: 14px; }
.line-nums { display: flex; flex-direction: column; gap: 8px; }
.field.compact input { text-align: right; font-variant-numeric: tabular-nums; }
.line-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-2); padding-top: 8px; font-size: 13px; color: var(--muted); }
.line-total output { font-weight: 700; color: var(--navy); font-size: 15px; font-variant-numeric: tabular-nums; }
.line-tools { display: flex; flex-direction: column; gap: 6px; }
.add-line { margin: 14px 20px; }
.totals { margin: 0 20px 20px auto; width: min(360px, calc(100% - 40px)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals .grand { background: var(--navy); color: #fff; border: 0; font-size: 1.1rem; font-weight: 700; padding: 11px 14px; }
.totals .grand dt { color: #fff; }

/* Lists */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f7f9fb; white-space: nowrap; }
.grid td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid .sub { display: block; font-size: 12px; color: var(--muted); }
.grid tr.is-off td { color: var(--muted); }
.strong-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.strong-link:hover { text-decoration: underline; }


.status, .role { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status-draft { background: #eef1f4; color: #44515e; }
.status-sent { background: #e3eef9; color: #1f4e79; }
.status-accepted { background: var(--ok-bg); color: var(--ok); }
.status-rejected { background: var(--err-bg); color: var(--err); }
.role-admin { background: #fff4c2; color: #6b5300; }
.role-seller { background: #eef1f4; color: #44515e; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.empty { background: var(--surface); border: 1px dashed #b7c3ce; border-radius: 8px; padding: 40px 24px; text-align: center; }
.empty p { color: var(--muted); max-width: 52ch; margin: 8px auto 18px; }

/* Auth */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--paper); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 8px; padding: 28px; }
.auth-card h1 { margin-bottom: 16px; }

/* Responsive */
@media (max-width: 1080px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 6px; }
  .brand { padding: 0 8px 0 0; }
  .side-nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .side-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .side-nav a.is-active { border-bottom-color: var(--volt); }
  .side-sep { display: none; }
  .side-user { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; gap: 12px; }
  .side-user-name { display: none; }
  .main { padding: 20px 16px 48px; }
  .line, .no-photos .line { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .line-photo { flex-direction: row; }
  .line-tools { flex-direction: row; justify-content: flex-end; }
  .line-nums { flex-direction: row; flex-wrap: wrap; }
  .line-nums .field { flex: 1 1 120px; }
  .line-total { flex: 1 1 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }

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

/* ---- Εικονίδια ενεργειών λίστας ---- */
.actions-cell { width: 1%; white-space: nowrap; vertical-align: middle; }
.icon-actions, .row-actions { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.row-actions { gap: 14px; font-size: 13px; }
.icon-actions form, .row-actions form { display: contents; }
.ia { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.ia:hover { background: var(--line-2); color: var(--navy); }
.ia-danger:hover { background: var(--err-bg); color: var(--err); }
.ia .ico { display: block; }

/* ---- Σετ με ενιαία τιμή ---- */
.add-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 20px; }
.btn-small { padding: 6px 12px; font-size: 14px; }
.bundle { border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--volt); background: #fffdf3; padding-bottom: 14px; }
.bundle-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px 4px 16px; }
.bundle-tag { font-weight: 700; font-size: 13px; background: var(--volt); color: var(--ink); padding: 2px 10px; border-radius: 999px; }
.bundle-desc { font-size: 13px; color: var(--muted); }
.bundle-tools { margin-left: auto; display: flex; gap: 6px; }
.bundle-body { display: grid; grid-template-columns: minmax(0, 1fr) 200px 34px; gap: 16px; padding-right: 20px; align-items: start; }
.bundle-nums { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; grid-column: 2; }
.bundle .line { grid-template-columns: 112px minmax(0, 1fr) 34px; padding-right: 0; padding-left: 16px; background: transparent; border-bottom: 1px dashed #e8dca6; }
.bundle .line:last-child { border-bottom: 0; }
.bundle .line .line-nums { display: none; }
.no-photos .bundle .line { grid-template-columns: minmax(0, 1fr) 34px; }
.add-member { margin-left: 16px; }
@media (max-width: 860px) {
  .bundle-body { grid-template-columns: minmax(0, 1fr); padding: 0 16px 0 0; }
  .bundle-nums { grid-column: auto; flex-direction: row; flex-wrap: wrap; padding: 0 0 0 16px; }
  .bundle-nums .field { flex: 1 1 120px; }
  .bundle .line, .no-photos .bundle .line { grid-template-columns: minmax(0, 1fr); }
}

/* ======================= Υπόλοιπα πελατών ======================= */

/* Ετικέτες κατάστασης */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-off { background: #eef1f4; color: #44515e; }

.amount-debt { color: var(--err); }
.amount-payment { color: var(--ok); }
.grid tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #f7f9fb; }

/* Ταξινομήσιμες κεφαλίδες */
.grid th.sortable { padding: 0; }
.th-sort { display: flex; align-items: center; gap: 6px; padding: 11px 14px; color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--navy); }
.th-sort .caret { font-size: 10px; opacity: .45; }
.th-sort.on { color: var(--navy); }
.th-sort.on .caret { opacity: 1; }

/* Διαδρομή πλοήγησης */
.crumbs { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

/* Κεφαλίδα καρτέλας πελάτη */
.cust-head { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: stretch; }
.cust-card { display: flex; gap: 16px; align-items: flex-start; margin: 0; }
.cust-card h1 { font-size: 1.3rem; margin-bottom: 8px; }
.cust-main { flex: 1; min-width: 0; }
.avatar { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; }
.info-grid { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; }
.info-grid.wide { max-width: 720px; gap: 10px 28px; }
.info-grid .k { color: var(--muted); }
.hero-panel { background: var(--ink); color: #fff; border-radius: 8px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.hero-panel .kicker { font-size: 12.5px; color: #9fb0c0; }
.hero-amount { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero-actions form { display: contents; }
.btn-volt { background: var(--volt); border-color: var(--volt); color: var(--ink); font-weight: 600; }
.btn-ghost { background: transparent; border-color: #4a5a6a; color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Καρτέλες (tabs) */
.tabs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs-page { margin-bottom: 18px; }
.tabs-panel { padding-top: 6px; }
.tabs-panel .tabs { margin: -6px -6px 18px; }
.tab { font: inherit; font-weight: 500; background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 12px; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--navy); border-bottom-color: var(--navy); }
.tabs-spacer { flex: 1; }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.collapse { display: none; }
.collapse.on { display: block; }
.sep { border: 0; border-top: 1px solid var(--line-2); margin: 22px 0; }
.list-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.list-foot .pager { margin: 0; gap: 8px; }
.tx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Segmented φίλτρο */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 12px; }
.seg button { font: inherit; font-size: 13.5px; background: var(--surface); border: 0; border-right: 1px solid var(--line); padding: 7px 14px; cursor: pointer; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--navy); color: #fff; }

/* Ρυθμίσεις: γραμμές ελέγχου */
.test-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.test-row:last-child { border-bottom: 0; padding-bottom: 0; }
.test-row .hint { margin: 4px 0 0; max-width: 60ch; }
.test-form { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.test-form .field { min-width: 220px; }
.code-block { background: var(--ink); color: #e6edf3; padding: 12px 14px; border-radius: var(--r); overflow-x: auto; font-size: 13px; margin: 0 0 14px; }
.panel legend .badge { margin-left: 8px; font-weight: 600; }
.toggle.is-off { opacity: .55; }
.toggle.span-2 { grid-column: span 2; }

/* Υπόδειξη ελέγχου τηλεφώνου */
.phone-hint { font-size: 12.5px; font-weight: 400; min-height: 1em; }
.phone-hint.is-ok { color: var(--ok); }
.phone-hint.is-warn { color: #8a6100; }
.phone-hint.is-bad { color: var(--err); }

@media (max-width: 1080px) {
  .cust-head { grid-template-columns: minmax(0, 1fr); }
  .tx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .tx-grid { grid-template-columns: minmax(0, 1fr); }
  .cust-card { flex-wrap: wrap; }
}

/* ---- 1.1.1: ρυθμίσεις εταιρείας, λογαριασμοί, εμφάνιση εγγράφων ---- */
.hint-top { margin-top: 0; }
.field-gap { margin-top: 14px; }
.tabs-inner { margin: 4px 0 12px; }
.bank-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bank-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .7fr) auto; gap: 10px; align-items: end; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.bank-row .icon-btn { margin-bottom: 4px; }
.bank-iban input, .bank-bic input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.tpl-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tpl-choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; font-size: 14px; }
.tpl-choice:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.tpl-choice input { margin-top: 3px; }
.tpl-thumb { flex: none; width: 46px; height: 58px; border: 1px solid var(--line); border-radius: 3px; background: #fff; display: flex; flex-direction: column; gap: 4px; padding: 5px; }
.tpl-thumb i { display: block; height: 9px; border-bottom: 2px solid var(--navy); }
.tpl-thumb b { display: block; height: 6px; background: #e3e8ed; }
.tpl-thumb-classic b:first-of-type { background: var(--navy); }
.tpl-thumb-modern i { background: var(--navy); border: 0; height: 12px; margin: -5px -5px 0; }
.tpl-thumb-modern b:first-of-type { background: var(--navy-2); }
.tpl-thumb-minimal b { background: none; border-bottom: 1px solid #c9d2da; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.color-field code { font-size: 13px; color: var(--muted); }
.side-ver { color: #6f8091; font-size: 12px; }
.lang-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--info-bg); color: var(--navy); font-size: 11px; font-weight: 700; letter-spacing: .04em; vertical-align: 1px; }
.lang-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lang-seg label { position: relative; }
.lang-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lang-seg span { display: block; padding: 8px 14px; cursor: pointer; font-weight: 500; color: var(--muted); }
.lang-seg input:checked + span { background: var(--navy); color: #fff; }
.lang-seg input:focus-visible + span { outline: 2px solid var(--navy-2); outline-offset: -2px; }
@media (max-width: 900px) {
  .bank-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bank-row .bank-iban { grid-column: span 2; }
  .tpl-choices { grid-template-columns: minmax(0, 1fr); }
}

/* ======================= 1.2.0: Ενότητα SMS ======================= */
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f8091; padding: 2px 10px 4px; }
.badge-info { background: var(--info-bg); color: var(--navy); }
.btn-danger { color: var(--err); border-color: #f0b8b2; }
.btn-danger:hover { border-color: var(--err); }
.cols-sms { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.cols-sms .panel { margin-bottom: 18px; }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.chip { font: inherit; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: #f7f9fb; color: var(--navy); cursor: pointer; }
.chip:hover { border-color: var(--navy-2); background: var(--info-bg); }
.sms-meter { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.sms-meter.is-warn { color: #8a6100; }
.sms-preview { margin-top: 10px; }
.sms-preview-to { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.sms-bubble { background: #e9f1fa; border: 1px solid #cfe0f1; border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 46ch; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.when-row { display: flex; gap: 10px; flex-wrap: wrap; }
.when-row .radio span strong { display: block; }
.radios-inline { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row; gap: 16px; flex-wrap: wrap; }
.radios-inline legend { font-size: 13px; font-weight: 500; padding: 0; margin-bottom: 0; }
.radios-inline .toggle { margin-top: 8px; }
.picker { font-size: 14px; padding: 4px; margin-top: 8px; }
.picker option { padding: 5px 6px; border-radius: 4px; }
.picker option:disabled { color: #9aa6b2; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0 12px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line-2); }
.recipients-panel { padding-top: 14px; }
.rcpt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rcpt-head .seg { margin: 0; }
.rcpt-find { width: auto; flex: 0 1 280px; }
.rcpt-scroll { max-height: 520px; overflow: auto; }
.rcpt-table th { position: sticky; top: 0; z-index: 1; }
.rcpt-table .chk { width: 36px; text-align: center; }
.rcpt-table input[type=checkbox] { width: 17px; height: 17px; }
.summary { margin: 12px 0 0; display: grid; gap: 0; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; }
.skipped { margin-top: 12px; font-size: 13.5px; }
.skipped summary { cursor: pointer; color: var(--navy); }
.confirm-actions { margin: 18px 0; }
.progress-panel { padding: 16px 20px; }
.progress-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.progress { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--navy-2); transition: width .4s ease; }
.job-actions form { display: contents; }
.msg-cell { max-width: 380px; color: var(--ink-2); }
.seg a { font-size: 13.5px; background: var(--surface); border-right: 1px solid var(--line); padding: 7px 12px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--navy); color: #fff; }
nav.tabs .tab { text-decoration: none; }
.filters-rcpt { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
@media (max-width: 1080px) {
  .cols-sms { grid-template-columns: minmax(0, 1fr); }
}

/* ======================= Simple ERP 1.3 — πλατφόρμα ======================= */
.brand-name small { display: block; font-weight: 400; font-size: 12px; color: #93a3b3; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-dark .brand-name small { color: var(--muted); }
body.is-super .brand-mark { background: #7fd1ae; }
body.is-super .side-nav a.is-active { border-left-color: #7fd1ae; }
.nav-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--volt); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; line-height: 18px; }
.side-label { font-size: 12px; text-transform: none; color: #93a3b3; padding: 4px 10px; }

/* Σύνδεση / εγγραφή */
.auth-card.auth-wide { width: min(760px, 100%); }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: -6px 0 18px; counter-reset: st; }
.steps li { flex: 1; font-size: 12.5px; color: var(--muted); padding: 6px 0 0; border-top: 3px solid var(--line); counter-increment: st; }
.steps li::before { content: counter(st) ". "; }
.steps li.on { color: var(--navy); border-top-color: var(--navy); font-weight: 600; }
.steps li.done { color: var(--ok); border-top-color: var(--ok); }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: 14px; }
.checks .badge { min-width: 86px; text-align: center; margin-right: 6px; }
.list { padding-left: 20px; margin: 0 0 16px; }
.list li { margin-bottom: 4px; }

/* Γραμμές καταστημάτων */
.branch-rows [data-repeat-list] { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.branch-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, 1.1fr) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fafbfc; }
.branch-row.is-off { opacity: .6; }
.branch-tools { display: flex; align-items: center; min-height: 38px; }
.branch-tools .toggle { margin-top: 0; }
.branch-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.branch-foot .hint { margin: 0; }

/* Δείκτες */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; text-decoration: none; color: inherit; min-width: 0; }
a.kpi:hover { border-color: #b7c3ce; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi strong { font-size: 1.7rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi strong small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.kpi strong.kpi-text { font-size: 1.05rem; line-height: 1.4; overflow-wrap: anywhere; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-alert { border-color: #f0d26a; background: #fffbea; }
.kpis-sm .kpi strong { font-size: 1.4rem; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel-h { font-size: 1rem; font-weight: 600; margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.panel-h .small, .link.small { font-size: 13px; font-weight: 400; }
.panel-h-gap { margin-top: 22px; }
.table-wrap.flat { border: 0; border-radius: 0; margin: 0 -6px; }
.table-wrap.flat .grid th { background: transparent; }

/* Διάγραμμα (SVG) */
.chart { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-bar { fill: var(--navy-2); }
.chart-alt .chart-bar { fill: #3aa57a; }
.chart-val { font-size: 11px; fill: var(--ink-2); font-family: var(--font); }
.chart-lbl { font-size: 11px; fill: var(--muted); font-family: var(--font); }

/* Κατάταξη */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px; gap: 10px; align-items: center; font-size: 14px; }
.rank li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank meter { width: 100%; height: 8px; }
.rank strong { text-align: right; font-variant-numeric: tabular-nums; }

/* Σελίδα καταστήματος (διαχείριση) */
.tenant-head { display: flex; gap: 14px; align-items: center; }
.tenant-logo { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.page-head h1 .badge { font-size: 12px; margin-left: 6px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.inline-form .hint { flex-basis: 100%; margin: 0; }
.inline-form .grow { flex: 1 1 220px; }
.compact-field input { width: 130px; }
.danger-btn { color: var(--err); border-color: #f0b4ae; }
.danger-btn:hover { background: var(--err-bg); border-color: var(--err); }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.plain-list li.is-off { color: var(--muted); }
.plain-list .sub { display: block; font-size: 12.5px; color: var(--muted); }
.plain-list form.inline, form.inline { display: inline; margin-left: 8px; }
.ledger { max-height: 360px; overflow: auto; margin-top: 14px; }
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .menu-body { position: absolute; right: 0; top: 24px; z-index: 5; width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(21, 32, 43, .14); padding: 12px; display: grid; gap: 12px; text-align: left; white-space: normal; }

/* Αιτήματα */
.requests { display: grid; gap: 12px; }
.request { margin: 0; }
.request-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.request-head strong { font-size: 1.05rem; margin-right: 6px; }
.request-head .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.request-meta { font-size: 13px; color: var(--muted); }
.request-msg { margin: 10px 0 0; padding: 8px 12px; background: #f7f9fb; border-left: 3px solid var(--line); border-radius: 4px; }
.request-actions { margin-top: 12px; }
.request-actions .inline-form { margin-bottom: 6px; }
.request > .sub { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

@media (max-width: 1080px) {
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .branch-row { grid-template-columns: minmax(0, 1fr); }
  .rank li { grid-template-columns: minmax(0, 1fr) 80px 40px; }
}
.db-summary { font-size: 14px; background: #f5f8fb; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin: 0 0 12px; }
