/* Plugin Licenses — admin panel styles
 * Δομή: Tokens (χρώματα light/dark) → Base → Layout → Components → Skeleton → Drawer → Modal → Responsive.
 * Όλα τα χρώματα είναι CSS variables στο :root — για αλλαγή θέματος αλλάζεις μόνο εκεί.
 * Η σελίδα /licenses ΔΕΝ φορτώνει theme ή wp-admin CSS, γι' αυτό τα class names (.card, .btn) δεν συγκρούονται.
 * Αν ποτέ ενσωματωθεί μέσα σε theme ή στο wp-admin, χρειάζεται prefix (π.χ. .la-) σε όλα τα classes.
 */
/* Σχήμα: ΧΩΡΙΣ στρογγυλεμένες γωνίες (border-radius: 0 παντού) — όπως το dezitech.com.
 */
/* ===== Tokens =====
 * Παλέτα DeziTech: ΜΟΝΟ μαύρο (#00080D) και λευκό, με γκρι τόνους (απόφαση 21/09 — χωρίς κίτρινο).
 * Χρώματα υπάρχουν ΜΟΝΟ εκεί που λένε κάτι: status (πράσινο ενεργή, κόκκινο ανάκληση, μωβ web development, πορτοκαλί λήξη).
 * Light = default. Dark: ρητά (html[data-theme="dark"], διακόπτης πάνω δεξιά) ή από το σύστημα (prefers-color-scheme).
 * «accent» = το κύριο χρώμα κουμπιών: μαύρο στο light, λευκό στο dark (με αντίστροφο κείμενο).
 */
:root {
  --brand-dark: #00080D;
  --brand-light: #ffffff;

  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e3e5e8;
  --text: #00080D;
  --muted: #5c6570;
  --accent: var(--brand-dark);            /* κουμπιά, έμφαση */
  --accent-ink: #ffffff;                  /* κείμενο ΠΑΝΩ στο accent */
  --accent-soft: #eceef1;                 /* ήπιο φόντο επιλογής */
  --accent-text: var(--brand-dark);       /* links / έμφαση σε κείμενο */
  --focus: rgba(0, 8, 13, .22);
  --ok: #067647;   --ok-soft: #dcfae6;
  --warn: #b54708; --warn-soft: #fef0c7;
  --bad: #d92d20;  --bad-soft: #fee4e2;
  --dev: #6941c6;  --dev-soft: #f4ebff;   /* web development */
  --neutral-soft: #eef0f2;
  --sk-base: #e8eaed;
  --sk-shine: #f5f6f7;
  --side-bg: var(--brand-dark);           /* sidebar σκούρο και στα δύο θέματα */
  --side-text: #aab2bb;
  --side-strong: #ffffff;
  --side-hover: #0f1a22;
  --side-active: rgba(255, 255, 255, .10);
  --side-border: #13212b;
  --shadow: 0 1px 2px rgba(0, 8, 13, .05), 0 1px 3px rgba(0, 8, 13, .06);
  --shadow-lg: 0 20px 40px -12px rgba(0, 8, 13, .28);
  --radius: 0;                            /* τετράγωνα όπως το dezitech.com */
  --font: "ZonaPro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #00080D; --surface: #0a141b; --surface-2: #0f1c25; --border: #1c2a35;
    --text: #eef1f4; --muted: #8b97a3;
    --accent: #ffffff; --accent-ink: #00080D; --accent-soft: rgba(255, 255, 255, .08); --accent-text: #ffffff;
    --focus: rgba(255, 255, 255, .28);
    --ok: #47cd89; --ok-soft: rgba(71, 205, 137, .14); --warn: #f79009; --warn-soft: rgba(247, 144, 9, .14);
    --bad: #f97066; --bad-soft: rgba(249, 112, 102, .14); --dev: #b692f6; --dev-soft: rgba(182, 146, 246, .14);
    --neutral-soft: #15232e; --sk-base: #12202a; --sk-shine: #1a2b37;
    --side-bg: #000508; --side-hover: #0c1720; --side-border: #0f1c25;
    --shadow: none; --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #00080D; --surface: #0a141b; --surface-2: #0f1c25; --border: #1c2a35;
  --text: #eef1f4; --muted: #8b97a3;
  --accent: #ffffff; --accent-ink: #00080D; --accent-soft: rgba(255, 255, 255, .08); --accent-text: #ffffff;
  --focus: rgba(255, 255, 255, .28);
  --ok: #47cd89; --ok-soft: rgba(71, 205, 137, .14); --warn: #f79009; --warn-soft: rgba(247, 144, 9, .14);
  --bad: #f97066; --bad-soft: rgba(249, 112, 102, .14); --dev: #b692f6; --dev-soft: rgba(182, 146, 246, .14);
  --neutral-soft: #15232e; --sk-base: #12202a; --sk-shine: #1a2b37;
  --side-bg: #000508; --side-hover: #0c1720; --side-border: #0f1c25;
  --shadow: none; --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* το hidden να νικά πάντα τα display: grid/flex */
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 4px 8px 20px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 0; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.sidebar-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.sidebar-foot a { color: var(--muted); text-decoration: none; }
.sidebar-foot a:hover { color: var(--accent-text); }
.sidebar-user { font-weight: 600; color: var(--text); font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 18px; font-weight: 700; }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn.menu-btn { display: none; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; padding: 0 10px; height: 38px; width: 260px; color: var(--muted); }
.search input { border: 0; background: transparent; outline: none; width: 100%; color: var(--text); }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; width: 100%; }   /* 100% πλάτος */

/* ===== Components ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.card-head h2 { font-size: 15px; font-weight: 650; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat .hint { font-size: 12px; color: var(--muted); }

.btn { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 0; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .88; background: var(--accent); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-danger { color: var(--bad); }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 0; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 0; background: currentColor; }
.b-active { background: var(--ok-soft); color: var(--ok); }
.b-expired, .b-draft { background: var(--warn-soft); color: var(--warn); }
.b-revoked { background: var(--bad-soft); color: var(--bad); }
.b-deactivated { background: var(--neutral-soft); color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 13px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 0; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.sites-meter { display: flex; align-items: center; gap: 8px; }
.sites-meter .bar { width: 48px; height: 6px; background: var(--neutral-soft); border-radius: 0; overflow: hidden; }
.sites-meter .bar i { display: block; height: 100%; background: var(--accent); }

/* ===== Skeleton (η τεχνική του efood) ===== */
.sk { background: linear-gradient(100deg, var(--sk-base) 30%, var(--sk-shine) 50%, var(--sk-base) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; border-radius: 0; }
.sk-text { height: 12px; }
.sk-num { height: 28px; width: 40%; margin-top: 6px; }
.sk-pill { height: 20px; width: 64px; border-radius: 0; }
.sk-row { display: flex; gap: 24px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sk-row:last-child { border-bottom: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===== Drawer ===== */
.overlay { position: fixed; inset: 0; background: rgba(15,17,21,.45); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 21; transform: translateX(100%); transition: transform .22s ease, visibility .22s; display: flex; flex-direction: column; visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head, .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2, .modal-head h2 { font-size: 16px; }
.drawer-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.section-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.site { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0; }
.site + .site { margin-top: 8px; }
.site .grow { flex: 1; min-width: 0; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Modal ===== */
.modal { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border-radius: 0; box-shadow: var(--shadow-lg); z-index: 31; }
#modalOverlay { z-index: 30; }
form { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.field .help { font-size: 12px; color: var(--muted); }
.field input, .field select { height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); outline: none; }
.field input:disabled { opacity: .45; cursor: not-allowed; }
.field input:focus, .field select:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--focus); }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.notice { grid-column: 1 / -1; font-size: 13px; background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 0; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 0; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 40; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ===== Back to WordPress ===== */

/* ===== Stats (clickable) ===== */
.stat-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; text-decoration: none; }
.stat-btn:hover { border-color: var(--accent-text); }
.stat .value.warn, .warn { color: var(--warn); }
.bad { color: var(--bad); }
.stat .value small { font-size: 15px; color: var(--muted); font-weight: 600; }

/* ===== Filters ===== */
.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filter { height: 36px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); padding: 0 10px; font-size: 13px; min-width: 150px; }
select.filter { padding-right: 28px; }
.filter:focus-within, select.filter:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--focus); }
.filter.typeahead { display: flex; align-items: center; gap: 6px; position: relative; min-width: 220px; color: var(--muted); }
.filter.typeahead input { border: 0; outline: none; background: transparent; width: 100%; height: 34px; color: var(--text); }
.ta-clear { border: 0; background: var(--neutral-soft); color: var(--muted); width: 20px; height: 20px; border-radius: 0; cursor: pointer; line-height: 1; padding: 0; }
.list-meta { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

/* ===== Typeahead ===== */
.typeahead { position: relative; }
.ta-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow-lg); z-index: 40; padding: 4px; max-height: 300px; overflow-y: auto; }
.ta-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 0; cursor: pointer; text-align: left; color: var(--text); }
.ta-item span { font-size: 12px; color: var(--muted); }
.ta-item:hover, .ta-item.on { background: var(--accent-soft); }
.ta-empty { padding: 10px; color: var(--muted); font-size: 13px; }

/* ===== Overview: expandable customer rows ===== */
.grp-table tbody.grp { border-bottom: 1px solid var(--border); }
.grp-table tbody.grp:last-of-type { border-bottom: 0; }
.grp-table .grp-row td { border-bottom: 0; }
.grp-row { cursor: pointer; }
.grp-row:hover, .grp-row[aria-expanded="true"] { background: var(--surface-2); }
.grp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chev-cell { width: 36px; padding-right: 0 !important; }
.chev { display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.grp-row[aria-expanded="true"] .chev { transform: rotate(45deg); }
.cust-link { color: var(--text); font-weight: 600; text-decoration: none; }
.cust-link:hover { color: var(--accent-text); text-decoration: underline; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 0; background: var(--neutral-soft); font-size: 12px; font-weight: 600; }
.grp-detail > td { padding: 0 20px 16px 56px !important; background: var(--surface-2); border-bottom: 0; }
.sub-wrap { border: 1px solid var(--border); border-radius: 0; overflow-x: auto; background: var(--surface); }
.sub-table th { background: transparent; padding: 8px 14px; font-size: 11px; }
.sub-table td { padding: 10px 14px; font-size: 13px; }
.sub-table .go { color: var(--accent-text); font-weight: 600; white-space: nowrap; text-align: right; }
.list-end { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-top: 1px solid var(--border); }
.load-more .btn { min-width: 240px; }
.load-more .muted { font-size: 12px; }

/* ===== Customer card ===== */
.back-link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.back-link:hover { color: var(--accent-text); }
.cust-head { display: flex; gap: 18px; align-items: center; padding: 20px; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 0; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.cust-info { flex: 1; min-width: 200px; }
.cust-info h2 { font-size: 20px; }
.cust-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.cust-contact a { color: var(--accent-text); text-decoration: none; }
.cust-actions { display: flex; gap: 8px; }
.cust-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.cust-side { display: flex; flex-direction: column; gap: 20px; }
.site-list { padding: 8px; }
.site-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 0; }
.site-row + .site-row { border-top: 1px solid var(--border); border-radius: 0; }
.site-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notes { padding: 16px 20px; white-space: pre-wrap; font-size: 14px; }
.notice-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); padding: 12px 16px; border-radius: 0; font-size: 14px; }
.notice-bar .btn { margin-left: auto; }

/* ===== Drawer extras ===== */
.drawer-stack { display: flex; flex-direction: column; gap: 20px; }
.drawer-status { display: flex; align-items: center; gap: 10px; }
.empty.dashed { padding: 20px; border: 1px dashed var(--border); border-radius: 0; }

/* ===== Forms extras ===== */
.field textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); outline: none; font: inherit; color: inherit; resize: vertical; }
.field textarea:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--focus); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
.field-err { font-size: 12px; color: var(--bad); min-height: 0; }
.field-err:empty { display: none; }
.field .typeahead input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); outline: none; }
.field .typeahead input:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--focus); }
.field .typeahead input[readonly] { background: var(--surface-2); }
.field.invalid .typeahead input { border-color: var(--bad); }
.check { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 400 !important; }
.check input { height: auto !important; }
.static { height: 40px; display: flex; align-items: center; color: var(--muted); }
.notice.info { background: var(--neutral-soft); color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid-2 .full { grid-column: 1 / -1; }
form > .full, form > .notice, form > .key-box { grid-column: 1 / -1; }
.btn-block { width: 100%; white-space: normal; height: auto; min-height: 40px; padding: 8px 14px; text-align: center; }

/* ===== License entry (μεγάλη φόρμα) ===== */
.modal.modal-lg { width: min(940px, calc(100vw - 32px)); }
.modal-lg form { display: block; padding: 0; }
.lic-form { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.lic-main { padding: 8px 24px 24px; }
.form-sec { padding: 18px 0; border-bottom: 1px solid var(--border); }
.form-sec:last-child { border-bottom: 0; }
.form-sec h3 { font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step { width: 22px; height: 22px; border-radius: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; }
.seg { display: inline-flex; background: var(--neutral-soft); border-radius: 0; padding: 3px; margin-bottom: 14px; }
.seg-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 0; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.lic-summary { background: var(--surface-2); border-left: 1px solid var(--border); padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; align-self: start; border-bottom-right-radius: 14px; }
.sum-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sum-list { display: grid; grid-template-columns: 70px 1fr; gap: 8px 10px; margin: 0; font-size: 13px; }
.sum-list dt { color: var(--muted); }
.sum-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 12px; }
.sum-total b { font-size: 22px; }
.sum-disc { font-size: 12px; color: var(--ok); text-align: right; margin-top: -8px; }
.sum-note { font-size: 12px; color: var(--muted); }
.sum-demo { font-size: 12px; background: var(--warn-soft); color: var(--warn); padding: 8px 10px; border-radius: 0; }

/* ===== Key display ===== */
.key-box { text-align: center; padding: 20px; border: 2px dashed var(--accent); border-radius: 0; background: var(--accent-soft); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.key-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.key-value { white-space: nowrap; font-size: clamp(16px, 5vw, 24px); font-weight: 700; letter-spacing: .08em; user-select: all; overflow-wrap: anywhere; }

/* ===== Toast variants ===== */
.toast.ok { background: var(--ok); color: #fff; }
.toast.err { background: var(--bad); color: #fff; }

@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 900px) {
  .cust-grid { grid-template-columns: 1fr; }
  .lic-form { grid-template-columns: 1fr; }
  .lic-summary { border-left: 0; border-top: 1px solid var(--border); position: static; border-radius: 0; }
}
@media (max-width: 760px) {
  .filters-bar .filter { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .filter.typeahead { flex-basis: 100%; }
  .list-meta { margin-left: 0; width: 100%; }
  .grp-detail > td { padding: 0 10px 12px !important; }
  .grid-2 { grid-template-columns: 1fr; }
  .lic-main { padding: 4px 16px 16px; }
  .cust-actions { width: 100%; }
  .cust-actions .btn { flex: 1; }
}


/* ===== DeziTech sidebar (σκούρο και στα δύο θέματα, λευκό λογότυπο) ===== */
.sidebar { background: var(--side-bg); border-right-color: var(--side-border); color: var(--side-text); }
.brand { color: var(--side-strong); flex-direction: column; align-items: flex-start; gap: 6px; padding: 6px 8px 20px; }
.brand-logo { display: block; height: 28px; width: auto; max-width: 180px; filter: brightness(0) invert(1); }  /* οποιοδήποτε λογότυπο → λευκό */
.brand-word { font-weight: 800; font-size: 20px; letter-spacing: .08em; color: var(--side-strong); }          /* αν δεν φορτώσει το λογότυπο */
.brand-name { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--side-text); }
.nav a { color: var(--side-text); }
.nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.nav a.active { background: var(--side-active); color: var(--side-strong); box-shadow: inset 3px 0 0 var(--side-strong); }
.sidebar-foot, .sidebar-foot a { color: var(--side-text); }
.sidebar-foot a:hover { color: var(--side-strong); }
/* Αποσύνδεση: φόρμα POST που μοιάζει με link */
.logout-form { margin: 0; padding: 0; display: block; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--side-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--side-strong); }
.link-btn:focus-visible { outline: 2px solid var(--side-strong); outline-offset: 2px; }

/* ===== Login ===== */
.login-page { background: var(--side-bg); min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-wrap { width: min(400px, 100%); display: flex; flex-direction: column; gap: 22px; }
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.login-brand .brand-logo { height: 34px; }
.login-card { background: var(--surface); border: 1px solid var(--border); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.login-card h1 { font-size: 20px; margin-bottom: 8px; }
.login-card label { font-size: 13px; font-weight: 600; margin-top: 6px; }
.login-card input { height: 44px; padding: 0 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); outline: none; font: inherit; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.login-card .btn { height: 46px; margin-top: 14px; font-size: 15px; }
.login-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; font-size: 13px; font-weight: 600; }
.login-foot { color: var(--side-text); font-size: 12px; margin: 0; }
.sidebar-user { color: var(--side-strong); }

/* ===== Theme toggle ===== */
.theme-toggle { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: none; }
}

/* ===== Status: web development ===== */
.b-development { background: var(--dev-soft); color: var(--dev); }
.notice-bar.info { background: var(--dev-soft); color: var(--dev); }

/* ===== Έκπτωση ===== */
.disc { display: inline-block; padding: 0 6px; border-radius: 0; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 700; vertical-align: 1px; }

/* ===== Danger ===== */
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-solid:hover { background: var(--bad); filter: brightness(.92); }
.btn-danger-solid svg { width: 16px; height: 16px; }
.mr-auto { margin-right: auto; }

/* ===== Επιλογές (radio cards) στη φόρμα ===== */
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 0; cursor: pointer; font-weight: 400 !important; }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice input { margin-top: 3px; accent-color: var(--brand-dark); height: auto !important; }
:root[data-theme="dark"] .choice input { accent-color: #ffffff; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice small { color: var(--muted); font-size: 12px; }
.manual-price { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.manual-price input { width: 160px; }

/* ===== Drawer tabs + ιστορικό ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab { border: 0; background: transparent; padding: 10px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab-n { background: var(--neutral-soft); border-radius: 0; padding: 0 7px; font-size: 11px; }
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.log-item { display: flex; gap: 12px; padding: 8px 0; position: relative; font-size: 13px; }
.log-dot { width: 14px; height: 14px; border-radius: 0; background: var(--surface); border: 3px solid var(--muted); flex-shrink: 0; margin-top: 2px; z-index: 1; }
.log-body { min-width: 0; overflow-wrap: anywhere; }
.log-body .badge { font-size: 11px; padding: 0 8px; }
.ev-created .log-dot, .ev-reactivated .log-dot { border-color: var(--ok); }
.ev-renewed .log-dot { border-color: var(--text); }
.ev-status_changed .log-dot { border-color: var(--dev); }
.ev-key_rotated .log-dot { border-color: var(--warn); }
.ev-revoked .log-dot { border-color: var(--bad); }
.ev-site_activated .log-dot { border-color: var(--ok); background: var(--ok); }
.ev-site_deactivated .log-dot { border-color: var(--muted); background: var(--muted); }
/* Έλεγχοι sites (event «check»): μικρή γκρι κουκκίδα· αποτυχία = κόκκινη */
.ev-check .log-dot { width: 10px; height: 10px; margin: 4px 2px 0; border-width: 2px; border-color: var(--border-strong, var(--muted)); }
.ev-check.check-fail .log-dot { border-color: var(--bad); background: var(--bad); }
.ev-check .log-body { color: var(--muted); }
.ev-check .log-body b { color: var(--text); font-weight: 600; }
.log-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 12px; }
.log-note { font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border); }
.seg-btn { background: var(--surface); color: var(--text); border: 0; border-right: 1px solid var(--border); padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: var(--neutral-soft); }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); }
.seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#logMore { border-top: 0; padding: 10px 0 0; }

@media (max-width: 760px) {
  .choice-row { grid-template-columns: 1fr; }
  .cust-actions { flex-wrap: wrap; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } .search { width: 180px; } }
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; z-index: 25; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-actions { width: 100%; }
  .search { flex: 1; width: auto; }
  #newBtnLabel { display: none; }
  .content { padding: 16px; }
  .stats { gap: 10px; }
  .stat .value { font-size: 22px; }
  th, td { padding: 10px 14px; }
  .hide-sm { display: none; }
  form { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
}

/* ===== Στοιχεία τιμολόγησης ===== */
.cust-tax { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; }
.cust-tax b { font-weight: 600; }
.form-subtitle { font-size: 13px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.form-subtitle .muted { font-weight: 400; }
.inv-warn { margin-top: 10px; font-size: 13px; background: var(--warn-soft); color: var(--warn); padding: 8px 12px; }
.inv-hint.req { color: var(--text); font-weight: 600; }

.login-help { font-size: 13px; color: var(--muted); margin: 0 0 6px; line-height: 1.5; }
.login-card label .muted { font-weight: 400; }
