:root {
  --bg: #f7f7f5; --card: #ffffff; --text: #1d1d1f; --muted: #6b6b70; --line: #e3e3e0;
  --accent: #1f5fbf; --accent-text: #ffffff; --warn-bg: #fff4e5; --warn: #8a4b00;
  --high: #b3261e; --medium: #a35c00; --info: #4a5a70; --ok: #1e7a3c;
  --c1: #2f6fd0; --c2: #2a9d6a; --c3: #d0612f;
  --busy-a: #c2410c; --busy-b: #f59e0b;
}
/* Themes: <html data-theme="…"> (το ορίζει το μενού «Εμφάνιση»· χωρίς επιλογή = αυτόματο από το σύστημα).
   data-scheme="dark|light" δείχνει αν το τρέχον theme είναι σκούρο, για τους κανόνες που εξαρτώνται από αυτό. */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]), :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #141416; --card: #1d1d20; --text: #ececee; --muted: #a0a0a8; --line: #2e2e33;
    --accent: #5b93e6; --accent-text: #0d0d0f; --warn-bg: #3a2a12; --warn: #f3c27a;
    --high: #ff7a70; --medium: #f0a64a; --info: #a7b6cc; --ok: #6fcf8f;
    --c1: #5b93e6; --c2: #4cc38a; --c3: #f08a5a;
    --busy-a: #c2410c; --busy-b: #f59e0b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141416; --card: #1d1d20; --text: #ececee; --muted: #a0a0a8; --line: #2e2e33;
  --accent: #5b93e6; --accent-text: #0d0d0f; --warn-bg: #3a2a12; --warn: #f3c27a;
  --high: #ff7a70; --medium: #f0a64a; --info: #a7b6cc; --ok: #6fcf8f;
  --c1: #5b93e6; --c2: #4cc38a; --c3: #f08a5a;
}
:root[data-theme="ocean"] {
  color-scheme: dark;
  --bg: #0b1626; --card: #11223a; --text: #e6f0fb; --muted: #93a9c4; --line: #1f3a5c;
  --accent: #38bdf8; --accent-text: #04202f; --warn-bg: #3b2a10; --warn: #fcd38d;
  --high: #fb7185; --medium: #fbbf24; --info: #a5c3e0; --ok: #4ade80;
  --c1: #38bdf8; --c2: #34d399; --c3: #fb923c;
}
:root[data-theme="paper"] {
  --bg: #f4ecd8; --card: #fbf6ea; --text: #3b2f22; --muted: #7a6a55; --line: #e0d3b5;
  --accent: #9a4a12; --accent-text: #fffaf0; --warn-bg: #fbe7c6; --warn: #7a3e00;
  --high: #a61b1b; --medium: #9a5a00; --info: #5b5040; --ok: #3f6b2a;
  --c1: #9a4a12; --c2: #4d7c3a; --c3: #b8860b;
}
:root[data-theme="forest"] {
  --bg: #f1f6f0; --card: #ffffff; --text: #18261b; --muted: #5d6e60; --line: #d3e2d0;
  --accent: #15803d; --accent-text: #ffffff; --warn-bg: #fdf3dc; --warn: #7c4a03;
  --high: #b3261e; --medium: #a35c00; --info: #3f5a4a; --ok: #15803d;
  --c1: #15803d; --c2: #0e7490; --c3: #ca8a04;
}
:root[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #1b1c1e; --card: #242528; --text: #e8e8e6; --muted: #a1a1a6; --line: #36373b;
  --accent: #f59e0b; --accent-text: #1b1c1e; --warn-bg: #3a2a12; --warn: #fcd38d;
  --high: #f87171; --medium: #fbbf24; --info: #b4b8bf; --ok: #86efac;
  --c1: #f59e0b; --c2: #60a5fa; --c3: #34d399;
}
:root[data-theme="contrast"] {
  --bg: #ffffff; --card: #ffffff; --text: #000000; --muted: #222222; --line: #000000;
  --accent: #0000cc; --accent-text: #ffffff; --warn-bg: #fff2a8; --warn: #000000;
  --high: #b00000; --medium: #7a3d00; --info: #000000; --ok: #005a00;
  --c1: #0000cc; --c2: #006b00; --c3: #b00000;
}
:root[data-theme="contrast"] a { text-decoration: underline; }
:root[data-theme="contrast"] body { font-weight: 500; }
:root[data-theme="contrast"] :focus-visible { outline: 3px solid #ff8c00; outline-offset: 2px; }

/* Συμπαγής προβολή: μικρότερα γράμματα και κενά */
:root[data-density="compact"] body { font-size: 13.5px; line-height: 1.4; }
:root[data-density="compact"] main { padding: 10px 14px; }
:root[data-density="compact"] h1 { font-size: 1.35rem; }
:root[data-density="compact"] h2 { font-size: 1.02rem; margin: 1rem 0 .4rem; }
:root[data-density="compact"] th, :root[data-density="compact"] td { padding: 3px 7px; }
:root[data-density="compact"] section { margin-bottom: .6rem; }
:root[data-density="compact"] .kpi { padding: 6px 9px; }
:root[data-density="compact"] .top { padding: 6px 14px; }

/* Μενού «Εμφάνιση» */
.theme-menu { display: inline-block; position: relative; margin-left: 6px; }
.theme-menu > summary { cursor: pointer; list-style: none; color: var(--accent); }
.theme-menu > summary::-webkit-details-marker { display: none; }
.theme-panel { position: absolute; right: 0; top: 1.8rem; z-index: 50; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; width: 230px; box-shadow: 0 6px 20px rgba(0,0,0,.18); display: grid; gap: 2px; }
.theme-panel button.theme-opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent;
  color: var(--text); border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; font: inherit; cursor: pointer; }
.theme-panel button.theme-opt:hover { border-color: var(--line); }
.theme-panel button.theme-opt[aria-pressed="true"] { border-color: var(--accent); }
.theme-swatch { width: 26px; height: 16px; border-radius: 4px; border: 1px solid rgba(127,127,127,.5); flex: 0 0 auto;
  background: linear-gradient(90deg, var(--sw-bg) 0 60%, var(--sw-ac) 60% 100%); }
.theme-panel .theme-sep { border-top: 1px solid var(--line); margin: 6px 0 4px; }
.theme-panel label { display: flex; gap: 8px; align-items: center; padding: 4px 7px; cursor: pointer; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin: .4rem 0; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: .95rem; margin: 0 0 .4rem; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
section { margin-bottom: 1rem; }

.top { display: flex; gap: 16px; align-items: center; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text); }
.nav { margin-left: auto; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 150px; }
.stats strong { font-size: 1.3rem; }
.search { display: flex; gap: 8px; flex: 1; min-width: 220px; max-width: 520px; }
.search input { flex: 1; min-width: 0; }
.search.big { max-width: 640px; margin-top: 1rem; }
.search.big input { font-size: 1.05rem; padding: 10px 12px; }
.hero { padding: 2rem 0 1rem; }

input, select { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
button, .button { font: inherit; border: 0; border-radius: 6px; padding: 7px 14px; background: var(--accent); color: var(--accent-text); cursor: pointer; display: inline-block; }
button.secondary, .button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
/* Ένδειξη «δουλεύει»: άλλο χρώμα και κινούμενη λωρίδα όσο περιμένει απάντηση */
button.busy, button.busy:disabled {
  opacity: 1; cursor: progress; color: #fff; border-color: transparent;
  background: linear-gradient(90deg, var(--busy-a), var(--busy-b), var(--busy-a));
  background-size: 200% 100%;
  animation: busy-shimmer 1.2s linear infinite, busy-pulse 1.2s ease-in-out infinite;
}
@keyframes busy-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes busy-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--busy-a) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { button.busy { animation: none; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: .6rem; }
.actions form, .actions-inline form { display: inline; }
.actions-inline { white-space: nowrap; }

table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures tbody th { font-weight: 500; white-space: nowrap; }
.figures td.low { background: var(--warn-bg); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.scroll table { border: 0; }
tr.primary td:first-child { font-weight: 600; }
sup { color: var(--muted); margin-left: 1px; }
sup.src { font-size: .6rem; letter-spacing: .02em; }

.results { list-style: none; padding: 0; }
.results li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 10px; background: var(--accent); color: var(--accent-text); margin-left: 6px; }
.tag.grey { background: var(--line); color: var(--muted); }

.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 8px; }
.ok { color: var(--ok); }
.job { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 8px; margin: 1rem 0; }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.progress progress { flex: 1; max-width: 360px; height: 10px; accent-color: var(--accent); }
.signals { list-style: none; padding: 0; margin: 0; }
.signals li { padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 6px; margin-bottom: 6px; }
.signals li.sev-high { border-left-color: var(--high); }
.signals li.sev-medium { border-left-color: var(--medium); }
.sev { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-right: 6px; }
.sev-high .sev { color: var(--high); } .sev-medium .sev { color: var(--medium); }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 16px 14px; }
.ai form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
.summary form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.chat { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 16px 14px; }
.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg { padding: 8px 12px; border-radius: 8px; max-width: 90%; }
.msg .who { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.msg .text { white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--bg); border: 1px solid var(--line); }
.msg.assistant { align-self: flex-start; background: var(--bg); border-left: 3px solid var(--accent); }
.msg.stale { opacity: .65; }
.msg { scroll-margin-top: 16px; transition: box-shadow .6s ease; }
.msg.just-arrived { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
.rich .headline { font-weight: 600; font-size: 1.02rem; margin: 2px 0 10px; }
.rich .section { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.rich .section:first-of-type { border-top: 0; padding-top: 0; }
.rich .section > div { flex: 1; min-width: 0; }  /* ο φαρδύς πίνακας κυλάει, δεν σπρώχνει το κείμενο */
.rich .icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rich .icon-trend_up .icon { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.rich .icon-trend_down .icon, .rich .icon-warning .icon { background: color-mix(in srgb, var(--high) 16%, transparent); }
.rich h4 { margin: 4px 0 2px; font-size: .92rem; }
.rich p { margin: 0 0 4px; }
.rich ul { margin: 4px 0 0; padding-left: 18px; }
.rich li { margin: 2px 0; }
.mini-wrap { margin: 6px 0 2px; border-radius: 6px; }
table.mini { font-size: .85rem; background: transparent; }
table.mini th, table.mini td { padding: 4px 8px; }
table.mini tbody th { font-weight: 500; white-space: nowrap; }
.arrow { margin-left: 4px; font-size: .7rem; color: var(--muted); }
.arrow.good { color: var(--ok); }
.arrow.bad { color: var(--high); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.history-item { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.history-item > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.history-item > summary .preview { flex-basis: 100%; color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item[open] > summary .preview { display: none; }
.history-body { padding: 0 14px 12px; }
.history-body.messages { display: flex; flex-direction: column; gap: 8px; }
button.watching { background: var(--ok); color: #fff; }
.notifications { list-style: none; padding: 0; margin: 0 0 12px; }
.notifications li { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--info); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; }
.notifications li > div { flex: 1; min-width: 0; }
.notifications li.kind-filing { border-left-color: var(--ok); }
.notifications li.kind-management, .notifications li.kind-capital { border-left-color: var(--medium); }
.notifications .icon { font-size: 18px; }
button.small-btn { padding: 2px 8px; }
.compare-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.compare-pick select { max-width: 100%; }
table.compare thead th { vertical-align: bottom; min-width: 150px; }
table.compare thead form { display: inline; }
table.compare tr.group th { background: var(--bg); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
table.compare td.best { font-weight: 600; }
.star { color: var(--medium); }
.scope-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 10px 0 4px; }
.scope-toggle a { padding: 6px 14px; color: var(--muted); }
.scope-toggle a.active { background: var(--accent); color: var(--accent-text); }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.suggestions form { display: inline; }
button.chip { background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 16px; padding: 4px 11px; font-size: .85rem; text-align: left; }
button.chip:hover { background: var(--accent); color: var(--accent-text); }
.suggestions.older button.chip { border-color: var(--line); color: var(--muted); font-size: .8rem; }
.ask { display: flex; gap: 8px; align-items: flex-end; }
.ask textarea { flex: 1; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; resize: vertical; min-width: 0; }
.ask-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.charts > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; height: 300px; position: relative; }
.charts canvas { max-height: 250px; }
.correction { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.correction label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: 3px; }
.correction label.wide { flex: 1; min-width: 200px; }

.viewer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.viewer-head h1 { font-size: 1.2rem; }
.pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.goto { display: flex; gap: 4px; }
.goto input { width: 4.5em; }
.page-image { display: block; width: 100%; max-width: 1000px; margin: 12px auto; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
footer { max-width: 1180px; margin: 2rem auto 0; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer p { margin: .3rem 0; }

@media (max-width: 720px) {
  .charts { grid-template-columns: 1fr; }
  .nav { margin-left: 0; }
  h1 { font-size: 1.3rem; }
}
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #444; --line: #ccc; --warn-bg: #f3f3f3; }
  .no-print, .top { display: none !important; }
  main { max-width: none; padding: 0; }
  a { color: inherit; }
  .scroll { overflow: visible; border: 0; }
  .charts { grid-template-columns: 1fr 1fr; break-inside: avoid; }
  section { break-inside: avoid-page; }
  footer { margin-top: 1rem; }
}

/* Διοίκηση και ιστορικό */
.history-now { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 12px; margin-bottom: .5rem; }
@media (max-width: 700px) { .history-now { grid-template-columns: 1fr; } }
.people .role { color: var(--muted); }
.card-box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.card-box h3 { margin-bottom: .5rem; }
.big-num { font-size: 1.4rem; font-weight: 600; margin: 0 0 .2rem; font-variant-numeric: tabular-nums; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.people li:last-child { border-bottom: 0; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: .6rem 0 .8rem; }
.tl-chip { font: inherit; font-size: .85rem; padding: 4px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.tl-chip.on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); }
.tl-year { margin: 14px 0 6px -27px; }
.tl-year span { background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: .8rem; padding: 2px 9px; border-radius: 10px; }
.tl-event { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; position: relative; }
.tl-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 50%; font-size: .85rem; margin-left: -32px; }
.tl-event a { word-break: break-word; }
.tl-event.cat-status .tl-icon, .tl-event.cat-structure .tl-icon { border-color: var(--warn); }
.tl-event[hidden], .tl-year[hidden] { display: none; }

/* Μενού «Ενημέρωση» */
/* Το μενού ανοίγει από την αρχή της γραμμής κουμπιών, ώστε να χωράει και σε στενή οθόνη */
.actions { position: relative; }
.update-menu { position: static; }
.update-menu > summary { list-style: none; cursor: pointer; }
.update-menu > summary::-webkit-details-marker { display: none; }
.update-menu[open] > summary { border-color: var(--accent); }
.update-panel { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(440px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 4px; }
.update-panel p { margin: 0 0 4px; }
.update-step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.update-step:hover { background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.update-step input { margin-top: 4px; }
.update-step .last { color: var(--text); opacity: .85; }
.ai-badge, .free-badge { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 10px; margin-left: 4px; vertical-align: 1px; }
.ai-badge { background: #7c3aed; color: #fff; }
.free-badge { background: var(--line); color: var(--muted); }
.update-panel button { margin-top: 6px; align-self: flex-start; }

/* Χρονολόγιο: περιεχόμενο από AI */
.tl-lines { list-style: none; margin: .25rem 0 0; padding: 0; font-size: .9em; }
.tl-lines li { margin: .1rem 0; }
.ai-tag { display: inline-block; font-size: .7em; padding: 0 .35em; margin-left: .3em; border-radius: 4px;
  border: 1px solid currentColor; color: var(--muted, #6b7280); vertical-align: middle; }
table.changes td:first-child { white-space: nowrap; }
table.changes tr.act-left td:nth-child(3) { color: #b42318; }
table.changes tr.act-joined td:nth-child(3) { color: #067647; }

/* Βαθμολογία υγείας */
.health-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.health-score { min-width: 110px; text-align: center; padding: 10px 14px; border-radius: 10px; border: 2px solid currentColor; }
.health-score .big-num { font-size: 2.2rem; font-weight: 700; }
.lvl-good { color: #067647; } .lvl-ok { color: #3b6fd8; } .lvl-weak { color: #b54708; } .lvl-bad { color: #b42318; }
.health-parts { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 260px; }
.health-parts li { display: grid; grid-template-columns: 110px 1fr 48px; gap: 4px 10px; align-items: center; margin: 4px 0; }
.health-parts li .muted { grid-column: 1 / -1; margin-top: -2px; }
.health-parts .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.health-parts .bar span { display: block; height: 100%; background: currentColor; color: var(--accent, #3b6fd8); }
.health-pill { display: inline-block; padding: 0 7px; border-radius: 10px; border: 1px solid currentColor; font-variant-numeric: tabular-nums; }

/* Συνδέσεις προσώπων */
.connections { padding-left: 1.1rem; }
.connections > li { margin: 6px 0; }
.connections ul { margin: 2px 0 0; padding-left: 1.1rem; }

/* Χρονολόγιο αλλαγών και λίστα δυνατοτήτων */
.changelog, .changelog ul, .features { list-style: none; padding: 0; margin: 0; }
.cl-day h2 { margin: 18px 0 6px; }
.cl-item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cl-time { color: var(--muted, #6b7280); font-size: .85rem; font-variant-numeric: tabular-nums; }
.cl-body { margin: 3px 0; white-space: pre-line; font-size: .9rem; }
@media (max-width: 600px) { .cl-item { grid-template-columns: 1fr; gap: 2px; } }
.feat { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feat-num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  border: 2px solid var(--line); }
.feat.st-done .feat-num { border-color: #15803d; color: #15803d; }
.feat.st-needs_approval .feat-num { border-color: #b45309; color: #b45309; }
.feat-tag { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 10px; margin-left: 6px; vertical-align: 1px; }
.feat-tag.done { background: #dcfce7; color: #14532d; }
.feat-tag.planned { background: #e0e7ff; color: #1e3a8a; }
.feat-tag.approval { background: #fef3c7; color: #78350f; }
.feat-progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0 10px; }
.feat-progress span { display: block; height: 100%; background: #15803d; }

/* Σημειώσεις και έκθεση ελέγχου */
.note-year { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.note-year summary { cursor: pointer; }
.note-body h4 { margin: 10px 0 4px; }
.note-body ul { margin: 0; padding-left: 1.2rem; }
.op-badge { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 10px; margin: 0 4px; }
.op-unqualified { background: #dcfce7; color: #14532d; }
.op-qualified { background: #fef3c7; color: #78350f; }
.op-adverse, .op-disclaimer { background: #fee2e2; color: #7f1d1d; }
.op-not_audited, .op-not_found { background: #e5e7eb; color: #374151; }

/* Σύγκριση με τον κλάδο */
.pos-bar { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--line); vertical-align: middle; overflow: hidden; }
.pos-bar span { display: block; height: 100%; }
.pos-bar .good { background: #15803d; } .pos-bar .mid { background: #ca8a04; } .pos-bar .bad { background: #b91c1c; }
.peers { margin: 6px 0; padding-left: 1.1rem; }
.feat-tag.later { background: #e5e7eb; color: #374151; }
.feat-num { flex: 0 0 auto; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 15px; font-size: .85rem; }
.feat-toc { margin: 8px 0 4px; line-height: 1.8; }
.zone-safe { color: #067647; } .zone-grey { color: #b54708; } .zone-distress { color: #b42318; }

/* Αναζήτηση με φίλτρα */
.screener-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0 16px; }
.sf-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-bottom: 10px; }
.sf-row label { display: flex; flex-direction: column; font-size: .85rem; gap: 3px; }
.sf-row label.check { flex-direction: row; align-items: center; gap: 6px; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 10px; }
.sf-grid fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px 8px; margin: 0; }
.sf-grid legend { font-size: .8rem; padding: 0 4px; }
.sf-grid input { width: calc(50% - 4px); }
.presets { margin: 8px 0; line-height: 2; }
table.screener td.neg { color: #b42318; }
table.screener th a { color: inherit; text-decoration: none; }
table.figures tr.total th, table.figures tr.total td { border-top: 2px solid var(--line); }
.fscore-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 260px; columns: 2; column-gap: 20px; }
.fscore-list li { margin: 2px 0; break-inside: avoid; }
.fscore-list .fs-group { font-weight: 600; font-size: .8rem; color: var(--muted, #6b7280); margin-top: 6px; }
.fscore-list .yes span { color: #067647; } .fscore-list .no span { color: #b42318; } .fscore-list .na { color: var(--muted, #6b7280); }
@media (max-width: 600px) { .fscore-list { columns: 1; } }

/* Tabs στη σελίδα της εταιρείας */
.tabbar { z-index: 30; background: var(--bg); }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0;
  background: var(--bg); scrollbar-width: none; }
/* Το όνομα της εταιρείας φαίνεται πάνω από τα tabs μόνο όταν η μπάρα είναι παγωμένη */
.tabbar-name { display: none; padding: 8px 2px 2px; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.tabbar.frozen .tabbar-name { display: block; }
#tabs-anchor { margin-top: 14px; }
.tabbar + * { margin-top: 10px; }
.tabbar.frozen.no-name .tabbar-name { display: none; }
/* Παγωμένη: σταθερή στην κορυφή (θέση και πλάτος από το JS), χωρίς sticky που «τρεμοπαίζει» με το momentum scroll */
.tabbar.frozen { position: fixed; top: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); transform: translateZ(0); }
/* Παγωμένη: τα tabs αναδιπλώνονται σε δεύτερη γραμμή αντί να κρύβονται δεξιά */
.tabbar.frozen .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
.tabbar.frozen .tabs a { padding: 6px 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 13px; white-space: nowrap; text-decoration: none; color: var(--muted, #6b7280);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: inherit; }
.tabs a.active { color: var(--accent, #3b6fd8); border-bottom-color: currentColor; }
.tab-badge { display: inline-block; font-size: .72rem; padding: 0 6px; border-radius: 9px; border: 1px solid currentColor; margin-left: 3px; }
.warn-badge { color: #b45309; }
.tab-panel[hidden] { display: none; }
.tab-panel { min-height: calc(100vh - 56px); }  /* και τα σύντομα tabs κρατούν τη μπάρα «παγωμένη» */
@media print { .tab-panel { min-height: 0; } }
/* Κάρτες της επισκόπησης */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: inherit; background: var(--card); }
.kpi-link:hover { border-color: var(--accent, #3b6fd8); }
.kpi-label { font-size: .78rem; color: var(--muted, #6b7280); }
.kpi-value { font-size: 1.35rem; font-weight: 700; }
.kpi-value.neg { color: #b42318; }
.kpi-change { font-size: .78rem; color: var(--muted, #6b7280); }
.kpi-change.up { color: #067647; } .kpi-change.down { color: #b42318; }
@media print { .tab-panel[hidden] { display: block !important; } .tabbar, .tabs, .kpis .kpi-link { display: none; } }

/* Επεξηγήσεις που ανοίγουν με κλικ (ⓘ) */
details.explain { margin: 6px 0; }
details.explain > summary { cursor: pointer; list-style: none; display: inline-block; font-size: .8rem; color: var(--muted); }
details.explain > summary::-webkit-details-marker { display: none; }
details.explain[open] > summary { color: var(--accent); }
details.explain > p { margin: 4px 0 0; }
/* Πάνω μενού: «Περισσότερα» */
.nav .more-menu { display: inline-block; position: relative; margin-left: 6px; }
.nav .more-menu > summary { cursor: pointer; list-style: none; color: var(--accent); }
.nav .more-menu > summary::-webkit-details-marker { display: none; }
.more-panel { position: absolute; right: 0; top: 1.6em; z-index: 20; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 0; min-width: 170px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.more-panel a { display: block; padding: 6px 14px; white-space: nowrap; }
.more-panel a:hover { background: var(--bg); }
.update-group { margin: 10px 0 2px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Βελάκι «στην κορυφή»: μόνο όταν η μπάρα των tabs είναι παγωμένη */
.tabs .to-top { display: none; flex: 0 0 30px; align-self: center; width: 30px; min-width: 30px; height: 30px; margin: 0 4px 0 2px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--accent); cursor: pointer;
  font-size: 1rem; line-height: 1; }
.tabbar.frozen .to-top { display: inline-flex; align-items: center; justify-content: center; animation: to-top-in .2s ease-out;
  position: sticky; left: 0; z-index: 1; box-shadow: 6px 0 6px -2px var(--bg); }  /* μένει ορατό όταν τα tabs κυλούν οριζόντια */
.tabs .to-top span { display: inline-block; animation: to-top-bob 1.4s ease-in-out infinite; }
.tabs .to-top:hover { border-color: var(--accent); }
.tabs .to-top:hover span { animation-duration: .7s; }
@keyframes to-top-bob { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes to-top-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tabs .to-top span, .tabbar.frozen .to-top { animation: none; } }
/* Μέσα σε tab (παγωμένη μπάρα): χωρίς το πάνω μέρος· εμφανίζεται ξανά με το βελάκι ↑ */
body.tabs-mode header.top, body.tabs-mode #company-head { display: none; }

/* Συζήτηση: προτεινόμενες ερωτήσεις σε λίστα, νεότερες ερωτήσεις πρώτες */
.suggestions-list { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 10px 0 6px; }
.suggestions-list form { margin: 0; width: 100%; }
.suggestions-list .suggestion { width: 100%; text-align: left; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-weight: 400; cursor: pointer; }
.suggestions-list .suggestion:hover { border-color: var(--accent); color: var(--accent); }
.suggestions-list .suggestion span { color: var(--accent); margin-right: 4px; }
.messages.newest-first { margin-top: 16px; }
.messages.newest-first .exchange { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.messages.newest-first .exchange:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* Πίνακες μεγεθών/δεικτών: μεταβολή από χρήση σε χρήση και γραφήματα ανά γραμμή */
.yoy { display: block; font-size: .72rem; font-weight: 400; margin-top: 1px; }
.yoy.good { color: #16a34a; } .yoy.bad { color: #dc2626; } .yoy.neutral { color: var(--muted); }
tr.row-main > th { cursor: pointer; white-space: nowrap; }
tr.row-main > th:hover { color: var(--accent); }
.row-toggle { border: 0; background: none; padding: 0 4px 0 0; margin: 0; color: var(--muted); cursor: pointer; font-size: .9rem; }
.row-toggle span { display: inline-block; transition: transform .15s ease; }
tr.row-main.open .row-toggle span { transform: rotate(90deg); color: var(--accent); }
tr.row-charts > td { background: var(--bg); padding: 10px 12px 14px; }
.row-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-charts-grid h4 { margin: 0 0 6px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.row-charts-grid .rc { position: relative; height: 190px; }
@media (max-width: 700px) { .row-charts-grid { grid-template-columns: 1fr; } }
@media print { tr.row-charts { display: none; } .row-toggle { display: none; } }
.row-charts-grid { position: sticky; left: 12px; }

/* Tab «Καταστάσεις» */
.year-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.year-btn { padding: 4px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.year-btn.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.stmt-source { margin: 4px 0 10px; }
.ai-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 12px; }
.stmt { margin-top: 14px; }
.stmt-table tr.stmt-heading th { padding-top: 12px; font-weight: 700; color: var(--accent); background: transparent; }
.stmt-table tr.stmt-total th, .stmt-table tr.stmt-total td { font-weight: 700; border-top: 1px solid var(--line); }
.stmt-table td.neg { color: #dc2626; }
.stmt-table th { white-space: normal; font-weight: 400; }

/* Tab «Επικοινωνία & site» */
.contact-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 16px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.web-fetch { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.web-fetch input[type=text] { flex: 1 1 260px; min-width: 0; }
.web-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 10px 0; background: var(--card); }
.web-card p { margin: 6px 0 0; }
.web-summary { margin: 16px 0; }
.web-summary .section-head form { margin: 0; }
.web-about { font-size: 1.05em; line-height: 1.5; }
.web-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }
.web-grid h4 { margin: 10px 0 4px; font-size: .95em; color: var(--muted); }
.web-grid ul { margin: 0; padding-left: 18px; }
.web-page { border-top: 1px solid var(--line); padding: 8px 0; }
.web-page summary { cursor: pointer; }
.web-text { white-space: pre-line; font-size: .9em; color: var(--muted); max-height: 320px; overflow: auto;
  border-left: 3px solid var(--line); padding-left: 10px; }

/* Σημειώσεις, ετικέτες και υπεύθυνοι (tab «Επικοινωνία & σημειώσεις») */
.user-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: .3rem 0; }
.user-tag { display: inline-block; font-size: .78rem; padding: 2px 10px; border-radius: 12px; background: #fef3c7; color: #78350f; text-decoration: none; border: 1px solid #fde68a; }
.user-tag.on { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.user-tag.mini { font-size: .7rem; padding: 0 7px; margin-left: 6px; }
.notes-form { display: grid; gap: .5rem; max-width: 760px; }
.notes-form label { display: grid; gap: .2rem; }
.notes-form button { justify-self: start; }
.contact-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .5rem; }
.contact-add input { flex: 1 1 140px; min-width: 0; }
.people.compact { columns: 2 260px; margin: .2rem 0 .6rem; }
.small-h { font-size: .95rem; margin: .8rem 0 .3rem; }
:root[data-scheme="dark"] .user-tag { background: #451a03; color: #fde68a; border-color: #78350f; }

/* Τάση του κλάδου */
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: .5rem 0; }
.trend-grid > div { height: 210px; display: flex; flex-direction: column; }
.trend-grid h4 { margin: 0 0 4px; font-size: .9rem; }
.trend-grid canvas { flex: 1; min-height: 0; }

/* Συνδέσεις & όμιλος */
.network { height: 540px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, transparent); }
.network-legend .nl { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-left: 4px; }
.nl.self { background: var(--c1); } .nl.person { background: var(--c2); border-radius: 50%; }
.nl.company { background: #dbeafe; border: 1px solid var(--c1); } .nl.outside { background: #f3f4f6; border: 1px solid #9ca3af; }
.kind-pill { font-size: .75rem; padding: 1px 8px; border-radius: 10px; background: var(--line); white-space: nowrap; }
.kind-pill.k-parent { background: #ede9fe; color: #4c1d95; } .kind-pill.k-subsidiary { background: #dcfce7; color: #14532d; }
.kind-pill.k-associate { background: #fef3c7; color: #78350f; } .kind-pill.k-joint_venture { background: #e0f2fe; color: #0c4a6e; }
@media (max-width: 600px) { .network { height: 420px; } }

/* Ταυτότητα εταιρείας */
.kad-list { list-style: none; padding: 0; margin: .2rem 0 .5rem; columns: 2 340px; }
.kad-list li { padding: 2px 0; break-inside: avoid; }
.kad-code { font-variant-numeric: tabular-nums; color: var(--muted); display: inline-block; min-width: 5.2em; }
.objective { white-space: pre-line; }

/* ⓘ τύπος και εξήγηση δείκτη */
.info { position: relative; display: inline-block; color: var(--accent); cursor: help; font-weight: 400; font-size: .85em; margin-left: 2px; }
.info .tip { display: none; }
.tipbox { position: fixed; z-index: 100; width: min(340px, 80vw); padding: 8px 10px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: .82rem; line-height: 1.4;
  pointer-events: none; }
.tipbox i { color: var(--muted); }
.tipbox[hidden] { display: none; }
.formulas { margin-top: .6rem; }
.formulas table td, .formulas table th { font-size: .82rem; }
.cagr-table .pos { color: var(--ok); } .cagr-table .neg { color: var(--high); }

/* Σήματα με τον κλάδο και σχέδιο δράσης */
.sector-note { font-size: .85em; } .ok-note { color: var(--ok); } .bad-note { color: var(--high); }
.action-plan > summary { cursor: pointer; list-style: none; } .action-plan > summary h3 { display: inline; }
.action-plan > summary::-webkit-details-marker { display: none; }
.action { border: 1px solid var(--line); border-left-width: 4px; border-radius: 0; padding: 8px 12px; margin: 8px 0; background: var(--card); }
.action.sev-high { border-left-color: var(--high); } .action.sev-medium { border-left-color: var(--medium); }
.action p { margin: .3rem 0; }
.action-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 700px) { .action-cols { grid-template-columns: 1fr; } }

/* Όροι πληρωμής */
.credit-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.credit-main { flex: 1; min-width: 260px; }
.credit-main p { margin: .25rem 0; }
.credit-terms { font-size: 1.15rem; font-weight: 700; }
.credit-factors { margin-top: .6rem; max-width: 760px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); vertical-align: 0; }
.dot.good { background: #15803d; } .dot.mid { background: #ca8a04; } .dot.bad { background: #b91c1c; }

.network-wrap { position: relative; }
.network-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.network-zoom button { width: 32px; height: 32px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.network-zoom button:hover { border-color: var(--accent); color: var(--accent); }

.search-tip { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0; background: var(--card); padding: 8px 12px; margin-top: .8rem; }
.search-tip ul { margin: .3rem 0 0; padding-left: 1.2rem; }

/* Εκτίμηση κόστους πάνω στα κουμπιά AI */
.cost-tag { display: inline-block; font-size: .75em; font-weight: 500; padding: 0 6px; margin-left: 4px; border-radius: 8px;
  background: #fef3c7; color: #78350f; vertical-align: 1px; }
:root[data-scheme="dark"] .cost-tag { background: #451a03; color: #fde68a; }

/* Ερώτηση σε όλη τη βάση */
.nl-ask { display: flex; gap: 8px; margin: .6rem 0 .2rem; }
.nl-ask input { flex: 1; min-width: 0; }
.nl-result { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0; background: var(--card); padding: 8px 12px; margin: .4rem 0; }
.weekly-note { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 10px 14px; margin: .4rem 0; white-space: pre-line; }
.tl-chip.on { border-color: var(--accent); color: var(--accent); }

/* Σύνδεση */
.login-box { max-width: 360px; margin: 12vh auto; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.login-box h1 { font-size: 1.3rem; margin-top: 0; }
.login-form { display: grid; gap: 10px; }
.login-form label { display: grid; gap: 4px; }
.more-panel .link-btn { display: block; width: 100%; text-align: left; padding: 6px 14px; background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; }
.more-panel .link-btn:hover { background: var(--bg); }
