:root{--navy:#0a355b;--blue:#0c78b5;--sky:#eef7fc;--line:#c9deeb;--text:#17344c;--muted:#647c8f;--danger:#a62929;--success:#14764a;--white:#fff;--shadow:0 16px 46px rgba(10,53,91,.11)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--sky)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit}.hidden{display:none!important}.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(680px,100%);background:#fff;border-radius:26px;padding:44px;box-shadow:var(--shadow)}h1,h2,h3{color:var(--navy)}.field{margin:0 0 16px}.field label,label{display:block;font-weight:800;margin-bottom:7px}.field input,.field select,.field textarea,input,select,textarea{width:100%;padding:12px 14px;border:1.5px solid #9fc7e0;border-radius:10px;background:#fff}.btn{border:0;border-radius:10px;padding:11px 16px;background:var(--blue);color:#fff;font-weight:800}.btn.soft{background:#e5f1f8;color:var(--navy)}.btn.danger{background:var(--danger)}.btn:disabled{opacity:.55}.status{min-height:24px;font-weight:750}.status.err{color:var(--danger)}.status.ok{color:var(--success)}.app{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{background:var(--navy);color:#fff;padding:20px 14px;position:sticky;top:0;height:100vh;overflow:auto}.brand{padding:10px 10px 22px;border-bottom:1px solid rgba(255,255,255,.2);font-size:1.1rem;font-weight:900}.nav{display:grid;gap:5px;margin-top:18px}.nav a{padding:11px 12px;text-decoration:none;border-radius:9px;font-weight:700}.nav a:hover,.nav a.active{background:rgba(255,255,255,.15)}.sidebar-bottom{margin-top:22px;padding-top:18px;border-top:1px solid rgba(255,255,255,.2)}.main{min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:5}.content{padding:26px}.grid{display:grid;gap:18px}.cards{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 7px 20px rgba(10,53,91,.05)}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:18px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.list-layout{display:grid;grid-template-columns:320px 1fr;gap:18px}.item-list{list-style:none;padding:0;margin:0;max-height:70vh;overflow:auto}.item-list li{padding:11px;border-bottom:1px solid #e5eef4;cursor:pointer}.item-list li:hover,.item-list li.active{background:#eaf5fb}.tabs{display:flex;gap:6px;margin-bottom:12px}.tab{background:#e6f1f8;color:var(--navy);border:0;padding:9px 14px;border-radius:8px;font-weight:800}.tab.active{background:var(--blue);color:#fff}.pane{display:none}.pane.active{display:block}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.media-item{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px;text-align:left}.media-item img,.media-item video{width:100%;height:110px;object-fit:cover;border-radius:8px;background:#eef2f4}.media-name{font-size:.85rem;word-break:break-word;margin-top:6px}.modal{display:none;position:fixed;inset:0;background:rgba(4,22,38,.72);z-index:50;padding:30px}.modal.open{display:grid;place-items:center}.modal-card{width:min(1100px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;padding:20px}.modal-head{display:flex;align-items:center;justify-content:space-between}.count{font-size:2rem;font-weight:900;color:var(--blue)}table{width:100%;border-collapse:collapse}th,td{padding:10px;border-bottom:1px solid #e5eef4;text-align:left;vertical-align:top}.drag{cursor:grab}.gallery-thumb{width:90px;height:65px;object-fit:cover;border-radius:7px}@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{height:auto;position:relative}.topbar{position:relative}.list-layout,.two,.three{grid-template-columns:1fr}}


/* SchoolDrive CMS v2.1.1 R2 additions */
.small {
  padding: 7px 10px;
  font-size: .9rem;
}

.inline-label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.inline-label select {
  width: auto;
  min-width: 220px;
}

.span-2 {
  grid-column: span 2;
}

.help-text {
  margin: -2px 0 12px;
  color: var(--muted);
}

.file-placeholder {
  height: 110px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf3f7;
  font-weight: 900;
  color: var(--navy);
}

/* Dashboard */
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, #0a355b, #0c78b5);
  box-shadow: var(--shadow);
}

.dashboard-hero h1 {
  margin: 0 0 8px;
  color: #fff;
}

.dashboard-hero p {
  margin: 0;
  opacity: .9;
}

.health-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  font-weight: 850;
}

.health-pill.ok {
  background: #dff7e9;
  color: #11683f;
}

.health-pill.err {
  background: #ffe0e0;
  color: #922323;
}

.dashboard-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-tile {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(10,53,91,.07);
  transition:
    transform .15s ease,
    box-shadow .15s ease;
}

.dashboard-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(10,53,91,.14);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #e8f5fc;
  font-size: 2rem;
}

.tile-copy {
  display: grid;
  gap: 5px;
}

.tile-copy strong {
  color: var(--navy);
  font-size: 1.08rem;
}

.tile-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.tile-count {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--blue);
}

.status-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--muted);
}

/* Menu editor */
.menu-level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.level-head h3 {
  margin: 0;
}

.menu-listbox {
  min-height: 380px;
  padding: 6px;
}

.menu-listbox option {
  padding: 10px;
  border-radius: 6px;
}

.menu-editor-actions {
  margin-top: 18px;
}

/* User profiles */
.users-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
}

.profile-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.profile-list-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}

.profile-list-item:hover,
.profile-list-item.active {
  border-color: var(--line);
  background: #eaf5fb;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-summary {
  display: grid;
  gap: 4px;
}

.profile-summary small {
  color: var(--muted);
}

.profile-top {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
}

.profile-photo-box {
  display: grid;
  align-content: start;
  gap: 12px;
}

#photoPreview {
  width: 210px;
  height: 210px;
  border: 2px dashed var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, #eef7fc, #dcecf6);
  object-fit: cover;
}

#photoPreview:not(.has-photo) {
  visibility: visible;
}

.bio-section {
  margin-top: 20px;
}

@media(max-width:1100px) {
  .menu-level-grid {
    grid-template-columns: 1fr;
  }

  .menu-listbox {
    min-height: 220px;
  }

  .users-layout,
  .profile-top {
    grid-template-columns: 1fr;
  }

  .profile-list {
    max-height: 360px;
  }
}

@media(max-width:700px) {
  .span-2 {
    grid-column: auto;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v2.1.2 FULL */
tr[draggable="true"] {
  cursor: grab;
}

tr.dragging {
  opacity: .45;
  outline: 2px dashed var(--blue);
}

.media-item .row {
  justify-content: center;
  margin-top: 8px;
}


/* -------------------------------------------------------
   Initial dashboard system check
   ------------------------------------------------------- */

html.initial-check-active,
html.initial-check-active body {
  overflow: hidden;
}

.initial-check-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 37, 50, 0.66);
  backdrop-filter: grayscale(0.55) blur(1.5px);
  -webkit-backdrop-filter: grayscale(0.55) blur(1.5px);
  opacity: 1;
  transition: opacity 0.22s ease;
  cursor: wait;
}

.initial-check-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.initial-check-dialog {
  width: min(520px, calc(100vw - 40px));
  padding: 34px 36px 38px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.30),
    0 8px 24px rgba(0, 0, 0, 0.12);
  text-align: center;
  color: #103958;
}

.initial-check-dialog h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
}

.initial-check-dialog p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.65;
}

.initial-check-dots {
  --dot-size: 15px;
  --dot-gap: 12px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, var(--dot-size));
  column-gap: var(--dot-gap);
  width: max-content;
  margin: 30px auto 0;
}

.initial-check-dots span,
.initial-check-dots i {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
}

.initial-check-dots span {
  display: block;
  background: #111111;
}

.initial-check-dots i {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  background: #a7adb3;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72);
  animation:
    initialCheckWalker 2.8s
    cubic-bezier(.45, 0, .55, 1)
    infinite alternate;
}

@keyframes initialCheckWalker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(
      calc(
        6 * (var(--dot-size) + var(--dot-gap))
      )
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .initial-check-dots i {
    animation-duration: 5.6s;
  }
}


/* -------------------------------------------------------
   Global CMS busy overlay
   ------------------------------------------------------- */

html.cms-global-busy-active,
html.cms-global-busy-active body {
  overflow: hidden;
}

.cms-global-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483500;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(28, 38, 46, 0.68);
  backdrop-filter: grayscale(0.65) blur(1.5px);
  -webkit-backdrop-filter: grayscale(0.65) blur(1.5px);
  opacity: 0;
  pointer-events: none;
  cursor: wait;
  transition: opacity 0.18s ease;
}

.cms-global-busy-overlay.is-open {
  display: grid;
  opacity: 1;
  pointer-events: all;
}

.cms-global-busy-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.cms-global-busy-dialog {
  width: min(520px, calc(100vw - 40px));
  padding: 34px 36px 38px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.30),
    0 8px 24px rgba(0, 0, 0, 0.14);
  text-align: center;
  color: #103958;
}

.cms-global-busy-dialog h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.cms-global-busy-dialog p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.6;
}

.cms-global-busy-dots {
  --dot-size: 15px;
  --dot-gap: 12px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, var(--dot-size));
  column-gap: var(--dot-gap);
  width: max-content;
  margin: 30px auto 0;
}

.cms-global-busy-dots span,
.cms-global-busy-dots i {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
}

.cms-global-busy-dots span {
  display: block;
  background: #111111;
}

.cms-global-busy-dots i {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  background: #a7adb3;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.76);
  animation:
    cmsGlobalBusyWalker 2.8s
    cubic-bezier(.45, 0, .55, 1)
    infinite alternate;
}

@keyframes cmsGlobalBusyWalker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(
      calc(
        6 * (var(--dot-size) + var(--dot-gap))
      )
    );
  }
}


/* Hero / Gallery Media Library picker */

.block-media-picker-card {
  width: min(1180px, 100%);
}

.block-media-upload-row {
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    auto
    minmax(240px, 0.7fr);
  gap: 12px;
  align-items: center;
  margin: 18px 0 12px;
}

.block-media-grid {
  margin-top: 14px;
  max-height: 58vh;
  overflow: auto;
  padding: 4px;
}

.block-media-choice {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.block-media-choice:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(10, 53, 91, 0.13);
}

.block-media-empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

@media (max-width: 760px) {
  .block-media-upload-row {
    grid-template-columns: 1fr;
  }
}

/* SchoolDrive CMS 3.0.7 — password management */
.check-line{display:flex;align-items:center;gap:9px;font-weight:700;margin:4px 0 18px}.check-line input{width:auto;margin:0}.login-button-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.text-button{border:0;background:transparent;color:var(--blue);font-weight:800;padding:9px 4px;text-decoration:underline;text-underline-offset:3px}.text-button:hover{color:var(--navy)}.password-recovery{margin-top:26px;padding-top:24px;border-top:1px solid var(--line)}.recovery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.recovery-head h2{margin:0 0 6px}.icon-close{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--navy);font-size:25px;line-height:1;display:grid;place-items:center}.help-text{color:var(--muted);margin:.25rem 0 1rem}.recovery-notice{background:#eef8ff;border:1px solid #b9dff2;border-radius:12px;padding:12px 14px;margin:15px 0;color:var(--text);font-weight:650}.password-policy{color:var(--muted);font-size:.92rem;margin-top:-4px}.recovery-requested .field{opacity:.78}.profile-password-actions{display:flex;gap:10px;flex-wrap:wrap}.password-modal-backdrop{position:fixed;inset:0;background:rgba(4,22,38,.72);z-index:2147483600;display:grid;place-items:center;padding:24px}.password-modal-card{width:min(560px,100%);background:#fff;border-radius:20px;padding:26px;box-shadow:var(--shadow)}.password-modal-card h3{margin-top:0}.password-modal-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}@media(max-width:640px){.login-card{padding:28px 22px}.login-button-row .btn{width:100%}.text-button{width:100%;text-align:center}.recovery-head{align-items:center}}

/* 3.0.8 backend/password verification status */
.backend-version{margin:.2rem 0 1rem;font-size:.88rem;font-weight:700;color:var(--muted)}.backend-version.ok{color:#0a7a45}.backend-version.warn{color:#a35b00}.backend-version.err{color:#b3261e}

/* SchoolDrive CMS 3.1 — Συλλογή Πολυμέσων / picker */
.cms-media-picker-backdrop{position:fixed;inset:0;z-index:2147483640;background:rgba(4,22,38,.76);display:grid;place-items:center;padding:24px}.cms-media-picker{width:min(1180px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:20px;box-shadow:var(--shadow)}.cms-media-picker header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:#fff;padding:10px 0;z-index:2}.cms-media-picker-filters{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,260px) minmax(180px,260px);gap:10px;margin:8px 0 16px}.cms-media-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.cms-media-picker-item{border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);padding:8px;text-align:left;display:grid;gap:6px;min-width:0}.cms-media-picker-item:hover{border-color:var(--blue);box-shadow:0 5px 18px rgba(10,53,91,.12)}.cms-media-picker-item img,.cms-media-picker-item video{width:100%;height:120px;object-fit:cover;border-radius:8px;background:#eef2f4}.cms-media-picker-item strong,.cms-media-picker-item small{overflow:hidden;text-overflow:ellipsis}.cms-media-file-icon,.file-placeholder{height:110px;display:grid;place-items:center;border-radius:8px;background:#eef2f4;color:var(--navy);font-weight:900}.data-table th{background:#f5fafc}@media(max-width:760px){.cms-media-picker-filters{grid-template-columns:1fr}.cms-media-picker{padding:14px}.cms-media-picker header{top:-14px}}


/* 3.5.1 — deferred Hero/Gallery deletion UI. */
.cms-delete-modal{position:fixed;inset:0;z-index:2147483646;background:rgba(4,22,38,.72);display:grid;place-items:center;padding:24px}
.cms-delete-modal[hidden]{display:none!important}
.cms-delete-dialog{width:min(620px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:26px;box-shadow:0 22px 70px rgba(4,22,38,.28)}
.cms-delete-dialog h3{margin:0 0 10px;font-size:1.35rem}
.cms-delete-dialog p{margin:0 0 18px;line-height:1.55}
.cms-delete-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.cms-delete-actions .btn.cancel{background:#fff;color:var(--muted);border:1px solid var(--line)}
.cms-object-card{transition:opacity .2s ease,filter .2s ease}
.cms-object-card.pending-delete{opacity:.42;filter:grayscale(.32)}
.cms-pending-banner{display:none;margin:0 0 16px;padding:12px 14px;border:1px solid #e7b1b1;background:#fff1f1;color:#7f2020;border-radius:12px;font-weight:800}
.cms-pending-banner.show{display:block}
.cms-pending-badge{display:inline-block;margin-left:7px;padding:2px 7px;border-radius:999px;background:#f7d9d9;color:#8f2020;font-size:.78em;font-weight:900;vertical-align:middle}
.btn.undo-delete{background:#fff3d8;color:#805500;border:1px solid #efd08a}
select option.pending-delete-option{color:#8b98a4;background:#f2f4f6}

.cms-credit{margin:1rem auto 0;text-align:center;color:#647c8f;font-size:.82rem}
