@font-face { font-family: Commissioner; src: url(fonts/commissioner-greek.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: Commissioner; src: url(fonts/commissioner-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Literata; src: url(fonts/literata-greek.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF; }
@font-face { font-family: Literata; src: url(fonts/literata-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --green-950: #04200f;
  --green-800: #0f4424;
  --green-600: #1b7a33;
  --green-100: #e3efe4;
  --gold: #e8c34a;
  --bg: #f1f2ec;
  --ink: #18201a;
  --muted: #5a665d;
  --line: #dcdfd4;
  --red: #a2281f;
  --sans: Commissioner, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); }
a { color: var(--green-600); }
img { max-width: 100%; height: auto; }
h1 { font-size: 27px; line-height: 1.2; margin: 0 0 14px; }
h2 { font-size: 18px; margin: 0 0 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-size: 15px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; background: var(--green-950); color: #fff; padding: 8px 18px; }
.top-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; margin-right: auto; }
.back-link { margin: 0 0 14px; font-size: 15px; }
.back-link a { font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top a { color: #e6eee7; }
.top .link { color: #e6eee7; }
.menu-btn { display: none; background: none; border: 1px solid rgb(255 255 255 / .4); border-radius: 7px; color: #fff; font: 600 15px var(--sans); padding: 6px 12px; }

.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 48px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.side a { color: var(--ink); text-decoration: none; padding: 9px 12px; border-radius: 7px; font-weight: 500; }
.side a:hover { background: var(--bg); }
.side a[aria-current] { background: var(--green-100); color: var(--green-800); font-weight: 700; }
.side .side-new { background: var(--green-600); color: #fff; font-weight: 700; margin-bottom: 10px; text-align: center; }
.side .side-new:hover { background: var(--green-800); }
.badge { display: inline-block; background: var(--gold); color: var(--green-950); border-radius: 99px; padding: 0 8px; font-size: 13px; font-weight: 700; }
.main { padding: 24px 28px 60px; max-width: 1180px; width: 100%; }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: 10px 18px; background: var(--green-600); color: #fff; font: 600 15.5px/1.3 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--green-800); }
.btn-quiet { background: var(--green-100); color: var(--green-800); }
.btn-quiet:hover { background: #d2e4d4; }
.btn-danger { background: #f8e2df; color: var(--red); }
.btn-danger:hover { background: #f1cfca; }
.btn-small { padding: 6px 12px; font-size: 14.5px; }
.btn-wide { width: 100%; display: block; }
.link { background: none; border: 0; padding: 0; color: var(--green-600); font: inherit; text-decoration: underline; cursor: pointer; }
.link-danger { color: var(--red); }

.panel { background: #fff; border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgb(10 40 20 / .08); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h1, .panel-head h2 { margin: 0; }
.head-links { display: flex; gap: 8px; margin: 0; }
.narrow { max-width: 480px; }
.count { color: var(--muted); font-weight: 400; }

.notice { padding: 10px 14px; border-radius: 8px; font-weight: 500; margin: 0 0 14px; }
.notice-ok { background: var(--green-100); color: var(--green-800); }
.notice-bad { background: #f8e2df; color: var(--red); }
.notice-warn { background: #faf0c9; color: #5d4a05; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows a strong { color: var(--ink); }
.row-actions { margin-left: auto; display: flex; gap: 6px; }
.note { flex-basis: 100%; color: #5d4a05; font-size: 15px; }

.status { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 9px; border-radius: 99px; }
.status-draft { background: #e8e9e4; color: #4a524c; }
.status-pending { background: #faf0c9; color: #5d4a05; }
.status-changes { background: #f8e2df; color: var(--red); }
.status-published { background: var(--green-100); color: var(--green-800); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 5px 13px; border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; border: 1px solid var(--line); }
.tabs a[aria-current] { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 520px; }

input:not([type=checkbox]):not([type=file]), textarea, select { width: 100%; padding: 9px 11px; border: 1px solid #b9c0b3; border-radius: 7px; background: #fff; font: 16px var(--sans); color: var(--ink); }
fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select { background: #f4f4f0; }

.article-rows { list-style: none; margin: 0; padding: 0; }
.article-rows li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: center; }
.article-rows li:first-child { border-top: 0; }
.thumb { display: block; width: 84px; aspect-ratio: 4 / 3; background: var(--green-100); border-radius: 6px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.row-title:hover { color: var(--green-600); }
.article-rows p { margin: 2px 0 0; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pager a, .pager span { padding: 6px 12px; border-radius: 7px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager .current { background: var(--green-800); color: #fff; border-color: var(--green-800); }

.form { display: grid; gap: 12px; }
.form > .btn { justify-self: start; }
.form > .btn-wide { justify-self: stretch; }
.form label, .field { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.form-row { grid-template-columns: 1fr 1fr 160px auto; align-items: end; }
.settings .panel { display: grid; gap: 11px; }
.settings .panel h2, .settings .panel p { margin: 0; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.form-main { display: grid; gap: 14px; min-width: 0; }
.form-side { display: grid; gap: 14px; position: sticky; top: 64px; }
.article-form > .field { margin-bottom: 14px; }
.title-input { font-size: 22px !important; font-weight: 700; }
.box { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 2px rgb(10 40 20 / .08); display: grid; gap: 9px; }
.box h2 { margin: 0; font-size: 16px; }
.box p { margin: 0; }
.actions { gap: 8px; }
.cover-preview img { width: 100%; border-radius: 7px; display: block; }
.file-btn { position: relative; cursor: pointer; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-status p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }
.upload-status .upload-error { color: var(--red); font-weight: 600; }

.editor-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgb(10 40 20 / .08); position: relative; }
.editor-wrap .upload-status { padding: 0 16px 8px; }
.restore { margin: 10px; }
.toolbar { position: sticky; top: 56px; z-index: 5; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; background: #fafaf6; padding: 6px; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.toolbar button { background: none; border: 0; border-radius: 6px; padding: 6px 9px; font: 500 14.5px var(--sans); color: var(--ink); cursor: pointer; }
.toolbar button:hover { background: var(--green-100); }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.editor { min-height: 340px; padding: 18px 20px; font: 18px/1.65 Literata, Georgia, serif; outline: none; overflow-wrap: anywhere; }
.editor:empty::before { content: attr(data-placeholder); color: #8b948d; }
.editor p { margin: 0 0 .9em; }
.editor h2, .editor h3 { font-family: var(--sans); font-size: 23px; margin: 1em 0 .4em; }
.editor h3 { font-size: 19px; }
.editor blockquote { margin: 1em 0; padding-left: 16px; border-left: 4px solid var(--green-600); font-style: italic; }
.editor img { border-radius: 6px; display: block; }
.editor video { max-width: 100%; }
.editor .embed { background: var(--green-950); color: #fff; border-radius: 7px; padding: 22px 16px; margin: 1em 0; font: 15px var(--sans); overflow-wrap: anywhere; }
.editor .embed::before { content: "▶  Βίντεο ή παρουσίαση: " attr(data-embed); }

.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.g-item { position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: var(--bg); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item button { position: absolute; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .62); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.g-left { left: 4px; bottom: 4px; }
.g-right { right: 4px; bottom: 4px; }
.g-remove { right: 4px; top: 4px; }

.dlg { border: 0; border-radius: 12px; padding: 20px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgb(0 0 0 / .25); }
.dlg::backdrop { background: rgb(0 0 0 / .45); }
.dlg label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 0 0; }
.dlg-error { color: var(--red); margin: 8px 0 0; font-size: 14.5px; }
.dlg-error:empty { display: none; }

.review { border-left: 4px solid var(--gold); display: grid; gap: 10px; }
.review h2 { margin: 0; }
.danger { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-fields { grid-template-columns: 1fr 160px auto; align-items: end; margin-top: 14px; }
.check { display: flex; gap: 8px; align-items: center; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.media-item { background: #fff; border-radius: 9px; overflow: hidden; box-shadow: 0 1px 2px rgb(10 40 20 / .08); }
.media-item > img, .file-tile { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.file-tile { display: grid; place-items: center; background: var(--green-100); font-weight: 700; text-decoration: none; }
.media-form { padding: 8px; display: grid; gap: 6px; }
.media-form input { font-size: 14.5px !important; padding: 6px 8px !important; }
.media-actions { display: flex; justify-content: space-between; font-size: 14.5px; }

.cat-list { display: grid; gap: 8px; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 80px auto auto; gap: 8px; align-items: center; }
.cat-add { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 480px; }

.user-rows { list-style: none; margin: 0; padding: 0; }
.user-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.user-rows li:first-child { border-top: 0; }
.user-rows p { margin: 2px 0 0; }
.user-rows .inactive { opacity: .62; }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.message { border-left: 4px solid transparent; }
.message-new { border-left-color: var(--gold); }
.message h2 { margin: 0; }
.message-actions { display: flex; gap: 8px; }

.help h2 { margin-top: 22px; }
.help h2:first-child { margin-top: 0; }
.help li { margin-bottom: 4px; }

.plain { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: linear-gradient(135deg, var(--green-950), var(--green-800)); }
.login-box { background: #fff; border-radius: 14px; padding: 28px 26px; width: min(400px, 100%); text-align: center; }
.login-box img { display: block; margin: 0 auto 8px; }
.login-box .form { text-align: left; }
.login-link { margin: 14px 0 0; font-size: 15px; }

@media (max-width: 1000px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-side { position: static; }
}

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .top-right { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: sticky; top: 50px; z-index: 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .side.open { display: flex; }
  .main { padding: 16px 16px 50px; }
  .form-row, .inline-fields, .cat-row { grid-template-columns: 1fr; }
  .toolbar { top: 48px; }
  .editor { padding: 14px; min-height: 280px; }
  .row-actions { margin-left: 0; }
}
