:root { --bg: #f4f3f8; --panel: #fff; --ink: #272043; --muted: #6f6a85; --line: #e2e0ea; --blue: #4f69b2; --green: #2c7d10; --red: #d44532; --yellow: #b88a00; font-family: "Segoe UI", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root { --bg: #17132b; --panel: #1f1a38; --ink: #ecebf3; --muted: #a6a1bf; --line: #332c55; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
.bar { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: #272043; color: #fff; }
.bar b { font-size: 17px; }
.bar .muted { color: #afacba; }
.bar .btn { margin-left: auto; color: #fff; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
.card.narrow { max-width: 380px; margin: 60px auto; }
.head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.head h2 { margin: 0; font-size: 18px; flex: 1; }
#filter { min-width: 280px; }
h2 { font-size: 18px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
label small { font-weight: 400; }
input, textarea, select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 7px; padding: 8px 14px; cursor: pointer; background: #e9e7f1; color: var(--ink); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn.small { padding: 4px 9px; font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { display: block; color: var(--muted); }
.mono { font-family: Consolas, monospace; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; white-space: nowrap; }
.badge.ok { background: var(--green); } .badge.warn { background: var(--yellow); } .badge.bad { background: var(--red); } .badge.idle { background: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.stats div { background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.stats b { font-size: 20px; display: block; }
.err { color: var(--red); font-weight: 700; min-height: 1em; }
dialog { border: 0; border-radius: 12px; padding: 20px; background: var(--panel); color: var(--ink); width: min(640px, 95vw); }
dialog::backdrop { background: rgba(15, 12, 32, .5); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .wide { grid-column: 1 / -1; }
form { display: flex; flex-direction: column; gap: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #272043; color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 700; }
.toast.error { background: var(--red); }
.muted { color: var(--muted); }
/* Καρτέλες */
.tabs { display: flex; gap: 4px; margin-left: 18px; }
.tabs button { font: inherit; font-weight: 700; border: 0; background: transparent; color: #afacba; padding: 7px 14px; border-radius: 7px; cursor: pointer; }
.tabs button.active { background: #fff; color: #272043; }
[hidden] { display: none !important; }
.btn:disabled { opacity: .45; cursor: default; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; }
.bar #hubInfo { font-size: 12px; }
/* Καταστήματα */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-bottom: 18px; }
.store { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--green); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.store:hover { border-color: var(--blue); }
.store.warn { border-left-color: var(--yellow); } .store.bad { border-left-color: var(--red); } .store.off { border-left-color: var(--muted); }
.store.sel { box-shadow: 0 0 0 2px var(--blue); }
.store-top { display: flex; align-items: center; gap: 8px; }
.store-top b { font-size: 16px; flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.dot.off { background: var(--muted); } .dot.bad { background: var(--red); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; font-size: 12px; }
.kv span { color: var(--muted); display: block; font-size: 11px; }
.alert { font-size: 13px; padding: 4px 8px; border-radius: 6px; background: var(--bg); border-left: 4px solid var(--yellow); }
.alert.bad { border-left-color: var(--red); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.detail-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 6px; }
.rowkv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rowkv span:first-child { color: var(--muted); }
.cmds { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tech-new { margin-top: 8px; align-items: center; }
/* Κουτάκι μαζί με το κείμενό του (παράθυρο εισαγωγής καταλόγου) */
label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
label.check input { width: auto; margin: 0; }
.tech-new input { flex: 1 1 160px; min-width: 0; }
.actions.start { justify-content: flex-start; }
.narrow-card { max-width: 620px; }
.small-list { font-size: 13px; line-height: 1.6; }
dialog.wide-dlg { width: min(1100px, 95vw); }
pre#textBody { max-height: 70vh; overflow: auto; background: var(--bg); padding: 10px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.btn.upload { display: inline-flex; align-items: center; }
select.small { padding: 4px 8px; font-size: 13px; }
.upd { font-size: 12px; } .upd.bad { color: var(--red); font-weight: 700; } .upd.ok { color: var(--green); font-weight: 700; }
h3.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 0 6px; }
pre.mini { background: var(--bg); padding: 8px; border-radius: 6px; font-size: 12px; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
.spark { display: flex; align-items: flex-end; gap: 1px; height: 28px; }
.spark i { flex: 1; background: var(--blue); opacity: .6; min-height: 1px; }
.spark i.gap { background: var(--red); opacity: .5; height: 100% !important; }

/* Εγκαταστάσεις του ΑΦΜ */
.table-wrap { overflow-x: auto; }
.br-edit input { width: 100%; min-width: 60px; padding: 6px 8px; }
.br-edit input.no { width: 70px; min-width: 70px; }
.br-edit select { width: 100%; min-width: 160px; padding: 6px 8px; }
.br-sub { font-size: 15px; margin: 18px 0 8px; }
.error-text { color: var(--red); font-weight: 600; min-height: 1em; }

/* Εκδόσεις: κουμπιά γραμμής + λίστα καταστημάτων αποστολής */
a.btn { display: inline-block; text-decoration: none; }
.rel-acts { min-width: 150px; }
.rel-acts .btn { margin: 2px 0; white-space: nowrap; }
.send-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; margin: 10px 0 14px; padding: 10px; border: 1px solid #e3e0ee; border-radius: 8px; }
.send-list label.check { flex-wrap: wrap; font-weight: 400; }
