/* ERP — στυλ σύμφωνα με το εγκεκριμένο σχέδιο οθονών (8/10/2026). */

@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/commissioner-greek-400-normal.woff2") format("woff2"); unicode-range: U+0370-03FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/commissioner-greek-500-normal.woff2") format("woff2"); unicode-range: U+0370-03FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/commissioner-greek-600-normal.woff2") format("woff2"); unicode-range: U+0370-03FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/commissioner-greek-700-normal.woff2") format("woff2"); unicode-range: U+0370-03FF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/commissioner-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/commissioner-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/commissioner-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/commissioner-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --ink: #17201B;
  --ink-2: #2E3833;
  --muted: #4F5A55;
  --line: #DDE1DC;
  --line-soft: #EEF0EC;
  --field: #B9C1BC;
  --bg: #F4F5F2;
  --card: #FFFFFF;
  --green: #1E5F46;
  --green-dark: #123D2D;
  --green-soft: #E3EFE9;
  --green-ink: #174A37;
  --warn-bg: #FFF1E0;
  --warn-ink: #7A3A00;
  --bad-bg: #FDE8E6;
  --bad-ink: #8E1F14;
  --blue-bg: #E4ECF7;
  --blue-ink: #1D3F6E;
  --badge-bg: #FFE2B8;
  --badge-ink: #6B3300;
  --focus: #8CC2AA;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Commissioner", "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
.mono, .num { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Πάνω μπάρα */
.top { background: var(--ink); color: #fff; padding: 0 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 64px; }
.brand { font-weight: 700; font-size: 18px; color: #fff; text-decoration: none; }
.brand span { font-weight: 400; color: #C9D2CD; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 420px; }
.tabs a { color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.tabs a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tabs a.active { background: #fff; color: var(--ink); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.env-badge { background: var(--badge-bg); color: var(--badge-ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.env-badge.prod { background: var(--green-soft); color: var(--green-ink); }
.link-light { color: #fff; background: none; border: 0; font: inherit; cursor: pointer; padding: 10px 6px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.link-light:hover { color: #C9D2CD; }

/* Περιεχόμενο */
main { max-width: 1280px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.2; }
h2 { margin: 0 0 14px; font-size: 18px; }
.sub { margin: 6px 0 0; color: var(--muted); }
.back { text-decoration: none; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card > h2:last-child { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.two-col > .col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.two-col > .col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sticky { position: sticky; top: 16px; }

/* Κουμπιά */
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 12px 18px; min-height: 48px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-soft); }
.btn-danger { background: #fff; color: var(--bad-ink); border-color: #C7867E; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-quiet { background: none; border-color: var(--field); color: var(--ink-2); }
.btn-quiet:hover { background: var(--line-soft); }
.btn-small { min-height: 44px; padding: 10px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-dashed { font: inherit; background: none; border: 1px dashed #8A938E; color: var(--ink-2); border-radius: 8px; padding: 10px 14px; min-height: 44px; cursor: pointer; }

/* Σήματα */
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.chip.ok { background: var(--green-soft); color: var(--green-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.neutral { background: var(--line-soft); color: var(--ink-2); }
.chip.receipt { background: var(--green-soft); color: var(--green-ink); }
.chip.invoice { background: var(--blue-bg); color: var(--blue-ink); }
.chip.credit { background: #F2E9F7; color: #4F2A66; }

/* Μηνύματα */
.alert { border-radius: 10px; padding: 14px 16px; font-weight: 500; border: 1px solid transparent; }
.alert.ok { background: var(--green-soft); color: var(--green-ink); border-color: #BFD9CC; }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #F2D2A9; }
.alert.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: #F0C2BC; }
.alert.info { background: #fff; color: var(--ink-2); border-color: var(--line); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.note { font-size: 14px; color: var(--muted); margin: 0; }

/* Πίνακες */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.right, table.data th.right { text-align: right; }
table.data a.rowlink { font-weight: 600; text-decoration: none; }
table.data tfoot td { border-top: 1px solid var(--line); font-weight: 600; }
.empty { color: var(--muted); padding: 18px 4px; margin: 0; }

/* Κάρτες site (Όλα) */
.grid-sites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.site-card:hover { border-color: var(--green); color: inherit; }
.site-card .name { font-size: 18px; font-weight: 700; }
.site-card .line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.site-card .line .k { color: var(--muted); }
.site-card .big { font-weight: 700; font-size: 20px; }
.site-card .sep { border-top: 1px solid var(--line); padding-top: 12px; }
.warn-text { color: #9A4A00; }

/* Φόρμες */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); font-size: 16px; padding: 11px 12px; border: 1px solid var(--field); border-radius: 8px; background: #fff; min-height: 46px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid var(--focus); outline-offset: 0; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad-ink); }
.field-error { color: var(--bad-ink); font-size: 14px; margin: 2px 0 0; font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.fields .wide { grid-column: span 2; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-height: 48px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border: 2px solid var(--green); background: var(--green-soft); font-weight: 600; padding: 11px 15px; }
.choice input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.lines-table input, .lines-table select { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.lines-table td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.lines-table th { padding: 8px 6px; }
.lines-table .col-qty { width: 96px; }
.lines-table .col-price { width: 120px; }
.lines-table .col-vat { width: 96px; }
.lines-table .col-kind { width: 190px; }
.lines-table .col-amount { width: 110px; text-align: right; }
.totals .line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.totals .grand { font-weight: 700; font-size: 20px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.hidden { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.scenario { border: 1px dashed #E3A04E; background: #FFF8EE; }

/* Καρτέλα παραστατικού */
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.doc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.aade { display: flex; flex-wrap: wrap; gap: 24px; }
.aade .qr { width: 148px; height: 148px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; background: #fff; }
.aade .qr svg { width: 138px; height: 138px; }
.kv { flex: 1 1 300px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; font-size: 14px; }
.kv .k { color: var(--muted); }
.kv .v { font-size: 15px; word-break: break-word; }
.kv .v.mono { font-size: 15px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.history li { display: flex; gap: 12px; }
.history .t { font-family: "IBM Plex Mono", monospace; color: var(--muted); min-width: 92px; }

/* Είσοδος */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.auth .card { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.auth h1 { font-size: 24px; }
.auth .brandline { font-weight: 700; font-size: 18px; }
.secret { font-family: "IBM Plex Mono", monospace; font-size: 15px; letter-spacing: .06em; background: var(--line-soft); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.qr-setup { display: flex; justify-content: center; }
.qr-setup svg { width: 200px; height: 200px; }
.code-input { font-family: "IBM Plex Mono", monospace; font-size: 24px !important; letter-spacing: .3em; text-align: center; }

/* Ρυθμίσεις */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 24px; font-size: 15px; }
.settings-grid .k { color: var(--muted); font-size: 14px; }

@media (max-width: 1000px) {
  .grid-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; gap: 8px 16px; }
  .tabs { flex-basis: 100%; order: 3; overflow-x: auto; flex-wrap: nowrap; }
  .tabs a { padding: 10px 12px; white-space: nowrap; }
  main { padding: 20px 16px; gap: 18px; }
  h1 { font-size: 23px; }
  .grid-sites { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .fields .wide { grid-column: auto; }
  .card { padding: 16px; }
  .actions .btn { flex: 1 1 auto; }
  .sticky { position: static; }
}
@media print {
  .top, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

/* Μενού «Νέο παραστατικό» (Όλα) */
.menu-wrap { position: relative; }
.menu-wrap > summary { list-style: none; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(23, 32, 27, .12); min-width: 240px; padding: 6px; z-index: 10; display: flex; flex-direction: column; }
.menu a { padding: 12px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; min-height: 44px; }
.menu a:hover { background: var(--green-soft); }
.grow { flex: 1 1 220px; }

/* Διορθώσεις μετά τον οπτικό έλεγχο */
.docno { font-variant-numeric: tabular-nums; white-space: nowrap; }
h1 .docno { font-weight: 700; }
.plain { font-family: "Commissioner", "Segoe UI", system-ui, sans-serif; }
.history .t { white-space: nowrap; min-width: 100px; }
.site-card .line.stacked { flex-direction: column; align-items: flex-start; gap: 2px; }
.site-card .line.stacked .num { font-weight: 600; }
@media (max-width: 640px) {
  .top { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .top .tabs { grid-column: 1 / -1; }
  .env-tail { display: none; }
  .top-right { gap: 8px; flex-wrap: nowrap; }
  .link-light { padding: 10px 2px; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
}
