/* =========================================================================
   EventProduction — single stylesheet
   Copied from operonlaw's operon.css (same Operon design system, same class
   vocabulary). Only the design tokens below were changed, to the Operon
   brand in InvoiceSort/style.md; app-specific additions are at the end.

   Conventions
   -----------
   1. Every color, radius, font-size and spacing step is a CSS custom
      property declared once in :root (Option A). Never hardcode a hex
      value inside a component class.
   2. Status ("tone") colors are exposed through context-specific classes
      (Option A): badge--danger, tone-text--danger, row--danger, cell--danger.
      A tone is one of: danger | warning | success | neutral | info.
   3. Class naming is block__element--modifier (BEM-lite). Blocks map 1:1
      to a partial or a page region, so a backend developer can find the
      markup that owns a class by grepping the templates/ directory.
   4. No CSS framework, no build step. This file is served as a plain
      static asset from core/static/core/css/operon.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
  /* Brand */
  --accent: #007979;          /* Operon teal — primary brand color (style.md) */
  --accent-hover: #006262;
  --accent-soft: #e6f2f2;     /* tinted background for active nav rows    */
  --accent-fg: #ffffff;       /* text on top of --accent                  */

  /* Surfaces */
  --bg: #f7f8f9;              /* app background                           */
  --surface: #ffffff;         /* panels, tables, sidebar                  */
  --surface-alt: #fafbfc;     /* zebra rows, table headers                */
  --surface-sunken: #f2f4f6;  /* inputs, disabled areas                   */

  /* Text */
  --text: #101d21;            /* primary text                             */
  --text-muted: #49585d;      /* secondary text, labels                   */
  --text-faint: #7d8a8f;      /* meta, timestamps, placeholders           */

  /* Lines */
  --line: #e5e7eb;            /* the 1px border used everywhere           */
  --line-strong: #d1d5db;
  --focus: #6eb1bd;

  /* Status tones — meaning only, never decoration */
  --danger: #dc2626;          /* deadline expiring / overdue              */
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --warning: #d97706;         /* needs attention                          */
  --warning-bg: #fffbeb;
  --warning-line: #fde68a;
  --success: #15803d;         /* completed                                */
  --success-bg: #f0fdf4;
  --success-line: #bbf7d0;
  --info: #1d4ed8;            /* informational / synced                   */
  --info-bg: #eff6ff;
  --info-line: #bfdbfe;
  --neutral: #4b5563;         /* no state                                 */
  --neutral-bg: #f3f4f6;
  --neutral-line: #e5e7eb;

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 11px;              /* badges, table meta                       */
  --fs-sm: 12px;              /* dense secondary data                     */
  --fs-base: 14px;            /* default data size                        */
  --fs-md: 14px;              /* section titles, emphasized rows          */
  --fs-lg: 20px;              /* page title                               */

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* Structure */
  --radius: 8px;
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 60px;
  --topbar-h: 48px;
  --row-h: 34px;              /* dense table row height                   */
  --z-modal: 100;
  --z-toast: 200;
}

/* -------------------------------------------------------------------------
   2. Reset / base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-family: var(--font);
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.45;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.u-hidden { display: none !important; }
.u-right { text-align: right; }
.u-center { text-align: center; }
.u-nowrap { white-space: nowrap; }
/* a table cell of long text that must wrap (tables are nowrap; §101.6) */
.table td.u-wrap { white-space: normal; overflow-wrap: anywhere; padding-block: var(--sp-2); height: auto; }
/* A one-button form that has to sit beside other buttons rather than on a
   line of its own — «Το είδα» in a table cell (§37.6b). */
.u-full { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.u-pre { white-space: pre-wrap; font-size: var(--fs-sm); margin-top: var(--sp-3); }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-mono { font-variant-numeric: tabular-nums; }
.u-push { margin-left: auto; }

/* -------------------------------------------------------------------------
   3. Shell — core/partials/_sidebar.html + _topbar.html + base.html
   ------------------------------------------------------------------------- */
.shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.shell__main {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
}

.shell__content {
  flex: 1 1 auto;
  overflow-y: auto;
}

/* Sidebar ---------------------------------------------------------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: width 0.15s ease;
}
.sidebar.is-collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.is-collapsed .sidebar__label,
.sidebar.is-collapsed .sidebar__brand-text { display: none; }
.sidebar.is-collapsed .sidebar__link { justify-content: center; padding-inline: 0; }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: var(--topbar-h);
  padding: 0 var(--sp-3);
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.sidebar__brand-text { font-size: 15px; font-weight: 600; }
/* The office's logo when core/static/core/img/brand-logo.svg exists; the
   scale mark only when the sidebar is collapsed (2026-10-05, §41). */
.sidebar__logo { display: block; max-width: 100%; max-height: 32px; width: auto; }
.sidebar__brand--logo .sidebar__brand-mark { display: none; }
.sidebar.is-collapsed .sidebar__logo { display: none; }
.sidebar.is-collapsed .sidebar__brand--logo .sidebar__brand-mark { display: block; }
.sidebar.is-collapsed .sidebar__brand { justify-content: center; padding-inline: 0; }
/* «© Made by Operon Consulting», just above «Σύμπτυξη μενού». */
.sidebar__credit { padding: var(--sp-2) var(--sp-4); color: var(--text-faint); font-size: var(--fs-xs); }
.sidebar.is-collapsed .sidebar__credit { display: none; }

.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-2) 0; }
.sidebar__divider { margin: var(--sp-2) 0; border-top: 1px solid var(--line); }

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 32px;
  padding: 0 var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-base);
}
.sidebar__link:hover { background: var(--surface-alt); color: var(--text); }
.sidebar__link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.sidebar__link--accent { color: var(--accent); font-weight: 600; }
.sidebar__icon { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar__toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 var(--sp-4);
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-base);
  cursor: pointer;
}
.sidebar__toggle:hover { background: var(--surface-alt); color: var(--text); }

/* Topbar ----------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: var(--topbar-h);
  flex-shrink: 0;
  padding: 0 var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__search { position: relative; width: 320px; max-width: 40vw; }
.topbar__search input {
  width: 100%;
  height: 30px;
  padding: 0 var(--sp-3) 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-sunken);
  font-size: var(--fs-base);
  color: var(--text);
}
.topbar__search-icon {
  position: absolute;
  left: var(--sp-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.topbar__actions { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; }

.topbar__bell { position: relative; display: inline-flex; padding: var(--sp-1); border: 0; background: none; color: var(--text-muted); cursor: pointer; }
.topbar__badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.topbar__user { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-base); }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--fs-xs);
  font-weight: 600;
  flex-shrink: 0;
}
.avatar--sm { width: 20px; height: 20px; font-size: 10px; }
.avatar--muted { background: var(--neutral-bg); color: var(--neutral); }

/* -------------------------------------------------------------------------
   4. Page scaffolding — core/partials/_page_header.html
   ------------------------------------------------------------------------- */
.page__header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page__title { font-size: var(--fs-lg); }
.page__subtitle { margin-top: 2px; color: var(--text-muted); font-size: var(--fs-base); }
.page__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.page__body { padding: var(--sp-5); }
.page__body--flush { padding: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel + .panel { margin-top: var(--sp-4); }
.panel__header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
.panel__title { font-size: var(--fs-md); }
.panel__meta { color: var(--text-muted); font-size: var(--fs-sm); }
.panel__body { padding: var(--sp-3); }
.panel__body--flush { padding: 0; }
.panel__footer { padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); background: var(--surface-alt); }

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 1100px) {
  .grid--3, .grid--4, .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
}

/* Στάδια: one column per δικόγραφο, top-aligned (client, 2026-10-18; §68). */
.stadia-columns { display: flex; gap: var(--sp-6); align-items: flex-start; overflow-x: auto; }
.stadia-columns__col { flex: 1 1 0; min-width: 320px; }
/* The column's header: a box with room around it — the δικόγραφο's kind,
   and under it its ΓΑΚ and court (client, 2026-10-19; problems.md §73). */
.stadia-columns__title { margin: var(--sp-4) 0 var(--sp-3); padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-alt); display: flex; flex-direction: column; gap: 2px;
  font-size: 0.95rem; font-weight: 600; }
.stadia-columns__sub { font-weight: 400; font-size: var(--fs-sm); color: var(--text-muted); }

/* What a step offers — «Καταχώρηση έφεσης», «Καταχώρηση ανακοπής» — in a box
   of its own under the step, not loose controls (client, 2026-10-19; §73). */
.stepaction { margin: var(--sp-2) 0 var(--sp-1); padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-alt); max-width: 560px;
  display: flex; flex-direction: column; gap: var(--sp-2); }
.stepaction__title { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.stepaction__row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; font-size: var(--fs-sm); }
.stepaction__muted { color: var(--text-muted); font-size: var(--fs-sm); }
.stepaction__filed { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--sp-1); }
/* Two choices as one switch; the radio itself is hidden, its label is the button. */
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 3px 12px; font-size: var(--fs-sm); cursor: pointer; background: var(--surface); }
.segmented label + input + label, .segmented input + label ~ label { border-left: 1px solid var(--line-strong); }
.segmented input:checked + label { background: var(--accent); color: #fff; }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }

/* A section that folds, remembered per user (client, 2026-10-19; §73):
   the Προθεσμίες and Έγγραφα of each δικόγραφο, the Απόφαση and the
   Πληροφορίες of each. A plain <details>: it works without the script. */
.fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 var(--sp-4); }
.fold > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; align-items: center;
  gap: var(--sp-3); flex-wrap: wrap; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold__title { font-weight: 600; }
.fold__sub { color: var(--text-muted); font-size: var(--fs-sm); }
.fold__aside { margin-left: auto; }
.fold__body { border-top: 1px solid var(--line); }
.fold__body > .panel { border: 0; border-radius: 0; margin: 0; box-shadow: none; }
.fold__body > .panel + .panel { border-top: 1px solid var(--line); }
.fold__body > .table-scroll { border: 0; }
/* «Σχετικά» — the δικόγραφο's folder, inside its Έγγραφα group (§77). */
.fold--folder { margin: var(--sp-3); background: var(--surface-alt); }
.fold__body > .list__meta { padding: 10px 14px; margin: 0; }
.fold--folder .fold__body > .stepaction { margin: var(--sp-3); max-width: none; }
.sxetika { margin: 0; padding: 0 var(--sp-3) var(--sp-3); }
.sxetika__item { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; padding: 6px 0;
  border-bottom: 1px solid var(--line); }
.sxetika__edit > summary { list-style: none; display: inline-flex; }
.sxetika__edit > summary::-webkit-details-marker { display: none; }
.sxetika__edit[open] { flex-basis: 100%; }

.empty {
  padding: var(--sp-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-base);
  text-align: center;
}

/* -------------------------------------------------------------------------
   5. Dense lists — the default way of showing records
   ------------------------------------------------------------------------- */
.list { border-top: 1px solid var(--line); }
.list__row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-size: var(--fs-base);
}
.list__row:hover { background: var(--surface-alt); }
.list__row--clickable { cursor: pointer; }
.list__main { min-width: 0; flex: 1 1 auto; }
.list__label { font-weight: 500; }
.list__meta { color: var(--text-muted); font-size: var(--fs-sm); }
.list__aside { flex-shrink: 0; display: flex; align-items: center; gap: var(--sp-2); }

/* Tone modifiers for list rows: left color bar + tinted background */
.row--danger  { box-shadow: inset 3px 0 0 var(--danger); }
.row--warning { box-shadow: inset 3px 0 0 var(--warning); }
.row--success { box-shadow: inset 3px 0 0 var(--success); }
.row--info    { box-shadow: inset 3px 0 0 var(--info); }
.row--neutral { box-shadow: inset 3px 0 0 var(--neutral-line); }

/* -------------------------------------------------------------------------
   6. Tables — tracking worksheet, case tabs, client lists
   ------------------------------------------------------------------------- */
.table {
  width: 100%;
  border-collapse: separate;   /* separate + 1px cell borders: avoids the
                                  sticky-column "ghosting" artifact when
                                  the worksheet scrolls horizontally      */
  border-spacing: 0;
  background: var(--surface);
  font-size: var(--fs-base);
}
.table th,
.table td {
  padding: 0 var(--sp-3);
  height: var(--row-h);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.table tbody tr:hover td { background: var(--surface-alt); }

/* SORTABLE HEADERS LOOK SORTABLE (client, 2026-10-06; §45.2). Every
   th[data-sort-key] carries a small up/down button after its label; the
   column sorted now shows its direction in the brand colour. app.js keeps
   aria-sort in step and makes the header reachable by keyboard. */
.table thead th[data-sort-key] { cursor: pointer; user-select: none; }
.table thead th[data-sort-key]::after {
  content: "\2195";                   /* ↕ */
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  width: 16px; height: 16px; margin-left: 6px;
  /* CENTRED ON THE LABEL (client, 2026-10-06; §45.2): middle of the box on
     the middle of the text, not on its baseline, which sat it lower. */
  vertical-align: middle; position: relative; top: -1px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface); color: var(--text-muted);
  font-size: 10px; line-height: 1; font-weight: 700;
}
/* NO HOVER CHANGE: it turned the sorted column's brown button brown-on-brown
   and it vanished under the mouse (client, 2026-10-06). */
.table thead th[data-sort-key]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table thead th[data-sort-dir]::after { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.table thead th[data-sort-dir="asc"]::after { content: "\25B2"; font-size: 8px; }   /* ▲ */
.table thead th[data-sort-dir="desc"]::after { content: "\25BC"; font-size: 8px; }  /* ▼ */
.table thead th.u-right[data-sort-key]::after { margin-left: 4px; }
/* A header with no label (the sheet's button column) is not a column to sort. */
.table thead th[data-sort-key]:empty { cursor: default; }
.table thead th[data-sort-key]:empty::after { display: none; }
@media print { .table thead th[data-sort-key]::after { display: none; } }
.table--zebra tbody tr:nth-child(even) td { background: var(--surface-alt); }

/* Horizontal scroll container for the worksheet */
.table-scroll { overflow: auto; max-width: 100%; }

/* Sticky first column(s). The opaque background must be set on the cell,
   not the row, otherwise scrolled content shows through. */
.table .col--sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.table thead .col--sticky { z-index: 4; background: var(--surface-alt); }
.table tbody tr:hover .col--sticky { background: var(--surface-alt); }
/* Two frozen columns: the second starts where the first ends, instead of
   both at left:0 with the second sliding over the first. */
.table .col--sticky-1 { width: 120px; min-width: 120px; max-width: 120px; }
.table .col--sticky-2 { left: 120px; }

/* Long text capped with «…»; the full text is the cell's tooltip
   (problems.md §29.2). The case name used to fill the screen. */
.table td.cell--clip { overflow: hidden; text-overflow: ellipsis; }
.table td.cell--clip a { display: block; overflow: hidden; text-overflow: ellipsis; }
.table .cell--clip-title { max-width: 320px; }
.table .cell--clip-client { max-width: 320px; }   /* «Υπόθεση»: both sides (2026-10-27) */

/* Live progress — app.js [data-watch] (problems.md §30.2). */
.progress__step { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) 0; font-size: var(--fs-base); }
.progress__mark { width: 16px; text-align: center; color: var(--text-faint); }
.progress__step.is-done .progress__mark { color: var(--success); }
.progress__step.is-done .progress__label { color: var(--text); }
.progress__step.is-pending .progress__label { color: var(--text-faint); }
.progress__step.is-running .progress__label { color: var(--accent); font-weight: 600; }
.progress__step.is-running .progress__mark::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: operon-spin 0.8s linear infinite;
}
.progress__detail { color: var(--text-muted); font-size: var(--fs-sm); }
.watch__spinner { display: none; }
/* While a check runs the spinner replaces the button in place (§31.4). */
.is-waiting .watch__idle { display: none; }
.is-waiting .watch__spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: operon-spin 0.8s linear infinite;
  vertical-align: -1px;
}
@keyframes operon-spin { to { transform: rotate(360deg); } }

/* A big loading animation for a screen that waits on background work — the
   κλήση's OCR (§45.7). */
.loader { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-6) 0 var(--sp-4); }
.loader__ring {
  width: 44px; height: 44px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: operon-spin 0.9s linear infinite;
}
.loader__label { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .loader__ring { animation-duration: 2.5s; } }

/* Date box, always ηη/μμ/εεεε — app.js input[data-date-input] (§29.12). */
.datefield { position: relative; }
.datefield .input { padding-right: 32px; }
.datefield .input.is-invalid { border-color: var(--danger); background: var(--danger-bg); }
.datefield__button {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 30px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.datefield__button:hover { color: var(--accent); }
.datepop {
  position: absolute;
  z-index: 25;
  top: calc(100% + 2px);
  right: 0;
  width: 248px;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.datepop__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.datepop__title { font-weight: 600; font-size: var(--fs-base); }
.datepop__nav { width: 28px; height: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.datepop__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datepop__weekday { text-align: center; color: var(--text-faint); font-size: var(--fs-xs); padding: 2px 0; }
.datepop__day { height: 28px; border: 0; border-radius: var(--radius); background: transparent; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.datepop__day:hover { background: var(--accent-soft); }
.datepop__day.is-today { outline: 1px solid var(--line-strong); }
.datepop__day.is-selected { background: var(--accent); color: var(--accent-fg); }

/* The filter button in use (worksheet chips). */
.btn--ghost.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.table__num { text-align: right; font-variant-numeric: tabular-nums; }

/* Tone modifiers for single cells */
.cell--danger  { background: var(--danger-bg)  !important; color: var(--danger); }
.cell--warning { background: var(--warning-bg) !important; color: var(--warning); }
.cell--success { background: var(--success-bg) !important; color: var(--success); }
.cell--info    { background: var(--info-bg)    !important; color: var(--info); }
.cell--neutral { background: var(--neutral-bg) !important; color: var(--neutral); }

/* -------------------------------------------------------------------------
   7. Tone text + badges + pills
   ------------------------------------------------------------------------- */
.tone-text--danger  { color: var(--danger); }
.tone-text--warning { color: var(--warning); }
.tone-text--success { color: var(--success); }
.tone-text--info    { color: var(--info); }
.tone-text--neutral { color: var(--text-muted); }
.tone-text--strong  { font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius);
  background: var(--neutral-bg);
  color: var(--neutral);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.badge--danger  { background: var(--danger-bg);  border-color: var(--danger-line);  color: var(--danger); }
.badge--warning { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.badge--success { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.badge--info    { background: var(--info-bg);    border-color: var(--info-line);    color: var(--info); }
.badge--neutral { background: var(--neutral-bg); border-color: var(--neutral-line); color: var(--neutral); }
.badge--accent  { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }

/* Who wrote a deadline's date (problems.md §26.16): a small «Επαληθευμένη»
   for a date a person wrote, and a grey note with its «Επαλήθευση» button
   for one the program calculated. Wraps, unlike a badge: the note is a
   sentence. */
/* Two-factor sign-in page (2026-10-06, §42). */
.tfa__steps { margin: var(--sp-3) 0 var(--sp-2) var(--sp-5); padding: 0; list-style: decimal; }
.tfa__qr { display: flex; justify-content: center; margin: var(--sp-2) 0; }
.tfa__qr img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tfa__key { letter-spacing: .05em; overflow-wrap: anywhere; }
.tfa__input { font-size: 20px; letter-spacing: .3em; text-align: center; }

/* The help assistant (2026-10-05, problems.md §40): a bubble bottom right,
   a panel above it. */
.support { position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: var(--z-toast); }
.support__bubble { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .25); text-decoration: none; }
.support__bubble:hover { filter: brightness(1.08); }
.support__icon { width: 22px; height: 22px; }
.support.is-open .support__bubble { box-shadow: 0 0 0 3px var(--accent-soft); }
.support__panel { position: absolute; right: 0; bottom: 60px; width: min(380px, calc(100vw - 2 * var(--sp-4))); max-height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); overflow: hidden; }
.support__panel[hidden] { display: none; }
.support__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); }
.support__title { font-weight: 600; }
.support__log { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.support__msg { max-width: 88%; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.support__msg--assistant { align-self: flex-start; background: var(--surface-alt); border: 1px solid var(--line); }
.support__msg--user { align-self: flex-end; background: var(--accent-soft); color: var(--text); }
.support__msg--alert { border-color: var(--warning-line); background: var(--warning-bg); }
.support__msg--wait { color: var(--text-muted); }
.support__form { display: grid; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3) var(--sp-3); border-top: 1px solid var(--line); }
.support__form[hidden] { display: none; }
.support__form .btn { justify-self: end; }
.support-page .support__log { max-height: none; }
.support-page__forms { display: block; }
.support-page__forms .support__form { border-top: 0; padding: 0; }
.report__pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); max-height: 320px; overflow: auto; }

/* Επισκόπηση (2026-10-05): figures, updates on the left, reminders and
   what falls due on the right; one column on a narrow screen. */
.dash__stats { margin-bottom: var(--sp-4); }
.stat--link { display: block; color: inherit; text-decoration: none; }
.stat--link:hover { border-color: var(--line-strong); background: var(--surface-alt); }
.dash__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sp-4); align-items: start; }
.dash__side { display: grid; gap: var(--sp-4); }
.dash__side > .panel + .panel { margin-top: 0; }
@media (max-width: 1100px) { .dash__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .grid.dash__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid.dash__stats { grid-template-columns: minmax(0, 1fr); } }
.dash__chips { padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.feed { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-2) var(--sp-4); }
.feed__text { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.feed > form { flex: 0 0 auto; }
.feed--seen .logline__text { color: var(--text-muted); }
.reminder { padding: 0; }
.reminder__link { display: grid; gap: 2px; width: 100%; padding: var(--sp-2) var(--sp-4); color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.reminder--danger .reminder__link { border-left-color: var(--danger); }
.reminder--warning .reminder__link { border-left-color: var(--warning); }
.reminder--info .reminder__link { border-left-color: var(--info); }
.reminder__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.reminder__message { overflow-wrap: anywhere; }
/* An alert on Επισκόπηση (problems.md §64): a reminder's box, not a link,
   with a × on the right to dismiss it (client, 2026-10-16). */
.alert { align-items: stretch; gap: 0; }
.alert__body { flex: 1 1 auto; min-width: 0; }
.alert__dismiss { flex: none; display: flex; align-items: flex-start; padding: var(--sp-2) var(--sp-3) 0 0; }
.alert__close { width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.alert__close:hover, .alert__close:focus-visible { background: var(--surface-alt); color: var(--text); }
/* The maintainer's notices in groups by category (problems.md §98). */
.alert-group { border-top: 1px solid var(--line); }
.alert-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.alert-group > summary::-webkit-details-marker { display: none; }
.alert-group > form { padding: 0 var(--sp-4) var(--sp-3); }
.soon__link { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.soon__when { display: flex; align-items: center; gap: var(--sp-2); }
.soon__what { font-weight: 500; }

/* Case page: «Ανατέθηκε σε» — the lawyer and the interns in one row. */
.assigned { flex-wrap: wrap; gap: var(--sp-2); }
.assigned__sep { color: var(--text-muted); }

/* «Καταγραφές»: one sentence per line (2026-10-05). */
.logline { display: block; padding: var(--sp-2) var(--sp-4); line-height: 1.5; }
.logline__text { overflow-wrap: anywhere; }
.logline__case { font-weight: 600; }
.logline__sep { margin: 0 var(--sp-1); color: var(--text-muted); }
.logline--auto strong { font-weight: 500; color: var(--text-muted); }

/* The name in the top bar opens «Το προφίλ μου». */
.topbar__profile { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; color: inherit; text-decoration: none; border-radius: var(--radius); }
.topbar__profile:hover span { text-decoration: underline; }

/* Προθεσμίες: the date and its button side by side, the notes below. */
.datecell { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.datecell__date { white-space: nowrap; }
.datecell + .badge, .datecell ~ .datenote { margin-top: var(--sp-1); }
.datenote { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--text-muted); font-size: var(--fs-xs); }
/* A COUNTED DATE WAITING FOR A LAWYER IS ORANGE (client, 2026-10-06; §45.1):
   the date, the note under it and its «Επαλήθευση» button. */
.datenote--unverified { display: flex; flex-wrap: wrap; margin-top: var(--sp-1); padding: 2px 6px; border: 1px solid var(--warning-line); border-radius: var(--radius); background: var(--warning-bg); color: var(--warning); }
.datenote--pending { color: var(--warning); }
.datecell__date--unverified { color: var(--warning); font-weight: 600; }
.substeps__form { display: inline-flex; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); }
.dot--danger { background: var(--danger); }
.dot--warning { background: var(--warning); }
.dot--success { background: var(--success); }
.dot--info { background: var(--info); }
.dot--neutral { background: var(--neutral-line); }

/* -------------------------------------------------------------------------
   8. Buttons, tabs, inputs
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-alt); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--danger { border-color: var(--danger-line); color: var(--danger); background: var(--danger-bg); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn--sm { height: 24px; padding: 0 var(--sp-2); font-size: var(--fs-sm); }
/* «Επαλήθευση»: orange like the date it answers (§45.1). After .btn so it wins. */
.btn--verify { border-color: var(--warning-line); background: var(--warning-bg); color: var(--warning); }
.btn--verify:hover { border-color: var(--warning); background: var(--warning-bg); color: var(--warning); }
.btn--block { width: 100%; }
/* A BUTTON THAT IS ONLY A DRAWING, sitting inside a line of text — the
   pencil beside a step's name. It keeps the text's own size and colour
   until it is pointed at, so the line still reads as one line (§37.7). */
.btn-icon {
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  vertical-align: baseline;
}
.btn-icon:hover { color: var(--accent); }
.icon-sm { width: 14px; height: 14px; }
.btn.is-busy { pointer-events: none; opacity: 0.7; }

.tabs { display: flex; gap: var(--sp-1); padding: 0 var(--sp-3); background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs__tab {
  height: 34px;
  padding: 0 var(--sp-3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-size: var(--fs-base);
  cursor: pointer;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs__count { margin-left: 4px; color: var(--text-faint); font-size: var(--fs-xs); }
.tab-panel[hidden] { display: none; }

.field { display: block; margin-bottom: var(--sp-3); }
.field[hidden] { display: none; }
.field__label { display: block; margin-bottom: 2px; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.field__hint { margin-top: 2px; color: var(--text-faint); font-size: var(--fs-sm); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 28px;
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
}
.textarea { min-height: 72px; resize: vertical; }
.input--flush { border-color: transparent; background: transparent; padding-inline: 4px; }
.input--flush:hover { border-color: var(--line); background: var(--surface); }

/* Searchable dropdown — app.js select[data-searchable-select] (report §9a.3).
   One box that looks like a .select; the list opens under it. */
.combo { position: relative; }
.combo::after {
  content: "\25BE";
  position: absolute;
  right: var(--sp-2);
  top: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  pointer-events: none;
}
.combo__input { padding-right: 24px; cursor: pointer; }
.combo__input:focus { cursor: text; }
.combo__input::placeholder { color: var(--text-faint); }
.combo__list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.combo__list[hidden] { display: none; }
.combo__group {
  position: sticky;
  top: 0;
  padding: var(--sp-1) var(--sp-2);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.combo__option { padding: var(--sp-1) var(--sp-2); font-size: var(--fs-base); cursor: pointer; }
.combo__option:hover,
.combo__option.is-active { background: var(--accent-soft); }
.combo__option[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.combo__empty { padding: var(--sp-2); color: var(--text-faint); font-size: var(--fs-sm); }

/* Στάδια: the deadlines a «Υπολογισμός προθεσμιών» step owns, listed under
   it — smaller, indented, one dot each (problems.md §35). */
.substeps { list-style: none; margin: var(--sp-1) 0 0; padding: 0 0 0 var(--sp-4); }
.substeps__item { display: flex; align-items: center; gap: var(--sp-2); padding: 2px 0; font-size: var(--fs-sm); }
.substeps__name { color: var(--text-muted); }
.substeps__date { color: var(--text); font-variant-numeric: tabular-nums; }
.substeps__date--unverified { color: var(--warning); font-weight: 600; }   /* waits for «Επαλήθευση» (§45.1) */

/* Στάδιο on the sheet: several steps run at once and the cell now names
   every one of them instead of saying «+2» (§35). Capped so the columns to
   its right stay on screen; the whole text is the cell's tooltip. */
.table .cell--clip-stage { max-width: 260px; }

.switch { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-base); }
.switch input { width: 14px; height: 14px; accent-color: var(--accent); }
/* The print dialog's tick boxes (case page). */
.print-picker { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); }

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.toolbar__group { display: flex; align-items: center; gap: var(--sp-2); }
.toolbar__spacer { margin-left: auto; }

/* Sync indicator (tracking page, top-right) */
.sync { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--fs-sm); }
.sync.is-running .dot { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* -------------------------------------------------------------------------
   9. Stats, timeline, calendar, modal, toast
   ------------------------------------------------------------------------- */
.stat { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat__label { color: var(--text-muted); font-size: var(--fs-sm); }
.stat__value { margin-top: 2px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat__delta { font-size: var(--fs-sm); }

.timeline { position: relative; padding-left: var(--sp-4); }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 var(--sp-3) var(--sp-3); }
.timeline__item::before { content: ""; position: absolute; left: -1px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline__date { color: var(--text-muted); font-size: var(--fs-sm); }
.timeline__title { font-weight: 500; }
/* Στάδια with its history (problems.md §26.20 Part 4, client 2026-10-04):
   a line as it read before an αναβολή / ματαίωση / κλήση moved it, the
   «Δικάσιμος» line, and one collapsible block per event. */
.timeline__item--old .timeline__title,
.timeline__item--old .timeline__date,
.timeline__item--old .list__meta,
.timeline__item--old .substeps__name,
.timeline__item--old .substeps__date { color: var(--text-muted) !important; }
.timeline__item--old .timeline__title { text-decoration: line-through; text-decoration-thickness: 1px; }
.timeline__item--hearing::before { background: var(--info); box-shadow: 0 0 0 2px var(--accent-soft); }
/* The tinted bands of the approved mock-up: blue for the Δικάσιμος, orange
   for an event (red for a ματαίωση). The dot stays on the timeline. */
.timeline__item--hearing,
.timeline__item.timeline__event { border-radius: 6px; padding-top: var(--sp-1); padding-bottom: var(--sp-1); margin-bottom: var(--sp-2); padding-right: var(--sp-2); }
.timeline__item--hearing { background: color-mix(in srgb, var(--info) 9%, transparent); }
.timeline__item--hearing::before,
.timeline__item.timeline__event::before { top: 10px; }
.timeline__event { background: color-mix(in srgb, var(--warning) 14%, transparent); border-radius: 6px; }
.timeline__event--danger { background: color-mix(in srgb, var(--danger) 13%, transparent); }
/* A block's header: one tinted band per line (ματαίωση red, κλήση orange). */
.timeline__group > details > summary .timeline__event { display: block; padding: var(--sp-1) var(--sp-2); }
.timeline__group > details > summary .timeline__event + .timeline__event { margin-top: var(--sp-1); margin-left: var(--sp-3); }
.timeline__group > details > summary { display: flex; align-items: flex-start; }
.timeline__group > details > summary::before { padding-top: var(--sp-1); }
.timeline__group > details > summary > .timeline__lines { flex: 1; }
.timeline__item--old::before,
.timeline__item--old .dot { background: var(--line); box-shadow: none; }
/* An old line is a record: no «εκκρεμεί επαλήθευση», no «Μετακινήθηκε». */
.timeline__item--old .datenote,
.timeline__item--old .badge { display: none; }
.timeline__group > details > summary { cursor: pointer; list-style: none; }
.timeline__group > details > summary::-webkit-details-marker { display: none; }
.timeline__group > details > summary::before { content: "▸"; color: var(--text-muted); margin-right: var(--sp-1); }
.timeline__group > details[open] > summary::before { content: "▾"; }
.timeline__group .timeline { margin-top: var(--sp-2); }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--surface); }
.calendar__dow { padding: var(--sp-1) var(--sp-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-alt); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; }
/* The cell's FLOOR, not its ceiling: a busy day still grows to fit its
   three events. 96px on a tall window, less on a short one, so that a
   six-week month does not push the last week under the fold — which is the
   only reason this screen ever needed scrolling (client, 2026-09-26). */
.calendar__day { min-height: clamp(72px, 11vh, 96px); padding: var(--sp-1); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; background: var(--surface); cursor: pointer; }
.calendar__day:hover { background: var(--surface-alt); }
.calendar__day.is-outside { background: var(--surface-sunken); color: var(--text-faint); }
.calendar__day.is-today .calendar__daynum { background: var(--accent); color: var(--accent-fg); border-radius: var(--radius); padding: 0 4px; }
.calendar__day.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar__daynum { font-size: var(--fs-sm); font-weight: 600; }
/* The whole text, WRAPPED — not cut with «…», and never wider than its day
   (client, 2026-10-05). */
.calendar__event { display: block; margin-top: 2px; padding: 1px 4px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
/* A long notice above the month («Αναστολή Αυγούστου — …») wraps too,
   instead of running off the screen. */
.badge--wrap { height: auto; min-height: 18px; white-space: normal; overflow-wrap: anywhere; padding: 1px 6px; line-height: 1.35; }
.calendar__event--danger { background: var(--danger-bg); color: var(--danger); }
.calendar__event--warning { background: var(--warning-bg); color: var(--warning); }
.calendar__event--success { background: var(--success-bg); color: var(--success); }
/* A day the courts and the επιμελητές are shut. It is the whole reason the
 * αργίες are on this screen: a deadline that lands here cannot be met, and
 * the eye has to catch that before the label is read (problems.md §34). */
.calendar__day.is-closed { background: var(--surface-sunken); }
.calendar__day.is-closed .calendar__daynum { color: var(--text-faint); }
.calendar__event--neutral { background: var(--surface-sunken); color: var(--text-muted); }
.calendar__event--info { background: var(--accent-soft); color: var(--accent); }

/* Modal — driven by data-modal-open / [data-modal] in app.js */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-start; justify-content: center; padding: 8vh var(--sp-4) var(--sp-4); background: rgba(17, 24, 39, 0.45); }
.modal[hidden] { display: none; }
.modal__dialog { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18); }
.modal__dialog--wide { max-width: 860px; }
.modal__header { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border-bottom: 1px solid var(--line); }
.modal__title { font-size: var(--fs-md); }
.modal__close { margin-left: auto; border: 0; background: none; color: var(--text-muted); cursor: pointer; }
.modal__body { padding: var(--sp-3); max-height: 62vh; overflow-y: auto; }
/* The ποινικά portal pop-up: more room between its lines (client, 2026-11-20). */
.modal__body--roomy { padding: var(--sp-4) var(--sp-5); }
.modal__body--roomy > * + * { margin-top: var(--sp-4); }
.modal__body--roomy .list__row { padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.modal__body--roomy .field { margin-bottom: 0; }
.modal__body--roomy .field__label { margin-bottom: var(--sp-1); }
/* Ποινικά: the portal's answer right after the reading, on the form (client, 2026-11-20). */
.portal-first { margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); background: var(--surface-alt); }
.portal-first > * + * { margin-top: var(--sp-1); }
.portal-first--success { background: var(--success-bg); border-color: var(--success-line); border-left-color: var(--success); }
.portal-first--warning { background: var(--warning-bg); border-color: var(--warning-line); border-left-color: var(--warning); }
.portal-first--danger { background: var(--danger-bg); border-color: var(--danger-line); border-left-color: var(--danger); }
.modal__footer { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3); border-top: 1px solid var(--line); background: var(--surface-alt); }

.toast-stack { position: fixed; right: var(--sp-4); bottom: 76px; /* above the help bubble (§40) */ z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2); }
.toast { min-width: 240px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 12px rgba(17, 24, 39, 0.12); font-size: var(--fs-base); }
.toast--danger { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--success); }
.toast--warning { border-left-color: var(--warning); }

/* Split screen (intake verification: document on the left, form on the right) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; height: calc(100vh - var(--topbar-h) - 52px); }
.split__pane { min-width: 0; overflow-y: auto; background: var(--surface); }
.split__pane + .split__pane { border-left: 1px solid var(--line); }
.split--single { grid-template-columns: minmax(0, 860px); background: var(--surface); }
/* Inside the page gutter the split is a card, and its form has room to
   breathe — the fields used to run into the right edge (client, 2026-10-05). */
.page__body > .split { height: calc(100vh - var(--topbar-h) - 52px - 2 * var(--sp-5)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.split__pane > form { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
@media (max-width: 1000px) { .split, .page__body > .split { grid-template-columns: minmax(0, 1fr); height: auto; } }

/* Dropzone (intake upload) */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-6); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-muted); text-align: center; }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.progress { height: 4px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }

/* -------------------------------------------------------------------------
   10. Print — used by the print/export actions
   ------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .page__actions, .toolbar, .btn, .toast-stack, .support { display: none !important; }
  .shell, .shell__content { height: auto; overflow: visible; }
  .panel, .table { border-color: #000; }
  body { background: #fff; font-size: 11px; }
  .table thead th { position: static; }
}

/* -------------------------------------------------------------------------
   11. Column helpers
   Fixed-width slots used by the dense list rows so columns line up between
   rows without a table. Kept here instead of inline styles in templates.
   ------------------------------------------------------------------------- */
.col-date  { width: 86px; flex: 0 0 86px; }
.col-days  { width: 76px; flex: 0 0 76px; text-align: center; }
.col-time  { width: 70px; flex: 0 0 70px; }
.col-tag   { width: 74px; flex: 0 0 74px; text-align: center; text-transform: uppercase; }
.col-title { width: 160px; flex: 0 0 160px; }
.col-type  { width: 280px; flex: 0 0 280px; }
.col-meta  { max-width: 320px; }
.col-w200  { width: 200px; }
.col-w220  { width: 220px; }
.col-grow  { flex: 1 1 auto; min-width: 0; }

.list__row--plain { background: transparent; }
.list__link { display: flex; align-items: center; gap: var(--sp-4); flex: 1 1 auto; min-width: 0; }
.panel__body--between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.page__actions--block { margin-bottom: var(--sp-4); }
.preview-body { margin: 0; font: inherit; white-space: pre-wrap; }
.doc-preview img { max-width: 100%; height: auto; display: block; }
.u-mt-3 { margin-top: var(--sp-3); }
.u-mt-4 { margin-top: var(--sp-4); }
.u-mb-4 { margin-bottom: var(--sp-4); }
.topbar__search--inline { width: 260px; max-width: none; }

/* Dropzone actions row + visually hidden inputs (native file input replacement). */
.dropzone__actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The frozen columns of Παρακολούθηση open the case. Underlined on hover only,
   so the sheet still reads as a sheet rather than as a page of links. */
.table tbody .col--sticky a { color: var(--accent); font-weight: 500; }
.table tbody .col--sticky a:hover { text-decoration: underline; }

/* An orange dot on a case tab: the απόφαση waits for verification (§65.10). */
.tabs__dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; vertical-align: middle; }
.tabs__dot--warning { background: var(--warning); }

/* «Εισαγωγή από Excel» — the four steps (§79). */
.import-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.import-step { display: flex; gap: var(--sp-3); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.import-step__n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-alt); }
.import-step__title { font-weight: 600; }
.import-step--done .import-step__n { background: var(--success-bg); color: var(--success); }
.import-step--bad .import-step__n { background: var(--danger-bg); color: var(--danger); }
.import-step--run .import-step__n { background: var(--warning-bg); color: var(--warning); }
.u-inline { display: inline; }

/* «Έλεγχος στο apofaseis»: the απόφαση found for an import row, framed at
 * the bottom of the row page by the browser's own PDF viewer (§81.2). */
.import-pdf { display: block; width: 100%; height: 85vh; border: 0; }

/* Λειτουργία συντήρησης: the band on every page while it is on (§81.3). */
.service-mode-band { margin: 0 0 12px; padding: 8px 12px; border-radius: 6px;
  background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }

/* Several διάδικοι per side (§84): one row each, wrapping on a narrow screen. */
.party-rows { display: grid; gap: 6px; }
.party-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.party-row .input, .party-row .select { flex: 1 1 140px; min-width: 0; }
.party-row__name { flex: 2 1 220px !important; }
.party-row__address { flex: 2 1 200px !important; }


/* =========================================================================
   EventProduction additions
   ========================================================================= */

/* Pill buttons (style.md §4) */
.btn { border-radius: 9999px; }
.btn-icon { border-radius: 9999px; }

.topbar__title { font-weight: 600; color: var(--text); }

/* Home: tool cards */
.tool-grid { max-width: 960px; }
.tool-card { display: block; transition: border-color .15s ease, box-shadow .15s ease; }
.tool-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 121, 121, .08); }
.tool-card .panel__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-6); }
.tool-card__icon { display: inline-flex; padding: var(--sp-3); border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.tool-card__svg { width: 24px; height: 24px; }
.tool-card__title { font-size: 18px; }
.tool-card__text { color: var(--text-muted); }

/* Login */
.login { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.login__box { width: 100%; max-width: 380px; padding: 0 var(--sp-4); }
.login__logo { display: block; height: auto; margin: 0 auto var(--sp-5); }

/* Narrow screens: the sidebar collapses to icons */
@media (max-width: 760px) {
  .sidebar { width: var(--sidebar-w-collapsed); }
  .sidebar .sidebar__label, .sidebar .sidebar__credit, .sidebar .sidebar__logo { display: none; }
  .sidebar .sidebar__brand-mark { display: block; }
  .sidebar .sidebar__link, .sidebar .sidebar__brand { justify-content: center; padding-inline: 0; }
  .grid--2 { grid-template-columns: 1fr; }
}

/* Run page (upload + progress) */
.u-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u-link-muted { color: var(--text-muted); }
.u-link-muted:hover { color: var(--accent); }
.icon-sm { width: 14px; height: 14px; vertical-align: -2px; }
.run { display: flex; flex-direction: column; gap: var(--sp-4); }
.run .dropzone { cursor: pointer; min-height: 140px; transition: border-color .15s ease, background .15s ease; }
.run .dropzone:hover { border-color: var(--accent); }
.dropzone__icon { width: 28px; height: 28px; color: var(--accent); transform: rotate(180deg); }
.run__counts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.run__summary .progress { height: 6px; }
.run__summary .progress__bar { height: 100%; background: var(--accent); transition: width .3s ease; }
.run .panel + .panel { margin-top: 0; }
.run td.run__error { color: var(--danger); font-size: var(--fs-sm); white-space: normal; }
.run .upload-bar { display: inline-block; width: 80px; height: 4px; border-radius: 2px; background: var(--surface-sunken); vertical-align: middle; overflow: hidden; }
.run .upload-bar > i { display: block; height: 100%; background: var(--accent); }

/* Review pages: lists on the left, PDF preview + form on the right */
.review { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.review > * { min-width: 0; }
.review__lists { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.review__pane { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-2) 0 var(--sp-4); }
.review__group { display: flex; gap: var(--sp-1); align-items: baseline; padding: var(--sp-3) var(--sp-4) var(--sp-1); font-size: var(--fs-sm); color: var(--text-muted); text-transform: none; }
.review__group--green { color: var(--success); }
.review__hint { padding: var(--sp-3) var(--sp-4) 0; }
.review__pending { margin: var(--sp-2) var(--sp-4) 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); background: var(--info-bg); color: var(--info); font-size: var(--fs-sm); }
.review__detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.review__pdf { position: relative; flex: 1 1 auto; min-height: 240px; background: var(--surface-sunken); }
.review__pdf iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.review__pdf-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.review__form { margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.review__form-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); min-width: 0; }
.review__kinds { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: 0 0 var(--sp-3); padding: 0; border: 0; }
.review__kinds legend { width: 100%; margin-bottom: var(--sp-1); }
.review__kinds label { display: inline-flex; align-items: center; gap: var(--sp-1); cursor: pointer; }
.review__form-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.tabs__count--danger { background: var(--danger-bg); color: var(--danger); }
.doclist { margin: 0 var(--sp-2); border-radius: var(--radius); outline: none; }
.doclist:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.doclist__row { display: flex; align-items: center; gap: var(--sp-2); min-height: 34px; padding: 0 var(--sp-2); border-radius: 6px; cursor: pointer; }
.doclist__row:hover { background: var(--surface-alt); }
.doclist__row.is-selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.doclist--green .doclist__row { background: var(--success-bg); margin-bottom: 2px; }
.doclist--green .doclist__row.is-selected { background: #dcf5e4; }
.doclist--danger .doclist__name { color: var(--danger); }
.doclist__name { flex: 1 1 auto; min-width: 0; }
.doclist__amount { flex-shrink: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.doclist__empty { padding: var(--sp-1) var(--sp-4); color: var(--text-faint); }
.btn.is-disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 960px) {
  .review { grid-template-columns: 1fr; height: auto; }
  .review__lists { max-height: 45vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .review__pdf { height: 60vh; }
}

/* Post Event pages */
.steps { display: flex; gap: var(--sp-1); margin-top: var(--sp-2); flex-wrap: wrap; }
.steps__step { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 9999px; color: var(--text-muted); font-size: var(--fs-sm); }
.steps__step span { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-sunken); font-weight: 600; font-size: var(--fs-xs); }
.steps__step:hover { background: var(--surface-alt); }
.steps__step.is-done span { background: var(--accent-soft); color: var(--accent); }
.steps__step.is-current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.steps__step.is-current span { background: var(--accent); color: var(--accent-fg); }
.pe { display: flex; flex-direction: column; gap: var(--sp-3); }
.pe .panel + .panel { margin-top: 0; }
.pe__alert { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--danger-line); border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); }
.pe__toolbar { padding: 0; background: none; border: 0; gap: var(--sp-4); }
.pe__filter { display: inline-flex; gap: var(--sp-1); align-items: center; white-space: nowrap; cursor: pointer; }
.pe__table td { vertical-align: middle; }
.pe__table .input { height: 28px; min-width: 14ch; }
.pe__table .pe__amount { width: 12ch; text-align: right; }
.pe__table tr.is-unmatched { background: var(--warning-bg); }
.pe__table tr.is-saving { opacity: .6; }
.pe__nosupplier { color: var(--danger); font-size: var(--fs-sm); }
.pe__edited { color: var(--accent); cursor: pointer; border: 0; background: none; font-size: var(--fs-sm); padding: 0 2px; }
.pe__total td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.pe__settings { max-width: 640px; }
.review__kinds--stack { flex-direction: column; }
.u-link { color: var(--accent); text-decoration: underline; }
.review--3 { grid-template-columns: minmax(240px, 300px) minmax(220px, 300px) minmax(0, 1fr); }
.review__files { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); padding-bottom: var(--sp-4); }
.review__group--danger { color: var(--danger); }
.doclist__row.is-empty .doclist__name { color: var(--warning); }
.doclist__row.is-empty::after { content: "χωρίς PDF"; font-size: var(--fs-xs); color: var(--warning); }
@media (max-width: 1100px) { .review--3 { grid-template-columns: 1fr 1fr; } .review--3 .review__detail { grid-column: 1 / -1; min-height: 70vh; } }
@media (max-width: 960px) { .review--3 { grid-template-columns: 1fr; } }
.doclist__row.is-unread .doclist__name { color: var(--danger); }


/* =========================================================================
   Phase 6 — fixes found in the visual check (2026-11-25)
   ========================================================================= */

/* An element with the hidden attribute is ALWAYS hidden, whatever display a
   class gives it (.btn, .badge, .dropzone… set display and used to win). */
[hidden] { display: none !important; }

/* Main column: header + body stacked; review pages fill the rest exactly. */
.shell__content { display: flex; flex-direction: column; }
.shell__content > .page__header { flex-shrink: 0; }
.shell__content > .page__body { flex: 0 0 auto; }

/* Panels laid out by a grid never get the stacked-panel top margin. */
.grid > .panel + .panel, .grid > .panel { margin-top: 0; }

/* Tabs: label and count on one line; scroll sideways when narrow. */
.tabs { overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.tabs__tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.tabs__count { margin-left: 0; min-width: 20px; padding: 0 6px; border-radius: 9999px; background: var(--surface-sunken);
               color: var(--text-muted); font-size: var(--fs-xs); line-height: 18px; text-align: center; }
.tabs__tab.is-active .tabs__count { background: var(--accent-soft); color: var(--accent); }
.tabs__count.tabs__count--danger { background: var(--danger-bg); color: var(--danger); }

/* Stats as compact chips under the page title. */
.stats { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.stats__chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 1px 8px; border-radius: 9999px;
               background: var(--surface-sunken); color: var(--text-muted); font-size: var(--fs-sm); white-space: nowrap; }
.stats__chip b { color: var(--text); font-weight: 600; }
.stats__chip--danger { background: var(--danger-bg); color: var(--danger); }
.stats__chip--danger b { color: var(--danger); }

/* PDF preview placeholder: plain, not a dashed drop zone. */
.review__pdf-empty { border: 0; border-radius: 0; background: transparent; }
.review__pdf iframe { box-shadow: none; }

/* Wrapping text cells wrap at words, not inside them. */
.table td.u-wrap { overflow-wrap: normal; word-break: normal; }
.run__name-error { display: block; margin-top: 2px; color: var(--danger); font-size: var(--fs-sm); white-space: normal; }

/* Screen 2: section headings of the proposal, and a table that scrolls. */
.pe__table { min-width: 860px; }
.pe__table td:nth-child(2) { min-width: 18ch; }
.pe__table tr.pe__heading td { background: var(--surface-alt); color: var(--text); font-weight: 600; font-size: var(--fs-sm);
                                letter-spacing: .01em; padding-top: var(--sp-3); }
.pe__table tr.pe__heading td.table__num { color: var(--text-faint); font-weight: 400; }

/* Sidebar brand: mark + app name. */
.sidebar__brand { gap: var(--sp-2); }
.sidebar__brand .sidebar__mark { width: 26px; height: 26px; flex-shrink: 0; }
.sidebar__brand-text { color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sidebar.is-collapsed .sidebar__brand-text { display: none; }

/* Login: the mark sits on the white panel, not on its own white box. */
.login__panel { padding-top: var(--sp-5); }
.login__logo { display: block; width: 64px; height: 64px; margin: 0 auto var(--sp-2); }
.login__title { text-align: center; font-size: 18px; margin-bottom: var(--sp-1); }
.login__subtitle { text-align: center; color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }

/* Narrow screens */
@media (max-width: 760px) {
  .page__header { flex-wrap: wrap; padding: var(--sp-3); gap: var(--sp-2); }
  .page__header > div:first-child { flex: 1 1 100%; min-width: 0; }
  .page__actions { margin-left: 0; flex-wrap: wrap; }
  .page__title { font-size: 17px; }
  .page__body { padding: var(--sp-3); }
  .topbar__title, .topbar__user .u-truncate { display: none; }
  .steps { gap: 2px; }
  .sidebar .sidebar__brand-text { display: none; }
  .review__lists { max-height: none; }
  .review__pane { max-height: 45vh; }
}

/* Number columns right-aligned (".table td { text-align:left }" used to win). */
.table th.table__num, .table td.table__num { text-align: right; }

/* Tabs fit the lists column. */
.review { grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); }
.review__lists .tabs { padding: 0 var(--sp-2); gap: 0; }
.review__lists .tabs__tab { padding: 0 10px; }

/* Form spacing in the review panes. */
.review__form .run__error { margin-bottom: var(--sp-3); }
.review__form .field__hint { margin-bottom: var(--sp-2); }
.review__kinds legend { padding: 0; }
.review__form .panel__body { padding: var(--sp-4); }
.tool-grid { align-items: stretch; }
.tool-card .panel__body { height: 100%; }
.tool-card .btn { margin-top: auto; }

/* Run page table: fixed columns so long file names never push the amounts off screen. */
.run .table { table-layout: fixed; width: 100%; min-width: 760px; }
.run .table th:nth-child(1) { width: 40%; }
.run .table th:nth-child(2) { width: 120px; }
.run .table th:nth-child(4) { width: 120px; }
.run .table th:nth-child(5) { width: 150px; }
.run .table th:last-child { width: 72px; }
.run .table td { overflow: hidden; text-overflow: ellipsis; }
.run .table td.u-wrap { white-space: normal; }
.field > .field__hint { display: block; margin-top: 4px; }
