/* Προγραμματισμός Δράσεων — στυλ
   Κεντρική ιδέα: το χρώμα κάθε τύπου δράσης (--tc) είναι πληροφορία και
   εμφανίζεται με τον ίδιο τρόπο παντού: λίστα, ημερολόγιο, ημερήσια εικόνα. */

:root {
  --ink: #1D2733;
  --muted: #5B6670;
  --canvas: #F2F4F3;
  --surface: #FFFFFF;
  --line: #D8DDDB;
  --line-strong: #B7C0BD;
  --primary: #22476B;
  --primary-hover: #1A3854;
  --primary-soft: #E3EBF3;
  --warn: #8A5300;
  --warn-bg: #FFF2D9;
  --warn-line: #E8B25C;
  --danger: #A3262F;
  --danger-bg: #FBE8E9;
  --ok: #1F6B45;
  --ok-bg: #E2F2E9;
  --focus: #2F7BD8;
  --r-s: 4px;
  --r: 8px;
  --font: "Commissioner", "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }
p { margin: 0 0 0.6em; }
code { font-size: 0.9em; background: var(--primary-soft); padding: 0 0.3em; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.warn-text { color: var(--warn); font-weight: 500; }

/* ------------------------------------------------------------ κεφαλίδα */
.top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); gap: 3px; align-items: end; height: 22px; }
.brand-mark i { display: block; border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 12px; background: #3D6B94; }
.brand-mark i:nth-child(2) { height: 22px; background: #C98A12; }
.brand-mark i:nth-child(3) { height: 16px; background: #2E7D4F; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 600; font-size: 1rem; }
.brand-text small { color: var(--muted); font-size: 0.78rem; }

.main-nav { display: flex; gap: 0.25rem; }
.main-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: var(--r-s);
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}
.main-nav a:hover { color: var(--ink); background: var(--canvas); }
.main-nav a.on { color: var(--primary); background: var(--primary-soft); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--r-s);
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: " ▾"; }
.user-menu[open] summary, .user-menu summary:hover { background: var(--canvas); color: var(--ink); }
.user-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 6px 24px rgba(29, 39, 51, 0.12);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
}
.user-menu > div a { padding: 0.45rem 0.65rem; border-radius: var(--r-s); text-decoration: none; color: var(--ink); }
.user-menu > div a:hover { background: var(--canvas); }

.page { max-width: 1320px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }

/* ------------------------------------------------------------- κουμπιά */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-s);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger-quiet { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger-quiet:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.btn-icon { width: 2.2rem; height: 2.2rem; padding: 0; font-size: 1.2rem; }
.btn-link {
  font: inherit;
  font-size: 0.88rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.btn-link.danger, .danger { color: var(--danger); }
.link-reset { font-size: 0.88rem; color: var(--muted); }
.inline-form { display: inline; margin: 0; }

/* ------------------------------------------------------------ μηνύματα */
.flash {
  padding: 0.7rem 1rem;
  border-radius: var(--r-s);
  margin-bottom: 1rem;
  border-left: 4px solid var(--ok);
  background: var(--ok-bg);
}
.flash-error { border-left-color: var(--danger); background: var(--danger-bg); }
.note { margin-top: 1rem; padding: 0.7rem 1rem; background: var(--warn-bg); border-radius: var(--r-s); }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.empty p { color: var(--muted); margin-bottom: 1rem; }

/* ------------------------------------------------------ κεφαλίδα σελίδας */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.page-head p { margin: 0.25rem 0 0; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.month-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.month-nav h1 { min-width: 11ch; text-align: center; }

/* --------------------------------------------------------------- φίλτρα */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 1.25rem;
}
.filters label { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.78rem; color: var(--muted); }
.filters label.chk { flex-direction: row; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--ink); padding-bottom: 0.45rem; }
.filters .f-search { flex: 1 1 16rem; }
.filters select, .filters input[type=search] { min-width: 9rem; }
.filters select { max-width: 15rem; }

input, select, textarea {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  padding: 0.45rem 0.6rem;
  width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=color] { padding: 0.1rem; height: 2.2rem; width: 3.5rem; }
textarea { resize: vertical; line-height: 1.45; }
input:disabled { background: var(--canvas); color: var(--muted); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 0; margin: 0; overflow: hidden; }
.seg legend { font-size: 0.78rem; color: var(--muted); }
.seg label { flex-direction: row !important; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 0.42rem 0.75rem; font-size: 0.86rem; color: var(--ink); border-left: 1px solid var(--line); }
.seg label:first-of-type span { border-left: 0; }
.seg input:checked + span { background: var(--primary); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }

/* -------------------------------------------------------- λίστα δράσεων */
.table-wrap { overflow-x: auto; }
.actions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.actions-table thead th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.actions-table td { padding: 0.7rem 0.8rem; vertical-align: top; border-bottom: 1px solid var(--line); }
.month-h th {
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1.1rem 0.8rem 0.45rem;
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
}
.month-h th span { font-size: 0.8rem; font-weight: 500; color: var(--muted); margin-left: 0.4rem; }
.arow td:first-child { box-shadow: inset 4px 0 0 var(--tc); padding-left: 1rem; }
.arow:hover td { background: #F8FAF9; }
.arow.past td { color: var(--muted); }
.arow.past .a-title { color: #3C4A57; }
.arow.cancelled .a-title { text-decoration: line-through; }
.arow.flash-row td { background: var(--warn-bg); }
.arow.has-conflict td:first-child { box-shadow: inset 4px 0 0 var(--tc), inset 7px 0 0 var(--warn-line); }
.c-date { width: 10.5rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-date a { color: inherit; text-decoration: none; font-weight: 500; }
.c-date a:hover { text-decoration: underline; }
.c-time { width: 9rem; font-variant-numeric: tabular-nums; }
.c-status { width: 9.5rem; }
.c-main { min-width: 16rem; }
.type-name { display: block; font-size: 0.76rem; font-weight: 600; color: var(--tc); margin-bottom: 0.1rem; }
.a-title { font-weight: 500; color: var(--ink); text-decoration: none; }
a.a-title:hover { text-decoration: underline; color: var(--primary); }
.sub { display: block; font-size: 0.83rem; color: var(--muted); }
.sub:empty { display: none; }
.c-people span:first-child { display: block; font-size: 0.88rem; }
.classes { font-weight: 500; }

.today-rule td { padding: 0 !important; border-bottom: 0 !important; background: transparent; }
.today-rule span {
  display: block;
  position: relative;
  margin: 0.2rem 0;
  padding: 0.15rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--danger);
  border-top: 2px solid var(--danger);
}

.st {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.st-planned { background: var(--primary-soft); color: var(--primary); }
.st-approved { background: var(--ok-bg); color: var(--ok); }
.st-done { background: #ECEEEE; color: var(--muted); }
.st-cancelled { background: var(--danger-bg); color: var(--danger); }

.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tc);
}
.type-tag::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--tc); }

.warn-badge {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--r-s);
  padding: 0.05rem 0.45rem;
  text-decoration: none;
}
.warn-badge:hover { color: var(--warn); text-decoration: underline; }

/* ------------------------------------------------------------- ημερολόγιο */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.55fr)); }
.cal-head div { padding: 0.5rem 0.6rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-head .abbr { display: none; }
.cal-day {
  min-height: 7.5rem;
  padding: 0.35rem 0.4rem 0.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.we { background: #F7F8F8; }
.cal-day.out { background: #F4F5F5; }
.cal-day.out .dnum { color: #A0A8AE; }
.dnum {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.05rem 0.35rem;
  border-radius: var(--r-s);
  font-variant-numeric: tabular-nums;
}
.dnum .dw { display: none; }
.dnum:hover { background: var(--primary-soft); }
.cal-day.today .dnum { background: var(--danger); color: #fff; }
.chip {
  display: block;
  font-size: 0.76rem;
  line-height: 1.3;
  padding: 0.18rem 0.35rem 0.18rem 0.45rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--tc) 13%, white);
  border-left: 3px solid var(--tc);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@supports not (background: color-mix(in srgb, red 10%, white)) {
  .chip { background: #EEF2F4; }
}
.chip b { font-weight: 600; }
.chip.cont { border-left-style: dotted; opacity: 0.85; }
.chip.cancelled { text-decoration: line-through; opacity: 0.6; }
.chip:hover { color: var(--ink); filter: brightness(0.96); }
.more { font-size: 0.76rem; color: var(--muted); padding-left: 0.35rem; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; padding: 0; margin: 1rem 0 0; font-size: 0.85rem; }
.legend li { display: flex; align-items: center; gap: 0.4rem; }
.legend li::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--tc); }
.legend a { color: var(--ink); text-decoration: none; }
.legend a:hover { text-decoration: underline; }

/* ------------------------------------------------------ ημερήσια εικόνα */
.k {
  display: inline-grid;
  place-items: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.25rem;
  border-radius: 4px;
  background: var(--tc);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.k:hover { color: #fff; filter: brightness(1.1); }
.k.untimed {
  background: repeating-linear-gradient(135deg, var(--tc) 0 4px, color-mix(in srgb, var(--tc) 55%, white) 4px 8px);
}

.day-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 0.6rem;
}
.day-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.7rem 0.8rem;
}
.day-list .k { flex: none; min-width: 1.9rem; height: 1.9rem; font-size: 0.95rem; }

.day-grid-wrap h2, .escorts h2 { margin-bottom: 0.25rem; }
.day-grid {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 0.6rem;
  min-width: 100%;
}
.day-grid th, .day-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0.28rem 0.4rem; }
.day-grid th:last-child, .day-grid td:last-child { border-right: 0; }
.day-grid thead th { font-size: 0.82rem; font-weight: 600; text-align: center; background: var(--surface); }
.day-grid thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.day-grid thead th:first-child, .day-grid tbody th { text-align: left; width: 5rem; }
.day-grid tbody th { font-weight: 600; font-size: 0.88rem; }
.day-grid td { min-width: 4.4rem; height: 2.2rem; text-align: center; }
.day-grid td { white-space: nowrap; }
.day-grid td .k + .k { margin-left: 2px; }
.day-grid tr.free th { color: var(--muted); font-weight: 500; }
.day-grid tr.busy th { color: var(--ink); }
.day-grid tr.gbreak th, .day-grid tr.gbreak td { border-top: 2px solid var(--line-strong); }
.day-grid tbody tr:last-child th, .day-grid tbody tr:last-child td { border-bottom: 0; }

.loose { margin-top: 1.25rem; }
.loose ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
.loose li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.9rem; }
.escorts { margin-top: 2rem; }

table.plain { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-top: 0.6rem; }
table.plain th { text-align: left; font-size: 0.78rem; font-weight: 500; color: var(--muted); padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
table.plain td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.plain tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------ σελίδα δράσης */
.action { max-width: 60rem; }
.action-head { padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 3px solid var(--tc); }
.action-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; font-size: 0.85rem; }
.action-head h1 { font-size: 1.75rem; max-width: 40ch; }
.action-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; align-items: center; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.facts > div { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.facts > div:nth-child(odd):not(.wide) { border-right: 1px solid var(--line); }
.facts > div.wide { grid-column: 1 / -1; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.2rem; }
.facts dd { margin: 0; }
.role-line { padding: 0.12rem 0; }
.role { display: inline-block; min-width: 9.5rem; font-size: 0.82rem; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.panel h2 { margin-bottom: 0.5rem; }
.panel-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.panel-warn h2 { color: var(--warn); }
.conflicts { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.5rem; }
.conflicts li { padding-left: 0.7rem; border-left: 3px solid var(--tc); font-size: 0.9rem; }
.conflicts li a { font-weight: 500; }
.conflicts li span { display: block; font-size: 0.83rem; color: var(--muted); }
.conflicts .why { color: var(--warn); }

.quick-status { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin-bottom: 0.75rem; }
.quick-status label { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--muted); gap: 0.15rem; }
.quick-status select { width: auto; }
.meta { margin-bottom: 2rem; }

.count { font-size: 0.8rem; font-weight: 500; color: var(--muted); background: var(--canvas); border: 1px solid var(--line); padding: 0.05rem 0.45rem; border-radius: 999px; vertical-align: middle; }
.btn-approve { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-approve:hover { background: var(--ok); border-color: var(--ok); color: #fff; filter: brightness(1.1); }
.btn-approve-alt { background: var(--surface); border-color: var(--ok); color: var(--ok); }
.btn-approve-alt:hover { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.pubtag { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0 0.4rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.pubtag.on { border-color: var(--ok); color: var(--ok); }
.c-status .pubtag { margin-top: 0.25rem; }
.public-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; font-size: 0.88rem; padding: 0.55rem 0.8rem; margin: 0 0 0.75rem; border-radius: var(--r-s); background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); }
.public-note p { margin: 0; }
.public-note.on { background: var(--ok-bg); border: 1px solid var(--ok); color: var(--ink); }

/* ------------------------------------------------ ειδοποίηση εγκρίσεων */
.btn-notify { gap: 0.45rem; color: var(--muted); }
.btn-notify.has { color: var(--ink); border-color: var(--danger); }
.btn-notify.has svg { color: var(--danger); }
.btn-notify.on { background: var(--primary-soft); }
.ncount { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ncount[hidden] { display: none; }

.appr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.appr-item { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: var(--r-s); padding: 0.8rem 1rem; }
.appr-main { flex: 1 1 26rem; min-width: 0; }
.appr-main .type-name { display: inline; }
.appr-main .a-title { display: block; }
.appr-when { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-right: 0.5rem; }
.appr-when.soon { color: var(--danger); }
.appr-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.appr-group { margin: 1.5rem 0 0.6rem; font-size: 1rem; }
.appr-group:first-of-type { margin-top: 0; }

/* ------------------------------------------------ λίστα διαδικασιών */
.cl-archive { margin: 1.5rem 0 1rem; }
.cl-archive > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.cl-archive .checklist { margin-top: 0.6rem; }
.checklist { margin: 1.5rem 0 1rem; padding: 1rem 1.1rem 0.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.8rem; margin-bottom: 0.3rem; }
.cl-progress { font-weight: 700; font-variant-numeric: tabular-nums; padding: 0.05rem 0.55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 0.85rem; }
.cl-progress.ok { background: var(--ok-bg); color: var(--ok); }
.cl-progress.bad { background: var(--danger-bg); color: var(--danger); }
.cl-over { font-size: 0.85rem; font-weight: 600; color: var(--danger); }
.cl-sub { margin: 1rem 0 0.3rem; font-size: 0.95rem; }
.cl-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.cl-row { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.cl-row:first-child { border-top: 0; }
.cl-form { margin: 0; display: inline; }
.cl-box { flex: none; width: 1.4rem; height: 1.4rem; margin-top: 0.05rem; padding: 0; border: 2px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; position: relative; display: inline-block; }
span.cl-box { cursor: default; }
button.cl-box:hover { border-color: var(--ok); }
.cl-row.done .cl-box, .cl-row.auto.ok .cl-box { background: var(--ok); border-color: var(--ok); }
.cl-row.done .cl-box::after, .cl-row.auto.ok .cl-box::after { content: ""; position: absolute; left: 0.38rem; top: 0.12rem; width: 0.35rem; height: 0.7rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cl-row.na .cl-box, .cl-row.auto.unknown .cl-box { border-style: dashed; }
.cl-row.na .cl-box::after { content: ""; position: absolute; left: 0.25rem; right: 0.25rem; top: 50%; border-top: 2px solid var(--line-strong); }
.cl-row.auto.bad .cl-box { border-color: var(--danger); background: var(--danger-bg); }
.cl-row.auto.bad .cl-box::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); font-weight: 800; font-size: 0.85rem; }
.cl-text { flex: 1; min-width: 0; }
.cl-label { display: block; font-size: 0.93rem; }
.cl-row.na .cl-label { color: var(--muted); }
.cl-meta { display: block; font-size: 0.8rem; color: var(--muted); }
.cl-by { color: var(--ok); font-weight: 500; }
.cl-row.na .cl-by { color: var(--muted); }
.cl-due { font-weight: 500; color: var(--ink); }
.cl-row.soon .cl-due { color: var(--warn); font-weight: 600; }
.cl-row.overdue .cl-due, .cl-row.auto.bad .cl-due { color: var(--danger); font-weight: 600; }
.cl-na { flex: none; font: inherit; font-size: 0.78rem; color: var(--muted); background: none; border: 1px solid transparent; border-radius: var(--r-s); padding: 0.15rem 0.45rem; cursor: pointer; }
.cl-na:hover { border-color: var(--line-strong); color: var(--ink); }
.clchip { display: inline-block; margin-top: 0.3rem; font-size: 0.72rem; font-weight: 600; padding: 0.05rem 0.45rem; border-radius: var(--r-s); background: var(--primary-soft); color: var(--primary); text-decoration: none; white-space: nowrap; }
.clchip.ok { background: var(--ok-bg); color: var(--ok); }
.clchip.bad { background: var(--danger-bg); color: var(--danger); }
.c-status .clchip { display: table; }
.kind-info { font-size: 0.86rem; background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: var(--r-s); padding: 0.55rem 0.8rem; }
.kind-info strong { font-weight: 600; }
.kind-info ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.kind-info li { margin: 0.1rem 0; }
.role-field { display: block; }
.kinds-pick summary { cursor: pointer; font-size: 0.82rem; color: var(--primary); }
.kinds-pick[open] { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 0.4rem 0.6rem; }
.kinds-group { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.4rem; }
.kinds-group > span { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.kinds-group label.chk { font-size: 0.82rem; }
.radio-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.radio-list legend { font-size: 0.86rem; font-weight: 500; padding: 0; margin-bottom: 0.2rem; }
.checks-table td { vertical-align: top; }
.checks-table td:first-child { width: 38%; }
.checks-table td:first-child .stack-cell { min-width: 20rem; }
.stack-cell { display: flex; flex-direction: column; gap: 0.3rem; min-width: 14rem; }
.stack-cell select { font-size: 0.82rem; padding: 0.25rem 0.4rem; }
.small-input { font-size: 0.8rem !important; color: var(--muted); }
.due-row { display: flex; gap: 0.3rem; align-items: center; }

/* ---------------------------------------------------- δημόσιο ημερολόγιο */
.pub-nav { margin-bottom: 0.75rem; }
.pub-nav h2 { font-size: 1.3rem; min-width: 11ch; text-align: center; }
.pub-empty { margin: 0 0 0.75rem; }
.pub-bottom { margin-top: 2rem; max-width: 48rem; }
.pub-bottom h2 { margin-bottom: 0.6rem; }
.pub-upcoming { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.pub-upcoming li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: var(--r-s); padding: 0.55rem 0.8rem; }
.pu-date { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pub-upcoming a { font-weight: 500; color: var(--ink); text-decoration: none; }
.pub-upcoming a:hover { text-decoration: underline; }
.pub-action { margin: 0 auto; }

/* ---------------------------------------------------------------- φόρμες */
.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.stack > label, .edit-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.86rem; font-weight: 500; }
label.chk, .edit-form label.chk { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; font-size: 0.9rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-start; }
.row > label { flex: 1 1 9rem; }
.row > .grow-1 { flex: 1 1 14rem; }
.row > .grow-2 { flex: 2 1 18rem; }
.self-end { align-self: flex-end; padding-bottom: 0.55rem; }
.err { color: var(--danger); font-size: 0.82rem; font-weight: 400; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0.5rem 0 0; }
.narrow-field { max-width: 22rem; }

.edit-form { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
.edit-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.sec {
  margin: 0;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.sec > legend { float: left; width: 100%; font-weight: 600; font-size: 1.02rem; padding: 0; margin: 0 0 0.1rem; }
.sec > legend + * { clear: both; }
.field .lbl { display: block; font-size: 0.86rem; font-weight: 500; margin-bottom: 0.3rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.1rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--surface);
  line-height: 1.2;
  user-select: none;
}
.pill small { font-size: 0.68rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill:hover span { border-color: var(--ink); }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill input:checked + span small { color: #D6E2EE; }
.pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.class-picker { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.grade-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.grade-toggle, .grade-label {
  font: inherit;
  font-size: 0.8rem;
  width: 6.2rem;
  padding: 0.35rem 0.4rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-s);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}
.grade-label { border-color: transparent; cursor: default; }
.grade-toggle:hover { border-color: var(--primary); color: var(--primary); }
.grade-toggle.full { border-style: solid; border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* επιλογή εκπαιδευτικών (βελτιώνεται από το app.js) */
.picker-label select[multiple] { min-height: 6rem; }
.picker { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; padding: 0.3rem; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); position: relative; font-weight: 400; }
.picker:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.picker .tchip { display: inline-flex; align-items: center; gap: 0.2rem; background: var(--primary-soft); color: var(--primary); border-radius: 3px; padding: 0.15rem 0.2rem 0.15rem 0.5rem; font-size: 0.84rem; font-weight: 500; }
.picker .tchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.25rem; }
.picker .tchip button:hover { color: var(--danger); }
.picker input { border: 0; flex: 1 1 10rem; min-width: 8rem; padding: 0.25rem 0.3rem; outline: none; }
.picker ul {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 2px);
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  max-height: 15rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  box-shadow: 0 6px 20px rgba(29, 39, 51, 0.12);
}
.picker li { padding: 0.35rem 0.55rem; border-radius: 3px; cursor: pointer; font-size: 0.9rem; }
.picker li.hl, .picker li:hover { background: var(--primary-soft); }
.picker li.none { color: var(--muted); cursor: default; background: none; }

.form-actions { display: flex; gap: 0.6rem; padding: 0.25rem 0 1rem; }

.conflict-panel {
  position: sticky;
  top: 72px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.conflict-panel h2 { font-size: 0.95rem; margin-bottom: 0.6rem; }
.conflict-panel.has-conflicts { border-color: var(--warn-line); background: var(--warn-bg); }
.cp-ok { color: var(--ok); font-weight: 500; font-size: 0.9rem; }
.cp-sub { font-size: 0.8rem; color: var(--muted); margin: 0.8rem 0 0.3rem; font-weight: 600; }
.cp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.cp-list li { font-size: 0.84rem; border-left: 3px solid var(--tc); padding-left: 0.5rem; }
.cp-list li a { font-weight: 500; }
.cp-list li span { display: block; color: var(--muted); font-size: 0.78rem; }
.cp-list li .why { color: var(--warn); }

/* ------------------------------------------------------------ ρυθμίσεις */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabs a { padding: 0.55rem 0.9rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.5rem; align-items: start; }
.admin-grid aside { position: sticky; top: 72px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.4rem; }
.admin-table tr.inactive td { color: var(--muted); }
.admin-table input:not([type=checkbox]):not([type=color]) { padding: 0.3rem 0.45rem; }
.admin-table .new-row td { background: #F8FAF9; }
.bulk-result { margin-bottom: 1.5rem; }
.bulk-result .flash { margin: 0.4rem 0 0.8rem; }
.bulk-result tr.bulk-bad td { color: var(--danger); }
code.pw { font-size: 0.95rem; letter-spacing: 0.04em; background: var(--canvas); padding: 0.05rem 0.4rem; }
@media print { main:has(.bulk-result) .admin-grid, main:has(.bulk-result) .tabs, main:has(.bulk-result) .page-head { display: none !important; } }
.row-tools { white-space: nowrap; text-align: right; }
.row-tools > * + * { margin-left: 0.6rem; }
.w-num { width: 4.5rem !important; }
.w-code { width: 7rem !important; }
.narrow-wide { max-width: 52rem; }

/* ------------------------------------------------------ σύνδεση κλπ */
.bare .top { justify-content: center; position: static; }
.login, .narrow { max-width: 26rem; margin: 3rem auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.75rem; }
.narrow { margin-top: 1rem; }
.login h1, .narrow h1 { margin-bottom: 0.5rem; }
.login form { margin-top: 1.25rem; }
.google-row { margin-top: 1.25rem; }
.btn-google { width: 100%; gap: 0.65rem; padding: 0.6rem 1rem; font-size: 0.95rem; background: #fff; color: #1F1F1F; border-color: #747775; }
.btn-google:hover { background: #F7F8F8; color: #1F1F1F; border-color: #1F1F1F; }
.or { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0; color: var(--muted); font-size: 0.82rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------- κινητά */
@media (max-width: 1000px) {
  .edit-form, .admin-grid { grid-template-columns: 1fr; }
  .conflict-panel { position: static; max-height: none; order: -1; }
  .admin-grid aside { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .top { flex-wrap: wrap; gap: 0.5rem 1rem; position: static; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .top-right { gap: 0.4rem; }
  .user-menu summary { max-width: 9rem; }
  .btn-notify .nlabel { display: none; }
  h1 { font-size: 1.35rem; }
  .filters { padding: 0.7rem; }
  .filters label:not(.f-search):not(.chk) { flex: 1 1 45%; }
  .filters select { max-width: none; min-width: 0; }
  .seg { width: 100%; }
  .seg label { flex: 1; }
  .seg span { text-align: center; padding: 0.42rem 0.3rem; font-size: 0.8rem; }

  .actions-table, .actions-table tbody, .actions-table tr, .actions-table td { display: block; width: auto; }
  .actions-table thead { display: none; }
  .actions-table { border: 0; background: transparent; }
  .month-h { display: block; }
  .month-h th { display: block; padding: 1rem 0.2rem 0.4rem; background: transparent; }
  .arow { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: var(--r-s); margin-bottom: 0.5rem; padding: 0.55rem 0.75rem; }
  .arow td, .arow td:first-child { border: 0; padding: 0.1rem 0; box-shadow: none; }
  .arow:hover td { background: transparent; }
  .arow.has-conflict { box-shadow: inset 3px 0 0 var(--warn-line); }
  .c-date, .c-time, .c-status { width: auto; }
  .c-date { font-size: 0.85rem; }
  .c-time:not(:empty)::before { content: "Ώρα: "; color: var(--muted); }
  .today-rule, .today-rule td { display: block; }

  .cal { border: 0; background: transparent; }
  .cal-head { display: none; }
  .cal-body { display: block; }
  .cal-day { display: none; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); margin-bottom: 0.4rem; padding: 0.5rem; }
  .cal-day.has, .cal-day.today { display: flex; }
  .cal-day.out.has { display: none; }
  .dnum .dw { display: inline; }
  .chip { white-space: normal; font-size: 0.85rem; padding: 0.3rem 0.5rem; }

  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(odd):not(.wide) { border-right: 0; }
  .role { display: block; min-width: 0; }
  .day-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* -------------------------------------------------------------- εκτύπωση */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 10.5pt; }
  .top, .filters, .head-actions, .action-tools, .no-print, .cl-na, .form-actions, .legend, .btn, .month-nav .btn, .link-reset, .warn-badge { display: none !important; }
  .page { padding: 0; max-width: none; }
  .actions-table, .cal, .day-grid, table.plain, .facts, .panel, .day-list li { border-color: #999; }
  .arow td:first-child { box-shadow: inset 3px 0 0 var(--tc); }
  .today-rule { display: none; }
  .k, .chip, .type-tag::before, .arow td:first-child { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal-day { min-height: 5.5rem; }
  .chip { white-space: normal; }
  a { color: inherit; text-decoration: none; }
}
