
:root { --bg:#1e1f22; --card:#2b2d31; --line:#3f4147; --text:#dbdee1; --muted:#949ba4; --white:#f2f3f5;
  --teal:#4fb8ba; --orange:#f4a11c; --crimson:#e0245e; --blurple:#5865f2; }
* { box-sizing:border-box; }
html,body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 "Segoe UI",system-ui,-apple-system,Roboto,"Noto Sans",sans-serif; }
a { color:var(--teal); }
.wrap { max-width:1180px; margin:0 auto; padding:24px 20px 40px; }
.shell { display:grid; grid-template-columns:200px minmax(0,1fr); gap:28px; align-items:start; }
.side { position:sticky; top:16px; display:flex; flex-direction:column; gap:18px; }
.nav-group { display:flex; flex-direction:column; gap:2px; }
.nav-title { font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:0 10px 4px; }
.side a, .mobile-nav a { padding:7px 10px; border-radius:8px; color:var(--text); text-decoration:none; font-weight:500; font-size:14.5px; }
.side a:hover, .mobile-nav a:hover { background:rgba(255,255,255,.04); color:var(--white); text-decoration:none; }
.side a.on, .mobile-nav a.on { background:var(--card); color:var(--white); font-weight:700; box-shadow:inset 3px 0 0 var(--teal); }
.mobile-nav { display:none; margin:-6px 0 14px; }
.mobile-nav summary { cursor:pointer; list-style:none; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px 14px; font-weight:700; color:var(--white); }
.mobile-nav summary::-webkit-details-marker { display:none; }
.mobile-nav summary::after { content:"▾"; float:right; color:var(--muted); }
.mobile-nav[open] summary::after { content:"▴"; }
.mobile-nav nav { display:grid; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px; margin-top:6px; }
@media (max-width:860px) { .shell { display:block; } .side { display:none; } .mobile-nav { display:block; } }
.top { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:28px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; color:var(--white); }
.brand .dots { display:flex; gap:5px; }
.brand .dots i { width:10px; height:10px; transform:rotate(45deg); display:block; }
.d1 { background:var(--crimson); } .d2 { background:#bdb8b6; } .d3 { background:var(--teal); } .d4 { background:var(--orange); }
.brand.centered { justify-content:center; margin-bottom:18px; }
.inline { margin:0; }
.user { display:flex; align-items:center; gap:10px; }
.user img { width:32px; height:32px; border-radius:50%; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px 22px; margin-bottom:16px; }
.card h2 { margin:0 0 12px; font-size:16px; color:var(--white); }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.stat { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.stat b { display:block; font-size:24px; color:var(--white); }
.stat span { color:var(--muted); font-size:13px; }
.muted { color:var(--muted); }
button, .button { font:inherit; font-weight:600; border:0; border-radius:8px; padding:9px 16px; cursor:pointer; text-decoration:none; display:inline-block; }
.primary { background:var(--blurple); color:#fff; }
.ghost { background:transparent; color:var(--text); border:1px solid var(--line); }
.center { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.box { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:32px 30px; max-width:420px; width:100%; text-align:center; }
.box h1 { margin:0 0 8px; font-size:22px; color:var(--white); }
.box p { margin:0 0 20px; }
.field { display:grid; grid-template-columns:220px 1fr; gap:6px 18px; padding:14px 0; border-top:1px solid var(--line); }
.field:first-of-type { border-top:0; }
.field label.name { color:var(--white); font-weight:600; }
.field .help { color:var(--muted); font-size:13px; }
.field .source { font-size:12px; color:var(--muted); margin-top:4px; }
.field .source b { color:var(--teal); font-weight:600; }
textarea.small { min-height:110px; }
select, input[type=text], input[type=number] { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; }
.checks { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:4px 12px; max-height:220px; overflow:auto; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.checks label, .envbox { display:flex; gap:8px; align-items:center; font-size:14px; }
.envbox { margin-top:6px; color:var(--muted); font-size:13px; }
.banner { border-radius:10px; padding:12px 16px; margin-bottom:16px; }
.banner.ok { background:rgba(79,184,186,.12); border:1px solid rgba(79,184,186,.4); }
.banner.err { background:rgba(224,36,94,.12); border:1px solid rgba(224,36,94,.45); }
.banner ul { margin:6px 0 0; padding-left:18px; }
.actions { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
textarea { white-space:pre; overflow-wrap:normal; overflow-x:auto; width:100%; min-height:320px; resize:vertical; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:12px; font:13.5px/1.55 ui-monospace,"Cascadia Mono",Menlo,Consolas,monospace; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
.chips { display:flex; flex-wrap:wrap; gap:8px 14px; margin:8px 0 12px; font-size:14px; }
.chips code, .preview code, .card code { background:var(--bg); border:1px solid var(--line); border-radius:4px; padding:1px 5px; font-size:12.5px; }
.preview { background:#313338; border-radius:8px; padding:14px 16px; color:#dbdee1; line-height:1.375; overflow-wrap:anywhere; }
.preview .h1 { font-size:24px; font-weight:700; color:#f2f3f5; margin:8px 0 4px; }
.preview .h2 { font-size:20px; font-weight:700; color:#f2f3f5; margin:8px 0 4px; }
.preview .h3 { font-size:16px; font-weight:700; color:#f2f3f5; margin:8px 0 4px; }
.preview .subtext { font-size:12px; color:#949ba4; }
.preview .blank { height:10px; }
.preview ol, .preview ul { margin:2px 0; padding-left:26px; }
.preview .mention { background:rgba(88,101,242,.3); color:#c9cdfb; border-radius:3px; padding:0 2px; font-weight:500; }
.count { font-size:13px; color:var(--muted); margin-top:6px; }
table.list { width:100%; border-collapse:collapse; font-size:14px; }
table.list th, table.list td { text-align:left; padding:7px 8px; border-top:1px solid var(--line); }
table.list th { color:var(--muted); font-weight:600; border-top:0; }
.chip { white-space:nowrap; }
table.list td.date { white-space:nowrap; }
.tag { white-space:nowrap; font-size:12px; border-radius:6px; padding:1px 7px; background:var(--bg); border:1px solid var(--line); color:var(--muted); }
.controls { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.controls label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.controls select { min-width:180px; }
progress { width:100%; min-width:80px; height:8px; appearance:none; border:0; border-radius:4px; background:var(--bg); overflow:hidden; }
progress::-webkit-progress-bar { background:var(--bg); border-radius:4px; }
progress::-webkit-progress-value { background:var(--teal); border-radius:4px; }
progress::-moz-progress-bar { background:var(--teal); border-radius:4px; }
table.list td.num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
table.list td.bar { width:30%; }
.chart { width:100%; border-radius:10px; display:block; }
.chart-wrap { overflow-x:auto; }
.activity-chart { width:100%; height:auto; display:block; border-radius:10px; touch-action:pan-y; cursor:crosshair; }
a:hover { text-decoration:underline; }
button:hover, .button:hover { filter:brightness(1.12); text-decoration:none; }
:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.card { overflow-x:auto; }
.note { border-radius:10px; padding:10px 14px; margin:0 0 18px; font-size:14px; background:rgba(79,184,186,.12); border:1px solid rgba(79,184,186,.4); }
.recent { list-style:none; margin:0; padding:0; }
.recent li { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--line); font-size:14px; }
.recent li:first-child { border-top:0; }
.recent .when { color:var(--muted); white-space:nowrap; }
footer.foot { margin-top:36px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:12.5px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.actions { flex-wrap:wrap; align-items:center; }
.wrap.wide { max-width:1400px; }
.editor-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:16px; align-items:start; }
.editor-grid .preview-card { position:sticky; top:12px; max-height:calc(100vh - 110px); overflow:auto; }
textarea.wrap-text { white-space:pre-wrap; overflow-wrap:anywhere; min-height:560px; font-size:14px; line-height:1.6; }
.count.over { color:var(--crimson); font-weight:600; }
input.filter, .toolbar input[type=search] { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:inherit; margin-bottom:8px; }
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin-bottom:6px; }
.toolbar label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); flex:1; min-width:180px; }
.toolbar select { min-width:150px; }
.person { display:flex; align-items:center; gap:10px; }
.person img { width:28px; height:28px; border-radius:50%; flex-shrink:0; }
.person .sub { color:var(--muted); font-size:12.5px; }
.danger { background:transparent; color:#ff8fa8; border:1px solid rgba(224,36,94,.55); padding:6px 12px; font-size:13px; }
.pager { display:flex; gap:8px; justify-content:flex-end; align-items:center; margin-top:12px; font-size:14px; }
.tag.off { color:var(--orange); border-color:rgba(244,161,28,.5); }
.rule { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.rule h3 { margin:0 0 6px; font-size:16px; color:var(--white); display:flex; gap:8px; align-items:center; }
.rule .meta { color:var(--muted); font-size:13px; margin-bottom:8px; }
.rule .chips code { white-space:nowrap; }
.rule-actions { display:flex; gap:8px; margin-top:10px; }
.form-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
.form-grid label.block { display:flex; flex-direction:column; gap:5px; font-size:13px; color:var(--muted); }
.form-grid textarea { min-height:150px; white-space:pre-wrap; }
.form-grid input[type=text], .form-grid input[type=number] { width:100%; }
.match { border-radius:10px; padding:10px 14px; margin-top:10px; font-size:14px; }
.match.yes { background:rgba(79,184,186,.12); border:1px solid rgba(79,184,186,.4); }
.match.no { background:rgba(244,161,28,.10); border:1px solid rgba(244,161,28,.4); }
@media (max-width:760px) { .rule, .form-grid { grid-template-columns:1fr; } }
.dembed { position:relative; background:#2b2d31; border-radius:4px; padding:12px 16px 14px 18px; max-width:520px; overflow:hidden; }
.dembed .bar { position:absolute; left:0; top:0; width:4px; height:100%; }
.dembed .t { font-weight:700; color:#f2f3f5; margin-bottom:6px; }
.dembed .f { font-size:12px; color:#b5bac1; margin-top:10px; display:flex; align-items:center; gap:8px; }
.dembed .f img { width:20px; height:20px; border-radius:50%; }
.block-group { display:flex; flex-direction:column; gap:12px; }
.form-grid label.block select, .form-grid label.block input[type=text] { margin-top:2px; }
.dmsg { background:#313338; border-radius:8px; padding:14px; }
.dbuttons { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; max-width:560px; }
.dbtn { display:inline-flex; align-items:center; gap:6px; border-radius:4px; padding:6px 14px; font-size:14px; font-weight:500; color:#fff; }
.dbtn.primary { background:#5865f2; } .dbtn.secondary { background:#4e5058; } .dbtn.success { background:#248046; } .dbtn.danger { background:#da373c; }
.dbtn img { width:18px; height:18px; }
.btn-rows { width:100%; border-collapse:collapse; font-size:14px; }
.btn-rows th { text-align:left; color:var(--muted); font-weight:600; padding:6px; }
.btn-rows td { padding:4px 6px; vertical-align:top; }
.btn-rows input[type=text], .btn-rows input[type=number], .btn-rows select { width:100%; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 8px; font:inherit; }
.btn-rows td.pos { width:64px; }
input[type=color] { width:64px; height:36px; padding:2px; background:var(--bg); border:1px solid var(--line); border-radius:8px; }
.status { font-size:13px; color:var(--muted); }
.status b { color:var(--teal); }
.tag.on { color:var(--teal); border-color:rgba(79,184,186,.5); }
.mini-chart { width:100%; height:auto; display:block; margin:6px 0; }
.delta { font-size:12px; font-weight:600; margin-left:4px; }
.delta.up { color:var(--teal); } .delta.down { color:#ff8fa8; }
table.clicks { margin-top:10px; font-size:13px; }
table.clicks td, table.clicks th { padding:4px 6px; }
.meta b.hits { color:var(--teal); }
a.plain { color:inherit; text-decoration:none; }
a.plain:hover .person > div > div:first-child { text-decoration:underline; }
.mention-line { margin-bottom:6px; }
.embed-image { max-width:100%; border-radius:4px; margin-top:10px; display:block; }
.session-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
button.small { padding:6px 10px; font-size:13px; }
.member-head { display:flex; align-items:center; gap:16px; }
.member-head img { width:64px; height:64px; border-radius:50%; }
.member-head h1 { margin:0; font-size:22px; color:var(--white); }
details.card summary { cursor:pointer; }
details.card[open] summary { margin-bottom:10px; }
.form-grid.single { grid-template-columns:1fr; }
.form-grid textarea.short { min-height:110px; }
.card-scroll { overflow-x:auto; margin:8px 0; }
.btn-rows input[name=btn_emoji_text] { margin-top:4px; }
.preview-inline .h1, .preview-inline .h2, .preview-inline .h3 { color:#f2f3f5; font-weight:700; }
.preview-inline .blank { height:10px; }
.greet { margin:-4px 0 18px; }
.greet h1 { margin:0 0 2px; font-size:24px; color:var(--white); }
.greet p { margin:0; }
.kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.kpi { display:flex; flex-direction:column; gap:2px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px; color:var(--text); text-decoration:none; transition:border-color .15s; }
.kpi:hover { border-color:var(--teal); text-decoration:none; }
.kpi b { font-size:28px; color:var(--white); line-height:1.15; }
.kpi .label { font-weight:600; }
.kpi .sub { color:var(--muted); font-size:13px; }
.home-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:16px; align-items:start; }
.home-grid > div { min-width:0; }
.spark { width:100%; height:64px; display:block; margin:4px 0 12px; }
.spark-head { display:flex; justify-content:space-between; font-size:14px; font-weight:600; }
.spark-axis { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-top:-6px; }
.recent li .person { min-width:0; }
.quick-search { display:flex; gap:8px; margin-bottom:10px; }
.quick-search input { flex:1; min-width:0; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; }
.quick { list-style:none; margin:0; padding:0; }
.quick li { border-top:1px solid var(--line); }
.quick li:first-child { border-top:0; }
.quick a { display:flex; justify-content:space-between; align-items:center; padding:9px 2px; color:var(--text); text-decoration:none; font-size:14px; font-weight:600; }
.quick a::after { content:"›"; color:var(--muted); font-size:18px; }
.quick a:hover { color:var(--white); }
.stacked .recent li { flex-direction:column; gap:2px; }
.stacked .recent .when { font-size:12.5px; }
.facts { list-style:none; margin:0; padding:0; }
.facts li { display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-top:1px solid var(--line); font-size:14px; }
.facts li:first-child { border-top:0; }
.facts li span:last-child { text-align:right; }
@media (max-width:900px) { .home-grid { grid-template-columns:1fr; } .kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) {
  .recent li { flex-direction:column; gap:2px; }
  .recent .when { white-space:normal; font-size:12.5px; }
  .person .sub { overflow-wrap:anywhere; }
  .kpi b { font-size:22px; }
  .facts li { flex-direction:column; gap:2px; }
  .facts li span:last-child { text-align:left; }
}
.actions.sticky { position:sticky; bottom:0; z-index:5; margin:16px -4px 0; padding:12px 4px; background:linear-gradient(to top, var(--bg) 70%, rgba(30,31,34,0)); }
.confirm { display:flex; gap:8px; align-items:center; margin-right:auto; color:var(--muted); font-size:14px; }
.update-mode { display:flex; flex-wrap:wrap; gap:6px 16px; margin-right:auto; color:var(--muted); font-size:14px; }
.update-mode label { display:flex; gap:6px; align-items:center; }
.health { list-style:none; margin:0; padding:0; }
.health li { display:flex; gap:10px; align-items:flex-start; padding:9px 0; border-top:1px solid var(--line); font-size:14px; }
.health li:first-child { border-top:0; }
.dot { width:10px; height:10px; border-radius:50%; margin-top:6px; flex-shrink:0; }
.dot.ok { background:var(--teal); } .dot.warn { background:var(--orange); } .dot.err { background:var(--crimson); }
.health a { margin-left:auto; white-space:nowrap; font-size:13px; }
.card .more { display:inline-block; margin-top:10px; font-size:14px; }
.area { font-weight:600; color:var(--white); }
@media (max-width:640px) {
  .field { grid-template-columns:1fr; }
  .wrap { padding:16px 12px 32px; }
  .top { margin-bottom:18px; }
  .brand { font-size:15px; gap:8px; }
  .brand .dots i { width:8px; height:8px; }
  .user { gap:8px; }
  .user span { display:none; }
  .user img { width:28px; height:28px; }
  .user button { padding:7px 12px; }
  .card { padding:16px 14px; }
  textarea { white-space:pre-wrap; min-height:260px; }
  .chart, .activity-chart { min-width:640px; }
  .wide-only { display:none; }
  .grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stat b { font-size:20px; }
}
@media (max-width:860px) { .two { grid-template-columns:1fr; } }
/* Tables that become one block per row on phones; labels come from data-label. */
@media (max-width:640px) {
  table.stack, table.stack tbody { display:block; }
  table.stack tr:first-child { display:none; }
  table.stack tr { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding:10px 0; border-top:1px solid var(--line); }
  table.stack tr:nth-child(2) { border-top:0; }
  table.stack td { display:block; border:0; padding:0; text-align:left; }
  table.stack td.full { flex-basis:100%; }
  table.stack td.strong { font-weight:600; color:var(--white); }
  table.stack td.muted-m { color:var(--muted); font-size:13px; }
  table.stack td[data-label]::before { content:attr(data-label) ": "; color:var(--muted); }
  table.stack td.action { margin-left:auto; }
  table.stack td.wide-only { display:none; }
  table.clicks th, table.clicks td { font-size:12px; white-space:normal; }
  /* Role button editor: one block per button. */
  .btn-rows, .btn-rows tbody { display:block; }
  .btn-rows tr:first-child { display:none; }
  .btn-rows tr { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; padding:12px 0; border-top:1px solid var(--line); }
  .btn-rows tr:nth-child(2) { border-top:0; }
  .btn-rows td { padding:0; }
  .btn-rows td:not(.pos) { grid-column:1 / -1; }
  .btn-rows td[data-label="Ρόλος"] { grid-column:2; grid-row:1; }
  .btn-rows td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:12px; margin-bottom:3px; }
  .btn-rows td.pos::before { content:"#"; display:block; color:var(--muted); font-size:12px; margin-bottom:3px; }
}
@media (max-width:420px) {
  .top { gap:8px; }
  .brand { font-size:14px; gap:6px; }
  .brand .dots { gap:3px; }
  .brand .dots i { width:7px; height:7px; }
  .user { gap:6px; }
  .user img { width:26px; height:26px; }
  .user button { padding:6px 10px; font-size:13px; }
}
@media (max-width:980px) { .editor-grid { grid-template-columns:1fr; } .editor-grid .preview-card { position:static; max-height:none; } }
