:root {
  --topbar-h: 60px; --footer-h: 56px;
  --bg:#f7f7fb; --bg-2:#fff; --text:#0f172a; --muted:#6b7280; --border:#e5e7eb;
  --primary:#2563eb; --primary-2:#14b8a6; --accent:#a855f7; --shadow:0 10px 30px rgba(2,6,23,.08);
}
:root.dark {
  --bg:#0b1220; --bg-2:#0f172a; --text:#e5e7eb; --muted:#9ca3af; --border:#1f2937;
  --primary:#60a5fa; --primary-2:#34d399; --accent:#c084fc; --shadow:0 10px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box} html,body{height:100%}
body.app{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans";background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}

/* containers */
.container{width:100%;max-width:1100px;margin:0 auto;padding:0 16px}
.container--top{padding-left:0} /* brand τελείως αριστερά */

/* topbar */
.topbar{position:sticky;top:0;z-index:20;background:var(--bg-2);border-bottom:1px solid var(--border);backdrop-filter:saturate(120%) blur(4px)}
.nav{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;min-height:var(--topbar-h)}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.brand__logo{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--accent));display:grid;place-items:center;color:#fff;font-weight:800;box-shadow:var(--shadow)}
.brand__text{font-weight:800;letter-spacing:.3px;color:var(--text)}
.menu{display:flex;gap:8px;flex-wrap:wrap}
.menu__item{padding:8px 12px;border-radius:12px;text-decoration:none;color:var(--text);border:1px solid transparent;transition:transform .08s ease,background .2s ease,border-color .2s ease;display:inline-flex;align-items:center;gap:8px}
.menu__item:hover{transform:translateY(-1px);background:var(--bg);border-color:var(--border)}
.menu__item.active{background:linear-gradient(90deg,color-mix(in oklab,var(--primary) 18%,transparent),color-mix(in oklab,var(--accent) 18%,transparent));border-color:color-mix(in oklab,var(--primary) 35%,var(--border))}

/* buttons */
.btn{appearance:none;border:1px solid transparent;background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;padding:10px 14px;border-radius:14px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:8px;box-shadow:var(--shadow);transition:transform .06s ease,filter .15s ease,box-shadow .15s ease;cursor:pointer}
.btn:hover{transform:translateY(-1px);filter:brightness(1.02);box-shadow:0 12px 32px rgba(30,58,138,.22)}
.btn-outline{background:transparent;color:var(--text);border-color:var(--border);box-shadow:none}
.btn-outline:hover{background:color-mix(in oklab,var(--primary) 15%,transparent);color:#fff;border-color:transparent}
.btn-ghost{background:transparent;color:var(--text);border-color:transparent;box-shadow:none}
.btn-ghost:hover{background:var(--bg)}

/* form */
.input{width:100%;background:var(--bg-2);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:10px 12px}
.label{font-weight:600;margin-bottom:6px;display:block}
.field{margin-top:12px}
.switch{display:flex;align-items:center;gap:10px}
.switch input{width:18px;height:18px}

/* misc util */
.small{font-size:12px}.muted{color:var(--muted)}.mt{margin-top:12px}.gap{gap:10px}.flex{display:flex}.link{color:var(--primary);text-decoration:none}.link:hover{text-decoration:underline}

/* layout bodies */
.main{height:calc(100vh - var(--topbar-h) - var(--footer-h));overflow:hidden;display:block}
/* FIX: δώσε ύψος 100% στο container του main για να λειτουργεί το 1fr των παιδιών */
.main > .container{height:100%;display:grid}
.viewport{display:grid;grid-template-rows:max-content 1fr max-content;gap:16px;height:100%}
.panel-full{display:grid;grid-template-rows:max-content 1fr;gap:12px;height:100%;min-height:0}
.panel__head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel__actions{display:flex;gap:10px}

/* scrolling regions */
.scroll-area{overflow:auto}
/* FIX: enable scroll inside grid cards */
.panel-full > .card.scroll-area{min-height:0;max-height:100%;overflow:auto}
.section--fill{min-height:0;display:grid;grid-template-rows:max-content 1fr;gap:10px}
.section__head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.notices-scroll{min-height:0}

/* grids */
.grid3{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){.grid3{grid-template-columns:1fr}}
.grid2{display:grid;gap:16px;grid-template-columns:1fr 1fr}
@media (max-width:900px){.grid2{grid-template-columns:1fr}}

/* cards / rows */
.card{background:var(--bg-2);border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:var(--shadow)}
.card--stat{background:radial-gradient(180px 80px at 110% -10%,color-mix(in oklab,var(--primary) 18%,transparent),transparent 60%),radial-gradient(220px 120px at -10% 110%,color-mix(in oklab,var(--accent) 22%,transparent),transparent 60%),var(--bg-2)}
.card__label{font-size:13px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.card__value{font-size:32px;font-weight:800;margin:6px 0}
.card__hint{font-size:13px;color:var(--muted)}

.list{display:flex;flex-direction:column;gap:10px}
.row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--bg-2);box-shadow:var(--shadow)}
.row__title{font-weight:700}
.row__sub{margin-top:4px}
.row__actions{display:flex;gap:8px}

/* badges/pills */
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:color-mix(in oklab,var(--primary) 18%,transparent);color:#fff;font-weight:600;font-size:12px}
.pill{display:inline-block;padding:4px 8px;border-radius:999px;font-weight:700;font-size:12px;border:1px solid var(--border);background:var(--bg)}
.pill--new{background:#ef4444;color:#fff;border-color:transparent}
.pill--new.pill--soft{background:#dc2626}
.pill--score{background:linear-gradient(90deg,var(--primary),var(--primary-2));color:#fff;border-color:transparent}
.pill--sent{background:#16a34a;color:#fff;border-color:transparent}
.pill--queued{background:#f59e0b;color:#111827;border-color:transparent}
.pill--failed{background:#ef4444;color:#fff;border-color:transparent}

/* empty state */
.empty{text-align:center;padding:30px;border:1px dashed var(--border);border-radius:18px;background:var(--bg-2)}
.empty__icon{font-size:30px;margin-bottom:6px}
.empty__title{font-weight:700;margin-bottom:8px}
.empty__desc{margin-bottom:16px}
.empty__actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* status labels */
.status-dot{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:12px;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:var(--bg)}
.status-dot.ok{background:#10b981;color:#fff;border-color:transparent}
.status-dot.off{background:#9ca3af;color:#111827}

/* footer */
.footer{margin-top:0;border-top:1px solid var(--border)}
.footer__inner{display:flex;align-items:center;justify-content:space-between;padding:12px 0;height:var(--footer-h)}

/* headings */
.h1{font-size:28px;font-weight:800;margin:6px 0}
.h2{font-size:20px;font-weight:700;margin:6px 0 4px}

/* unread row style */
.row.unread{border-color:color-mix(in oklab,var(--primary) 45%,var(--border));background:color-mix(in oklab,var(--primary) 6%,var(--bg-2))}

/* responsive nav */
@media (max-width:1100px){
  .nav{grid-template-columns:auto 1fr;align-items:start}
  .menu{display:flex;flex-wrap:wrap;gap:8px}
}
@media (max-width:820px){
  .menu{flex-direction:column;align-items:flex-start}
}
/* λίστα δικαιολογητικών με πράσινο tick */
.tick-list{list-style:none;padding-left:0;margin:8px 0 12px;columns:2;column-gap:24px}
@media (max-width:900px){.tick-list{columns:1}}
.tick-list li{break-inside:avoid;margin:6px 0;display:flex;gap:10px;align-items:center}
.tick{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;background:#10b981;color:#fff;font-weight:800;box-shadow:0 4px 10px rgba(16,185,129,.35)}
.sep{border:0;border-top:1px solid var(--border);margin:14px 0}
/* sticky ενημερωτική κορδέλα στην αρχή της φόρμας */
.notice-banner{
  position: sticky; top: 0; z-index: 2;
  padding: 10px 12px; margin: -18px -18px 12px -18px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(300px 120px at 10% -10%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 60%),
              radial-gradient(400px 150px at 110% 10%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%),
              var(--bg-2);
  font-weight: 700;
}

/* λίστα με πράσινο tick (σύνοψη) */
.tick-list{list-style:none;padding-left:0;margin:8px 0 12px;columns:2;column-gap:24px}
@media (max-width:900px){.tick-list{columns:1}}
.tick-list li{break-inside:avoid;margin:6px 0;display:flex;gap:10px;align-items:center}
.tick{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;background:#10b981;color:#fff;font-weight:800;box-shadow:0 4px 10px rgba(16,185,129,.35)}
.sep{border:0;border-top:1px solid var(--border);margin:14px 0}
/* εικονίδια στο menu */
.ico {display:inline-flex;align-items:center;justify-content:center}
.menu__item .ico {margin-right:6px}

/* scroll box για ενότητα 7ημέρου */
.scroll-box {max-height: 460px; overflow:auto; padding-right: 4px; }
@media (max-height:900px){ .scroll-box{ max-height: 360px; } }
@media (max-height:750px){ .scroll-box{ max-height: 300px; } }
/* fix scroll container μέσα σε grid */
.scroll-box{
  max-height:460px;
  overflow:auto;
  padding-right:4px;
  min-height:0;                    /* σημαντικό σε grid */
  -webkit-overflow-scrolling:touch;
}
@media (max-height:900px){ .scroll-box{ max-height:360px; } }
@media (max-height:750px){ .scroll-box{ max-height:300px; } }
/* --- compact header --- */
.topbar{position:sticky;top:0;z-index:50;background:var(--bg-2);border-bottom:1px solid var(--border)}
.container--top{padding-top:6px;padding-bottom:6px}
.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:nowrap}
.brand{display:flex;align-items:center;gap:10px;font-weight:800}
.brand__logo{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:var(--primary);color:#fff;font-weight:900}
.brand__text{letter-spacing:.2px}
.menu{display:flex;align-items:center;gap:12px;flex-wrap:nowrap}
.menu__item{display:inline-flex;align-items:center;padding:6px 10px;border-radius:10px;white-space:nowrap}
.menu__item.active{background:var(--bg-3)}
.menu__item .ico{margin-right:6px}

/* πιο σφιχτή γενικά */
.container{max-width:1100px}
.main .container{padding-top:16px;padding-bottom:16px}
.card{padding:14px}
.section__head{margin-bottom:10px}
.grid3{gap:12px}
.card--stat .card__value{font-size:28px}

/* empty state να μην πιάνει τεράστιο ύψος */
.card .empty{min-height:120px;padding:18px}

/* λίστα προκηρύξεων πιο compact */
.list .row{padding:10px 8px}
.row__title{font-size:15px}

/* scroll box για 7ήμερο */
.scroll-box{
  max-height:460px; overflow:auto; padding-right:4px; min-height:0;
  -webkit-overflow-scrolling:touch;
}
@media (max-height:900px){ .scroll-box{ max-height:360px; } }
@media (max-height:750px){ .scroll-box{ max-height:300px; } }
/* --- Notices page layout --- */
.notice-toolbar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  margin: 8px 0 12px 0;
}
.notice-toolbar .search{
  flex:1 1 520px;
  height:38px; padding:0 12px;
  border-radius:10px; border:1px solid var(--card-border,#2b3340);
  background: var(--card-bg,#121723);
  color:#e8edf6;
}
.notice-toolbar .chk{ display:flex; align-items:center; gap:6px; font-size:14px; opacity:.9; }
.notice-toolbar .total{ margin-left:auto; font-size:13px; opacity:.7; }

.notice-list{
  display:flex; flex-direction:column; gap:10px;
  max-height: calc(100vh - 280px); /* κρατά χώρο για header/toolbar/footer */
  overflow:auto; padding-right:6px;
}

.notice-row{
  display:flex; align-items:center; gap:14px;
  border:1px solid var(--card-border,#283041);
  background: linear-gradient(180deg, rgba(24,29,43,.8), rgba(18,23,35,.8));
  border-radius:16px; padding:12px 14px;
}
.notice-main{ flex:1 1 auto; min-width:0; }
.notice-title{ color:#fff; font-weight:600; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notice-title a{ color:#e8ecf1; text-decoration:none; }
.notice-title a:hover{ text-decoration:underline; }
.notice-meta{ margin-top:4px; font-size:12px; color:#aab4c3; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

.row-actions{ display:flex; gap:8px; flex: 0 0 auto; white-space:nowrap; }
.btn{ height:34px; padding:0 12px; border-radius:12px; font-weight:600; border:0; }
.btn-soft{ background:#262e42; color:#d6def0; }
.btn-soft[aria-disabled="true"], .btn-soft.disabled{ opacity:.4; pointer-events:none; }
.btn-primary{ background:#6e6be8; color:white; }
.btn-danger{ background:#e84b4b; color:white; }

.badge{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.badge--unread{ background:#ef4444; color:#fff; }
.badge--read{ background:#16a34a; color:#fff; }
.badge--watch{ background:#4f46e5; color:#fff; }

.empty-box{
  border:1px dashed #334055; color:#aab4c3;
  border-radius:14px; padding:16px; text-align:center; margin-top:8px;
}
.page-title{ font-size:28px; font-weight:800; margin: 0 0 8px 0; }
/* ===== Notices page ===== */
.page-title{ font-size:28px; font-weight:800; margin:0 0 10px 0; }

.notice-header{ display:flex; align-items:center; margin:0 0 8px 0; }
.notice-toolbar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  justify-content:flex-start; /* αριστερά, όχι κέντρο */
  width:100%; margin:0;
}
.notice-toolbar .search{
  flex: 1 1 520px;
  height:38px; padding:0 12px;
  border-radius:10px; border:1px solid var(--card-border,#2b3340);
  background: var(--card-bg,#121723);
  color:#e8edf6;
}
.notice-toolbar .chk{ display:flex; align-items:center; gap:6px; font-size:14px; opacity:.9; }
.notice-toolbar .total{ margin-left:auto; font-size:13px; opacity:.7; }

.notice-list{
  display:flex; flex-direction:column; gap:10px;
  max-height: calc(100vh - 260px); /* μένει ορατή χωρίς να κατεβαίνει στη μέση */
  overflow:auto; padding-right:6px;
}

.notice-row{
  display:flex; align-items:center; gap:14px;
  border:1px solid var(--card-border,#283041);
  background: linear-gradient(180deg, rgba(24,29,43,.8), rgba(18,23,35,.8));
  border-radius:16px; padding:12px 14px;
}
.notice-main{ flex:1 1 auto; min-width:0; }
.notice-title{ color:#fff; font-weight:600; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notice-title a{ color:#e8ecf1; text-decoration:none; }
.notice-title a:hover{ text-decoration:underline; }
.notice-meta{ margin-top:4px; font-size:12px; color:#aab4c3; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

.row-actions{ display:flex; gap:8px; flex: 0 0 auto; white-space:nowrap; }
.btn{ height:34px; padding:0 12px; border-radius:12px; font-weight:600; border:0; }
.btn-soft{ background:#262e42; color:#d6def0; }
.btn-soft.disabled, .btn-soft[aria-disabled="true"]{ opacity:.4; pointer-events:none; }
.btn-primary{ background:#6e6be8; color:#fff; }
.btn-danger{ background:#e84b4b; color:#fff; }

.badge{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.badge--unread{ background:#ef4444; color:#fff; }
.badge--read{ background:#16a34a; color:#fff; }
.badge--watch{ background:#4f46e5; color:#fff; }

.empty-box{
  border:1px dashed #334055; color:#aab4c3;
  border-radius:14px; padding:16px; text-align:center; margin-top:8px;
}
