:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d23;
  --muted: #5b6270;
  --border: #e3e6eb;
  --border-strong: #c9ced6;
  --accent: #2457c5;
  --accent-dark: #1a3f94;
  --accent-bg: #eef3fd;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #9a4a06;
  --warn-bg: #fff4e5;
  --warn-border: #f2c98a;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --chip: #eef0f3;
  --chip-text: #3a404b;
}

* { box-sizing: border-box; }
/* Το μενού το εμφανίζει το App Bridge στην πλαϊνή στήλη του admin */
ui-nav-menu { display: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1 { margin: 0; font-size: 24px; font-weight: 700; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 19px; font-weight: 600; }

.section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.section > .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.section > .body { padding: 14px 18px; }
.scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid #eef0f3; vertical-align: top; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fafbfc; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--chip-text); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--accent-bg); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 14px 18px; border: 1px solid; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-border); color: #7a3e06; }
.banner.bad { background: var(--bad-bg); border-color: #f4c7c3; color: var(--bad); }
.banner.info { background: var(--accent-bg); border-color: #c7d6f5; color: var(--accent-dark); }
.banner pre { margin: 6px 0 0; white-space: pre-wrap; font-family: inherit; font-size: 13px; }
.banner strong { display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f3f4f6; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }

input[type=search], select { min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); font: inherit; background: var(--surface); color: var(--text); }
input[type=search] { width: 320px; max-width: 100%; }
label.inline { display: inline-flex; align-items: center; gap: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid #eef0f3; }
.list li:first-child { border-top: 0; }
.list a { display: flex; flex-direction: column; gap: 2px; padding: 11px 18px; color: inherit; }
.list a:hover { background: #fafbfc; text-decoration: none; }
.list .t { font-weight: 600; }
.list .s { color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none !important; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; cursor: pointer; }
.tab[aria-pressed=true] { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }

.diff td.path { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--chip-text); word-break: break-all; width: 30%; }
.diff .val { display: block; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; padding: 4px 8px; border-radius: 6px; font-size: 12.5px; }
.diff .old { background: var(--bad-bg); color: #7a1a12; }
.diff .new { background: var(--ok-bg); color: #054d30; }
.diff .none { color: var(--muted); font-style: italic; }

details > summary { cursor: pointer; padding: 12px 18px; font-weight: 600; }
details pre { margin: 0; padding: 0 18px 16px; white-space: pre-wrap; word-break: break-word; max-height: 520px; overflow: auto; }

.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.error { background: var(--bad-bg); color: var(--bad); border: 1px solid #f4c7c3; border-radius: 12px; padding: 14px 18px; }
.pager { display: flex; justify-content: center; padding: 12px; border-top: 1px solid #eef0f3; }
.spacer { flex: 1; }

@media (max-width: 640px) {
  .page { padding: 16px 12px 48px; }
  input[type=search] { width: 100%; }
}
