/* ΛΟΓΙΣΤΗΣ — σύστημα σχεδίασης v2 «Λογιστικό έντυπο»
   Χαρτί + μελάνι. Μπορντό = η σφραγίδα του γραφείου· ώχρα, λαδί, πετρόλ, κεραμιδί = τα χρώματα
   των ειδών (ΦΠΑ, ΕΦΚΑ, έγγραφα, πληρωμές). Σέριφ (Literata) για τίτλους/ποσά, Commissioner
   (ελληνικό σχέδιο) για το κείμενο. Γραμματοσειρές από τον δικό μας server — καμία εξωτερική κλήση. */

@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/commissioner-greek-full-normal.woff2") format("woff2-variations");
  unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: "Commissioner"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/commissioner-latin-full-normal.woff2") format("woff2-variations");
  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: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("/fonts/literata-greek-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("/fonts/literata-latin-opsz-normal.woff2") format("woff2-variations");
  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: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url("/fonts/literata-greek-opsz-italic.woff2") format("woff2-variations");
  unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url("/fonts/literata-latin-opsz-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }

:root {
  color-scheme: light;
  /* χαρτί & μελάνι */
  --paper: #f4efe6;
  --paper-2: #fbf8f2;          /* κάρτες */
  --paper-3: #ece4d6;          /* χωνευτά πεδία */
  --ink: #1f1b18;
  --ink-2: #544b44;
  --ink-3: #766c63;            /* ≥ 4.5:1 στο χαρτί */
  --rule: rgba(31, 27, 24, .13);
  --rule-strong: rgba(31, 27, 24, .28);
  /* σφραγίδα γραφείου */
  --burgundy: #6e1e32;
  --burgundy-2: #8f2d45;
  --burgundy-tint: #f2e2e4;
  --on-burgundy: #fbf8f2;
  /* χρώματα ειδών */
  --ochre: #9a6a12;   --ochre-tint: #f5ead2;
  --olive: #56702f;   --olive-tint: #e7eedb;
  --petrol: #0f6b76;  --petrol-tint: #daecee;
  --terra: #b24f22;   --terra-tint: #f6e1d6;
  --violet: #5b4b8a;  --violet-tint: #e8e3f3;
  --red: #b3262d;
  /* διαγράμματα (επικυρωμένα: CVD ΔE 14.9 στο #fbf8f2) */
  --chart-in: #008c9a;
  --chart-out: #c4622d;
  --shadow: 0 1px 0 rgba(31, 27, 24, .04), 0 8px 24px -16px rgba(31, 27, 24, .35);
  --radius: 14px;
  --gutter: 18px;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .12  0 0 0 0 .1  0 0 0 0 .09  0 0 0 .055 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Σκοτεινό θέμα: μόνο όταν το επιλέξει ο χρήστης (ή «Αυτόματο» σε σκοτεινή συσκευή) — βλ. theme.js */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171412;
  --paper-2: #221d1a;
  --paper-3: #2c2622;
  --ink: #efe7dd;
  --ink-2: #c9bdb1;
  --ink-3: #a2968a;
  --rule: rgba(239, 231, 221, .12);
  --rule-strong: rgba(239, 231, 221, .26);
  --burgundy: #d9869a;          /* ως μελάνι/κείμενο στη νύχτα */
  --burgundy-2: #9b3450;        /* γέμισμα κουμπιών */
  --burgundy-tint: #3a2129;
  --on-burgundy: #fff6f2;
  --ochre: #e0b25a;   --ochre-tint: #3a2f1c;
  --olive: #a8c27c;   --olive-tint: #2a3121;
  --petrol: #6cc3cc;  --petrol-tint: #1c3134;
  --terra: #ec9a73;   --terra-tint: #3b261d;
  --violet: #b9aaf0;  --violet-tint: #2c2740;
  --red: #f07a73;
  --chart-in: #16a3b1;
  --chart-out: #d9703c;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 26px -18px rgba(0, 0, 0, .8);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .9  0 0 0 .035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-variation-settings: "FLAR" 30;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--burgundy); text-underline-offset: 3px; }
::selection { background: var(--burgundy-tint); }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.ico { width: 22px; height: 22px; display: inline-block; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 18px; height: 18px; }
.loading { padding: 48px 20px; text-align: center; color: var(--ink-3); font-family: var(--serif); font-style: italic; }

/* ---------- Τυπογραφία ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; line-height: 1.15; margin: 4px 0 2px; }
h3 { font-size: 1.08rem; margin: 0 0 4px; }
.serif { font-family: var(--serif); }
.meta { color: var(--ink-3); font-size: .86rem; }
.note { color: var(--ink-2); font-size: .86rem; margin-top: 8px; }
.provisional { color: var(--ochre); }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); margin: 26px 0 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }
.dateline { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.greeting { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.1; margin: 4px 0 2px; }
.greeting em { font-style: italic; color: var(--burgundy); font-weight: 500; }

/* ---------- Είσοδος ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 40px var(--gutter); max-width: 460px; margin: 0 auto; }
.login .brand { display: flex; align-items: center; gap: 12px; }
.login .brand .mark { width: 46px; height: 46px; }
.login .brand .word { font-size: .8rem; letter-spacing: .22em; font-weight: 700; color: var(--burgundy); }
.login h1 { font-size: 2.3rem; line-height: 1.05; margin: 8px 0 0; font-weight: 500; }
.login h1 em { color: var(--burgundy); }
.login p { color: var(--ink-2); margin: 0; }
.login form { display: flex; flex-direction: column; gap: 2px; }
.demo-note { color: var(--ink-3); font-size: .82rem; margin-top: 6px; border-top: 1px solid var(--rule); padding-top: 12px; }

/* ---------- Πλαίσιο εφαρμογής ---------- */
.shell { max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.masthead .mark { width: 30px; height: 30px; flex: none; }
.masthead .word { font-size: .68rem; letter-spacing: .2em; font-weight: 800; color: var(--burgundy); line-height: 1; }
.masthead .who { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: transparent; border: 1px solid transparent; color: var(--ink); }
.icon-btn:hover { background: var(--paper-3); }
.bell-count { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--burgundy-2); color: var(--on-burgundy); font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.bell-count[hidden] { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--burgundy-tint); color: var(--burgundy); font-weight: 800; font-size: .8rem; letter-spacing: .02em; border: 1px solid var(--rule); }

main { flex: 1; padding: 14px var(--gutter) 108px; }
.freshness { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .8rem; margin-bottom: 8px; }

/* ---------- Κάρτες ---------- */
.card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 4px; }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.rowline:last-child { border-bottom: none; }
.rowline .meta { margin-top: 1px; }
.amount { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; font-weight: 600; white-space: nowrap; }
.empty { color: var(--ink-3); text-align: center; padding: 26px 12px; font-family: var(--serif); font-style: italic; }

/* Λίστα ενεργειών: μία «σελίδα» με χρωματιστή ράχη ανά είδος, όχι σωρός από κουτιά */
.action { display: flex; align-items: center; gap: 12px; position: relative; padding-left: 18px; }
.action::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--rule-strong); }
.action.status-ERROR::before { background: var(--red); }
.action.status-ACTION::before { background: var(--terra); }
.action.status-PROCESSING::before { background: var(--petrol); }
.action.status-VERIFIED::before { background: var(--olive); }
.action.status-PENDING::before { background: var(--ochre); }
.actions-card { padding: 4px 16px; }
.actions-card .action { padding: 13px 0 13px 16px; border-bottom: 1px solid var(--rule); }
.actions-card .action:last-child { border-bottom: none; }
.actions-card .action::before { top: 14px; bottom: 14px; }
.calm { border-style: dashed; background: transparent; box-shadow: none; }
.calm-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--olive); }
.action .body { flex: 1; min-width: 0; }
.action .title { font-weight: 650; line-height: 1.3; }
.action .detail { color: var(--ink-2); font-size: .86rem; margin-top: 2px; }

/* Κατάσταση: τελεία + λέξη (ποτέ μόνο χρώμα) */
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--ink-3); }
.sdot.VERIFIED { background: var(--olive); } .sdot.PENDING { background: var(--ochre); } .sdot.PROCESSING { background: var(--petrol); }
.sdot.ACTION { background: var(--terra); } .sdot.ERROR { background: var(--red); } .sdot.UNKNOWN { background: var(--ink-3); }

/* ---------- Κουμπιά ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--burgundy-2); color: var(--on-burgundy); border: 1px solid transparent; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; letter-spacing: .01em; line-height: 1.1;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:hover { background: var(--burgundy); }
:root[data-theme="dark"] .btn:hover { background: #ab3d5b; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.secondary:hover { background: var(--paper-3); }
.btn.small { padding: 7px 13px; font-size: .86rem; }
.btn:disabled { opacity: .55; }
.btn .ico { width: 18px; height: 18px; }
.link { background: none; border: none; color: var(--burgundy); padding: 6px; font-weight: 650; }

/* Ετικέτες/«σφραγίδες» */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; }
.badge.verified { background: var(--olive-tint); color: var(--olive); border-color: transparent; }
.badge.pending { background: var(--ochre-tint); color: var(--ochre); border-color: transparent; }
.badge.error { background: color-mix(in srgb, var(--red) 12%, var(--paper-2)); color: var(--red); border-color: transparent; }
.stamp { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 6px; transform: rotate(-2deg); }

/* ---------- Αριθμοί («καθολικό») ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kpi { padding: 10px 12px 12px 0; border-bottom: 1px solid var(--rule); }
.kpi:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: 12px; }
.kpi:nth-child(even) { padding-left: 14px; }
.kpi .label { color: var(--ink-3); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.kpi .value { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-top: 2px; font-variant-numeric: lining-nums tabular-nums; }
.kpi.wide { grid-column: 1 / -1; border-right: none; padding-left: 0; border-bottom: none; }
.kpi.wide .value { font-size: 2rem; }
.kpi .value.result { color: var(--burgundy); }
.kpis.q4 .kpi .value { font-size: 1.15rem; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat:nth-child(3n) { border-right: none; }
.stat:nth-last-child(-n+3) { border-bottom: none; }
.stat .n { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.stat .l { color: var(--ink-3); font-size: .72rem; line-height: 1.25; margin-top: 2px; }

.attention-row { display: flex; gap: 10px; align-items: flex-start; }
.attention-row .sev { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.attention-row .sev.RED { background: var(--red); }
.attention-row .sev.ORANGE { background: var(--terra); }
.attention-row .reasons { color: var(--ink-2); font-size: .86rem; }

/* ---------- Μηνύματα ---------- */
.msg { max-width: 84%; padding: 10px 13px; border-radius: 16px; margin-bottom: 8px; line-height: 1.4; }
.msg.FROM_CLIENT { margin-left: auto; background: var(--burgundy-2); color: var(--on-burgundy); border-bottom-right-radius: 5px; }
.msg.TO_CLIENT { margin-right: auto; background: var(--paper-3); border-bottom-left-radius: 5px; }
.msg .who { font-size: .72rem; opacity: .8; margin-bottom: 2px; }
.composer { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.composer input { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink); border-radius: 999px; padding: 11px 15px; font: inherit; }

/* ---------- Κάτω μπάρα ---------- */
.nav {
  position: sticky; bottom: 0; z-index: 6;
  display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-top: 1px solid var(--rule);
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
}
.nav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: var(--ink-3); font-size: .68rem; font-weight: 650; padding: 7px 2px 5px; border-radius: 12px; }
.nav button .ico { width: 23px; height: 23px; }
.nav button.active { color: var(--burgundy); }
.nav button.active::after { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--burgundy); }
.nav button .dot { position: absolute; top: 5px; left: calc(50% + 8px); width: 8px; height: 8px; background: var(--terra); border-radius: 50%; box-shadow: 0 0 0 2px var(--paper-2); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  background: var(--ink); color: var(--paper-2);
  padding: 11px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; z-index: 60;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); text-align: center;
  animation: toast-in .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Φόρμες ---------- */
.field { width: 100%; margin: 6px 0; background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink); border-radius: 12px; padding: 12px 13px; font: inherit; }
.field:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px var(--burgundy-tint); }
textarea.field { min-height: 80px; resize: vertical; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field-label { display: block; margin-top: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.form-error { color: var(--red); font-size: .86rem; min-height: 1.2em; margin-top: 6px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--burgundy-2); }
#login-form, #setup-form { display: flex; flex-direction: column; }

/* ---------- Παράθυρα (bottom sheet στο κινητό) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 16, 14, .46); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto;
  background: var(--paper-2); background-image: var(--grain); border: 1px solid var(--rule);
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 18px);
  box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .45);
  animation: sheet .26s cubic-bezier(.2, .8, .2, 1);
}
.modal::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--rule-strong); margin: 0 auto 12px; }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 620px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; }
  .modal::before { display: none; }
}
.modal h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 10px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.choice-list .btn { width: 100%; justify-content: flex-start; padding: 13px 16px; }
.cred { background: var(--paper-3); border-radius: 12px; padding: 11px 13px; margin: 8px 0; font-variant-numeric: tabular-nums; word-break: break-all; }
.cred-pass { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .06em; }
.mail-preview { margin-top: 10px; }
.mail-preview summary { cursor: pointer; }
.mail-preview pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .84rem; background: var(--paper-3); border-radius: 12px; padding: 11px 13px; margin: 8px 0 0; max-height: 40dvh; overflow-y: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sheet-head h3 { margin: 0; }

/* ---------- Ειδοποιήσεις ---------- */
.notif-group { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 6px; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: start; background: none; border: none; border-bottom: 1px solid var(--rule); padding: 12px 2px; color: var(--ink); }
.notif:last-child { border-bottom: none; }
.notif .nic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--paper-3); color: var(--ink-2); }
.notif .nic .ico { width: 19px; height: 19px; }
.notif .ntext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.notif .t { font-weight: 650; line-height: 1.3; }
.notif .b { color: var(--ink-2); font-size: .88rem; white-space: pre-line; }
.notif .w { color: var(--ink-3); font-size: .74rem; }
.notif.unread .t::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--burgundy-2); margin-right: 7px; vertical-align: 2px; }
.push-card { border-style: dashed; border-color: var(--rule-strong); background: transparent; box-shadow: none; }
.push-card .title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.push-card .detail { color: var(--ink-2); font-size: .9rem; }
.install-card { border: 1px solid var(--rule); background: var(--burgundy-tint); box-shadow: none; }
.install-card .title { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; color: var(--burgundy); }
.install-card .detail { color: var(--ink-2); font-size: .9rem; }
.install-card .composer { margin-top: 10px; }
.steps { margin: 6px 0 8px; padding-left: 20px; font-size: .92rem; }
.steps li { margin: 4px 0; }
.share-ico { display: inline-block; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0 5px; font-size: .8rem; }

/* ---------- Είδη προθεσμιών (χρώμα ράχης/ετικέτας + λέξη) ---------- */
.k-VAT { --k: var(--burgundy); --kt: var(--burgundy-tint); }
.k-EFKA { --k: var(--ochre); --kt: var(--ochre-tint); }
.k-APD, .k-FMY { --k: var(--violet); --kt: var(--violet-tint); }
.k-OBLIGATION { --k: var(--terra); --kt: var(--terra-tint); }
.k-REQUEST { --k: var(--petrol); --kt: var(--petrol-tint); }
.k-ASSIGNMENT { --k: var(--olive); --kt: var(--olive-tint); }
.kind { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: var(--kt, var(--paper-3)); color: var(--k, var(--ink-2)); margin-right: 5px; vertical-align: 1px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--k, var(--ink-3)); }
.dot.off { background: transparent; border: 1.5px solid var(--red); }
.cal-row { position: relative; }
.cal-row[data-open] { cursor: pointer; }

/* ---------- Ημερολόγιο: ημεροδείκτης τοίχου ---------- */
.cal { padding: 16px 14px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; }
.cal-head .btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; border-top: 1.5px solid var(--ink); padding-top: 6px; }
.cal-wd { text-align: center; color: var(--ink-3); font-size: .66rem; font-weight: 800; letter-spacing: .1em; padding: 2px 0 6px; }
.cal-wd:last-of-type, .cal-wd:nth-child(7) { color: var(--red); }
.cal-day { position: relative; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; background: none; border: none; color: var(--ink); border-radius: 12px; padding: 6px 0 4px; }
.cal-day .n { font-family: var(--serif); font-size: 1.12rem; font-weight: 500; line-height: 1; position: relative; z-index: 1; font-variant-numeric: lining-nums; }
.cal-day.off .n { color: var(--ink-3); }
.cal-day.sun .n, .cal-day.hol .n { color: var(--red); font-weight: 650; }
.cal-day .dots { display: flex; gap: 2px; height: 6px; }
.cal-day .dots .dot { width: 6px; height: 6px; border-radius: 2px; }
.cal-day.sel { background: var(--burgundy-tint); }
.cal-day.sel .n { color: var(--burgundy); font-weight: 700; }
.cal-day .scribble { position: absolute; top: -1px; left: 50%; width: 38px; height: 38px; transform: translateX(-50%) rotate(-8deg); color: var(--burgundy); pointer-events: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 12px 0 4px; font-size: .74rem; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-list { margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 10px; }
.cal-date { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 2px; }
.cal-date .badge { font-family: var(--sans); }

/* ---------- Διαγράμματα ---------- */
.chart-card { padding: 14px 14px 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); }
.chart .grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .zero { stroke: var(--ink-2); stroke-width: 1; }
.chart .s-inc, .sw.s-inc, .chart .s-profit, .sw.s-profit { fill: var(--chart-in); background: var(--chart-in); }
.chart .s-exp, .sw.s-exp, .chart .s-loss, .sw.s-loss { fill: var(--chart-out); background: var(--chart-out); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.on { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.chart-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.chart-tip { margin-top: 10px; padding: 9px 12px; background: var(--paper-3); border-radius: 12px; font-size: .84rem; color: var(--ink); min-height: 2.4em; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.year-sel { width: auto; margin: 0; padding: 7px 34px 7px 12px; font-weight: 700; }
.vat-top { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 10px; }
.vat-top .meta { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.vat-top .field { margin-top: 4px; }
.assign-sel { width: auto; max-width: 50%; margin: 0; padding: 7px 30px 7px 10px; font-size: .86rem; }
details.card > summary { cursor: pointer; }

@media (min-width: 620px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis .kpi { border-right: 1px solid var(--rule); padding: 10px 14px; }
  .kpis .kpi:nth-child(3n) { border-right: none; }
  .greeting { font-size: 2.4rem; }
}

/* λεπτομέρειες */
.file { display: flex; align-items: center; gap: 6px; }
.file .ico { color: var(--ink-3); }
.soon { color: var(--terra); font-weight: 700; }
.note .ico, .meta .ico, .form-error .ico { width: 16px; height: 16px; vertical-align: -3px; }
.push-card .title .ico, .install-card .title .ico { width: 22px; height: 22px; }

/* Μικρές γραμμές ρύθμισης (εγκατάσταση/ειδοποιήσεις) κάτω από τον χαιρετισμό */
.setup { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.setup:not(:has(.setup-row)) { display: none; }
.setup > div:empty { display: none; }
.setup-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.setup-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--burgundy-tint); color: var(--burgundy); flex: none; }
.setup-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.setup-text strong { font-size: .95rem; }
.setup-text .meta { font-size: .8rem; }
.x { background: none; border: none; color: var(--ink-3); font-size: 1.4rem; line-height: 1; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.x:hover { background: var(--paper-3); color: var(--ink); }
.more { text-align: center; margin: -4px 0 8px; }
.setup-row .btn.small { padding: 8px 14px; font-size: .84rem; }
.setup-ic { width: 34px; height: 34px; border-radius: 10px; }

/* Χρώμα ράχης ανά είδος ενέργειας· το εκπρόθεσμο είναι πάντα κόκκινο */
.actions-card .action.act-PAY::before { background: var(--terra); }
.actions-card .action.act-UPLOAD::before { background: var(--petrol); }
.actions-card .action.act-DECIDE::before { background: var(--olive); }
.actions-card .action.act-NOTE::before { background: var(--ochre); }
.actions-card .action.status-ERROR::before { background: var(--red); }
.actions-card .action.status-VERIFIED::before { background: var(--olive); }

/* Απαλλαγή ΦΠΑ μικρών επιχειρήσεων (άρθρο 39): τζίρος έναντι ορίου 10.000 € */
.turnover { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.turnover-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.turnover-head .amount { font-family: var(--serif); font-size: 1.05rem; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--olive); }
.turnover.lvl-NEAR .meter i { background: var(--ochre); }
.turnover.lvl-OVER .meter i, .turnover.lvl-ALARM .meter i { background: var(--red); }
.turnover.lvl-OVER, .turnover.lvl-ALARM { border-color: var(--red); }
.turnover-warn { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ink); font-weight: 600; }
@media (max-width: 370px) { .vat-top { grid-template-columns: 1fr; gap: 0; } }
.meter b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--paper); }

/* Ηχηρός συναγερμός (CRITICAL): σε όλη την οθόνη μέχρι «Το είδα» — κόκκινη σφραγίδα πάνω στο χαρτί */
.alarm-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(58, 10, 16, .86);
}
.alarm-card {
  width: 100%; max-width: 420px; background: var(--paper-2); color: var(--ink); text-align: center;
  border: 2px solid var(--red); border-radius: 14px; padding: 26px 22px 22px; position: relative;
  box-shadow: 0 0 0 6px var(--paper-2), 0 0 0 8px var(--red);
  animation: alarm-pulse 1.1s ease-in-out infinite;
}
.alarm-icon { display: grid; margin: 0 auto; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: var(--paper-2); }
.alarm-icon svg { width: 34px; height: 34px; }
.alarm-kicker {
  display: inline-block; margin-top: 12px; color: var(--red); font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  font-size: .8rem; border: 2px solid currentColor; border-radius: 4px; padding: 2px 10px; transform: rotate(-2deg);
}
.alarm-card h2 { margin: 10px 0 8px; font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; }
.alarm-card p { margin: 0 0 18px; color: var(--ink-2); }
.alarm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.alarm-actions .btn { min-width: 130px; }
@keyframes alarm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) { .alarm-card { animation: none; } }

/* Επιλογή θέματος (μενού λογαριασμού): Φωτεινό / Σκοτεινό / Αυτόματο */
.theme-pick { margin: 4px 0 14px; }
.theme-pick .field-label { margin: 0 0 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--paper-3); }
.seg button { font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--paper-2); color: var(--burgundy); box-shadow: 0 0 0 1px var(--rule-strong); }
.seg button:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 1px; }
.theme-pick .meta { margin-top: 6px; font-size: .8rem; }
