/* 1.91.0: a design system / fejléces papír betűi (assets/fonts/BETUK.md) */
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/instrumentsans-400.ttf") format("truetype"); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600 800; font-display: swap; src: url("fonts/instrumentsans-700.ttf") format("truetype"); }
@font-face { font-family: 'Reddit Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/redditmono-400.ttf") format("truetype"); }
@font-face { font-family: 'Reddit Mono'; font-style: normal; font-weight: 600 800; font-display: swap; src: url("fonts/redditmono-700.ttf") format("truetype"); }

/* Plus Jakarta Sans: fontul din machetele de design, livrat cu aplicația (nu de la un
   serviciu extern), în două subseturi. Fișierul este variabil, deci o singură sursă
   acoperă toate grosimile de la 200 la 800. Latin-ext aduce diacriticele românești. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url("fonts/plusjakartasans-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url("fonts/plusjakartasans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fonturile de brand. DIN Mittel: titluri și interfață. Minion Pro: text explicativ.
   Subsetate la latină + diacritice românești și maghiare. */
@font-face {
  font-family: "DIN Mittel";
  src: url("fonts/dinmittel-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DIN Mittel";
  src: url("fonts/dinmittel-500.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DIN Mittel";
  src: url("fonts/dinmittel-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Minion Pro";
  src: url("fonts/minionpro-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Minion Pro";
  src: url("fonts/minionpro-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-soft: #eff6fd;
  --highlight: #eff6fd;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dfe6ef;
  --primary: #032f62;
  --primary-dark: #021f45;
  --primary-contrast: #ffffff;
  --danger: #c0341e;
  --danger-dark: #8f2716;
  --danger-soft: #fdf6f4;
  --danger-border: #e3c4bd;
  --warning: #ffd21f;
  --warning-ink: #3d3200;
  --success: #8bc53f;
  --success-contrast: #122e60;
  --accent: #8bc53f;
  --ink-soft: #334155;
  --focus: #77b83b;
  --prep-rowhead: #f1f6fc;
  --shadow: 0 12px 28px rgba(15, 23, 42, .06);
  --radius: 12px;
  --radius-card: 22px;
  --font-ui: 'Plus Jakarta Sans', "DIN Mittel", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --font-serif: 'Plus Jakarta Sans', "DIN Mittel", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-family: var(--font-ui);
}

.theme-blue_light {
  --bg: #f1f6fd;
  --surface: #ffffff;
  --surface-alt: #f8fbff;
  --surface-soft: #e8f1fb;
  --highlight: #edf6ff;
  --text: #1d2522;
  --muted: #647184;
  --border: #cfe0f2;
  --primary: #a2c73b;
  --primary-dark: #789726;
  --primary-contrast: #17210c;
  --success: #122e60;
  --success-contrast: #ffffff;   /* sötétkék gomb: fehér felirat (a „Reparat” gomb eddig olvashatatlan volt) */
  --accent: #122e60;
  --ink-soft: #26314a;
  --prep-rowhead: #f0f6fd;
  --focus: #122e60;
  --shadow: 0 18px 40px rgba(18, 46, 96, 0.16);
  --danger: #c0341e;
  --danger-dark: #8f2716;
  --danger-soft: #fdf6f4;
  --danger-border: #e3c4bd;
}

/* Crem: fundal și suprafețe calde în loc de alb pur, pentru ecranele ținute deschise toată ziua (1.62.0). */
.theme-cream {
  --bg: #f4eedf;
  --surface: #fdf8ec;
  --surface-alt: #f8f1e1;
  --surface-soft: #f3ead4;
  --highlight: #f5ecd6;
  --text: #1f2430;
  --muted: #6b6553;
  --border: #e3d8bd;
  --prep-rowhead: #f6eedb;
  --shadow: 0 12px 28px rgba(60, 46, 12, .08);
}

.theme-dark {
  --bg: #10151f;
  --surface: #172132;
  --surface-alt: #1b2638;
  --surface-soft: #1e2b40;
  --highlight: #213653;
  --text: #edf3f7;
  --muted: #aab6c3;
  --border: #31435d;
  --primary: #a2c73b;
  --primary-dark: #c3e963;
  --primary-contrast: #10151f;
  --danger: #e2604a;
  --danger-dark: #f08b78;
  --danger-soft: #2a1c19;
  --danger-border: #5c3229;
  --warning: #ffd21f;
  --warning-ink: #fff1a8;
  --success: #5f95e8;
  --accent: #a2c73b;
  --ink-soft: #d9e7f5;
  --prep-rowhead: #1b2638;
  --focus: #a2c73b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 3px solid var(--success);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  min-height: 64px;
  /* Bara de sus rămâne pe toată lățimea, dar conținutul ei se aliniază cu pagina:
     altfel marca stă lipită de marginea ecranului, iar textul începe la mijloc. */
  padding: 10px max(22px, calc((100% - 1440px) / 2));
}

.brand {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  gap: 11px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

/* Emblema Transport Local; brandbook-ul o recomandă singură la dimensiuni mici. */
.brand-emblem {
  display: block;
  flex-shrink: 0;
  height: 34px;
  width: 34px;
}

.brand-names {
  align-items: baseline;
  display: inline-flex;
  gap: 8px;
}

.brand:hover {
  text-decoration: none;
}

.brand-main {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.brand-sub {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 300;
  line-height: 1;
}

.nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

/* Numele meniurilor nu se rup pe două rânduri și nu intră peste blocul din dreapta. */
.nav a {
  white-space: nowrap;
}

.nav a,
.tabs a {
  border-radius: var(--radius);
  color: var(--ink-soft);
  padding: 8px 10px;
}

.nav a:hover,
.tabs a:hover {
  background: var(--highlight);
  text-decoration: none;
}

.tabs a.active {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.user-box {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: flex-end;
  position: relative;
  white-space: nowrap;
}

.user-menu,
.section-switcher {
  position: relative;
}

.user-menu summary,
.section-switcher summary {
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 8px 10px;
}

.user-menu summary {
  background: var(--highlight);
  border: 1px solid transparent;
}

.user-menu summary::-webkit-details-marker,
.section-switcher summary::-webkit-details-marker {
  display: none;
}

.user-menu summary::after,
.section-switcher summary::after {
  content: " ▾";
  font-weight: 700;
}

.user-menu[open] summary,
.section-switcher[open] summary,
.user-menu summary:hover,
.section-switcher summary:hover {
  background: var(--highlight);
  border-color: var(--success);
  text-decoration: none;
}

.user-menu-panel,
.section-switcher-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(18, 46, 96, 0.16);
  display: grid;
  gap: 12px;
  padding: 16px;
  position: absolute;
  z-index: 50;
}

.user-menu-panel {
  grid-template-columns: 1fr;
  right: 0;
  top: calc(100% + 10px);
  width: 280px;
}

.menu-group-link,
.section-switcher-panel a {
  border-radius: var(--radius);
  color: var(--ink-soft);
  display: grid;
  gap: 1px;
  padding: 8px 9px;
}

.menu-group-link:hover,
.section-switcher-panel a:hover,
.section-switcher-panel a.active {
  background: var(--highlight);
  text-decoration: none;
}

.menu-group-link span {
  font-size: 15px;
  line-height: 1.2;
}

.menu-group-link small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.tab-area {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-area-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-switcher {
  display: inline-block;
  margin-bottom: 16px;
}

.section-switcher summary {
  background: var(--highlight);
  border: 1px solid var(--success);
  display: inline-flex;
}

.section-switcher-panel {
  left: 0;
  min-width: 260px;
  top: calc(100% + 8px);
}

.container {
  margin: 0 auto;
  max-width: 1440px;
  padding: 22px;
}

.page-title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.driver-profile-header {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
}

.driver-profile-title {
  min-width: 0;
}

.driver-profile-title h1 {
  overflow-wrap: anywhere;
}

.driver-profile-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-self: end;
  width: 100%;
}

.driver-date-form {
  min-width: 0;
}

.date-action-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.driver-profile-actions .button {
  min-height: 42px;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* Scara din machete: H1 de 40/800 cu spațiere strânsă, titlurile de card 17/800.
   Titlurile aplicației erau mai mici și mai subțiri, de aceea pagina se citea altfel
   decât proiectul chiar și cu fontul potrivit. */
h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 6px;
}

h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
}

.panel,
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 22px);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  padding: 20px;
}

.login-card {
  margin: 9vh auto;
  max-width: 440px;
  padding: 26px 26px 22px;
}

/* Logoul complet, în culorile lui, pe fundal alb — cum îl arată brandbook-ul. */
.login-logo {
  display: block;
  height: auto;
  margin-bottom: 22px;
  max-width: 300px;
  width: 100%;
}

.danger-panel {
  border-color: var(--warning);
  background: #fff8c9;
  color: var(--warning-ink);
}

.theme-dark .danger-panel,
.theme-dark .notice-error,
.theme-dark .notice-warning {
  background: #3a320f;
  color: var(--warning-ink);
}

.theme-dark .danger-panel .muted,
.theme-dark .notice-error .muted,
.theme-dark .notice-warning .muted {
  color: var(--warning-ink);
}

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

.stats-grid article,
.facts div,
.details-grid div,
.report-meta div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.stats-grid span,
.facts span,
.details-grid span,
.report-meta span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stats-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.facts,
.details-grid,
.report-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.two-column {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact-inline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.fact-inline span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.fact-inline strong {
  display: block;
}

.quick-actions,
.actions-inline,
.form-actions,
.inline-form,
.tabs,
.subtabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  align-items: flex-end;
}

/* Într-un rând de filtre, câmpurile își iau lățimea din conținut: un select de 100%
   împinge butoanele pe rândul următor și rupe bara. */
.inline-form input,
.inline-form select {
  min-width: 150px;
  width: auto;
}

.inline-form label {
  gap: 4px;
  min-width: 160px;
}

.inline-form .button,
.inline-form button {
  align-self: end;
}

.ciclograma-title {
  align-items: end;
}

.ciclograma-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 240px) auto auto auto;
}

.ciclograma-filter label {
  min-width: 0;
}

.ciclograma-filter .button,
.ciclograma-filter button {
  min-height: 44px;
  white-space: nowrap;
}

.view-mode-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.view-mode-tabs a {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  padding: 9px 13px;
}

.view-mode-tabs a:hover,
.view-mode-tabs a.active {
  background: var(--success);
  color: #122e60;
  text-decoration: none;
}

.quick-actions {
  align-items: stretch;
}

.subtabs {
  margin-bottom: 18px;
}

.subtabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--primary);
  min-height: 38px;
  padding: 8px 12px;
}

.subtabs button.active {
  background: var(--success);
  color: #122e60;
}

.button,
button {
  align-items: center;
  appearance: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-align: center;
}

.button:hover,
button:hover {
  text-decoration: none;
}

.button.primary,
button.primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

/* Butonul inactiv arată inactiv: nu mai promite o acțiune care nu se poate face. */
.button:disabled,
button:disabled {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.button.primary:hover,
button.primary:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
}

.button.secondary:hover {
  background: var(--surface-soft);
}

.theme-dark .button.secondary {
  color: var(--text);
}

.button.danger,
button.danger {
  background: var(--danger);
  color: #ffffff;
}

.theme-dark .button.danger,
.theme-dark button.danger {
  color: #1b0f0c;
}

.button.success,
button.success {
  background: var(--success);
  color: var(--success-contrast);
}

.button.quick {
  background: var(--success);
  color: var(--success-contrast);
  flex: 1 1 210px;
  font-size: 17px;
  min-height: 58px;
}

.button.full {
  width: 100%;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-stack {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 600;
  gap: 5px;
  letter-spacing: 0.02em;
  position: relative;
}

/* Valoarea introdusă rămâne la mărimea de citire, eticheta se retrage. */
label > input,
label > select,
label > textarea {
  color: var(--text);
  font-size: 15px;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  min-height: 48px;
  padding: 11px 14px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.searchable-select {
  position: relative;
}

.searchable-select-native {
  display: none;
}

.searchable-select-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  left: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
}

.searchable-select-option {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  display: block;
  font-weight: 700;
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
  width: 100%;
}

.searchable-select-option:hover,
.searchable-select-option:focus,
.searchable-select-option[aria-selected="true"] {
  background: var(--highlight);
  color: var(--primary);
}

.searchable-select-empty {
  color: var(--muted);
  font-weight: 700;
  padding: 8px 9px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .12);
  outline: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(119, 184, 59, .38);
  outline-offset: 2px;
}

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

.checkbox-line {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.checkbox-line input {
  min-height: auto;
  width: auto;
}

.option-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0;
  padding: 14px;
}

.option-grid legend {
  color: var(--ink-soft);
  font-weight: 800;
  padding: 0 6px;
}

.notice {
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice ul {
  margin-bottom: 0;
}

.notice-error {
  background: #fff8c9;
  border: 1px solid var(--warning);
  color: var(--warning-ink);
}

.notice-warning {
  background: #fff6d8;
  border: 1px solid #e1bd58;
  color: var(--warning-ink);
}

.notice-success {
  background: var(--highlight);
  border: 1px solid var(--success);
  color: var(--primary);
}

.theme-dark .notice-success {
  color: var(--text);
}

.prose {
  max-width: 920px;
  line-height: 1.55;
}

.theme-preview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.theme-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.theme-preview span {
  border-radius: 999px;
  display: block;
  height: 12px;
}

.theme-preview small {
  color: var(--muted);
}

.theme-preview-green_light {
  background: #f7f9f2;
}

.theme-preview-green_light span {
  background: linear-gradient(90deg, #122e60 0 50%, #a2c73b 50% 100%);
}

.theme-preview-blue_light {
  background: #f1f6fd;
}

.theme-preview-blue_light span {
  background: linear-gradient(90deg, #a2c73b 0 50%, #122e60 50% 100%);
}

.theme-preview-cream {
  background: #f4eedf;
}

.theme-preview-cream span {
  background: linear-gradient(90deg, #032f62 0 50%, #8bc53f 50% 100%);
}

.theme-preview-dark {
  background: #172132;
  color: #edf3f7;
}

.theme-preview-dark span {
  background: linear-gradient(90deg, #a2c73b 0 50%, #5f95e8 50% 100%);
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.compact-number {
  width: 5.5rem;
  min-width: 5.5rem;
}

.field-error {
  display: block;
  margin-top: 0.3rem;
  color: var(--danger, #a12622);
  font-weight: 700;
}

.ciclograma-board {
  overflow: visible;
}

.schedule-matrix-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.schedule-matrix,
.schedule-week-table {
  min-width: 980px;
}

.schedule-matrix th,
.schedule-matrix td,
.schedule-week-table th,
.schedule-week-table td,
.compact-table th,
.compact-table td {
  line-height: 1.25;
  vertical-align: middle;
}

.schedule-matrix .route-head,
.schedule-matrix .route-title-cell {
  left: 0;
  position: sticky;
  z-index: 2;
}

.schedule-matrix .route-head {
  z-index: 3;
}

.schedule-matrix .route-title-cell {
  background: var(--surface);
  min-width: 220px;
}

.route-summary-row:hover td,
.route-summary-row.expanded td {
  background: var(--highlight);
}

.route-title-cell strong,
.route-title-cell span {
  display: block;
}

.route-title-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.hour-cell {
  min-width: 96px;
}

.departure-chip {
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  margin: 2px;
  min-width: 30px;
  padding: 6px 7px;
}

.chip-1 {
  background: color-mix(in srgb, var(--success) 26%, var(--surface));
}

.chip-2 {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}

.chip-3 {
  background: var(--surface-soft);
}

.chip-4 {
  background: color-mix(in srgb, var(--warning) 22%, var(--surface));
}

.planner-filter {
  align-items: end;
}

.planner-status-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.planner-status-strip article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.planner-status-strip span {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
}

.planner-status-strip strong {
  color: var(--text);
}

.visual-planner {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
}

.planner-column {
  min-width: 0;
}

.planner-slots,
.planner-card-list {
  display: grid;
  gap: 10px;
}

.planner-slot {
  align-items: stretch;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.planner-slot.is-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateY(-1px);
}

.planner-slot.complete {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}

.planner-slot-time strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.planner-slot-time span,
.planner-slot-main span,
.planner-card span,
.planner-card small,
.planner-card em {
  color: var(--muted);
  display: block;
  font-weight: 700;
}

.planner-slot-main {
  min-width: 0;
}

.planner-slot-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-slot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.planner-slot-tags span {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 8px;
}

.tag-ok {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
}

.tag-missing {
  background: color-mix(in srgb, var(--warning) 24%, var(--surface));
  border-color: var(--warning) !important;
  color: var(--warning-ink);
}

.planner-clear-form {
  align-self: center;
}

.button.small {
  border-radius: 7px;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 10px;
}

.planner-palette + .planner-palette {
  margin-top: 18px;
}

.planner-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.planner-card:active {
  cursor: grabbing;
}

.planner-card.is-dragging {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  opacity: 0.68;
  transform: scale(0.99);
}

.planner-card strong {
  display: block;
  margin-bottom: 3px;
}

.planner-card em {
  color: var(--accent);
  font-style: normal;
  margin-top: 5px;
}

.route-stop-dnd {
  display: grid;
  gap: 14px;
}

.section-heading-row {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.route-stop-filter {
  min-width: min(280px, 100%);
}

.route-stop-dnd-grid {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
}

.route-stop-drop-zone {
  align-content: center;
  background: var(--surface-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 172px;
  padding: 18px;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.route-stop-drop-zone strong {
  font-size: 18px;
}

.route-stop-drop-zone span {
  color: var(--muted);
  font-weight: 700;
}

.route-stop-drop-zone.is-over {
  background: var(--highlight);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  transform: translateY(-1px);
}

.route-stop-card-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: 380px;
  overflow: auto;
  padding-right: 2px;
}

.route-stop-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  display: grid;
  gap: 3px;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.route-stop-card:active {
  cursor: grabbing;
}

.route-stop-card.is-dragging {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  opacity: 0.68;
  transform: scale(0.99);
}

.route-stop-card.is-assigned {
  background: var(--highlight);
  border-color: var(--success);
}

.route-stop-card strong {
  color: var(--text);
}

.route-stop-card span,
.route-stop-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.manual-ciclograma-form textarea {
  min-height: 168px;
  resize: vertical;
}

.manual-workflow {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-workflow div {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.manual-workflow strong {
  color: var(--primary);
}

.manual-workflow span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.manual-origin-list {
  display: grid;
  gap: 14px;
}

.manual-origin-group {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.manual-origin-header {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.manual-origin-header .compact-button {
  min-width: 44px;
}

.manual-origin-header [data-manual-remove-origin]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.manual-ciclograma-tree,
.manual-tree-children,
.manual-origin-schedule-list {
  display: grid;
  gap: 12px;
}

.manual-tree-level {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.manual-tree-level > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 15px;
}

.manual-tree-level > summary small,
.manual-origin-schedule-heading small {
  color: var(--muted);
  font-weight: 700;
}

.manual-tree-level[open] > summary {
  border-bottom: 1px solid var(--border);
}

.manual-tree-ciclograma > summary {
  background: var(--surface-soft);
  color: var(--primary);
}

.manual-tree-route > summary {
  background: var(--surface-alt);
}

.manual-tree-program > summary {
  background: var(--highlight);
}

.manual-tree-children {
  padding: 12px;
}

.manual-program-actions {
  padding: 12px 12px 0;
}

.manual-origin-schedule-list {
  padding: 12px;
}

.manual-origin-schedule {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.manual-origin-schedule-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.manual-origin-schedule-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.manual-time-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.manual-time-list span {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  padding: 5px 9px;
}

.dispatcher-route-table,
.dispatcher-program-list {
  display: grid;
  gap: 10px;
}

.dispatcher-route-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dispatcher-route-row > summary {
  align-items: center;
  background: var(--surface-alt);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(70px, 0.25fr) minmax(180px, 1fr) auto;
  padding: 14px;
}

.dispatcher-route-row[open] > summary {
  border-bottom: 1px solid var(--border);
}

.dispatcher-route-number {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 900;
}

.dispatcher-route-name {
  font-weight: 800;
}

.dispatcher-route-program-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.dispatcher-program-list {
  padding: 12px;
}

.dispatcher-program-row {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(110px, 0.3fr) minmax(220px, 1fr) auto;
  padding: 12px;
}

.dispatcher-program-row > strong {
  align-self: center;
  color: var(--primary);
}

.dispatcher-program-row > small {
  color: var(--muted);
  grid-column: 2 / -1;
  font-weight: 700;
}

.dispatcher-daily-program-row {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(100px, 0.25fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
  padding: 12px;
}

.dispatcher-daily-program-row > strong {
  align-self: center;
  color: var(--primary);
}

.dispatcher-daily-program-row > small {
  color: var(--muted);
  grid-column: 2 / -1;
  font-weight: 700;
}

.dispatcher-indicative-date {
  margin-bottom: 16px;
}

.dispatcher-day-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 12px;
}

.dispatcher-day-summary article {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.dispatcher-day-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dispatcher-day-summary strong {
  color: var(--primary-dark);
}

.dispatcher-day-summary .status-reconfirmation_required {
  border-color: var(--warning);
}

.dispatcher-confirmation-meta {
  margin: 0 0 14px;
}

.dispatcher-indicative-tools {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.dispatcher-filter-grid {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 0.45fr)) auto;
}

.dispatcher-quick-actions,
.dispatcher-quick-actions form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.dispatcher-save-all-bar {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 16px;
}

.dispatcher-reason-dialog {
  background: transparent;
  border: 0;
  color: var(--text);
  max-width: 680px;
  padding: 0;
  width: calc(100% - 32px);
}

.dispatcher-reason-dialog::backdrop {
  background: rgba(4, 12, 24, 0.76);
  backdrop-filter: blur(3px);
}

.dispatcher-reason-dialog .panel {
  margin: 0;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.dispatcher-transition-table {
  min-width: 1420px;
}

.dispatcher-transition-table th:first-child,
.dispatcher-transition-table .dispatcher-route-cell {
  width: 100px;
}

.dispatcher-transition-table th:nth-child(2),
.dispatcher-transition-table .dispatcher-program-cell {
  width: 190px;
}

.dispatcher-transition-table th:nth-child(3),
.dispatcher-transition-table th:nth-child(4) {
  width: 280px;
}

.dispatcher-transition-table th:nth-child(5) {
  width: 130px;
}

.dispatcher-transition-table th:nth-child(6) {
  width: 200px;
}

.dispatcher-transition-table th:last-child,
.dispatcher-transition-table td:last-child {
  width: 210px;
}

.dispatcher-transition-table .dispatcher-route-cell {
  border-right: 3px solid var(--primary);
}

.dispatcher-transition-table tbody tr[data-status="incomplete"] td {
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
}

.warning-text {
  color: var(--warning-ink);
  font-size: 0.8rem;
}

.dispatcher-close-observations {
  min-width: 210px;
}

.dispatcher-reserve-allocation {
  margin-bottom: 16px;
  padding: 0;
}

.dispatcher-reserve-allocation summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
  padding: 16px 18px;
}

.dispatcher-reserve-allocation summary::-webkit-details-marker {
  display: none;
}

.dispatcher-reserve-allocation summary::before {
  color: var(--primary);
  content: "▸";
  font-size: 1.25rem;
  font-weight: 950;
}

.dispatcher-reserve-allocation[open] summary::before {
  content: "▾";
}

.dispatcher-reserve-allocation summary > span:first-of-type {
  display: grid;
  flex: 1;
  gap: 2px;
}

.dispatcher-reserve-allocation summary strong {
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.dispatcher-reserve-allocation summary small {
  color: var(--muted);
  font-weight: 700;
}

.dispatcher-reserve-allocation-body {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.dispatcher-reserve-add-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 620px) auto;
  justify-content: start;
}

.dispatcher-reserve-add-form .searchable-select {
  min-width: 260px;
  width: 100%;
}

.dispatcher-reserve-add-form .searchable-select-input {
  min-height: 42px;
  text-align: center;
}

.dispatcher-reserve-add-form .searchable-select-input::placeholder {
  text-align: center;
}

.dispatcher-reserve-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dispatcher-reserve-chips > .muted {
  margin: 0;
}

.dispatcher-reserve-chip {
  align-items: center;
  background: var(--highlight);
  border: 1px solid var(--success);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  gap: 8px;
  padding: 5px 6px 5px 12px;
}

.dispatcher-reserve-chip form {
  margin: 0;
}

.dispatcher-reserve-chip button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.dispatcher-reserve-chip button:hover {
  border-color: var(--danger);
}

.dispatcher-indicative-panel {
  padding: 0;
}

.dispatcher-indicative-table {
  min-width: 1000px;
  table-layout: fixed;
}

.dispatcher-line-column {
  width: 100px;
}

.dispatcher-program-column {
  width: 190px;
}

.dispatcher-save-column {
  width: 130px;
}

.dispatcher-indicative-table th,
.dispatcher-indicative-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.dispatcher-indicative-table th:first-child,
.dispatcher-indicative-table .dispatcher-route-cell {
  width: 100px;
}

.dispatcher-indicative-table th:nth-child(2),
.dispatcher-indicative-table .dispatcher-program-cell {
  width: 190px;
}

.dispatcher-indicative-table th:last-child,
.dispatcher-indicative-table td:last-child {
  width: 130px;
}

.dispatcher-indicative-table .searchable-select {
  min-width: 0;
  width: 100%;
}

.dispatcher-indicative-table .searchable-select-input {
  min-height: 38px;
  padding: 7px 9px;
  text-align: center;
  width: 100%;
}

.dispatcher-indicative-table .searchable-select-input::placeholder {
  text-align: center;
}

.dispatcher-route-group td {
  background: var(--surface);
}

.dispatcher-route-group:nth-of-type(even) td {
  background: var(--surface-alt);
}

.dispatcher-route-group + .dispatcher-route-group tr:first-child td {
  border-top: 6px solid var(--bg);
}

.dispatcher-route-group tr:not(:last-child) td:not(.dispatcher-route-cell) {
  border-bottom-style: dashed;
}

.dispatcher-route-group tr:last-child td,
.dispatcher-route-cell {
  border-bottom: 2px solid var(--border);
}

.dispatcher-route-group tr:hover td:not(.dispatcher-route-cell) {
  background: var(--highlight);
}

.dispatcher-indicative-table .dispatcher-route-cell {
  background: var(--surface-soft);
  border-right: 3px solid var(--primary);
  text-align: center;
  vertical-align: middle;
}

.dispatcher-indicative-table .dispatcher-route-cell strong {
  color: var(--primary-dark);
  display: inline-block;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  min-width: 54px;
  padding: 10px 8px;
}

.dispatcher-route-owner {
  color: var(--muted);
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
  padding: 0 4px 8px;
}

.dispatcher-program-cell {
  border-right: 1px solid var(--border);
  text-align: center;
}

.dispatcher-program-cell span {
  background: var(--highlight);
  border: 1px solid var(--success);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 150px;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
  width: 150px;
}

.dispatcher-program-cell small {
  display: block;
  font-size: .75rem;
  line-height: 1.35;
  margin-top: 7px;
}

.dispatcher-shift-editor {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(190px, 1fr) auto;
}

.dispatcher-shift-editor > small {
  grid-column: 1 / -1;
  min-height: 1.1em;
  text-align: center;
}

.success-text { color: var(--success); font-weight: 800; }
.error-text { color: var(--danger); font-weight: 800; }

.manual-shift-boundary-panel {
  background: var(--surface-alt);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  padding: 16px;
}

.manual-shift-boundary-panel label {
  font-weight: 900;
}

.dispatcher-week-periods,
.dispatcher-live-list {
  display: grid;
  gap: 8px;
}

.dispatcher-page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.dispatcher-service-status {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto auto;
  padding: 9px 12px;
}

.dispatcher-service-status span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dispatcher-service-status strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dispatcher-live-departure {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 8px 16px;
  min-height: 64px;
  grid-template-columns: 72px minmax(110px, .18fr) minmax(148px, .2fr) minmax(160px, .3fr) minmax(290px, .46fr);
  padding: 11px 16px;
}

/* Marginea din stânga poartă starea plecării — se citește dintr-o privire,
   fără să adauge încă un element colorat în rând. */
.dispatcher-live-departure:has(.status-confirmed) { border-left-color: var(--success); }
.dispatcher-live-departure:has(.status-changed) { border-left-color: var(--primary); }
.dispatcher-live-departure:has(.status-missing) { border-left-color: var(--warning); }
.dispatcher-live-departure:has(.status-overdue) { border-left-color: var(--danger); }
.dispatcher-live-departure:has(.status-not_operated) {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
}

/* Numărul liniei și ora sunt reperele; restul rândului le sprijină. */
.dispatcher-live-route {
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dispatcher-live-departure time {
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.dispatcher-live-departure:has(.status-not_operated) .dispatcher-live-route,
.dispatcher-live-departure:has(.status-not_operated) time {
  color: var(--danger-dark);
}

.dispatcher-live-program-column strong {
  font-size: 15px;
  font-weight: 600;
}

.dispatcher-live-program-column span {
  color: var(--muted);
  font-size: 13px;
}

.dispatcher-live-departure small {
  color: var(--muted);
}

.dispatcher-live-route-column,
.dispatcher-live-program-column,
.dispatcher-live-time-column,
.dispatcher-live-vehicle-column,
.dispatcher-live-actions {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dispatcher-live-program-column small,
.dispatcher-live-vehicle-column small {
  overflow-wrap: anywhere;
}

/* Acțiunile stau pe un rând, cu suprafețe de atingere de 44px pentru tabletă. */
.dispatcher-live-actions {
  align-content: center;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dispatcher-live-actions .button {
  font-size: 13px;
  justify-content: center;
  line-height: 1.15;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
}

.dispatcher-live-actions [data-change-result-message] {
  flex-basis: 100%;
  text-align: right;
}

/* compact-button ar impune 36px; într-un rând operativ toate ținta sunt egale. */
.dispatcher-live-actions .button.compact-button {
  min-height: 44px;
  padding: 0 14px;
}

.dispatcher-window-control {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dispatcher-window-control label {
  display: grid;
  font-size: .78rem;
  font-weight: 900;
  gap: 2px;
}

.dispatcher-window-control select {
  min-width: 135px;
  padding-block: 7px;
}

.dispatcher-departure-time-vehicle {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dispatcher-live-vehicle {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Lipsa autobuzului planificat nu blochează nimic: pastila galbenă o spune deja,
   iar roșul rămâne pentru ce chiar oprește plecarea. */
.dispatcher-live-vehicle.missing {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.dispatcher-live-vehicle-column small {
  font-size: 12px;
  line-height: 1.3;
}

.dispatcher-view-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.dispatcher-bus-change-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-top: 10px;
  padding: 12px;
}

.dispatcher-bus-change-form > .checkbox-row,
.dispatcher-bus-change-form > button,
.dispatcher-bus-change-form > small,
.dispatcher-bus-change-form > .dispatcher-program-swap-note {
  grid-column: 1 / -1;
}

.dispatcher-program-swap-note {
  font-size: .84rem;
  line-height: 1.4;
  margin: 0;
  padding: 8px 10px;
}

.dispatcher-change-details,
.dispatcher-departure-history {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.dispatcher-change-details > summary,
.dispatcher-departure-history > summary {
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 900;
  font-size: .82rem;
}

.dispatcher-live-departure > .dispatcher-change-details > summary,
.dispatcher-live-departure > .dispatcher-departure-history > summary {
  display: none;
}

.dispatcher-departure-history article {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 3px;
  padding: 8px 0;
}

.dispatcher-day-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.dispatcher-day-plan-table {
  font-size: .86rem;
  min-width: 1250px;
}

.dispatcher-day-plan-table th,
.dispatcher-day-plan-table td {
  padding: 7px 8px;
  vertical-align: middle;
}

.dispatcher-day-compact-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, .35fr) auto;
  margin: 10px 0 14px;
}

.dispatcher-day-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.dispatcher-day-legend span {
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .75rem;
  font-weight: 800;
  padding: 5px 8px;
}

.dispatcher-day-legend .is-current,
.dispatcher-day-time.is-current {
  background: #a8cf32;
  border-color: #8db31f;
  color: #142009;
}

.dispatcher-day-legend .is-past,
.dispatcher-day-time.is-past {
  background: #d8dde4;
  border-color: #bcc3cd;
  color: #59616d;
}

.dispatcher-day-legend .is-future,
.dispatcher-day-time.is-future {
  background: #fff;
  border-color: #cbd2dc;
  color: #172033;
}

.dispatcher-day-time.is-not-operated,
.dispatcher-day-time.is-not-operated.is-current,
.dispatcher-day-time.is-not-operated.is-past,
.dispatcher-day-time.is-not-operated.is-future {
  background: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 75%, #000);
  color: #fff;
}

.dispatcher-day-route-list {
  display: grid;
  gap: 12px;
}

.dispatcher-day-route-block {
  border: 2px solid var(--border-strong, var(--border));
  border-radius: 10px;
  overflow: hidden;
}

.dispatcher-day-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.dispatcher-day-compact-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: .82rem;
  min-width: 100%;
  width: max-content;
}

.dispatcher-day-compact-table th,
.dispatcher-day-compact-table td {
  border-bottom: 1px solid var(--border);
  padding: 5px 7px;
  text-align: left;
  vertical-align: middle;
}

.dispatcher-day-compact-table thead th {
  background: var(--primary);
  color: var(--primary-ink, #172033);
  font-size: .75rem;
  letter-spacing: .03em;
  position: sticky;
  top: 0;
  z-index: 5;
}

.dispatcher-day-compact-table tbody tr:last-child > * {
  border-bottom: 0;
}

.dispatcher-day-compact-table .day-route-sticky {
  left: 0;
  min-width: 72px;
  position: sticky;
  width: 72px;
  z-index: 4;
}

.dispatcher-day-compact-table .day-program-sticky {
  left: 72px;
  min-width: 132px;
  position: sticky;
  width: 132px;
  z-index: 3;
}

.dispatcher-day-compact-table thead .day-route-sticky,
.dispatcher-day-compact-table thead .day-program-sticky {
  z-index: 7;
}

.day-route-number {
  background: color-mix(in srgb, var(--primary) 20%, var(--surface));
  color: var(--primary-dark);
  font-size: 1.28rem;
  text-align: center !important;
  vertical-align: top !important;
}

.day-program-name {
  background: var(--surface-alt);
  color: var(--text);
  white-space: nowrap;
}

.dispatcher-day-departures-cell {
  background: var(--surface);
  min-width: max-content;
}

.dispatcher-day-departures {
  align-items: center;
  display: flex;
  gap: 5px;
  min-width: max-content;
  white-space: nowrap;
}

.dispatcher-day-time {
  align-items: center;
  border: 1px solid;
  border-radius: 6px;
  cursor: pointer;
  display: inline-grid;
  font: inherit;
  font-weight: 900;
  gap: 4px;
  justify-content: center;
  grid-template-columns: 1fr auto;
  min-width: 66px;
  padding: 5px 7px;
}

.dispatcher-day-time > span,
.dispatcher-day-time > b { grid-column: 1; line-height: 1.05; text-align: center; }
.dispatcher-day-time > b { font-size: .72rem; font-weight: 800; }
/* Plecare fără autobuz planificat: rândul rămâne gol, dar celula își păstrează înălțimea. */
.dispatcher-day-time > b { min-height: 1.05em; }
.dispatcher-day-time > small { grid-column: 2; grid-row: 1 / span 2; }

.dispatcher-day-time:hover,
.dispatcher-day-time:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring, var(--primary));
  transform: translateY(-1px);
}

.dispatcher-day-time small {
  font-size: .65rem;
  line-height: 1;
}

.dispatcher-day-departure-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  max-height: min(82vh, 760px);
  max-width: min(720px, calc(100vw - 24px));
  overflow: auto;
  padding: 18px;
  width: 100%;
}

.dispatcher-day-departure-dialog::backdrop {
  background: rgb(3 10 22 / 72%);
}

.dispatcher-dialog-heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dispatcher-dialog-heading > div {
  display: grid;
  gap: 4px;
}

.dispatcher-day-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 14px;
}

.dispatcher-day-detail-grid div {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.dispatcher-day-detail-grid dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.dispatcher-day-detail-grid dd {
  font-weight: 800;
  margin: 3px 0 0;
}

.dispatcher-day-filter-empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.dispatcher-plan-status {
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.02em;
  min-height: 34px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* În rândul de plecare eticheta stă în coloana ei; nu se revarsă peste autobuz. */
.dispatcher-live-time-column .dispatcher-plan-status {
  justify-self: start;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dispatcher-plan-status.status-confirmed { background: color-mix(in srgb, var(--success) 22%, var(--surface)); color: var(--success); }
.dispatcher-plan-status.status-changed { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--primary-dark); }
.dispatcher-plan-status.status-pending { background: color-mix(in srgb, var(--warning) 24%, var(--surface)); color: var(--warning-ink); }
.dispatcher-plan-status.status-overdue { background: color-mix(in srgb, var(--danger) 20%, var(--surface)); color: var(--danger); }
.dispatcher-plan-status.status-future { background: var(--surface-alt); color: var(--muted); }
.dispatcher-plan-status.status-missing { background: color-mix(in srgb, var(--warning) 30%, var(--surface)); color: var(--warning-ink); }
.dispatcher-plan-status.status-not_operated { background: var(--danger); color: #fff; }

.dispatcher-not-operated-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  color: var(--danger);
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  width: 48px;
}

.dispatcher-not-operated-button:hover {
  background: var(--danger-soft);
}

.dispatcher-not-operated-button.is-active,
.dispatcher-not-operated-button:disabled { background: var(--danger); color: #fff; }

.dispatcher-not-operated-dialog {
  background: var(--surface);
  border: 2px solid var(--danger);
  border-radius: 14px;
  color: var(--text);
  max-height: 88vh;
  max-width: min(720px, calc(100vw - 24px));
  overflow: auto;
  padding: 18px;
  width: 100%;
}

.dispatcher-not-operated-dialog::backdrop { background: rgb(3 10 22 / 76%); }
.dispatcher-not-operated-dialog form { display: grid; gap: 12px; }
.dispatcher-dialog-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dispatcher-dialog-actions form { align-items: center; display: flex; gap: 8px; margin: 0; }

/* Fereastra unei plecări din Planul complet: trei rânduri — linie/program/oră, status/autobuze, butoane. */
.button.warning,
button.warning { background: var(--warning); color: #2b2300; }
.dispatcher-day-dialog-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 10px; }
.dispatcher-day-dialog-title { font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: 0.01em; }
.dispatcher-dialog-close { background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 20px; height: 34px; line-height: 1; width: 34px; }
.dispatcher-dialog-close:hover { background: var(--surface-alt); color: var(--text); }
.dispatcher-day-dialog-facts { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.dispatcher-day-dialog-facts b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dispatcher-day-dialog-sep { color: var(--muted); }
.dispatcher-day-dialog-actions { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dispatcher-day-dialog-actions form { display: contents; }
.dispatcher-day-dialog-actions .button { justify-content: center; min-height: 44px; width: 100%; }
.dispatcher-day-dialog-actions .button:disabled { cursor: not-allowed; opacity: 0.55; }
.dispatcher-day-departure-dialog .dispatcher-history-compact { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 10px; }
.dispatcher-day-departure-dialog .dispatcher-history-compact summary { color: var(--muted); cursor: pointer; font-weight: 700; }
.dispatcher-day-departure-dialog .dispatcher-history-compact p { margin: 8px 0 0; }
.dispatcher-bus-change-dialog { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 48px rgb(3 10 22 / 45%); color: var(--text); max-height: min(86vh, 760px); max-width: min(560px, calc(100vw - 24px)); overflow: auto; padding: 18px; width: 100%; }
.dispatcher-bus-change-dialog::backdrop { background: rgb(3 10 22 / 55%); }
.dispatcher-bus-change-dialog .dispatcher-day-dialog-title { font-size: 18px; }
/* În fereastra de schimbare formularul este o singură coloană, fără al doilea chenar. */
.dispatcher-bus-change-dialog .dispatcher-bus-change-form { background: transparent; border: 0; display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0; padding: 0; }
.dispatcher-bus-change-form > .dispatcher-quick-buses { grid-column: 1 / -1; }
.dispatcher-bus-change-form .checkbox-row { align-items: center; display: flex; gap: 8px; }
.dispatcher-bus-change-form .checkbox-row input[type="checkbox"] { flex: 0 0 auto; height: 18px; margin: 0; min-height: 0; width: 18px; }
.dispatcher-bus-change-dialog .dispatcher-bus-change-form button[type="submit"] { background: var(--warning); border-color: var(--warning); color: #2b2300; min-height: 44px; }
.dispatcher-quick-buses { display: grid; gap: 6px; }
.dispatcher-quick-buses > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.dispatcher-quick-bus-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dispatcher-quick-bus { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--text); cursor: pointer; font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 800; min-height: 40px; min-width: 52px; padding: 0 12px; }
.dispatcher-quick-bus:hover { border-color: var(--warning); }
.dispatcher-quick-bus[aria-pressed="true"] { background: var(--warning); border-color: var(--warning); color: #2b2300; }
.dispatcher-quick-bus:focus-visible, .dispatcher-dialog-close:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 520px) {
  .dispatcher-day-dialog-actions { grid-template-columns: 1fr; }
  .dispatcher-day-dialog-title { font-size: 19px; }
}

@media (max-width: 900px) {
  .dispatcher-bus-change-form,
  .dispatcher-day-filters { grid-template-columns: 1fr; }

  .dispatcher-day-compact-filters,
  .dispatcher-day-detail-grid { grid-template-columns: 1fr; }

  .dispatcher-day-legend { justify-content: flex-start; }

  .dispatcher-live-departure {
    grid-template-columns: minmax(60px, .2fr) minmax(150px, 1fr) minmax(100px, .35fr);
  }

  .dispatcher-live-vehicle-column,
  .dispatcher-live-actions {
    grid-column: span 3;
  }
}

.dispatcher-confirm-form {
  margin: 0;
}

.dispatcher-confirm-button {
  align-items: center;
  background: var(--success);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  color: #142009;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 48px;
}

.dispatcher-confirm-button:hover,
.dispatcher-confirm-button.is-confirmed {
  background: var(--success);
  color: var(--primary-contrast);
}

.dispatcher-confirm-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.dispatcher-reserve-form {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(170px, 1fr) auto;
}

.dispatcher-reserve-form .searchable-select-input {
  min-height: 38px;
}

.dispatcher-departure-result {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  grid-column: 5;
  justify-self: end;
  padding: 4px 10px;
}

.dispatcher-departure-result.confirmed {
  background: color-mix(in srgb, var(--success) 25%, var(--surface));
  color: var(--primary-dark);
}

.dispatcher-departure-result.reserve_replacement {
  background: color-mix(in srgb, var(--warning) 25%, var(--surface));
  color: var(--warning-ink);
}

.dispatcher-live-empty {
  align-items: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  min-height: 130px;
  padding: 24px;
  text-align: center;
}

.dispatcher-entry-body {
  min-height: 100vh;
}

.dispatcher-entry-topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 3px solid var(--success);
  display: flex;
  justify-content: flex-end;
  min-height: 74px;
  padding: 10px 24px;
}

.dispatcher-entry-actions {
  margin-left: auto;
}

.dispatcher-entry-shell {
  margin: 0 auto;
  max-width: 1280px;
  padding: clamp(36px, 7vw, 88px) 24px;
  width: 100%;
}

.dispatcher-entry-heading {
  margin-bottom: 34px;
  max-width: 780px;
}

.dispatcher-entry-heading h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 16px 0 12px;
}

.dispatcher-entry-heading p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.dispatcher-entry-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dispatcher-entry-card {
  appearance: none;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 8px 24px rgba(18, 46, 96, 0.09);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  min-height: 230px;
  padding: 26px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dispatcher-entry-card:hover,
.dispatcher-entry-card:focus-visible {
  background: var(--highlight);
  border-color: var(--primary);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-4px);
}

.dispatcher-entry-card:disabled,
.dispatcher-entry-card.is-unassigned {
  background: var(--surface-soft);
  border-color: var(--border);
  box-shadow: none;
  color: var(--muted);
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.58;
  transform: none;
}

.dispatcher-entry-card:disabled:hover,
.dispatcher-entry-card:disabled:focus-visible {
  background: var(--surface-soft);
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.dispatcher-entry-card-label {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatcher-entry-card strong {
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  line-height: 1.2;
  margin-top: 16px;
}

.dispatcher-entry-card small {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 6px;
}

.dispatcher-entry-card-code {
  align-self: flex-start;
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 14px;
  padding: 5px 10px;
}

.dispatcher-entry-card-action {
  align-items: center;
  color: var(--primary-dark);
  display: flex;
  font-weight: 900;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 22px;
  width: 100%;
}

.dispatcher-entry-card-action b {
  font-size: 1.5rem;
  line-height: 1;
}

.master-delete-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.master-delete-option {
  align-items: flex-start;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  padding: 12px;
}

.master-delete-option input {
  margin-top: 4px;
}

.master-delete-option strong,
.master-delete-option small {
  display: block;
}

.master-delete-option small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

.master-delete-preserve {
  margin: 12px 0;
}

.route-detail-row td {
  background: var(--surface-soft);
  padding: 14px;
}

.route-detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.compact-table th,
.compact-table td {
  padding: 8px;
}

.validation-summary-panel {
  border-color: var(--warning);
  max-height: 340px;
  overflow: auto;
}

.week-count {
  display: grid;
  gap: 2px;
}

.week-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.month-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
}

.month-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.month-day {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 10px;
}

.month-day:hover {
  background: var(--highlight);
  text-decoration: none;
}

.month-day.empty {
  background: transparent;
  border: 0;
}

.month-day strong {
  font-size: 20px;
}

.month-day span,
.month-day small {
  color: var(--muted);
  font-weight: 700;
}

.table-controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr);
  margin-bottom: 12px;
}

.table-controls input[type="search"] {
  max-width: 420px;
}

.alpha-filter,
.table-pager {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alpha-filter button,
.table-pager button {
  background: var(--highlight);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 13px;
  min-height: 32px;
  padding: 5px 8px;
}

.alpha-filter button.active {
  background: var(--primary);
  color: #fff;
}

.table-pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bulk-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.bulk-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.select-column {
  text-align: center;
  width: 42px;
}

.select-column input {
  margin: 0;
}

table {
  border-collapse: collapse;
  table-layout: auto;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  position: relative;
  text-align: left;
  vertical-align: middle;
  line-height: 1.35;
}

th {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
}

.badge {
  background: var(--highlight);
  border: 1px solid var(--success);
  color: var(--primary);
  border-radius: 999px;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 8px;
}

.badge-warning {
  background: color-mix(in srgb, var(--warning) 26%, var(--surface));
  border-color: var(--warning);
  color: var(--warning-ink);
}

.validation-chip {
  background: color-mix(in srgb, var(--chip-color) 34%, var(--surface));
  border: 1px solid var(--chip-color);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.review-input {
  min-width: 130px;
}

.review-input.short {
  min-width: 82px;
  width: 96px;
}

.compact-button {
  min-height: 36px;
  padding: 7px 10px;
}

.compact-check {
  font-weight: 400;
}

.quick-edit {
  position: relative;
}

.quick-edit summary {
  color: var(--success);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.quick-edit summary::-webkit-details-marker {
  display: none;
}

.quick-edit-form {
  align-items: end;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
}

.quick-edit-form label {
  flex: 1 1 130px;
  min-width: 120px;
}

.quick-edit-form .checkbox-line {
  flex: 0 0 auto;
  min-height: 36px;
}

.quick-edit-form input,
.quick-edit-form select {
  min-height: 34px;
  padding: 6px 8px;
}

.quick-edit-form button {
  flex: 0 0 auto;
}

td .muted,
td .badge {
  display: block;
  margin-top: 4px;
}

td .badge {
  display: inline-flex;
  margin-top: 6px;
  vertical-align: middle;
}

td.actions-inline {
  align-items: center;
  display: table-cell;
  white-space: nowrap;
}

td.actions-inline > a,
td.actions-inline > form,
td.actions-inline > details {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  min-height: 32px;
  vertical-align: middle;
}

td.actions-inline > :last-child {
  margin-right: 0;
}

.dense-list {
  margin-bottom: 0;
  padding-left: 20px;
}

.text-block {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid var(--primary);
  margin-bottom: 14px;
  padding-left: 12px;
}

.timeline span {
  color: var(--muted);
  display: block;
}

.report-page {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.report-header {
  border-bottom: 2px solid var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
}

.report-section {
  break-inside: avoid;
  margin-top: 20px;
}

.report-stats {
  margin-top: 16px;
}

code {
  white-space: pre-wrap;
}

.help-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 8px 12px;
}

.help-toggle:hover {
  background: var(--surface-soft);
}

.context-help {
  align-items: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.context-help p {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
}

.help-close,
.field-help-close {
  background: transparent;
  border: 0;
  color: #3d3200;
  cursor: pointer;
  font-weight: 800;
}

.field-help-wrap {
  display: inline-block;
  margin-left: 6px;
  position: relative;
  vertical-align: middle;
  z-index: 20;
}

label > .field-help-wrap,
th > .field-help-wrap {
  margin-left: 0;
  position: absolute;
  right: 8px;
  top: 8px;
}

th > .field-help-wrap {
  top: 50%;
  transform: translateY(-50%);
}

.field-help-trigger {
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-height: 22px;
  min-width: 22px;
  padding: 0;
  width: 22px;
}

.field-help-trigger:hover,
.field-help-trigger[aria-expanded="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.field-help-bubble {
  background: var(--primary);
  border: 1px solid var(--primary-dark);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(18, 46, 96, 0.28);
  color: #ffffff;
  display: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  max-width: min(360px, calc(100vw - 16px));
  min-width: 220px;
  padding: 10px 30px 10px 10px;
  position: fixed;
  white-space: normal;
  z-index: 100000;
}

.field-help-wrap:hover .field-help-bubble,
.field-help-wrap:focus-within .field-help-bubble {
  display: none;
}

.field-help-close {
  font-size: 18px;
  position: absolute;
  right: 7px;
  top: 4px;
}

.help-disabled .context-help,
.help-disabled .field-help-wrap {
  display: none !important;
}

.feedback-widget {
  bottom: 18px;
  position: fixed;
  right: 18px;
  z-index: 90000;
}

.feedback-launcher {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(18, 46, 96, 0.22);
  color: #ffffff;
  display: inline-flex;
  gap: 8px;
  min-height: 48px;
  padding: 10px 15px;
}

.feedback-launcher span {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.feedback-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  bottom: 62px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: var(--text);
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 16px;
  position: absolute;
  right: 0;
  width: min(420px, calc(100vw - 28px));
}

.feedback-panel-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feedback-panel-header p {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 0;
}

.feedback-close {
  background: transparent;
  color: var(--text);
  min-height: 30px;
  padding: 2px 8px;
}

.feedback-form {
  display: grid;
  gap: 10px;
}

.feedback-form label {
  gap: 4px;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  min-height: 38px;
  padding: 7px 9px;
}

.feedback-detail {
  color: var(--text);
  margin: 8px 0 0;
  white-space: normal;
}

.feedback-status-form {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .topbar,
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav,
  .user-box {
    flex-wrap: wrap;
    width: 100%;
  }

  .user-box {
    justify-content: flex-start;
  }

  .user-menu-panel {
    left: 0;
    right: auto;
    width: min(92vw, 360px);
  }

  .container {
    padding: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

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

  .driver-profile-header,
  .driver-profile-actions,
  .date-action-row,
  .ciclograma-filter,
  .visual-planner,
  .planner-status-strip,
  .route-stop-dnd-grid,
  .manual-workflow,
  .manual-origin-header,
  .master-delete-grid {
    grid-template-columns: 1fr;
  }

  .manual-tree-level > summary,
  .manual-origin-schedule-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dispatcher-route-row > summary,
  .dispatcher-program-row,
  .dispatcher-daily-program-row,
  .dispatcher-live-departure,
  .dispatcher-reserve-form,
  .dispatcher-reserve-add-form {
    grid-template-columns: 1fr;
  }

  .dispatcher-live-vehicle-column,
  .dispatcher-live-actions {
    grid-column: auto;
  }

  .dispatcher-day-summary,
  .dispatcher-filter-grid,
  .dispatcher-save-all-bar {
    grid-template-columns: 1fr;
  }

  .dispatcher-reserve-allocation summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dispatcher-reserve-add-form .searchable-select {
    min-width: 0;
  }

  .dispatcher-program-row > small,
  .dispatcher-daily-program-row > small {
    grid-column: auto;
  }

  .dispatcher-live-departure small {
    grid-column: auto;
  }

  .dispatcher-departure-result {
    grid-column: auto;
  }

  .dispatcher-live-vehicle {
    justify-self: start;
  }

  .section-heading-row {
    flex-direction: column;
  }

  .planner-slot {
    grid-template-columns: 1fr;
  }

  .planner-clear-form {
    align-self: stretch;
  }

  .planner-clear-form .button {
    width: 100%;
  }

  .driver-profile-actions {
    justify-self: stretch;
  }

  .quick-actions .button.quick,
  .actions-inline,
  .inline-form {
    width: 100%;
  }

  .inline-form input,
  .inline-form select,
  .inline-form button,
  .actions-inline .button,
  .actions-inline form,
  .actions-inline button {
    width: 100%;
  }

  .quick-edit-form {
    position: static;
  }

  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-weekday {
    display: none;
  }
}

.ciclograma-operational-summary article strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.ciclograma-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ciclograma-service-filters {
  align-items: end;
}

.ciclograma-service-table th,
.ciclograma-service-table td {
  vertical-align: top;
}

.service-row.status-confirmed {
  border-left: 4px solid #16804d;
}

.service-row.status-planned {
  border-left: 4px solid #23815f;
}

.service-row.status-partial {
  border-left: 4px solid #d39b16;
}

.service-row.status-unprepared {
  border-left: 4px solid #c83d3d;
}

.service-row.status-cancelled {
  border-left: 4px solid #8a8f98;
  color: #68707c;
}

.service-details {
  position: relative;
}

.service-details summary {
  cursor: pointer;
  color: var(--link-color, #116149);
  font-weight: 700;
  white-space: nowrap;
}

.service-detail-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  min-width: min(760px, calc(100vw - 48px));
}

.service-departure-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.service-departure-groups div {
  border: 1px solid var(--border-color, #d6ddd8);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted, #f7faf8);
}

.service-departure-groups p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.service-departure-groups a,
.service-departure-groups span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border-color, #d6ddd8);
  text-decoration: none;
  font-weight: 700;
}

.service-assignment-form {
  padding-top: 4px;
}

.weekly-service-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(7, minmax(145px, 1fr));
  gap: 1px;
  overflow-x: auto;
  background: var(--border-color, #d6ddd8);
  border: 1px solid var(--border-color, #d6ddd8);
  border-radius: 8px;
}

.weekly-service-head,
.weekly-service-title,
.weekly-service-cell,
.weekly-service-empty {
  background: var(--panel-bg, #fff);
  min-height: 88px;
  padding: 10px;
}

.weekly-service-head {
  min-height: 58px;
  font-weight: 800;
}

.weekly-service-head span,
.weekly-service-title span {
  display: block;
  color: var(--muted-color, #66746d);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 4px;
}

.weekly-service-title {
  position: sticky;
  left: 0;
  z-index: 1;
}

.weekly-service-cell a {
  display: grid;
  gap: 4px;
  min-height: 118px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.weekly-service-cell a.status-confirmed {
  background: #e9f7ef;
  border-color: #a8d9bb;
}

.weekly-service-cell a.status-planned {
  background: #edf8f3;
  border-color: #b8dccd;
}

.weekly-service-cell a.status-partial {
  background: #fff6df;
  border-color: #e4c46e;
}

.weekly-service-cell a.status-unprepared {
  background: #fff0f0;
  border-color: #e6aaaa;
}

.weekly-service-cell a.status-cancelled {
  background: #f2f3f5;
  border-color: #cfd4da;
  color: #68707c;
}

.weekly-service-cell strong,
.weekly-service-cell span,
.weekly-service-cell small,
.weekly-service-cell em {
  overflow-wrap: anywhere;
}

.weekly-service-cell em {
  color: var(--muted-color, #66746d);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
}

.weekly-service-empty {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .ciclograma-actions .button {
    width: 100%;
  }

  .weekly-service-grid {
    grid-template-columns: minmax(180px, 0.9fr) repeat(7, minmax(132px, 1fr));
  }

  .service-detail-panel {
    min-width: auto;
  }
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .topbar,
  .print-hidden,
  .tabs,
  .section-switcher,
  .user-menu,
  .context-help,
  .help-toggle,
  .field-help-wrap,
  .notice,
  .button,
  .table-controls,
  .table-pager,
  .feedback-launcher,
  script {
    display: none !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .report-page {
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  th,
  td {
    border-color: #999;
    font-size: 12px;
    padding: 6px;
  }

  /* A long report spans several sheets: the panel must not become one unbreakable block, the
     header has to repeat on every sheet, and a row must not be cut in half between two of them. */
  .panel {
    border: 0;
    box-shadow: none;
    break-inside: auto;
    padding: 0;
  }

  .table-wrap {
    overflow: visible !important;
  }

  table {
    break-inside: auto;
    width: 100%;
  }

  thead {
    display: table-header-group;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Written with the attribute in the selector so it always outranks [hidden]'s !important rule,
     whatever order the two end up in. */
  .istoric-print-title[hidden] {
    display: block !important;
    margin-bottom: 8px;
  }

  .istoric-print-title strong {
    display: block;
    font-size: 15px;
  }

  .istoric-print-title span {
    color: #333;
    font-size: 11px;
  }

  .dispatcher-day-summary {
    display: none !important;
  }

  .istoric-table {
    font-size: 10px;
  }

  .istoric-table th,
  .istoric-table td {
    font-size: 10px;
    padding: 4px 5px;
  }
}
/* Persistent dispatcher workspace */
/* Bara operativă rămâne pe un rând cât încape; se rupe firesc, nu în două coloane înalte. */
.dispatcher-persistent-header {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(18, 46, 96, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0 0 14px;
  padding: 11px 16px;
  position: sticky;
  top: 0;
  z-index: 18;
}
.dispatcher-persistent-header div { display: flex; flex-direction: column; gap: 2px; }
.dispatcher-persistent-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dispatcher-persistent-header div > *:not(span) {
  font-size: 15px;
  font-weight: 600;
}
.dispatcher-persistent-header .active-status { color: var(--primary); }
/* Tura de noapte trecută de miezul nopții: ziua arătată este cea nouă, sub ea de când ține tura. */
.dispatcher-service-since { color: var(--muted); display: block; font-size: 11px; font-weight: 600; }
/* Grupul de file stă într-un suport alb cu chenar, ca în machetă: filele nu mai plutesc
   direct pe fundalul paginii, iar fila activă se citește ca un buton apăsat. */
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
}

.tabs a.active {
  border-radius: 10px;
}

.tabs .danger-tab { color: var(--danger); }
/* Bara Dispeceratului: filele și antetul permanent rămân împreună sus, ca trecerea între file să
   nu ceară derulare înapoi. Sub 900 px rămâne pe loc, ca să nu mănânce jumătate din ecran. */
/* Bara Dispeceratului: numai rândul de file rămâne sus, cu închiderea serviciului la capăt.
   Restul datelor serviciului se citesc o dată și trec cu pagina. */
.dispatcher-sticky-bar {
  align-items: center;
  background: var(--bg);
  display: flex;
  gap: 12px;
  margin: 0 0 14px;
  padding: 6px 0;
  position: sticky;
  top: 0;
  z-index: 19;
}
/* Eticheta „Dispecerat” iese din bandă și nu spune nimic în plus: sus rămân numai filele. */
.dispatcher-sticky-bar .tab-area-label { display: none; }
.dispatcher-sticky-bar .tab-area { margin-bottom: 0; min-width: 0; }
/* Filele stau pe un singur rând, fără derulare: pe ecrane mai înguste scad litera și spațiul din
   jurul lor, ca toate să încapă deodată. */
.dispatcher-sticky-bar .tabs { flex-wrap: nowrap; max-width: 100%; }
.dispatcher-sticky-bar .tabs a { flex: 0 0 auto; white-space: nowrap; }
.dispatcher-sticky-close { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 1280px) {
  .dispatcher-sticky-bar .tabs a { font-size: 14px; padding: 7px 8px; }
}
@media (max-width: 1024px) {
  .dispatcher-sticky-bar { gap: 8px; }
  .dispatcher-sticky-bar .tab-area { flex: 0 1 auto; }
  .dispatcher-sticky-bar .tabs { padding: 4px; }
  .dispatcher-sticky-bar .tabs a { font-size: 13px; padding: 6px 6px; }
  .dispatcher-sticky-close { font-size: 13px; padding: 6px 10px; }
}
/* Sub această lățime cinci file nu mai pot încăpea lizibil pe un rând, așa că rândul se rupe. */
@media (max-width: 700px) {
  .dispatcher-sticky-bar { flex-wrap: wrap; }
  .dispatcher-sticky-bar .tabs { flex-wrap: wrap; }
}
/* Antetul serviciului nu mai este lipit sus: rândul de file îi ia locul. */
.dispatcher-persistent-header { position: static; }


/* --- Ráncfelvarrare: rolurile tipografice din brandbook --------------------
   DIN Mittel poartă interfața și datele; Minion Pro numai textul explicativ.
   Cifrele tabulare țin coloanele de ore și indicative aliniate. */

.page-title p.muted,
.notice,
.field-help-bubble,
.dispatcher-day-legend {
  font-family: var(--font-serif);
}

.notice {
  font-size: 15px;
  line-height: 1.5;
}

td,
th,
input,
select,
textarea,
time,
.dispatcher-day-time,
.dispatcher-live-time-column,
.dispatcher-plan-status,
.stat-value {
  font-variant-numeric: tabular-nums;
}

/* Numărul liniei și ora plecării sunt reperele citite dintr-o privire. */
.dispatcher-live-route,
.day-route-number {
  letter-spacing: -0.02em;
}

/* Antetele de tabel: DIN suportă bine spațierea, versalele devin mai lizibile. */
th {
  letter-spacing: 0.04em;
}

/* Butonul de ajutor este poziționat absolut peste antet; fără această rezervă
   acoperea textul capului de coloană atunci când acesta se rupe pe două rânduri. */
th:has(> .field-help-wrap) {
  padding-right: 30px;
}

label:has(> .field-help-wrap) {
  padding-right: 30px;
}


/* Câmp de căutare în care s-a tastat, dar nu s-a ales nimic din listă. */
.searchable-select-unresolved .searchable-select-input {
  background: var(--danger-soft);
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}


/* Rândul de paginare de sub tabel: aceleași butoane, separate vizual de date. */
.table-pager-bottom {
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
}

.table-pager-bottom button {
  min-height: 44px;
  padding: 0 16px;
}


/* Istoric zilnic: a read-only day, wide enough for the change log to stay readable. */
.istoric-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.istoric-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.istoric-print-title {
  display: none;
}

.istoric-table {
  width: 100%;
}

.istoric-table th,
.istoric-table td {
  vertical-align: top;
}

.istoric-table .istoric-route {
  text-align: center;
  width: 68px;
}

.istoric-table .istoric-route strong {
  color: var(--primary-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.istoric-table .istoric-service {
  color: var(--muted);
  font-size: .85rem;
  width: 180px;
}

.istoric-table .istoric-bus {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  width: 120px;
}

.istoric-table .istoric-bus em {
  color: var(--danger);
  display: block;
  font-size: .85rem;
  font-style: normal;
  font-weight: 700;
}

.istoric-table .istoric-bus.is-missing {
  color: var(--muted);
  font-weight: 400;
}

.istoric-table .istoric-changes p,
.istoric-table .istoric-not-operated p {
  line-height: 1.35;
  margin: 0 0 4px;
}

.istoric-table .istoric-changes p:last-child,
.istoric-table .istoric-not-operated p:last-child {
  margin-bottom: 0;
}

.istoric-table .istoric-changes strong,
.istoric-table .istoric-not-operated strong {
  font-variant-numeric: tabular-nums;
}

.istoric-table .istoric-changes small,
.istoric-table .istoric-not-operated small {
  color: var(--muted);
  display: block;
}

.istoric-table .istoric-not-operated {
  color: var(--danger-dark);
}


/* ---------------------------------------------------------------------------
   Ecranele dinaintea autentificării: bară de brand subțire, prezentare la
   stânga, formular la dreapta. Nu folosesc .container, deci se întind complet.
   --------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------
   Ecranul de autentificare, construit după macheta „ROTA bejelentkezes”, 1a.
   Tot ecranul stă într-un singur card rotunjit: antet, corpul în două coloane
   și subsolul fac parte din aceeași suprafață, ca la macheta de referință.
   Valorile de aici vin din machetă și nu se aproximează.
   --------------------------------------------------------------------------- */
.auth-body {
  background: #eef2f6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 26px 22px;
}

.rota-auth {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .1);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 1440px;
  overflow: hidden;
  width: 100%;
}

.auth-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 3px solid #8bc53f;
  display: flex;
  flex: none;
  gap: 16px;
  padding: 14px 32px;
}

.auth-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}

.auth-brand img {
  display: block;
  flex: none;
  height: 30px;
  width: 30px;
}

.auth-brand-name {
  color: #032f62;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.auth-brand-sep {
  color: #94a3b8;
  font-size: 13px;
}

.auth-brand-sub {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.auth-topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.auth-pill {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  color: #032f62;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
}

.auth-pill:hover {
  border-color: #032f62;
  text-decoration: none;
}

.auth-pill svg {
  display: block;
  flex: none;
}

.auth-pill-static {
  cursor: default;
}

.auth-help {
  position: relative;
}

.auth-help summary {
  list-style: none;
}

.auth-help summary::-webkit-details-marker {
  display: none;
}

.auth-help-panel {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  padding: 14px 16px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 268px;
  z-index: 20;
}

.auth-main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.auth-split {
  display: grid;
  flex: 1;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 620px;
}

/* Panoul din stânga: degrade, filigran și mesajul produsului. */
.auth-pitch {
  background: linear-gradient(135deg, #edf6e7 0%, #f8fbf4 20%, #ffffff 58%, #eff6fd 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 64px 60px;
  position: relative;
}

.auth-watermark {
  bottom: -130px;
  opacity: .07;
  pointer-events: none;
  position: absolute;
  right: -110px;
  width: 460px;
}

.auth-lockup {
  display: block;
  height: auto;
  margin-bottom: 28px;
  max-width: 100%;
  position: relative;
  width: 340px;
}

.auth-pitch h1 {
  color: #032f62;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.04;
  margin: 0;
  max-width: 460px;
  position: relative;
}

.auth-divider {
  background: rgba(119, 184, 59, .55);
  border-radius: 999px;
  height: 3px;
  margin: 26px 0;
  position: relative;
  width: 98px;
}

.auth-points {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.auth-points li {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  gap: 10px;
  white-space: nowrap;
}

.auth-points img {
  display: block;
  flex: none;
  height: 16px;
  width: 16px;
}

/* Panoul din dreapta: fundal sobru, cardul centrat pe verticală. */
.auth-form-panel {
  align-items: center;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  padding: 64px 60px;
}

.auth-card {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 22px;
  box-shadow: 0 24px 52px rgba(15, 23, 42, .08);
  margin: 0;
  max-width: 420px;
  padding: 36px 34px 34px;
  width: 100%;
}

.auth-card h2 {
  color: #032f62;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}

.auth-card-lead {
  color: #64748b;
  font-size: 13.5px;
  margin: 6px 0 22px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: block;
}

/* A beviteli keret is egy span a címke mellett, ezért a címke szabálya kizárja. */
.auth-field > span:not(.auth-input) {
  color: #334155;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

.auth-input {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
}

.auth-input:focus-within {
  border-color: #77b83b;
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .12);
}

.auth-input > svg {
  display: block;
  flex: none;
}

.auth-input input {
  background: transparent;
  border: 0;
  min-height: 0;
  color: #111827;
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  min-width: 0;
  outline: none;
  padding: 0;
}

/* Egy keret van: a külső .auth-input. Az általános input:focus gyűrűje és a
   böngésző automatikus kitöltésének háttere a belső mezőn második keretet rajzolna. */
.auth-input input:focus {
  border: 0;
  box-shadow: none;
}

.auth-input input:-webkit-autofill {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-input input:autofill {
  box-shadow: 0 0 0 1000px #fff inset;
}

.auth-input input[type="password"] {
  font-size: 16px;
  letter-spacing: .22em;
}

.auth-password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #98a2b3;
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: 32px;
  min-height: 32px;
  padding: 0;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.auth-password-toggle:hover {
  color: #032f62;
}

.auth-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

.auth-remember {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 9px;
}

.auth-remember input {
  appearance: none;
  background: #fff;
  border: 1px solid #cfe0ef;
  border-radius: 6px;
  cursor: pointer;
  flex: none;
  height: 20px;
  margin: 0;
  min-height: 20px;
  min-width: 20px;
  padding: 0;
  position: relative;
  width: 20px;
}

.auth-remember input:checked {
  background: #032f62;
  border-color: #032f62;
}

.auth-remember input:checked::after {
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  height: 4px;
  left: 4px;
  position: absolute;
  top: 5px;
  transform: rotate(-45deg);
  width: 9px;
}

.auth-row a {
  color: #032f62;
  font-size: 13.5px;
  font-weight: 700;
}

.auth-submit {
  background: #032f62;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(3, 47, 98, .2);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  margin-top: 20px;
  min-height: 52px;
  width: 100%;
}

.auth-submit:hover {
  background: #0b3d7a;
}

.auth-note {
  align-items: flex-start;
  border-top: 1px solid #eef2f6;
  color: #64748b;
  display: flex;
  font-size: 12.5px;
  gap: 9px;
  margin: 22px 0 0;
  padding-top: 16px;
}

.auth-note svg {
  display: block;
  flex: none;
  margin-top: 1px;
}

.auth-flash {
  margin: 18px 32px 0;
}

.auth-footer {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #eef2f6;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  gap: 12px 18px;
  justify-content: space-between;
  padding: 16px 32px;
}

.auth-footer-left {
  align-items: center;
  display: flex;
  gap: 10px;
}

.auth-footer-left img {
  display: block;
  height: 20px;
  width: 20px;
}

.auth-footer-links {
  display: flex;
  gap: 18px;
}

.auth-footer a {
  color: #64748b;
  font-weight: 600;
}

/* Pagina de confidențialitate folosește același card, doar mai lat pentru text curent. */
.auth-card-wide {
  max-width: 680px;
}

.auth-card-wide h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 22px 0 6px;
}

.auth-card-wide p {
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.auth-list {
  color: #334155;
  display: grid;
  font-size: 14px;
  gap: 6px;
  line-height: 1.55;
  margin: 0;
  padding-left: 20px;
}

.auth-back {
  margin-top: 26px;
}

/* Paginile de resetare folosesc aceeași ramă, dar au un singur card. */
.auth-split-narrow {
  grid-template-columns: 1fr 0.85fr;
}

.auth-pitch-text {
  color: #334155;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 460px;
  position: relative;
}

.auth-split > .auth-card {
  align-self: center;
  justify-self: center;
  margin: 48px auto;
}

/* Câmp fără pictogramă și grupul parolei din paginile de resetare. */
.auth-field > input,
.auth-password {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  color: #111827;
  display: flex;
  font-family: inherit;
  font-size: 15px;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}

.auth-password {
  padding-right: 6px;
}

.auth-field > input:focus,
.auth-password:focus-within {
  border-color: #77b83b;
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .12);
  outline: none;
}

.auth-password input {
  background: transparent;
  border: 0;
  flex: 1;
  min-height: 0;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: .22em;
  min-width: 0;
  outline: none;
  padding: 0;
}

.auth-password input[type="text"] {
  letter-spacing: normal;
}

.auth-password .auth-password-toggle {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  width: auto;
  padding: 0 8px;
}

.auth-single {
  align-items: center;
  background: #f8fafc;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 620px;
  padding: 64px 24px;
}

@media (max-width: 980px) {
  .auth-body {
    padding: 0;
  }

  .rota-auth {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .auth-split {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .auth-pitch {
    padding: 40px 26px 34px;
  }

  .auth-pitch h1 {
    font-size: 32px;
    max-width: none;
  }

  .auth-points li {
    white-space: normal;
  }

  .auth-lockup {
    width: 260px;
  }

  .auth-form-panel {
    padding: 34px 22px 44px;
  }

  .auth-topbar {
    padding: 12px 18px;
  }

  .auth-brand-sep,
  .auth-brand-sub {
    display: none;
  }

  .auth-footer {
    padding: 16px 18px;
  }
}


/* ---------------------------------------------------------------------------
   Numărul liniei ca indicativ plin.
   Este reperul citit primul pe fiecare ecran, așa că devine o pastilă compactă
   în loc de text mare: se distinge instant de oră și de indicativul mașinii, iar
   lățimea minimă aliniază liniile cu una și cu două caractere sub aceeași axă.
   Culorile vin din token-uri, deci pastila se întoarce singură pe tema închisă.
   --------------------------------------------------------------------------- */
.dispatcher-live-route,
.dispatcher-indicative-table .dispatcher-route-cell strong,
.istoric-table .istoric-route strong {
  align-items: center;
  background: var(--primary);
  border-radius: 9px;
  color: var(--primary-contrast);
  display: inline-flex;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.1;
}

.dispatcher-live-route {
  font-size: 23px;
  min-width: 62px;
  padding: 7px 12px;
}

.dispatcher-indicative-table .dispatcher-route-cell strong,
.istoric-table .istoric-route strong {
  font-size: 1.05rem;
  min-width: 52px;
  padding: 5px 10px;
}

/* O cursă neefectuată se recunoaște după indicativ, nu doar după eticheta de stare. */
.dispatcher-live-departure:has(.status-not_operated) .dispatcher-live-route {
  background: var(--danger);
  color: var(--primary-contrast);
}

/* Capul de rând din Planul complet al zilei rămâne o celulă, nu o pastilă: se
   întinde pe toate programele liniei, iar un bloc plin pe atâtea rânduri ar
   apăsa tabelul. Primește doar aceeași familie de culoare. */
.dispatcher-day-plan-table .day-route-number {
  color: var(--primary-dark);
  font-weight: 800;
}


/* ---------------------------------------------------------------------------
   Bara de sus pe un singur rând.
   Înainte, navigarea, numele, notificările, meniul, ieșirea și ajutorul stăteau
   unul lângă altul și rupeau bara pe trei rânduri. Acum: marca la stânga,
   navigarea la mijloc cu pastilă pe pagina curentă, iar la dreapta două butoane
   rotunde și cartela utilizatorului, care ține meniul și ieșirea.
   --------------------------------------------------------------------------- */
.topbar {
  flex-wrap: nowrap;
  gap: 10px 16px;
}

.topbar .brand {
  flex: none;
}

.topbar .nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
  min-width: 0;
  padding-left: 10px;
}

.topbar .nav a {
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 8px 15px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .nav a:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.topbar .nav a.active {
  background: #eff6fd;
  color: #032f62;
  font-weight: 700;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex: none;
  gap: 8px;
}

.icon-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 1rem;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: relative;
  text-decoration: none;
  width: 40px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Numărul de notificări necitite stă pe buton, nu lângă el. */
.icon-button b {
  background: var(--danger);
  border-radius: 999px;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  padding: 3px 5px;
  position: absolute;
  right: -3px;
  text-align: center;
  top: -3px;
}

.user-menu > summary {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  list-style: none;
  padding: 5px 12px 5px 5px;
}

.user-menu > summary::-webkit-details-marker { display: none; }
/* A nyilat a .user-chip-caret adja; a régi summary::after nyíl duplázná. */
.user-menu > summary::after { content: none; }

.user-menu > summary:hover,
.user-menu > summary:focus-visible {
  border-color: var(--primary);
}

.user-chip-avatar {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: var(--primary-contrast);
  display: inline-flex;
  flex: none;
  font-size: .82rem;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  letter-spacing: .02em;
  width: 32px;
}

.user-chip-text {
  display: grid;
  line-height: 1.2;
  max-width: 170px;
}

.user-chip-text strong {
  font-size: .92rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-text small {
  color: var(--muted);
  font-size: .76rem;
}

.user-chip-caret {
  color: var(--muted);
  font-size: .7rem;
}

.menu-logout {
  border-top: 1px solid var(--border);
  color: var(--danger-dark);
  font-weight: 600;
  margin-top: 4px;
  padding-top: 10px;
}

/* Ajutorul de pagină este acum închis implicit și se deschide din butonul "?". */
.context-help {
  margin-bottom: 16px;
}

@media (max-width: 1040px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar .nav {
    order: 3;
    padding-left: 0;
    width: 100%;
  }

  .user-chip-text {
    display: none;
  }

  .user-menu > summary {
    padding: 5px;
  }
}


/* ---------------------------------------------------------------------------
   Capul de pagină: starea și momentul deasupra, titlul mare, iar comutarea
   între cele două vederi la dreapta, într-un singur control.
   --------------------------------------------------------------------------- */
.page-head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-head-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-head-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .92rem;
  gap: 10px;
  margin: 0;
}

.page-head h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.08;
  margin: 0;
}

.page-head .muted {
  margin: 0;
}

.status-pill {
  align-items: center;
  background: var(--highlight);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: .84rem;
  font-weight: 600;
  gap: 7px;
  padding: 4px 12px 4px 10px;
}

.status-pill-dot {
  background: var(--success);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

/* Comutator segmentat: două stări, una singură activă, fără să pară două butoane. */
.segmented {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 4px;
}

.segmented a,
.segmented button {
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 9px 18px;
  text-decoration: none;
  white-space: nowrap;
}

.segmented a:hover,
.segmented button:hover {
  color: var(--primary-dark);
}

.segmented a.active,
.segmented button.active {
  background: var(--primary);
  color: var(--primary-contrast);
}

/* Varianta din bara de filtre: aceeași formă, la scara unui control de listă. */
.segmented.segmented-compact button {
  font-size: .85rem;
  padding: 7px 14px;
}

@media (max-width: 700px) {
  .segmented {
    width: 100%;
  }

  .segmented a,
  .segmented button {
    flex: 1 1 0;
    padding: 9px 10px;
    text-align: center;
  }
}


/* ---------------------------------------------------------------------------
   Rândul unei plecări.
   Un rând = o linie de text: ora, indicativul liniei, capătul spre care pleacă
   și sub el autobuzul, la dreapta starea și săgeata. Operațiile nu stau afară;
   se deschid sub rând, la click pe rând. Marginea colorată din stânga rămâne
   singurul semnal permanent de stare.
   --------------------------------------------------------------------------- */
.dispatcher-live-departure {
  border-left-width: 4px;
  display: block;
  overflow: hidden;
  padding: 0;
}

.departure-summary {
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0 14px;
  grid-template-columns: 58px 52px minmax(0, 1fr) auto 16px;
  padding: 9px 14px;
  text-align: left;
  width: 100%;
}

.departure-summary:hover {
  background: var(--surface-alt);
}

.departure-summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.departure-time {
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* Pastila liniei se micșorează în rând: aici sprijină ora, nu concurează cu ea. */
.departure-summary .dispatcher-live-route {
  font-size: 17px;
  min-width: 46px;
  padding: 5px 9px;
}

.departure-titles {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.departure-destination,
.departure-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rândul de plecare din machetă: destinația 14/800, linia de sub ea 12.5/600. */
.departure-destination {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.departure-sub {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.departure-sub .dispatcher-live-vehicle {
  color: var(--text);
  font-size: inherit;
  font-weight: 600;
}

.departure-sub .dispatcher-live-vehicle.missing {
  color: var(--muted);
  font-size: inherit;
}

.departure-caret {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  text-align: center;
  transition: transform .15s ease;
}

.dispatcher-live-departure.is-open {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.dispatcher-live-departure.is-open .departure-caret {
  transform: rotate(90deg);
}

.dispatcher-plan-status {
  border-radius: 999px;
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Panoul deschis: aceleași operații ca înainte, doar că sub rând. */
.departure-panel {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.departure-panel-meta {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0;
}

.departure-panel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.departure-panel-actions .dispatcher-confirm-form {
  display: contents;
}

.departure-panel .dispatcher-confirm-button,
.departure-panel .dispatcher-not-operated-button {
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  height: 38px;
  padding: 0 14px;
  white-space: nowrap;
  width: auto;
}

.departure-panel .button.compact-button {
  font-size: .85rem;
  min-height: 38px;
  padding: 0 14px;
}

.departure-panel-actions [data-change-result-message] {
  flex-basis: 100%;
}

/* Panourile interioare se deschid tot din butoane, deci titlurile lor sunt de prisos. */
.departure-panel > details > summary {
  display: none;
}

.departure-panel > details {
  margin: 0;
}

@media (max-width: 760px) {
  .departure-summary {
    grid-template-columns: 54px 48px minmax(0, 1fr) 16px;
    row-gap: 5px;
  }

  .departure-time { grid-area: 1 / 1; }
  .departure-summary .dispatcher-live-route { grid-area: 1 / 2; }
  .departure-titles { grid-area: 1 / 3; }
  .departure-caret { grid-area: 1 / 4; }

  .departure-summary .dispatcher-plan-status {
    grid-area: 2 / 3 / 3 / 5;
    justify-self: start;
  }
}



/* ---------------------------------------------------------------------------
   Coloana din dreapta a Dispeceratului, plăcile Panoului și stările goale.
   --------------------------------------------------------------------------- */
/* Starea de pornire a Dispeceratului, după macheta 3b: sub selector se spune ce urmează,
   iar cele trei capete folosite recent se aleg dintr-o apăsare. */
.dispatcher-recent { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }

.dispatcher-recent-label {
  color: var(--muted); display: block; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; margin-bottom: 10px; text-transform: uppercase;
}

.dispatcher-recent-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.dispatcher-recent-chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  color: var(--primary); cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 700; height: 40px; max-width: 100%; overflow: hidden; padding: 0 16px;
  text-overflow: ellipsis; white-space: nowrap; width: 236px;
}

.dispatcher-recent-chip:hover { border-color: var(--primary); }

.dispatcher-empty {
  align-items: center; display: flex; flex-direction: column;
  padding: 48px 24px 52px; text-align: center;
}

.dispatcher-empty-icon {
  align-items: center; background: var(--primary); border-radius: 50%;
  display: inline-flex; height: 68px; justify-content: center; width: 68px;
}

.dispatcher-empty h2 { font-size: 19px; font-weight: 800; margin: 18px 0 0; }

.dispatcher-empty p { color: var(--muted); font-size: 14px; margin: 8px 0 0; max-width: 46ch; }

.dispatcher-current-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1180px) {
  .dispatcher-current-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.dispatcher-side {
  display: grid;
  gap: 14px;
}

.side-card {
  margin: 0;
  padding: 18px;
}

.side-card h2 {
  font-size: 1.15rem;
  margin: 0 0 12px;
}

.side-card .muted {
  font-size: .86rem;
  margin: 0 0 12px;
}

.side-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.side-facts > div {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.side-facts dt {
  color: var(--muted);
  font-size: .88rem;
}

.side-facts dd {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.side-actions {
  background: var(--highlight);
}

.side-action {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 600;
  gap: 11px;
  margin-bottom: 8px;
  padding: 13px 14px;
  text-align: left;
  width: 100%;
}

.side-action:last-child { margin-bottom: 0; }

.side-action:hover:not(:disabled),
.side-action:focus-visible {
  border-color: var(--primary);
}

.side-action:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .6;
}

/* Pictograma stă într-un pătrat rotunjit, ca în machetă: dă butonului un reper
   vizual la aceeași înălțime cu textul, fără să ceară un set de icoane. */
.side-action-icon {
  align-items: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border-radius: 10px;
  color: var(--primary);
  display: inline-flex;
  flex: none;
  font-size: 1.05rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.side-action:disabled .side-action-icon {
  background: var(--surface-alt);
  color: var(--muted);
}

.side-action-caret {
  color: var(--muted);
  margin-left: auto;
}

.side-note {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.45;
  margin: 0;
  padding: 0 4px;
}

/* Rândul evidențiat după o acțiune rapidă: se stinge singur, nu lasă stare în urmă. */
.dispatcher-live-departure.is-highlighted {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
  transition: box-shadow .2s ease;
}

.stat-tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 12px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.stat-tile-label {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
}

.stat-tile-value {
  color: var(--primary-dark);
  font-size: 2.3rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.05;
}

.stat-tile-sub {
  color: var(--muted);
  font-size: .84rem;
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.stat-chips span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem;
  padding: 7px 14px;
}

.stat-chips b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.progress-card .progress-row {
  display: grid;
  gap: 5px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.progress-card .progress-row:last-child { margin-bottom: 0; }

.progress-card .progress-row b {
  font-variant-numeric: tabular-nums;
}

.progress-track {
  background: var(--surface-soft);
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
}

.progress-track > span {
  background: var(--primary);
  border-radius: 999px;
  display: block;
  height: 100%;
}

/* O listă goală care spune de ce este goală, în loc de un rând șters. */
.empty-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 34px 20px;
  text-align: center;
}

.empty-state-mark {
  align-items: center;
  background: var(--highlight);
  border-radius: 50%;
  color: var(--success);
  display: inline-flex;
  font-size: 1.7rem;
  height: 62px;
  justify-content: center;
  width: 62px;
}

.empty-state strong {
  font-size: 1.2rem;
}

.empty-state p {
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}

.empty-state .button {
  margin-top: 6px;
}


/* ---------------------------------------------------------------------------
   Panou operațional: cifrele zilei într-un singur panou cu titlu, iar progresul
   pe o coloană laterală, ca în machetă. Coloana cade sub conținut pe ecrane
   înguste, deci nu apare nicio bară de derulare orizontală.
   --------------------------------------------------------------------------- */
.panou-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1180px) {
  .panou-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.panou-main,
.panou-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panou-main > section,
.panou-main > div,
.panou-side > section {
  margin: 0;
}

.panou-side .progress-card {
  padding: 18px;
}

.panou-side .progress-card h2 {
  font-size: 1.15rem;
  margin: 0 0 14px;
}

.panou-side .progress-card .muted {
  font-size: .82rem;
  margin: 4px 0 0;
}

/* Câmpul de căutare a capătului de linie: lupa stă în câmp, ca în machetă. */
.field-icon-wrap {
  display: block;
  position: relative;
}

.field-icon {
  color: var(--muted);
  font-size: 1.15rem;
  left: 12px;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.field-icon-wrap > select,
.field-icon-wrap > input {
  padding-left: 34px;
  width: 100%;
}


/* ---------------------------------------------------------------------------
   Curse școlare: jelölés a Plecări curente sorában, összecsukható sor a Planul
   complet tetején, és a busz-beosztás táblázata a Planificări oldalon.
   --------------------------------------------------------------------------- */
.departure-school-badge {
  background: color-mix(in srgb, var(--warning) 28%, var(--surface));
  border-radius: 999px;
  color: var(--warning-ink);
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-right: 4px;
  padding: 1px 8px;
  text-transform: uppercase;
  vertical-align: 2px;
}

.dispatcher-school-block {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--border));
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 8px 12px;
}

.dispatcher-school-block > summary {
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .95rem;
}

.dispatcher-school-block > summary [data-school-count] {
  color: var(--muted);
  font-size: .85rem;
}

.dispatcher-school-departures {
  margin-top: 10px;
}

.dispatcher-school-route {
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
}

.dispatcher-school-planning .dispatcher-school-table td {
  vertical-align: middle;
}


/* ── Pregătire plan săptămânal — javítási lista A/C/D/E ─────────────────────
   Összecsukható szekciók, TOTAL oszlop, elkülönített hétvége, és a piros
   „Blocat" helyett csíkozott, nem kattintható cella az okkal. Piros szín
   ebben a modulban nem használható. */

.prep-fold { margin-top: 12px; }
.prep-fold-summary {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  list-style: none;
  min-height: 44px;
  padding: 0 16px;
}
.prep-fold-summary::-webkit-details-marker { display: none; }
.prep-fold-summary::marker { content: ''; }
.prep-fold-summary:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .2);
  outline: none;
}
.prep-fold-summary--warn {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--warning-ink);
}
.prep-fold[open] .prep-fold-summary { margin-bottom: 12px; }
.prep-note--ok { color: var(--ink-soft); }
.prep-note--warn {
  background: var(--warning);
  border-radius: var(--radius);
  color: var(--warning-ink);
  font-weight: 600;
  margin: 0 0 12px;
  padding: 10px 14px;
}

/* A világos hátteret csak az adatcellákra tesszük: a fejléc sötét, ott a
   világos háttér olvashatatlanná tenné a feliratot. A fejlécet csak a
   TOTAL oszlop bal szegélye különíti el. */
.prep-table td.prep-weekend { background: var(--surface-alt); }
.prep-table td.prep-total {
  background: var(--surface-soft);
  white-space: nowrap;
}
.prep-table th.prep-total,
.prep-table td.prep-total { border-left: 2px solid var(--border); }
.prep-missing { color: var(--warning-ink); font-weight: 700; }

.prep-cell--blocked {
  align-items: center;
  background: repeating-linear-gradient(45deg, var(--surface-soft) 0 6px, var(--border) 6px 12px);
  border: 1px dashed var(--muted);
  border-radius: 6px;
  color: var(--text);
  cursor: not-allowed;
  display: flex;
  font-size: 12.5px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
}

/* ── Pregătire plan săptămânal — javítási lista A/B ─────────────────────────
   Kontextussor a KPI-kártyák helyett, bal oldali lépéssáv, és egyetlen
   mentősáv a lap alján a hét külön mentőgomb helyett. */

.prep-context {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.prep-context-day { color: var(--ink-soft); font-size: 15px; font-weight: 700; }
.prep-badge--warn {
  background: var(--warning);
  border-radius: 999px;
  color: var(--warning-ink);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
}
.prep-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
}

.prep-layout { align-items: start; display: grid; gap: 24px; grid-template-columns: 260px minmax(0, 1fr); }
.prep-main { min-width: 0; }

.prep-steps {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  position: sticky;
  top: 16px;
}
.prep-steplist { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.prep-step {
  align-items: center;
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  padding: 12px;
}
.prep-step.is-active { background: var(--surface-soft); }
.prep-step-mark {
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  display: flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}
.prep-step.is-done .prep-step-mark {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary-contrast);
}
.prep-step.is-warn .prep-step-mark {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--warning-ink);
}
.prep-step.is-active .prep-step-mark { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.prep-step-body { display: grid; gap: 2px; min-width: 0; }
.prep-step-body strong { color: var(--text); font-size: 13px; font-weight: 700; }
.prep-step-body small { color: var(--muted); font-size: 13px; }
.prep-progress {
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 0;
  padding-top: 12px;
}

.savebar {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  margin: 24px 150px 0 auto;
  padding: 10px 20px;
  position: sticky;
  width: fit-content;
  z-index: 20;
}
.savebar-dot { color: var(--accent); font-size: 15px; }
.savebar-state { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.savebar-state[data-state="saving"] { color: var(--muted); }
.savebar-state[data-state="error"] { color: var(--warning-ink); }
.savebar-state[data-state="error"] ~ .savebar-dot,
.savebar:has(.savebar-state[data-state="error"]) .savebar-dot { color: var(--warning); }

@media (max-width: 980px) {
  .prep-layout { grid-template-columns: minmax(0, 1fr); }
  .prep-steps { position: static; }
  .savebar { bottom: 84px; margin-right: 16px; padding: 9px 16px; }
}

/* ── Pregătire plan săptămânal — javítási lista F ───────────────────────────
   Az autóbuszok vonalanként állnak, nem buszonként: 38 sor egy listában,
   lapozás nélkül, chipekkel és keresős hozzáadással. */

.veh-board { display: grid; gap: 16px; }

.veh-summary { display: flex; flex-wrap: wrap; gap: 12px; }
.veh-stat {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
}
.veh-stat strong { font-weight: 800; }
.veh-stat--warn { background: var(--warning); border-color: var(--warning); color: var(--warning-ink); }

.veh-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.veh-filter button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
}
.veh-filter button.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.veh-filter button:focus-visible { box-shadow: 0 0 0 3px rgba(119, 184, 59, .3); outline: none; }

.veh-lines { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.veh-line {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(140px, 1fr) fit-content(40%) auto auto;
  padding: 8px 14px;
}
.veh-line-no {
  background: var(--primary);
  border-radius: 8px;
  color: var(--primary-contrast);
  font-size: 15px;
  font-weight: 800;
  padding: 6px 0;
  text-align: center;
}
.veh-line-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.veh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.veh-chip {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-height: 32px;
  padding: 0 6px 0 14px;
}
.veh-chip-x {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}
.veh-chip-x:hover { background: var(--surface-alt); color: var(--text); }
.veh-add {
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}
.veh-cover { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.veh-cover strong { color: var(--text); font-weight: 800; }

.veh-pick {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px;
}
.veh-pick-search {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  min-height: 44px;
  padding: 0 14px;
}
.veh-pick-search:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(119, 184, 59, .12); outline: none; }
.veh-pick-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; max-height: 220px; overflow-y: auto; padding: 0; }
.veh-pick-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
}
.veh-pick-item:hover { border-color: var(--primary); color: var(--primary); }
.veh-pick-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

.veh-reserve { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 780px) {
  .veh-line { grid-template-columns: 56px minmax(0, 1fr); }
  .veh-chips, .veh-add, .veh-cover { grid-column: 1 / -1; }
}

main.container { padding-bottom: 96px; }


/* ── Pregătire plan săptămânal — machetă aprobată 2026-09-19 ────────────────
   Trei tonuri: antetul este cel mai închis (categorie), capul rândului mai
   deschis (tot categorie), datele rămân albe. Forma rămâne rotunjită peste
   tot — niciun bloc cu colțuri drepte. Tonurile vin din variabilele temei,
   deci funcționează la fel în toate cele trei teme. */
.prep-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-wrap.prep-wrap { border: 0; border-radius: 0; }

/* Antetul rămâne albastru, ca în restul aplicației, dar nu mai e un bloc cu
   colțuri drepte: e o bară rotunjită așezată peste rânduri. */
.prep-table thead th {
  background: var(--primary);
  border-bottom: 0;
  color: var(--primary-contrast);
  font-size: 11.5px;
  letter-spacing: .09em;
}
.prep-table thead th:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.prep-table thead th:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.prep-table thead th.prep-weekend { color: rgba(255, 255, 255, .62); }
.theme-dark .prep-table thead th.prep-weekend { color: rgba(16, 21, 31, .58); }
.prep-table thead th small { color: inherit; font-weight: 600; letter-spacing: 0; opacity: .72; }
.prep-table thead th.prep-total { border-left: 2px solid rgba(255, 255, 255, .28); }
.theme-dark .prep-table thead th.prep-total { border-left-color: rgba(16, 21, 31, .28); }
/* Aer între bara albastră și primul rând, ca bara să stea liber. */
.prep-table tbody tr:first-child > * { padding-top: 14px; }
.prep-table tbody tr:last-child > * { border-bottom: 0; }
.prep-table tbody th {
  background: var(--prep-rowhead, var(--surface-alt));
  white-space: nowrap;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.prep-table tbody td { background: var(--surface); }

/* Antetul unei secțiuni: număr, titlu, eticheta de stare. */
.prep-head { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; }
.prep-head h2 { flex-grow: 1; margin: 0; min-width: 0; }
.prep-head-nr {
  align-items: center;
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.prep-state {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  white-space: nowrap;
}
.prep-state--done { background: #eef8e3; border-color: #cfe8ac; color: #3c5c15; }
.prep-state--warn { background: var(--warning); border-color: var(--warning); color: var(--warning-ink); }
.prep-state--idle { background: var(--surface); color: var(--muted); }
.theme-dark .prep-state--done { background: #22331a; border-color: #40632a; color: #cfe8ac; }

/* Bara de progres din stânga. */
.prep-bar-title { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; margin: 0 0 8px; text-transform: uppercase; }
.prep-bar { background: var(--surface-alt); border-radius: 999px; height: 6px; overflow: hidden; }
.prep-bar span { background: var(--accent); border-radius: 999px; display: block; height: 6px; }
.prep-bar-label { color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 8px 0 14px; }


/* Cât mai lipsește: semnul galben stă sub câmpul în care scrieți, nu într-un
   alt rând. Rândul „Planificați” devine verde când ziua e acoperită. */
.prep-lack {
  background: var(--warning);
  border-radius: 999px;
  color: var(--warning-ink);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin: 5px auto 0;
  max-width: 5.5rem;
  padding: 2px 0;
  text-align: center;
}
.prep-table td.prep-ok,
.prep-table td.prep-ok strong { color: #3c5c15; }
.theme-dark .prep-table td.prep-ok,
.theme-dark .prep-table td.prep-ok strong { color: #a2c73b; }

/* ── Schimbul unei zile: un singur buton colorat ───────────────────────────
   O săptămână se citește ca un tipar de culori, nu ca 28 de liste mici.
   Albastru = dimineața, galben = după-amiaza, alb = liber, gri punctat =
   blocat. Formele rămân rotunjite, la fel ca restul ecranului. */
.prep-shift {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  min-width: 106px;
  padding: 0 10px;
  white-space: nowrap;
  width: 100%;
}
.prep-shift--static { cursor: default; }
.prep-shift--off { background: var(--surface); color: var(--muted); }
.prep-shift--morning { background: var(--surface-soft); border-color: var(--border); color: var(--primary); }
.prep-shift--afternoon { background: #fff6cc; border-color: #efd97a; color: var(--warning-ink); }
.theme-dark .prep-shift--afternoon { background: #3a3108; border-color: #6b5c13; color: #ffe79a; }
.prep-shift:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .25);
  outline: none;
}

.prep-legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12.5px;
  gap: 18px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.prep-legend li { align-items: center; display: flex; gap: 8px; }
.prep-legend-mark {
  border: 1px solid var(--border);
  border-radius: 5px;
  display: inline-block;
  height: 16px;
  width: 24px;
}
.prep-legend-mark--blocked {
  background: repeating-linear-gradient(45deg, var(--surface-soft) 0 6px, var(--border) 6px 12px);
  border-style: dashed;
  border-color: var(--muted);
}

/* Coloanele zilelor: butonul ocupă celula, deci marginile interioare pot fi
   mai mici — altfel tabelul depășește cardul și apare o bară de derulare. */
.prep-table td.prep-shift-cell { padding-left: 4px; padding-right: 4px; }

/* ── Telefon: tabelul devine o listă de cartonașe ──────────────────────────
   Sub 720 px un tabel de 8 coloane nu se poate citi. Fiecare rând devine un
   cartonaș: numele șoferului sus, iar sub el zilele una sub alta, fiecare cu
   numele ei. Câmpurile rămân aceleași, deci salvarea nu se schimbă. */
@media (max-width: 720px) {
  .prep-table,
  .prep-table tbody,
  .prep-table tr,
  .prep-table td,
  .prep-table tbody th { display: block; width: auto; }
  .prep-table thead { display: none; }
  .table-wrap.prep-wrap { border: 0; border-radius: 0; }
  .prep-table tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
  }
  .prep-table tbody th {
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    padding: 12px 14px;
  }
  .prep-table tbody td {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    padding: 8px 14px;
  }
  .prep-table tbody tr td:last-child { border-bottom: 0; }
  .prep-table tbody td::before {
    color: var(--ink-soft);
    content: attr(data-day);
    flex: 0 0 104px;
    font-size: 12.5px;
    font-weight: 700;
  }
  .prep-table tbody td[data-label]::before { content: attr(data-label); flex-basis: 132px; }
  .prep-table tbody td.prep-cell-empty { display: none; }
  .prep-table tbody td.prep-rowname {
    background: var(--prep-rowhead, var(--surface-alt));
    font-size: 14px;
    font-weight: 700;
  }
  .prep-table td.prep-total { border-left: 0; }
  .prep-shift, .prep-cell--blocked { flex-grow: 1; width: auto; }
  .prep-lack { margin-left: 0; }
  .compact-number { width: 100%; }

  /* Pașii se rostogolesc pe orizontală, ca o bandă de etichete. */
  .prep-steplist {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .prep-step { flex: 0 0 auto; padding: 8px 12px; }
  .prep-step-body strong { font-size: 12.5px; }
  .prep-step-body small { font-size: 11.5px; }
}

/* Alegerea șoferului apare numai pe telefon. */
.prep-driver-pick { display: none; }
@media (max-width: 720px) {
  .prep-driver-pick {
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    letter-spacing: .08em;
    margin-bottom: 12px;
    text-transform: uppercase;
  }
  .prep-driver-pick select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    height: 46px;
    letter-spacing: 0;
    padding: 0 12px;
    text-transform: none;
    width: 100%;
  }
}

/* Pe telefon numele șoferului e deja în lista de alegere de deasupra, deci
   nu-l mai repetăm și în capul cartonașului. */
@media (max-width: 720px) {
  [data-driver-table] tbody th { display: none; }
  [data-driver-table] tbody tr td:first-child { border-radius: var(--radius) var(--radius) 0 0; }
}

/* ── Portalul angajatului: /concediu (K1, K2) ──────────────────────────────
   Ecranele se folosesc pe telefon, de obicei în grabă, înainte sau după tură.
   De aceea: o coloană, ținte de apăsare de cel puțin 52 px, text de 16 px.
   Roșu nu apare nicăieri; respingerea este antracit. */
.cc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 auto;
  max-width: 480px;
  padding-bottom: 32px;
  width: 100%;
}
.cc-head { display: flex; flex-direction: column; gap: 5px; }
.cc-head h1 { font-size: 23px; letter-spacing: -.02em; margin: 0; }
.cc-head .muted { font-size: 13.5px; margin: 0; }

.cc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.cc-card-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  margin: 0;
  text-transform: uppercase;
}

.cc-field { display: flex; flex-direction: column; gap: 7px; }
.cc-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.cc-field input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 52px;
  padding: 0 14px;
  width: 100%;
}
.cc-field input:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(119, 184, 59, .22);
  outline: none;
}

.cc-button {
  align-items: center;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  text-decoration: none;
  width: 100%;
}
.cc-button--main { background: var(--primary); border: 1px solid var(--primary); color: var(--primary-contrast); }
.cc-button--second { background: var(--surface); border: 1px solid var(--primary); color: var(--primary); }
.cc-button--quiet { background: var(--surface); border: 1px solid var(--border); color: var(--ink-soft); }
.cc-button--warn { background: var(--warning); border: 1px solid var(--warning); color: var(--warning-ink); }

.cc-error {
  align-items: flex-start;
  background: #e8ecf1;
  border: 1px solid #c9d3de;
  border-radius: var(--radius);
  color: #1f2937;
  display: flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.45;
  margin: 0;
  padding: 12px 14px;
}
.theme-dark .cc-error { background: #232c3a; border-color: #3a475a; color: #e7edf5; }
.cc-note { border-radius: var(--radius); font-size: 13.5px; line-height: 1.5; margin: 0; padding: 12px 14px; }
.cc-note--info { background: var(--surface-soft); border: 1px solid var(--border); color: var(--ink-soft); }
.cc-note--warn { background: var(--warning); color: var(--warning-ink); font-weight: 700; }
.cc-link { align-self: center; font-size: 15px; font-weight: 700; padding: 12px; text-decoration: none; }
.cc-foot { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 18px 0 0; text-align: center; }
.cc-link-button {
  background: none; border: 0; color: var(--ink-soft); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; padding: 12px; text-decoration: underline;
}
.cc-logout { display: flex; justify-content: center; }

.cc-balance { border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.cc-balance--now { background: var(--surface-soft); }
.cc-balance-year { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.cc-balance-row { display: flex; gap: 8px; }
.cc-balance-row > span { display: flex; flex: 1 1 0; flex-direction: column; gap: 3px; min-width: 0; }
.cc-balance-row small { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cc-balance-row strong { font-size: 17px; font-weight: 800; }
.cc-pending { color: var(--warning-ink); }
.theme-dark .cc-pending { color: #ffe79a; }
.cc-available { color: #3c5c15; }
.theme-dark .cc-available { color: #a2c73b; }

.cc-request { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.cc-request-title { color: var(--text); font-size: 16px; font-weight: 800; }
.cc-request-meta { color: var(--ink-soft); font-size: 13.5px; }
.cc-request-note { color: var(--muted); font-size: 12.5px; }

.cc-list { display: flex; flex-direction: column; }
.cc-row {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  padding: 12px 0;
  text-decoration: none;
}
.cc-row:last-child { border-bottom: 0; }
.cc-row-main { display: flex; flex-direction: column; flex-grow: 1; gap: 3px; min-width: 0; }
.cc-row-main strong { color: var(--text); font-size: 14.5px; font-weight: 700; }
.cc-row-main small { color: var(--muted); font-size: 12.5px; }

.cc-st {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12.5px;
  font-weight: 700;
  gap: 6px;
  line-height: 1.2;
  padding: 6px 12px;
  white-space: nowrap;
}
.cc-st--blue { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.cc-st--greenline { background: var(--surface); border-color: var(--accent); color: #3c5c15; }
.cc-st--green { background: #eef8e3; border-color: #cfe8ac; color: #3c5c15; }
.cc-st--dark { background: #e8ecf1; border-color: #c9d3de; color: #1f2937; }
.cc-st--yellow { background: var(--warning); border-color: var(--warning); color: var(--warning-ink); }
.cc-st--grey { background: var(--surface-alt); border-color: var(--border); color: var(--muted); }
.cc-st-dot { background: var(--warning); border-radius: 999px; height: 8px; width: 8px; }
.cc-st-mark { font-size: 11px; font-weight: 800; }
.theme-dark .cc-st--greenline { color: #a2c73b; }
.theme-dark .cc-st--green { background: #22331a; border-color: #40632a; color: #cfe8ac; }
.theme-dark .cc-st--dark { background: #232c3a; border-color: #3a475a; color: #e7edf5; }

@media (min-width: 560px) {
  .cc { padding-top: 8px; }
}

/* Cererea: alegere de tip, sumar, textul cererii, confirmare, parcurs. */
.cc-choice {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
}
.cc-choice.is-on { background: var(--surface-soft); border-color: var(--primary); color: var(--primary); }
.cc-choice input { accent-color: var(--primary); height: 20px; margin: 0; width: 20px; }

.cc-sum {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}
.cc-sum-main { font-size: 20px; font-weight: 800; }
.cc-sum > span { display: flex; gap: 12px; justify-content: space-between; line-height: 1.5; }
.cc-sum em { color: var(--muted); font-size: 13.5px; font-style: normal; }
.cc-sum b { font-size: 13.5px; font-weight: 700; text-align: right; }

.cc-paper { font-size: 15px; line-height: 1.65; margin: 0; }
.cc-paper--note { color: var(--ink-soft); font-size: 14px; }

.cc-sent { align-items: center; display: flex; flex-direction: column; gap: 12px; padding-top: 12px; text-align: center; }
.cc-sent h1 { font-size: 22px; margin: 0; }
.cc-sent p { color: var(--ink-soft); font-size: 15px; line-height: 1.5; margin: 0; }
.cc-sent-mark {
  align-items: center;
  background: #eef8e3;
  border: 1px solid #cfe8ac;
  border-radius: 999px;
  color: #3c5c15;
  display: inline-flex;
  font-size: 26px;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.theme-dark .cc-sent-mark { background: #22331a; border-color: #40632a; color: #cfe8ac; }

.cc-time { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.cc-time li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.cc-time li:last-child { padding-bottom: 0; }
.cc-time li::after {
  background: var(--border);
  bottom: -6px;
  content: '';
  left: 12.5px;
  position: absolute;
  top: 26px;
  width: 1.5px;
}
.cc-time li:last-child::after { display: none; }
.cc-time-mark {
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
  z-index: 1;
}
.cc-time .is-done .cc-time-mark { background: var(--accent); border-color: var(--accent); color: #20340a; }
.cc-time .is-stopped .cc-time-mark { background: #e8ecf1; border-color: #c9d3de; color: #1f2937; }
.cc-time .is-next .cc-time-mark { background: var(--primary); border: 4px solid var(--surface-soft); }
.cc-time-body { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.cc-time-body strong { font-size: 14.5px; font-weight: 700; }
.cc-time .is-next .cc-time-body strong { font-weight: 800; }
.cc-time-body small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
a.cc-button, a.cc-button:hover { text-decoration: none; }

/* ── Setări concedii ───────────────────────────────────────────────────────
   Egy dolgozó = egy fișă. A lapon minden kártyának van címe és egysoros
   magyarázata, a táblák maguktól mentődnek, a keretet egy helyen írjuk be.
   A táblafej ugyanaz a rotunjit, sötétkék sáv, mint a heti terven. */

.ls-card { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.ls-card-head {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}
.ls-card-head > div { flex: 1 1 260px; min-width: 0; }
.ls-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.ls-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.ls-foot { color: var(--muted); font-size: 13px; margin: 0; }
.ls-empty { color: var(--muted); font-size: 14px; margin: 0; }
.ls-label { color: var(--ink-soft); display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ls-note { color: var(--muted); display: block; font-size: 12.5px; font-weight: 600; margin-top: 3px; }

.ls-defaults { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ls-defaults label { display: block; }
.ls-defaults input[type="number"], .ls-defaults input[type="email"] { width: 100%; }
.ls-defaults .checkbox-line { align-self: center; }

/* „Adaugă grup”: a gomb nyitja a mezőt, JavaScript nélkül is. */
.ls-add { position: relative; }
.ls-add > summary { cursor: pointer; list-style: none; }
.ls-add > summary::-webkit-details-marker { display: none; }
.ls-add-form { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ls-add-form input[type="text"], .ls-add-form select { min-width: 220px; }

/* Tábla — ugyanaz a formanyelv, mint a heti terven. */
.table-wrap.ls-wrap { border: 0; border-radius: 0; }
.ls-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.ls-table thead th {
  background: var(--primary);
  border-bottom: 0;
  color: var(--primary-contrast);
  font-size: 11.5px;
  letter-spacing: .09em;
}
.ls-table thead th:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.ls-table thead th:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.ls-table tbody tr:first-child > * { padding-top: 14px; }
.ls-table tbody tr:last-child > * { border-bottom: 0; }
.ls-table tbody td { background: var(--surface); vertical-align: middle; }
.ls-table tbody tr + tr > td { border-top: 1px solid var(--border); }
.ls-table select { min-width: 150px; width: 100%; }
.ls-implicit { color: var(--muted); font-weight: 700; white-space: nowrap; }
.ls-implicit small { font-weight: 600; }
.ls-exceptions { white-space: nowrap; }
.ls-exceptions a { color: var(--primary); font-weight: 700; text-decoration: none; }
.ls-action { text-align: right; white-space: nowrap; }
.ls-action .button { padding: 8px 14px; }

/* A hiányos sor sárga: enélkül négy sorban állt „–” anélkül, hogy baj lett volna. */
.ls-table tbody tr.ls-row--todo > td { background: #fff9e0; }
.theme-dark .ls-table tbody tr.ls-row--todo > td { background: #3a3417; }

.ls-warn {
  background: var(--warning);
  border-radius: var(--radius);
  color: var(--warning-ink);
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
  padding: 11px 16px;
}
.ls-warn span {
  background: var(--warning-ink);
  border-radius: 999px;
  color: var(--warning);
  display: inline-block;
  font-size: 12px;
  height: 18px;
  line-height: 18px;
  margin-right: 8px;
  text-align: center;
  width: 18px;
}

/* Év és szűrők. */
.ls-year { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; font-weight: 800; }
.ls-year-step {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  text-decoration: none;
  width: 32px;
}
.ls-year-step:hover { background: var(--surface-soft); }

.ls-filters { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.ls-search { flex: 1 1 220px; max-width: 320px; }
.ls-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 15px;
  text-decoration: none;
  white-space: nowrap;
}
.ls-chip b { color: var(--muted); margin-left: 4px; }
.ls-chip--on { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.ls-chip--on b { color: inherit; opacity: .75; }

/* A fișă szerkesztője. */
.ls-drawer { border-color: var(--primary); }
.ls-close { color: var(--muted); font-size: 18px; line-height: 1; text-decoration: none; }
.ls-form { display: grid; gap: 14px; }
.ls-block { font-size: 13px; font-weight: 800; letter-spacing: .06em; margin: 6px 0 0; text-transform: uppercase; color: var(--muted); }
.ls-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* A napok két oszlopban állnak, mint a terven: a bifa így a két mező alatt
   fut végig, nem lóg ki a sor közepére. */
.ls-grid--days { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.ls-grid label { display: block; }
.ls-grid input, .ls-grid select { width: 100%; }
/* A bifa átér az egész soron, és a felirata a négyzet MELLETT áll, nem alatta:
   a `.ls-grid label` erősebb szabály volt, ezért kell ide is a `.ls-grid`. */
.ls-grid .ls-check {
  align-items: center;
  display: flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 9px;
  grid-column: 1 / -1;
}
.ls-grid .ls-check input { width: auto; }
.ls-chain { margin: 0; }
.ls-total {
  background: var(--surface-soft);
  border-radius: var(--radius);
  font-size: 14px;
  margin: 0;
  padding: 12px 16px;
}
.ls-total small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.ls-form textarea { width: 100%; }
.ls-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1100px) {
  .ls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ls-total { max-width: 760px; }

@media (max-width: 720px) {
  .ls-card-head { flex-direction: column; }
  .ls-action { text-align: left; }
  .ls-grid, .ls-defaults { grid-template-columns: minmax(0, 1fr); }
}

/* ── Setări concedii — 1.50.1: három fül, sötét fejléc, apróságok ─────────── */

/* Fülek, mint a terven: 200 px széles „mappa-fülek”; az aktív összenyílik a
   tartalommal, a többi csak felirat. */
.ls-tabs {
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 20px;
}
.ls-tab {
  align-items: center;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-sizing: border-box;
  color: var(--ink-soft);
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  margin-bottom: -1px;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  width: 200px;
}
.ls-tab:hover { color: var(--primary); }
.ls-tab--on {
  background: var(--bg);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg);
  color: var(--primary);
  font-weight: 800;
}
.ls-badge {
  align-items: center;
  background: var(--warning);
  border-radius: 999px;
  color: var(--warning-ink);
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

/* Sötét témában a táblafej nem teli zöld (túl harsány), hanem mélyebb sáv. */
.theme-dark .ls-table thead th { background: var(--bg); color: var(--text); }

/* Minden számmező egyforma: léptető nyilak sehol, ne csak egy mezőn. */
.ls-page input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.ls-page input[type="number"]::-webkit-outer-spin-button,
.ls-page input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* A jobb alsó Feedback-gomb ne takarja az utolsó sort. */
.ls-page { padding-bottom: 96px; }

.ls-chain a { color: var(--primary); font-weight: 700; margin-left: 6px; }
.ls-sub a { color: var(--primary); font-weight: 700; }

@media (max-width: 720px) {
  .ls-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .ls-tab { flex: 0 0 auto; width: auto; }
}
/* Sötétben a --warning-ink világos (sötét háttérre szánt sárga szöveg), a teli
   sárga sávon és jelvényen viszont sötét betű kell, különben olvashatatlan. */
.theme-dark .ls-warn, .theme-dark .ls-badge { color: #3d3200; }
.theme-dark .ls-warn span { background: #3d3200; color: var(--warning); }
/* Az általános `a:hover` aláhúzás erősebb szabály; a fül, a szűrő és a
   léptető gomb nem szöveges link, ezért ott ki kell kapcsolni. */
.ls-tab:hover, .ls-chip:hover, .ls-year-step:hover, .ls-close:hover { text-decoration: none; }

/* K6: a még hátralévő lépés üres körrel, halványan (a terv „var” állapota). */
.cc-time .is-later .cc-time-mark { background: var(--surface); border: 2px solid var(--border); }
.cc-time .is-later .cc-time-body strong { color: var(--muted); font-weight: 600; }
.ls-warn a { color: inherit; font-weight: 800; margin-left: 4px; text-decoration: underline; }

/* ══ Setări concedii v2 (terv: ROTA setari concedii v2, 6a–6e) ═══════════════
   Színek a rota-theme.css tokenjeiből, a lap saját változóiban. Piros nincs,
   táblafej nem telt zöld. Kártya 14px, mező/gomb 8px, pill 999px. */

/* A változók a <body>-n vannak, mert a felugró ablak a lap tartalmán kívülre
   (a <body> végére) kerül, és ott is kell a színe. */
body {
  --ls2-warn-bg: #fffbeb;
  --ls2-warn-bd: #e0b91c;
  --ls2-warn-ink: #3d3200;
  --ls2-warn: #ffd21f;
  --ls2-green: #77b83b;
  --ls2-green-soft: #edf6e7;
  --ls2-green-bd: #cfe8ac;
  --ls2-green-ink: #315d1f;
  --ls2-off-bg: #eff6fd;
  --ls2-off-bd: #cfe0ef;
  --ls2-off-ink: #7d93ad;
  --ls2-dark: #334155;
  --ls2-line-soft: #eef2f6;
}
.ls2 { padding-bottom: 0; }
body.theme-dark {
  --ls2-warn-bg: #2a2410;
  --ls2-warn-bd: #6b5a12;
  --ls2-warn-ink: #f3e3a8;
  --ls2-green: #8bc53f;
  --ls2-green-soft: #16240f;
  --ls2-green-bd: #2f4a1c;
  --ls2-green-ink: #b6de7c;
  --ls2-off-bg: #101c2e;
  --ls2-off-bd: #243243;
  --ls2-off-ink: #64748b;
  --ls2-dark: #94a3b8;
  --ls2-line-soft: #1b2634;
}

.ls2-title { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 12px; }

/* Fülek: 190 px-es mappa-fülek, az aktív összenyílik a tartalommal; jobbra a mentés állapota. */
.ls2-tabs { align-items: flex-end; border-bottom: 1px solid var(--border); display: flex; gap: 4px; margin-bottom: 20px; }
.ls2-tab {
  align-items: center;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-sizing: border-box;
  color: var(--ink-soft);
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  margin-bottom: -1px;
  min-height: 44px;
  text-decoration: none;
  width: 190px;
}
.ls2-tab:hover { color: var(--rota-navy); text-decoration: none; }
.ls2-tab.is-on { background: var(--bg); border-color: var(--border); border-bottom: 1px solid var(--bg); color: var(--rota-navy); font-weight: 800; }
.ls2-badge {
  align-items: center;
  background: var(--ls2-warn);
  border-radius: 999px;
  color: #3d3200;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 7px;
}
.ls2-state { align-self: center; color: var(--muted); font-size: 12.5px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.ls2-state::before { color: var(--ls2-green); content: "● "; }
.ls2-state[data-state="saving"]::before { color: var(--muted); }
.ls2-state[data-state="error"] { color: var(--ls2-warn-ink); }
.ls2-state[data-state="error"]::before { color: var(--ls2-warn); }

/* Kártyák. */
.ls2-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; padding: 22px 24px; }
.ls2-card h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.ls2-card p { margin: 0; }
.ls2-card-head { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 16px; }
.ls2-card-head p, .ls2-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ls2-card--flush { padding: 18px 24px 16px; }

/* Valori implicite: egy sor, a cím balra (300 px). */
.ls2-defaults { align-items: center; display: flex; gap: 16px; }
.ls2-defaults-head { flex: 0 0 300px; }
.ls2-defaults-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.ls2-defaults-fields { display: grid; flex: 1 1 auto; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ls2-inline {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 6px 0 14px;
}
.ls2-inline span { color: var(--text); font-size: 13px; font-weight: 700; }
.ls2-inline input { background: transparent; border: 0; box-shadow: none; font-size: 16px; font-weight: 800; min-height: 0; padding: 6px 8px; text-align: right; width: 76px; }
.ls2-inline:focus-within { border-color: var(--ls2-green); }

/* Figyelmeztetés — sárga, soha nem piros. */
.ls2-warn {
  align-items: center;
  background: var(--ls2-warn-bg);
  border: 1px solid var(--ls2-warn-bd);
  border-radius: 8px;
  color: var(--ls2-warn-ink);
  display: flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 16px;
}
.ls2-warn a { color: inherit; font-weight: 800; text-decoration: underline; }
.ls2-bang {
  align-items: center;
  background: var(--ls2-warn);
  border-radius: 999px;
  color: #3d3200;
  display: inline-flex;
  flex: 0 0 22px;
  font-size: 13px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
}

/* Tábla: halvány fej, szürke verzál, soronként vékony elválasztó. */
.ls2-table-box { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ls2-table-box--scroll { max-height: calc(100vh - 400px); min-height: 220px; overflow: auto; }
.ls2-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.ls2-table thead th {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 12px 18px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}
.ls2-table tbody td { background: var(--surface); border-top: 1px solid var(--ls2-line-soft); font-size: 14px; padding: 12px 18px; vertical-align: middle; }
.ls2-table tbody tr:first-child td { border-top: 0; }
.ls2-table td strong { display: block; font-size: 14px; font-weight: 800; }
.ls2-table td small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.ls2-table select { min-height: 44px; width: 100%; }
.ls2-table tr.is-warn td { background: var(--ls2-warn-bg); }
.ls2-table tr.is-warn select { border-color: var(--ls2-warn-bd); }
.ls2-table tr.is-editing td { background: var(--surface-soft); }
.ls2-table tr.ls2-addrow td { background: var(--surface-alt); }
.ls2-table tr.ls2-addrow input { width: 100%; }
.ls2-right, .ls2-table th.ls2-right { text-align: right; }
.ls2-muted { color: var(--muted); white-space: nowrap; }
.ls2-muted b { color: var(--text); font-weight: 800; }
.ls2-link { color: var(--rota-navy); font-weight: 800; text-decoration: none; }
.ls2-hidden-form { display: none; }
.ls2-inline-form { display: inline; margin: 0; }

/* Gombok: fix szélesség, nem a felirathoz igazodnak. */
.ls2-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}
.ls2-btn:hover { text-decoration: none; }
.ls2-btn--main { background: var(--rota-navy); border-color: var(--rota-navy); color: var(--rota-navy-ink); }
.ls2-btn--ghost { background: var(--surface); border-color: var(--border); color: var(--rota-navy); }
.ls2-btn--dark { background: var(--surface); border: 1.5px solid var(--ls2-dark); color: var(--ls2-dark); }
.ls2-btn--off { background: var(--ls2-off-bg); border-color: var(--ls2-off-bd); color: var(--ls2-off-ink); }
.ls2-btn[disabled] { cursor: not-allowed; opacity: .55; }
.ls2-w110 { width: 110px; } .ls2-w130 { width: 130px; } .ls2-w150 { width: 150px; }
.ls2-w170 { width: 170px; } .ls2-w190 { width: 190px; } .ls2-w210 { width: 210px; }
.ls2-full { margin-top: 10px; width: 100%; }

.ls2-info { align-items: center; display: flex; gap: 12px; padding: 16px 24px; }
.ls2-info p { color: var(--muted); font-size: 13px; }
.ls2-info a { color: var(--rota-navy); text-decoration: underline; }
.ls2-i {
  align-items: center;
  border: 1.5px solid var(--muted);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
  height: 18px;
  justify-content: center;
}

/* Fișe: eszközsor. */
.ls2-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ls2-search { align-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); display: flex; flex: 0 1 280px; gap: 8px; min-height: 44px; padding: 0 12px; }
.ls2-search input { background: transparent; border: 0; box-shadow: none; flex: 1; min-height: 0; padding: 8px 0; }
.ls2-seg { border: 1px solid var(--border); border-radius: 8px; display: inline-flex; overflow: hidden; }
.ls2-seg-item { align-items: center; color: var(--ink-soft); display: inline-flex; font-size: 13px; font-weight: 700; gap: 6px; justify-content: center; min-height: 42px; text-decoration: none; }
.ls2-seg-item + .ls2-seg-item { border-left: 1px solid var(--border); }
.ls2-seg-item:hover { text-decoration: none; }
.ls2-seg-item.is-on { background: var(--rota-navy); color: var(--rota-navy-ink); }
.ls2-year { align-items: center; border: 1px solid var(--border); border-radius: 8px; display: inline-flex; gap: 18px; margin-left: auto; min-height: 42px; padding: 0 12px; }
.ls2-year a { color: var(--muted); font-size: 18px; text-decoration: none; }
.ls2-year b { font-size: 15px; font-weight: 800; }
.ls2-foot { color: var(--muted); display: flex; font-size: 12.5px; font-weight: 700; justify-content: space-between; margin-top: 10px; }

/* Felugró ablak. */
html.ls2-locked { overflow: hidden; }
.ls2-overlay { align-items: center; background: rgba(17, 24, 39, .45); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 1000; }
.ls2-modal { background: var(--surface); border-radius: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); box-sizing: border-box; max-height: 94vh; overflow: auto; padding: 26px 28px; width: min(816px, 100%); }
.ls2-modal--pin { width: min(460px, 100%); }
.ls2-modal-head { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 18px; }
.ls2-modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.ls2-modal-head p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.ls2-x {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 16px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  text-decoration: none;
}
.ls2-cols { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ls2-col { display: flex; flex-direction: column; gap: 12px; }
.ls2-block { color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.ls2-field { display: flex; flex-direction: column; gap: 6px; }
.ls2-field > span:first-child { color: var(--text); font-size: 13px; font-weight: 700; }
.ls2-field small { color: var(--muted); font-weight: 600; }
.ls2-field input, .ls2-field select, .ls2-field textarea { border-radius: 8px; font-size: 15px; font-weight: 600; width: 100%; }
.ls2-field input, .ls2-field select { min-height: 44px; }
.ls2-date { display: block; position: relative; }
.ls2-date input { padding-right: 44px; }
.ls2-date-btn { background: transparent; border: 0; color: var(--muted); cursor: pointer; height: 44px; position: absolute; right: 0; top: 0; width: 44px; }
.ls2-pair { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ls2-base { display: block; position: relative; }
.ls2-base input[disabled] { background: var(--surface-alt); color: var(--muted); }
.ls2-base em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.ls2-base.is-exception input { border: 2px solid var(--ls2-green); }
.ls2-base.is-exception em { color: var(--ls2-green-ink); }
.ls2-check { align-items: center; display: flex; font-size: 13.5px; font-weight: 700; gap: 10px; }
.ls2-check input { accent-color: var(--rota-navy); height: 18px; width: 18px; }
.ls2-total { background: var(--ls2-green-soft); border: 1px solid var(--ls2-green-bd); border-radius: 8px; color: var(--ls2-green-ink); font-size: 13px; line-height: 1.5; padding: 12px 14px; }
.ls2-total b { font-weight: 800; }
.ls2-grpnote { color: var(--muted); font-size: 12.5px; font-weight: 700; margin: -4px 0 0; }
.ls2-grpnote--warn { color: var(--ls2-warn-ink); }
.ls2-grpnote a { color: var(--rota-navy); text-decoration: underline; }
.ls2-modal-foot { align-items: center; border-top: 1px solid var(--border); display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; }
.ls2-modal-foot small { color: var(--muted); flex: 1; font-size: 12.5px; }
.ls2-modal-foot .ls2-btn--ghost { width: 130px; }
.ls2-modal-foot .ls2-btn--main { width: 190px; }

/* PIN-ablak: a PIN egyszer, nagyban, kék sávban. */
.ls2-pinband { background: var(--rota-navy); border-radius: 10px; color: var(--rota-navy-ink); display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; padding: 18px; text-align: center; }
.ls2-pinband small { font-size: 11px; font-weight: 800; letter-spacing: .12em; opacity: .75; }
.ls2-pinband b { font-size: 44px; font-weight: 800; letter-spacing: .18em; line-height: 1.1; }
.ls2-pinlist { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; max-height: 320px; overflow: auto; }
.ls2-pinlist div { align-items: center; display: flex; justify-content: space-between; padding: 10px 14px; }
.ls2-pinlist div + div { border-top: 1px solid var(--ls2-line-soft); }
.ls2-pinlist span { font-size: 13.5px; font-weight: 700; }
.ls2-pinlist b { font-size: 20px; font-weight: 800; letter-spacing: .14em; }

/* A6-os PIN-lap: képernyőn nem látszik, nyomtatáskor csak ez. */
.ls2-print { display: none; }
/* Tartalék: ha valaki a böngészőből nyomtat (Ctrl+P), akkor is csak a lap jön ki. */
@media print {
  /* 1.92.0: csak a szabadság-lapon (különben minden oldal üresen nyomtatódott) */
  body:has(.ls2-print) * { visibility: hidden; }
  body:has(.ls2-print) .ls2-print, body:has(.ls2-print) .ls2-print * { visibility: visible; }
  .ls2-print { display: block; left: 0; position: absolute; top: 0; width: 100%; }
  .ls2-a6 { border: 1px dashed #98a2b3; border-radius: 10px; box-sizing: border-box; break-after: page; color: #111827; font-family: inherit; padding: 16px; }
  .ls2-a6:last-child { break-after: auto; }
  .ls2-a6 p { font-size: 12pt; margin: 0 0 8px; }
  .ls2-a6-head { align-items: center; color: #032f62; display: flex; font-weight: 800; gap: 8px; margin-bottom: 14px !important; }
  .ls2-a6-head img { height: 22px; width: 22px; }
  .ls2-a6-pin b { font-size: 20pt; letter-spacing: .2em; }
  .ls2-a6 hr { border: 0; border-top: 1px solid #dfe6ef; margin: 12px 0; }
  .ls2-a6-note { color: #475569; font-size: 10pt !important; }
}

/* Notificări: négy kapcsoló-sor. */
.ls2-notif h2 { margin-bottom: 2px; }
.ls2-notif .ls2-sub { margin-bottom: 16px; }
.ls2-notif .ls2-sub a { color: var(--rota-navy); text-decoration: underline; }
.ls2-switchrow { align-items: center; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 10px; min-height: 56px; padding: 10px 16px; }
.ls2-switchrow b { color: var(--text); display: block; font-size: 14px; font-weight: 800; }
.ls2-switchrow small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.ls2-switchrow.is-locked { cursor: default; }
.ls2-switch {
  appearance: none;
  border: 0;
  box-sizing: border-box;
  min-height: 0;
  padding: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 52px;
  height: 30px;
  margin: 0;
  position: relative;
  transition: background .15s;
  width: 52px;
}
.ls2-switch::after { background: #fff; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); content: ""; height: 24px; left: 3px; position: absolute; top: 3px; transition: left .15s; width: 24px; }
.ls2-switch:checked { background: var(--ls2-green); }
.ls2-switch:checked::after { left: 25px; }
.ls2-switch[disabled] { background: #cbd5e1; cursor: default; }
.theme-dark .ls2-switch, .theme-dark .ls2-switch[disabled] { background: #334155; }
.theme-dark .ls2-switch:checked:not([disabled]) { background: var(--ls2-green); }

.ls2 input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.ls2 input[type="number"]::-webkit-outer-spin-button,
.ls2 input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 1100px) {
  .ls2-defaults { align-items: stretch; flex-direction: column; }
  .ls2-defaults-head { flex-basis: auto; }
  .ls2-year { margin-left: 0; }
}
@media (max-width: 760px) {
  .ls2-tabs { overflow-x: auto; }
  .ls2-tab { flex: 0 0 auto; padding: 0 14px; width: auto; }
  .ls2-state { display: none; }
  .ls2-defaults-fields, .ls2-cols, .ls2-pair { grid-template-columns: minmax(0, 1fr); }
  .ls2-card-head { flex-direction: column; }
  .ls2-modal { padding: 20px; }
  .ls2-table-box--scroll { max-height: none; }
  .ls2-seg { width: 100%; }
  .ls2-seg-item { flex: 1; width: auto; }
}

/* ══ Közös: sötétkék az elsődleges műveletekhez (a tervek szerint) ══════════
   A „Albastru deschis” témában a --primary zöld, a tervek viszont minden
   elsődleges gombot, aktív fület és kijelölt szegmenst sötétkékkel rajzolnak.
   Sötét témában a „sötétkék” szerepét a zöld viszi (rota-theme.css). */
body { --rota-navy: #032f62; --rota-navy-ink: #ffffff; --rota-antracit: #334155; }
body.theme-dark { --rota-navy: var(--primary); --rota-navy-ink: var(--primary-contrast); --rota-antracit: #94a3b8; }

/* Fülsáv: az aktív fül telt sötétkék, nem zöld (javítólista, Utilizatori 9). */
.tabs a.active { background: var(--rota-navy); color: var(--rota-navy-ink); }
.tabs--fixed a { align-items: center; border-radius: 8px; box-sizing: border-box; display: inline-flex; font-size: 13px; font-weight: 700; justify-content: center; min-height: 40px; padding: 0 8px; text-align: center; width: 130px; }
.tabs--fixed a.active { border-radius: 8px; font-weight: 800; }
@media (max-width: 760px) { .tabs--fixed a { width: auto; } }

/* --- Defecte autobuze -------------------------------------------------------
   Rândul de autobuze verzi și roșii este felul în care garajul vede parcul dintr-o privire;
   lista defectelor deschise stă lângă el, cu cele două acțiuni ale garajului. */
.fault-report-form { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.fault-report-form .span-2 { grid-column: 1 / -1; }
.fault-report-form button { grid-column: 1 / -1; justify-self: start; }
/* Garajul vede parcul în stânga și defectele deschise lângă el, ca pe un tablou de bord. */
.defecte-layout { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); }
.defecte-column { align-content: start; display: grid; gap: 16px; }
.defecte-panel-head { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.defecte-panel-head h2 { margin: 0; }
.defecte-panel-head .fault-filter { flex: 1 1 220px; margin: 0; max-width: 360px; }
.fleet-counts { font-size: 14px; margin: 0; }
.fleet-counts span { color: var(--muted); margin: 0 4px; }
.fault-count {
  background: color-mix(in srgb, var(--danger) 16%, var(--surface));
  border-radius: 999px;
  color: var(--danger);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 2px 9px;
  vertical-align: middle;
}
.fleet-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
.fleet-box {
  background: color-mix(in srgb, var(--success) 22%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border));
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 46px;
  padding: 6px 8px;
  text-align: center;
}
.fleet-box.is-fault {
  background: color-mix(in srgb, var(--danger) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  color: var(--danger);
}
.fleet-ok { color: var(--success); }
.fleet-fault { color: var(--danger); }
.fault-filter { margin-bottom: 12px; max-width: 420px; }
/* A garázs jelentése gomb mögött van, hogy a kártya a lényeget mutassa. */
.garage-note { margin: 0; }
.garage-note > summary { cursor: pointer; display: block; list-style: none; text-align: center; width: 100%; }
.garage-note > summary::-webkit-details-marker { display: none; }
.garage-note[open] > summary { margin-bottom: 8px; }
.garage-note form { display: grid; gap: 6px; margin: 0; }
.fault-list { display: grid; gap: 10px; }
.fault-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
/* Reparat, de preluat: autobuzul este gata, dar încă nu este în trafic. */
.fault-card.is-ready { border-left-color: var(--success); }
.fault-card > div { flex: 1 1 260px; min-width: 0; }
.fault-card h3 { font-size: 17px; margin: 0 0 4px; }
.fault-card p { margin: 0 0 2px; }
.fault-garage-note { color: var(--primary-dark); }
.fault-meta { font-size: 12px; margin-top: 6px; }
.fault-actions { align-content: start; display: grid; gap: 8px; min-width: 200px; }
.fault-actions form { display: grid; gap: 6px; margin: 0; }
.fault-actions textarea { min-height: 54px; }
.filter-form { align-items: end; display: flex; flex-wrap: wrap; gap: 12px; }
.filter-form label { display: grid; gap: 4px; }
.pagination { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 1080px) {
  .defecte-layout { grid-template-columns: minmax(0, 1fr); }
  .fleet-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 56px)); }
}
@media (max-width: 720px) {
  .fault-report-form { grid-template-columns: 1fr; }
  .fault-actions { min-width: 0; width: 100%; }
}

/* Istoric zilnic: planul efectiv al zilei (salvat la 00:00), în aspectul Planului complet.
   O plecare = casetă verde cu ora în alb, iar dedesubt, cu albastru, autobuzul care a mers. */
.istoric-views { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.istoric-snapshot-note { margin: 4px 0 10px; }
.istoric-plan-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0 0 8px; font-size: .92rem; }
.istoric-plan-strip strong { font-size: 1.05rem; color: #122e60; }
.istoric-plan-strip span { color: #3b475c; }
.dispatcher-school-block { margin-top: 12px; }
.istoric-plan-list .dispatcher-day-compact-table thead th { color: #fff; }
.istoric-plan-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.istoric-plan-legend .hist-leg { padding: 4px 10px; border: 1px solid; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.istoric-plan-legend .hist-leg-ok { background: #f3f8e4; border-color: #78a517; color: #122e60; }
.istoric-plan-legend .hist-leg-unconfirmed { background: #f6f9ec; border-color: #c9d9a3; color: #5b6b3a; font-weight: 600; }
.istoric-plan-legend .hist-leg-off { background: #fdecec; border-color: #c53030; color: #7a1d1d; }
.hist-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 2px solid #78a517;
  border-radius: 8px;
  min-width: 74px;
  overflow: hidden;
  text-align: center;
}
.hist-slot .hist-time {
  background: #78a517;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 5px 8px;
  position: relative;
}
.hist-slot .hist-time i {
  background: rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: rgba(255, 255, 255, .85);
  font-size: .56rem;
  font-style: normal;
  font-weight: 800;
  height: 11px;
  line-height: 11px;
  position: absolute;
  right: 3px;
  top: 3px;
  width: 11px;
}
.hist-slot .hist-bus {
  color: #1747a6;
  font-size: .98rem;
  font-weight: 900;
  min-height: 1.4em;
  padding: 4px 6px 5px;
}
.hist-slot.hist-unconfirmed { border-color: #a9c46a; border-style: dashed; border-width: 1.5px; }
.hist-slot.hist-not-operated { border-color: #c53030; }
.hist-slot.hist-not-operated .hist-time { background: #c53030; }
.hist-slot.hist-not-operated .hist-bus { color: #7a1d1d; font-size: .78rem; }
.hist-slot.hist-no-bus { border-color: #9aa3b0; }
.hist-slot.hist-no-bus .hist-time { background: #9aa3b0; }
.hist-slot.hist-no-bus .hist-bus { color: #6b7280; }
.is-filtered-out { display: none !important; }
.istoric-form { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.istoric-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.istoric-form-row label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: #3b475c; }
.istoric-filters { border-top: 1px solid var(--border, #d9dee7); padding-top: 10px; }
.istoric-filters select, .istoric-filters input { min-height: 38px; }
.istoric-found { align-self: center; font-weight: 800; color: #122e60; }


.school-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto auto auto; gap: 8px; align-items: center; }
.school-row input[type="text"] { width: 100%; }
@media (max-width: 900px) { .school-row { grid-template-columns: 1fr; } }

.school-field { position: relative; }
.school-search { width: 100%; }
.school-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: 320px; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #b9c4d6; border-radius: 10px; box-shadow: 0 10px 28px rgba(18, 46, 96, .18); }
.school-results li { padding: 7px 10px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.school-results li small { display: block; font-weight: 500; opacity: .65; }
.school-results li.is-active, .school-results li:hover { background: #122e60; color: #fff; }
.school-results li.school-other-choice { border-top: 1px dashed #b9c4d6; margin-top: 4px; color: #3b475c; }
.school-results li.school-other-choice.is-active { color: #fff; }
.school-results li.school-none { cursor: default; font-weight: 500; opacity: .7; }
.school-results li.school-none:hover { background: transparent; color: inherit; }

/* Autobuz reparat, de preluat: fereastra dispecerului central (1.60.0). */
.fault-takeover-dialog { background: transparent; border: 0; color: var(--text); max-width: 560px; padding: 0; width: calc(100% - 32px); }
.fault-takeover-dialog::backdrop { background: rgba(4, 12, 24, 0.76); backdrop-filter: blur(3px); }
.fault-takeover-dialog .panel { border-left: 5px solid var(--success); margin: 0; max-height: calc(100vh - 40px); overflow: auto; }
.fault-takeover-dialog h2 { margin-top: 0; }
.fault-takeover-list { display: grid; gap: 8px; list-style: none; margin: 12px 0; padding: 0; }
.fault-takeover-list li { background: var(--surface-alt); border-radius: 8px; display: grid; gap: 2px; padding: 10px 12px; }
.fault-takeover-bus { font-size: 18px; }
.fault-takeover-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Integrare panaszkezelő: secretul cheii noi, afișat o singură dată (1.61.0). */
.panasz-secret { display: block; margin-top: 6px; padding: 6px 8px; overflow-wrap: anywhere; user-select: all; }

/* Tema Crem: cele două căsuțe care aveau alb fix (Planul complet, Istoric) urmează suprafața temei (1.62.0). */
.theme-cream .dispatcher-day-time.is-future,
.theme-cream .hist-slot { background: var(--surface); }

/* Butonul Defecte al dispecerului central: autobuze reparate de preluat (1.62.0). */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.nav a.nav-attention { box-shadow: inset 0 0 0 2px var(--danger); }
@keyframes nav-attention-pulse { 0%, 100% { background: transparent; } 50% { background: color-mix(in srgb, var(--danger) 22%, transparent); } }
@media (prefers-reduced-motion: no-preference) {
  .nav a.nav-attention:not(.active) { animation: nav-attention-pulse 1.4s ease-in-out infinite; }
}

/* Defecte: fișa autobuzului din „Stare flotă” (1.63.0). */
.fleet-box:hover { filter: brightness(.96); }
.fleet-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fleet-hint { margin: -4px 0 10px; font-size: 13px; }
.fault-sheet-dialog { background: transparent; border: 0; color: var(--text); max-width: 760px; padding: 0; width: calc(100% - 32px); }
.fault-sheet-dialog::backdrop { background: rgba(4, 12, 24, 0.76); backdrop-filter: blur(3px); }
.fault-sheet-dialog .panel { margin: 0; max-height: calc(100vh - 40px); overflow: auto; }
.fault-sheet { display: grid; gap: 12px; }
.fault-sheet-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.fault-sheet-head h2 { margin: 0; }
.fault-sheet-head p { margin: 2px 0 0; }
.fault-sheet-note { display: grid; gap: 6px; min-width: min(280px, 100%); }
.fault-sheet-history-title { margin: 8px 0 0; }
.fault-sheet-history td { vertical-align: top; }

/* ══ Alertă întârziere GPS (rajz: „ROTA késésriasztás – rajz”, 1–3) ══════════ */
.delay-alert-dialog { background: transparent; border: 0; color: var(--text); max-width: 560px; padding: 0; width: calc(100% - 32px); }
.delay-alert-dialog::backdrop { background: rgba(4, 12, 24, 0.82); backdrop-filter: blur(3px); }
.delay-alert-panel { border-left: 5px solid var(--danger); display: grid; gap: 16px; margin: 0; max-height: calc(100vh - 40px); overflow: auto; }
.delay-alert-panel.is-calm { border-left-color: var(--muted); }
.delay-alert-top { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; }
.delay-alert-chip { background: var(--danger-soft); border: 1px solid var(--danger-border); border-radius: 999px; color: var(--danger-dark); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; padding: 4px 10px; text-transform: uppercase; }
.delay-alert-chip.is-neutral { background: var(--surface-soft); border-color: var(--border); color: var(--ink-soft); }
.delay-alert-meta { font-size: 12px; }
.delay-alert-title-row { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.delay-alert-title-row h2 { color: var(--primary); font-size: 24px; margin: 0; }
.delay-alert-delay { color: var(--danger); font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 800; }
.delay-alert-delay.is-calm { color: var(--muted); }
.delay-alert-note { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 8px; margin: 0; padding: 10px 12px; }
.delay-alert-facts { column-gap: 12px; display: grid; font-size: 14px; grid-template-columns: 110px minmax(0, 1fr); margin: 0; row-gap: 6px; }
.delay-alert-facts dt { color: var(--muted); }
.delay-alert-facts dd { font-weight: 600; margin: 0; }
.delay-alert-driver { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.delay-alert-phone { color: var(--primary); font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 800; }
.delay-alert-tag { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; padding: 2px 8px; }
.delay-alert-reasons-box { display: grid; gap: 10px; }
.delay-alert-reasons-box h3 { font-size: 15px; margin: 0; }
.delay-alert-reasons { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.delay-alert-reason { background: var(--surface-alt); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 700; min-height: 52px; padding: 8px 10px; }
.delay-alert-reason:hover { background: var(--surface-soft); }
.delay-alert-reason.is-picked { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.delay-alert-other { display: grid; gap: 6px; }
.delay-alert-other label { font-size: 13px; font-weight: 700; }
.delay-alert-error { color: var(--danger); font-weight: 700; margin: 0; }
.delay-alert-foot { align-items: center; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-top: 14px; }
.delay-alert-countdown { font-size: 12px; }
.delay-alert-countdown strong { color: var(--text); font-variant-numeric: tabular-nums; }
.delay-alert-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.delay-alert-claim { border-color: var(--primary); }
@media (max-width: 560px) { .delay-alert-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.delay-alerts-area { display: grid; gap: 14px; margin-bottom: 16px; }
.delay-alerts-stale { background: var(--warning); border-radius: 10px; color: var(--warning-ink); font-size: 15px; font-weight: 800; padding: 12px 16px; }
.delay-alerts-panel { display: grid; gap: 12px; margin: 0; }
.delay-alerts-head { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; }
.delay-alerts-head h2 { color: var(--primary); font-size: 18px; margin: 0; }
.delay-alerts-head .muted { font-size: 13px; }
.delay-alerts-table-wrap { overflow-x: auto; }
.delay-alerts-table { border-collapse: collapse; font-size: 14px; width: 100%; }
.delay-alerts-table th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; padding: 8px 10px; text-align: left; text-transform: uppercase; }
.delay-alerts-table td { border-top: 1px solid var(--border); padding: 10px; }
.delay-alerts-route { font-weight: 800; }
.delay-alerts-action { text-align: right; }
.delay-alerts-pill { border-radius: 999px; display: inline-block; font-variant-numeric: tabular-nums; font-weight: 800; min-width: 68px; padding: 4px 10px; text-align: center; }
.delay-alerts-pill.is-alert { background: var(--danger); color: #ffffff; }
.delay-alerts-pill.is-warn { background: var(--warning); color: var(--warning-ink); }
.delay-alerts-pill.is-calm { background: var(--surface-soft); border: 1px solid var(--border); color: var(--ink-soft); }
.delay-alerts-pill.is-done { background: var(--success); color: #ffffff; }
.delay-alerts-link { background: none; border: 0; color: var(--primary); font-weight: 800; min-height: 44px; padding: 0 4px; text-decoration: underline; }

/* Utasinfó (1.65.0): întrebările apelului în fereastra de alertă. Rajz: „Késéshívás és utasinfó”, 1. rész. */
.delay-questions { display: grid; gap: 10px; }
.delay-q { border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 8px; padding: 10px 12px; }
.delay-q.is-next { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft, rgba(18, 46, 96, 0.12)); }
.delay-q.is-done { opacity: 0.55; }
.delay-q.is-done:hover, .delay-q.is-done:focus-within { opacity: 1; }
.delay-q-title { font-size: 14px; font-weight: 800; }
.delay-q-title small { color: var(--muted); font-weight: 600; }
.delay-q-hint { font-size: 13px; margin: 0; }
.delay-q-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.delay-q-btns.delay-alert-reasons { display: grid; }
.delay-q-btn { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 700; min-height: 40px; padding: 6px 12px; }
.delay-q-btn:hover { background: var(--surface-soft); }
.delay-q-btn.is-picked { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.delay-q-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.delay-q-select { max-width: 100%; min-height: 40px; }
.delay-q-checks { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.delay-q-check { align-items: center; display: flex; font-size: 14px; gap: 6px; }
.delay-q-internal { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; margin-left: 4px; padding: 1px 8px; text-transform: uppercase; }
.delay-readback-text { font-size: 15px; margin: 0; }
.delay-preview { background: var(--surface-soft); border: 1px dashed var(--border); border-radius: 10px; display: grid; gap: 4px; padding: 10px 12px; }
.delay-preview-lang { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.delay-preview-text { font-size: 14px; }
.delay-preview-note { font-size: 12px; margin: 0; }

/* ══ Live (1.68.0): a vonal buszai a térképen ══════════════════════════════════════════ */
.live-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 12px; }
.live-toolbar label { align-items: center; display: flex; font-weight: 700; gap: 8px; }
.live-toolbar select { font: inherit; font-size: 16px; font-weight: 800; min-height: 44px; min-width: 90px; }
.live-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; }
.live-map { background: #eef2f7; border: 1px solid var(--border); border-radius: 14px; height: 640px; overflow: hidden; }
.live-map .leaflet-control-zoom { border: 0; border-radius: 10px; box-shadow: 0 2px 8px rgba(15, 23, 42, .18); overflow: hidden; }
.live-map .leaflet-control-zoom a { color: #122e60; font-size: 20px; height: 44px; line-height: 44px; width: 44px; }
.live-list-wrap { max-height: 640px; overflow: auto; }
.live-list { border-collapse: collapse; font-size: 14px; width: 100%; }
.live-list th { font-size: 12px; padding: 6px 8px; text-align: left; }
.live-list td { border-bottom: 1px solid var(--border); padding: 8px; }
.live-strong { font-weight: 800; }
.live-old { color: #8a4b14; font-weight: 700; }
.live-busicon { background: transparent; border: 0; }
.live-bus { background: #122e60; border: 3px solid #ffffff; border-radius: 50%; box-shadow: 0 2px 6px rgba(15, 23, 42, .35); display: block; height: 14px; width: 14px; }
.live-bus.is-stopped { background: #64748b; }
.leaflet-tooltip.live-bus-label { background: #ffffff; border: 1px solid #dfe6ef; border-radius: 6px; box-shadow: 0 1px 4px rgba(15, 23, 42, .25); color: #122e60; font-family: var(--font-ui); font-size: 12px; font-weight: 800; padding: 1px 6px; }
.leaflet-tooltip.live-bus-label::before { display: none; }
@media (max-width: 1000px) { .live-layout { grid-template-columns: minmax(0, 1fr); } .live-map { height: 460px; } }

/* ══ Késés-csík (1.67.0; rajz: ROTA késés-csík) ══════════════════════════════════════
   A fülsor alatt, a ragadós sávban: a saját vonalak legfeljebb 6 legnagyobb késése (+5-től). */
.dispatcher-sticky-bar { flex-wrap: wrap; }
.delay-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}
.delay-strip[hidden] { display: none; }
.delay-strip-head { align-items: baseline; display: flex; gap: 12px; justify-content: space-between; }
.delay-strip-title { color: var(--primary); font-size: 14px; font-weight: 800; }
.delay-strip-meta { font-size: 12px; }
.delay-strip-tiles { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.delay-strip-empty { font-size: 13px; grid-column: 1 / -1; padding: 6px 2px; }
.delay-tile {
  align-items: stretch;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  justify-content: space-between;
  min-height: 84px;
  padding: 9px 12px;
  text-align: left;
}
.delay-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.delay-tile.is-yellow { background: #ffd21f; border: 1px solid #e6b800; color: #3d3200; }
.delay-tile.is-orange { background: #f59e42; border: 1px solid #d97f1f; color: #3a1d00; }
.delay-tile.is-red { background: var(--danger); border: 1px solid #a12b17; color: #ffffff; }
.delay-tile-top { align-items: flex-start; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; max-width: 100%; min-width: 0; text-align: left; }
.delay-tile-line { font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
/* Vonalszám után a célállomás (merre tart a busz); ha nem fér ki, „…”, teljes név a title-ben. */
/* Hosszú névnél két sor; a két sor együtt kb. a vonalszám magassága, így a csempe alig nő. */
.delay-tile-line-row { align-items: center; display: flex; gap: 6px; max-width: 100%; min-width: 0; }
.delay-tile-line-row .delay-tile-line { flex: none; }
.delay-tile-toward { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; font-size: 15px; font-weight: 800; line-height: 1.05; min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
.delay-alert-line:has(.delay-alert-line-toward) { flex-wrap: wrap; row-gap: 6px; }
.delay-alert-line-toward { color: var(--primary); font-size: 24px; font-weight: 800; line-height: 1; }
.delay-alert-line-toward + .delay-alert-line-dep { flex-basis: 100%; }
.delay-tile-dep { font-size: 12px; font-weight: 700; opacity: .92; }
.delay-tile-actual { font-weight: 800; opacity: 1; }
.delay-tile-delay { align-self: flex-end; font-size: 24px; font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1; }
.delay-strip .delay-alerts-stale { margin: 0; }
@media (max-width: 1100px) { .delay-strip-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .delay-strip-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Az ablak új fejléce: nagy vonalszám + indulás, jobbra a késés, alatta egy mondat. */
.delay-alert-line { align-items: baseline; display: flex; gap: 12px; margin: 0; }
.delay-alert-line-no { color: var(--primary); font-size: 38px; font-weight: 800; line-height: 1; }
.delay-alert-line-dep { color: var(--ink-soft); font-size: 15px; font-weight: 700; }
.delay-alert-delay.is-mid { color: #b45309; }
.delay-alert-sentence { font-size: 16px; font-weight: 700; line-height: 1.45; margin: 0; }
/* Gyors kitöltés (1.67.1, rajz 4): két kérdés elöl, a többi becsukva. */
.delay-more { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.delay-more > summary { color: var(--primary); cursor: pointer; font-size: 14px; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.delay-more[open] { display: grid; gap: 10px; }
.delay-alert-buttons .delay-save { font-size: 15px; min-width: 120px; }

/* ══ Semnalare trafic (1.66.0; rajz: ROTA Trafic-jelzés) ══════════════════════════════════
   Kis piros gomb a Dispecerat fülei mellett, a natív <dialog> ablak és az aktív lista. */
/* Lebegő gomb: jobb szélen, függőlegesen középen; görgetéskor is a helyén. A tartalom jobbról helyet hagy neki. */
.traffic-float-button {
  align-items: center;
  background: var(--danger);
  border: 0;
  border-radius: 14px 0 0 14px;
  box-shadow: -4px 6px 18px rgba(15, 23, 42, .28);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 10px;
  padding: 16px 0 18px;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 40;
}
.traffic-float-button span {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
}
.traffic-float-button:hover { background: var(--danger-dark); }
.traffic-float-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body:has(.traffic-float-button) main.container { padding-right: 60px; }
@media print { .traffic-float-button { display: none; } }
.traffic-dialog {
  border: 0;
  border-radius: var(--radius);
  border-top: 5px solid var(--danger);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .30);
  max-width: 720px;
  padding: 0;
  width: calc(100vw - 32px);
}
.traffic-dialog::backdrop { background: rgba(11, 23, 38, .6); }
.traffic-form { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px; }
.traffic-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.traffic-head h2 { color: var(--primary); font-size: 21px; margin: 0; }
.traffic-x { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--ink-soft); cursor: pointer; display: flex; height: 44px; justify-content: center; width: 44px; }
.traffic-row { display: grid; gap: 14px; }
.traffic-row-line { grid-template-columns: 140px minmax(0, 1fr); align-items: end; }
.traffic-row-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.traffic-form label, .traffic-field > span { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; gap: 6px; }
.traffic-field { display: flex; flex-direction: column; gap: 8px; }
.traffic-form select, .traffic-form input[type="text"] { font: inherit; font-size: 15px; min-height: 44px; }
.traffic-q { font-size: 15px !important; font-weight: 800 !important; }
.traffic-hint { color: var(--ink-soft); font-size: 12px; margin: -8px 0 0; }
.traffic-choice { display: grid; gap: 8px; }
.traffic-choice-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.traffic-choice-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.traffic-choice-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 46px;
  padding: 6px 8px;
}
.traffic-choice-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.traffic-map-figure { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.traffic-map { background: #eef2f7; border: 1px solid var(--border); border-radius: 14px; height: 300px; overflow: hidden; }
/* A honlap térképeivel azonos elemek (vonal-terkep.css): nagyítógombok, forrás-felirat, megálló-címke. */
.traffic-map .leaflet-control-zoom { border: 0; box-shadow: 0 2px 8px rgba(15, 23, 42, .18); border-radius: 10px; overflow: hidden; }
.traffic-map .leaflet-control-zoom a { color: #122e60; font-size: 20px; height: 44px; line-height: 44px; width: 44px; }
.traffic-map .leaflet-control-attribution { font-size: 12px; }
.leaflet-tooltip.traffic-term { background: #ffffff; border: 1px solid #dfe6ef; border-radius: 8px; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); color: #111827; font-family: var(--font-ui); font-size: 13px; font-weight: 800; padding: 2px 8px; }
.leaflet-tooltip.traffic-term::before { display: none; }
.leaflet-tooltip.traffic-term.leaflet-tooltip-left { margin-left: -10px; }
.leaflet-tooltip.traffic-term.leaflet-tooltip-right { margin-left: 10px; }
.traffic-map-figure figcaption { color: var(--danger-dark); font-size: 13px; font-weight: 700; }
.traffic-others { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.traffic-other-line { align-items: center; flex-direction: row !important; font-size: 14px !important; font-weight: 700 !important; gap: 6px !important; min-height: 32px; white-space: nowrap; }
.traffic-other-line input[type="checkbox"] { flex: 0 0 auto; height: 18px; margin: 0; min-height: 0; width: 18px; }
.traffic-other-line .muted { font-weight: 600; }
.traffic-error { color: var(--danger-dark); font-weight: 700; margin: 0; }
.traffic-actions { align-items: center; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-top: 14px; }
.traffic-actions > div { display: flex; gap: 8px; }
.traffic-area { display: grid; gap: 10px; margin-bottom: 16px; }
.traffic-list-head h2 { color: var(--primary); font-size: 17px; margin: 0; }
.traffic-count { background: var(--danger); border-radius: 999px; color: #ffffff; font-size: 12px; margin-left: 4px; padding: 2px 8px; }
.traffic-item { align-items: center; background: var(--surface); border: 1px solid var(--danger-border); border-radius: var(--radius); display: grid; gap: 14px; grid-template-columns: 90px minmax(0, 1fr) auto; padding: 12px 16px; }
.traffic-item.is-stale { background: #fffaf0; border: 2px solid #c27a00; }
.traffic-item-time { display: flex; flex-direction: column; gap: 2px; }
.traffic-item-time strong { color: var(--danger); font-size: 19px; }
.traffic-item.is-stale .traffic-item-time strong { color: #8a5600; }
.traffic-item-time span { color: var(--ink-soft); font-size: 11px; }
.traffic-item-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.traffic-item-body strong { font-size: 15px; }
.traffic-item-body span { color: var(--ink-soft); font-size: 13px; }
.traffic-item-body small { color: var(--ink-soft); font-size: 12px; }
.traffic-ask { color: #5f4300 !important; font-size: 14px !important; font-weight: 800; }
.traffic-ask-small { align-self: center; color: #5f4300; font-size: 13px; font-weight: 800; }
.traffic-item-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 700px) {
  .traffic-row-line, .traffic-row-stops { grid-template-columns: minmax(0, 1fr); }
  .traffic-choice-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .traffic-item { grid-template-columns: minmax(0, 1fr); }
  .traffic-item-actions { justify-content: flex-start; }
}

/* Panou (1.84.0): napi összesítő — négy kattintható számkártya, alatta négy lista két oszlopban. */
.panou-tiles .stat-tile { color: inherit; text-decoration: none; }
.panou-tiles .stat-tile:hover { border-color: var(--primary); }
.panou-tiles .stat-tile.is-alert .stat-tile-value { color: var(--danger); }
.panou-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.panou-grid .panel { margin: 0; }
.panou-head { align-items: baseline; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.panou-head h2 { margin: 0; }
.panou-head a { font-size: .9rem; font-weight: 700; }
.panou-table td, .panou-table th { padding-block: 6px; }
.panou-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.panou-note { margin: 8px 0 0; font-size: .88rem; }
.badge-danger { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-dark); }
.panou-table th, .panou-table td.nowrap { white-space: nowrap; }


/* Raport plecări (1.85.0) */
.report-filter { align-items: end; display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.report-filter .segmented a.is-on { background: var(--primary); color: #fff; }
.report-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.report-table th { white-space: nowrap; }
.report-table td.is-bad { color: var(--danger); font-weight: 700; }
.report-table tfoot th { border-top: 2px solid var(--border); }
.report-note { font-size: .88rem; max-width: 90ch; }

/* Jurnal admin (1.87.0) */
.admin-log-table td { vertical-align: top; }
.report-table td.nowrap { white-space: nowrap; }
.admin-log-json { font-size: 12px; max-width: 70ch; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ══ Dispecerat 1.91.0 — csendesebb, sűrűbb képernyő (a tulaj kérése, 2026-11-05) ══
   Elv: az alapállapot színtelen, csak a kivétel kap színt; a lista minél feljebb kezdődjön. */
.sr-only { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }

/* Fülsor + Trafic + zárás egy sorban */
.dispatcher-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; }
.dispatcher-toolbar .tab-area { margin: 0; }
.dispatcher-toolbar-actions { align-items: center; display: flex; gap: 8px; margin-left: auto; }
.dispatcher-toolbar .traffic-float-button { background: var(--surface); border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; box-shadow: none; flex-direction: row; gap: 6px; height: 38px; padding: 0 14px; position: static; transform: none; width: auto; writing-mode: horizontal-tb; }
.dispatcher-toolbar .traffic-float-button span { font-size: 14px; letter-spacing: 0; text-transform: none; transform: none; writing-mode: horizontal-tb; }
.dispatcher-toolbar .traffic-float-button svg { height: 16px; width: 16px; }
.dispatcher-toolbar .traffic-float-button:hover { background: var(--danger-soft); }
body:has(.dispatcher-toolbar .traffic-float-button) main.container { padding-right: 22px; }
.dispatcher-sticky-close { white-space: nowrap; }

/* Késések: kis, fehér kártyák színes bal csíkkal; a szín a súlyosság (sárga 5–9, narancs 10–14, piros 15+). */
.delay-strip { gap: 6px; padding: 8px 12px; }
.delay-strip-title { font-size: 13px; }
.delay-strip-tiles { gap: 8px; }
.delay-strip .delay-tile, .delay-strip .delay-tile.is-yellow, .delay-strip .delay-tile.is-orange, .delay-strip .delay-tile.is-red, .delay-strip .delay-tile.is-wrongprog {
  background: var(--surface); border: 1px solid var(--border); border-left-width: 6px; box-shadow: none; color: var(--text);
  min-height: 0; padding: 6px 10px; }
.delay-strip .delay-tile { align-items: center; display: flex; flex-direction: row; gap: 8px; height: auto; justify-content: space-between; }
.delay-strip .delay-tile-delay { align-self: center; flex: none; }
.delay-strip .delay-tile.is-yellow { border-left-color: #e0b100; }
.delay-strip .delay-tile.is-orange { border-left-color: #ea7a12; }
.delay-strip .delay-tile.is-red { border-left-color: var(--danger); }
.delay-strip .delay-tile.is-wrongprog { border-left-color: #6d28d9; }
.delay-strip .delay-tile-line { font-size: 18px; }
.delay-strip .delay-tile-toward { -webkit-line-clamp: 1; font-size: 13px; font-weight: 700; }
.delay-strip .delay-tile-dep { font-size: 11px; font-weight: 600; opacity: .8; }
.delay-strip .delay-tile-delay { border-radius: 6px; font-size: 16px; padding: 1px 6px; }
.delay-strip .delay-tile.is-yellow .delay-tile-delay { background: #fff3bf; color: #6b5200; }
.delay-strip .delay-tile.is-orange .delay-tile-delay { background: #ffe1c2; color: #8a3f00; }
.delay-strip .delay-tile.is-red .delay-tile-delay { background: var(--danger); color: #fff; }
.delay-strip .delay-tile.is-wrongprog .delay-tile-delay { color: #5b21b6; }

/* A szolgálat adatai egy vékony sorban (nem külön nagy kártya) */
.dispatcher-persistent-header { align-items: baseline; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none;
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 10px; padding: 4px 2px 8px; }
.dispatcher-persistent-header > div { align-items: baseline; display: flex !important; flex-direction: row !important; gap: 6px; }
.dispatcher-persistent-header > div > span, .dispatcher-persistent-header > div > strong, .dispatcher-persistent-header > div > small { display: inline !important; margin: 0; }
.dispatcher-persistent-header span { color: var(--muted); font-size: 12px; letter-spacing: 0; text-transform: none; }
.dispatcher-persistent-header strong { font-size: 14px; }
.dispatcher-persistent-header > div:first-child strong { font-size: 15px; }

/* Végállomás-választó (admin, Director): egy sor */
.dispatcher-service-selector { margin: 0 0 12px; }
.dispatcher-selector-row { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.dispatcher-selector-row label { flex: 1 1 360px; margin: 0; max-width: 560px; }
.dispatcher-service-selector .dispatcher-recent { align-items: center; border: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; padding: 0; }
.dispatcher-recent-label { font-size: 12px; }
.dispatcher-recent-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lista: teljes szélesség, egy fejléc */
.dispatcher-current-layout.is-single { display: block; }
.dispatcher-list-head { align-items: center; gap: 10px 16px; }
.dispatcher-list-title h2 { margin: 0; }
.dispatcher-list-meta { font-size: 13px; margin: 2px 0 0; max-width: 70ch; }
.dispatcher-window-control { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dispatcher-count { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.dispatcher-list-divider { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; margin: 10px 2px 2px; text-transform: uppercase; }
.dispatcher-list-divider.is-overdue { color: var(--danger); margin-top: 0; }

/* Sorok: az alapállapot („În așteptare”) színtelen; csak a kivétel kap színt és bal csíkot */
.dispatcher-live-departure { border-left-color: transparent; box-shadow: none; }
.dispatcher-live-departure .dispatcher-plan-status.status-pending { background: transparent; border: 0; box-shadow: none; color: var(--muted); font-weight: 600; padding-inline: 0; }
.dispatcher-live-departure:has(.status-pending) { border-left-color: transparent; }

/* ══ Színrend 1.91.0 (a tulaj döntése 2026-11-06, claude/SZINEK.md) ══
   Témától független állapotszínek: minden színnek egy jelentése van, minden képernyőn. */
:root, body {
  --st-crit: #c62828;      --st-crit-soft: #fdecea;   /* piros: azonnal lépni kell */
  --st-attn: #e8710a;      --st-attn-soft: #fff0e0;   /* narancs: figyelni kell */
  --st-info: #e0b100;      --st-info-soft: #fff6cc;   --st-info-ink: #5c4600;  /* sárga: tájékoztatás */
  --st-login: #7c3aed;     --st-login-soft: #f1eafe;  /* lila: hibás belépés */
  --st-human: #1d6fd1;     --st-human-soft: #e6f0fc;  /* kék: a diszpécser beavatkozott */
  --st-ok: #2e8b3e;        --st-ok-soft: #e7f5ea;     /* zöld: rendben */
  --st-neutral: #6b7280;                               /* szürke: normál, várakozó */
  --btn-bg: #122e60;       --btn-bg-hover: #0b1f44;   --btn-ink: #ffffff;   /* gombok: sötétkék */
}

/* Betűk (design system / fejléces papír): szöveg Instrument Sans, cím Plus Jakarta Sans 700,
   idő / vonalszám / rovatcím Reddit Mono, táblázatos számjegyekkel. */
:root, body {
  --font-ui: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Instrument Sans', system-ui, Arial, sans-serif;
  --font-tech: 'Reddit Mono', ui-monospace, "Courier New", monospace;
}
body { font-family: var(--font-ui); }
h1, h2, h3, .page-title h1, .stat-tile-value { font-family: var(--font-display); font-weight: 700; }
.departure-time, .dispatcher-live-route, .delay-tile-line, .fleet-dot, .report-table .num, .panou-table .num,
.delay-strip .delay-tile:not(.is-wrongprog):not(.is-gap) .delay-tile-delay,
.dispatcher-persistent-header > div:not(:first-child) strong, time { font-family: var(--font-tech); font-variant-numeric: tabular-nums; }
th, .dispatcher-list-divider, .stat-tile-label, .delay-strip-title { font-family: var(--font-tech); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.stat-tile-label, .delay-strip-title { color: #556178; font-size: 12px; }
/* Vonalszám-címke: lekerekített téglalap (8 px), sötétkék alapon fehér — nem kör, nem kapszula */
.dispatcher-live-route { background: #122e60; border-radius: 8px; color: #ffffff; font-weight: 700; }

/* Rendszerszínek (a tulaj, 2026-11-06): sötétkék, kék, szürke, fehér. A zöld CSAK állapot („rendben”),
   ezért a világos témák zöld rendszerszíneit felülírjuk. A sötét téma marad. */
body:not(.theme-dark) {
  --primary: #122e60; --primary-dark: #0b1f44; --primary-contrast: #ffffff;
  --success: #122e60; --success-contrast: #ffffff;
  --accent: #1d6fd1; --focus: #1d6fd1;
}
.success-text, .active-status, .dispatcher-persistent-header .active-status { color: var(--st-ok); }

/* Gombok: sötétkék minden témában (a zöld csak a „rendben” állapoté) */
.button.primary, button.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.button.primary:hover, button.primary:hover { background: var(--btn-bg-hover); }
.button.secondary { color: var(--btn-bg); }
body.theme-dark .button.secondary { color: var(--text); }
.segmented a.active, .segmented button.active, .report-filter .segmented a.is-on { background: var(--btn-bg); color: var(--btn-ink); }
.button.danger, button.danger { background: var(--surface); border: 1px solid var(--st-crit); color: var(--st-crit); }
.button.danger:hover, button.danger:hover { background: var(--st-crit-soft); }

/* Dispecerat — indulások állapota (címke + bal csík) */
.dispatcher-live-departure .dispatcher-plan-status.status-confirmed { background: var(--st-ok-soft); border: 0; color: var(--st-ok); }
.dispatcher-live-departure .dispatcher-plan-status.status-confirmed::before { content: "✓ "; }
.dispatcher-live-departure .dispatcher-plan-status.status-changed { background: var(--st-human-soft); border: 0; color: var(--st-human); }
.dispatcher-live-departure .dispatcher-plan-status.status-missing { background: var(--st-attn-soft); border: 0; color: var(--st-attn); }
.dispatcher-live-departure .dispatcher-plan-status.status-overdue { background: var(--st-crit-soft); border: 0; color: var(--st-crit); }
.dispatcher-live-departure .dispatcher-plan-status.status-not_operated { background: var(--st-crit); border: 0; color: #fff; }
.dispatcher-live-departure .dispatcher-plan-status.status-future { background: transparent; border: 0; color: var(--st-neutral); }
.dispatcher-live-departure:has(.status-confirmed) { border-left-color: var(--st-ok); }
.dispatcher-live-departure:has(.status-changed) { border-left-color: var(--st-human); }
.dispatcher-live-departure:has(.status-missing) { border-left-color: var(--st-attn); }
.dispatcher-live-departure:has(.status-overdue) { border-left-color: var(--st-crit); }
.dispatcher-live-departure:has(.status-not_operated) { border-left-color: var(--st-crit); }
.dispatcher-list-divider.is-overdue { color: var(--st-crit); }

/* Dispecerat — késés- és belépés-kártyák */
.delay-strip .delay-tile.is-yellow { border-left-color: var(--st-info); }
.delay-strip .delay-tile.is-orange { border-left-color: var(--st-attn); }
.delay-strip .delay-tile.is-red { border-left-color: var(--st-crit); }
.delay-strip .delay-tile.is-wrongprog { border-left-color: var(--st-login); }
.delay-strip .delay-tile.is-yellow .delay-tile-delay { background: var(--st-info-soft); color: var(--st-info-ink); }
.delay-strip .delay-tile.is-orange .delay-tile-delay { background: var(--st-attn-soft); color: #8a3f00; }
.delay-strip .delay-tile.is-red .delay-tile-delay { background: var(--st-crit); color: #fff; }
.delay-strip .delay-tile.is-wrongprog .delay-tile-delay { color: var(--st-login); }

/* Hartă — körök */
body .fleet-dot.is-ok { background: var(--st-ok); color: #ffffff; }
body .fleet-dot.is-late { background: var(--st-info); color: #122e60; }
body .fleet-dot.is-late.band-10 { background: var(--st-attn); color: #ffffff; }
body .fleet-dot.is-late.band-15 { background: var(--st-crit); color: #ffffff; }
body .fleet-dot.is-wrong { background: var(--st-login); color: #ffffff; }
body .fleet-dot.is-none { background: #9aa3ad; color: #ffffff; }

/* Táblázatfejléc és linkek: sötétkék (kattintható / szerkezet, nem állapot) */
th { background: var(--btn-bg); }
a { color: var(--btn-bg); }
body.theme-dark a { color: var(--primary); }

/* Panou */
.panou-tiles .stat-tile .stat-tile-value { color: var(--text); }
.badge { color: var(--btn-bg); border-color: var(--btn-bg); }
.badge.badge-info { background: var(--st-info-soft); border-color: var(--st-info); color: var(--st-info-ink); }
.badge.badge-attn { background: var(--st-attn-soft); border-color: var(--st-attn); color: #8a3f00; }
.badge.badge-crit { background: var(--st-crit); border-color: var(--st-crit); color: #fff; }
.panou-table td.delay-attn { color: #8a3f00; font-weight: 700; }
.panou-table td.delay-crit { color: var(--st-crit); font-weight: 800; }
/* Panou */
.panou-tiles .stat-tile.is-login .stat-tile-value { color: var(--st-login); }
.panou-tiles .stat-tile.is-attention .stat-tile-value { color: var(--st-attn); }
.badge.badge-login { background: var(--st-login-soft); border-color: var(--st-login); color: var(--st-login); }
.badge.badge-neutral { background: transparent; border-color: var(--border); color: var(--st-neutral); }

/* ══ Ciclogramă 1.92.0 — a papíros ciclogramă képe (navy sávok, halványkék fejlécek), A4 fekvő nyomtatás ══ */
.ciclo-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; margin-bottom: 14px; }
.ciclo-pick label { display: block; min-width: 260px; }
.ciclo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ciclo-sheet { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; color: #1b2437; margin-bottom: 20px; padding: 20px 22px 14px; }
.ciclo-head { align-items: center; border-bottom: 2px solid #122e60; display: grid; gap: 8px 20px; grid-template-columns: auto minmax(0, 1fr) auto; padding-bottom: 12px; }
.ciclo-logo { height: auto; max-width: 200px; width: 100%; }
.ciclo-traseu { font-size: 15px; margin: 0; }
.ciclo-traseu strong { color: #122e60; font-family: var(--font-display); }
.ciclo-sub { color: #556178; font-family: var(--font-tech); font-size: 12px; letter-spacing: .04em; margin: 4px 0 0; text-transform: uppercase; }
.ciclo-line { align-items: baseline; color: #122e60; display: flex; gap: 10px; }
.ciclo-line span { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.ciclo-line strong { font-family: var(--font-tech); font-size: 44px; font-weight: 700; line-height: 1; }
.ciclo-section { margin-top: 14px; }
.ciclo-section-title { background: #122e60; border-radius: 0; color: #ffffff; font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; margin: 0; padding: 7px 12px; text-align: center; }
.ciclo-meta { background: #e8edf5; display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; margin: 0; padding: 5px 12px; font-size: 13px; }
.ciclo-meta span:last-child { color: #556178; }
.ciclo-origin h3 { background: #d8e3f2; color: #122e60; font-family: var(--font-tech); font-size: 13px; letter-spacing: .06em; margin: 8px 0 0; padding: 5px 12px; text-align: center; }
.ciclo-table-wrap { overflow-x: auto; }
.ciclo-table { border-collapse: collapse; font-family: var(--font-tech); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 100%; }
.ciclo-table td, .ciclo-table th { border: 1px solid #b9c3d3; padding: 5px 6px; text-align: center; white-space: nowrap; }
.ciclo-table th.ciclo-prog { background: #f2f5f9; color: #122e60; font-weight: 700; text-transform: none; letter-spacing: 0; width: 40px; }
.ciclo-table td.is-last { box-shadow: inset 0 0 0 2px #122e60; color: #122e60; font-weight: 800; }
.ciclo-foot { color: #556178; font-size: 11px; margin-top: 10px; text-align: center; }

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #ffffff !important; }
  body > header, .topbar, nav, footer.site-footer, .feedback-float, .feedback-button, .no-print, .page-help, .rota-help { display: none !important; }
  main.container { max-width: none; padding: 0 !important; }
  .ciclo-sheet { border: 0; border-radius: 0; break-after: page; margin: 0; padding: 0; }
  .ciclo-sheet:last-of-type { break-after: auto; }
  .ciclo-table { font-size: 9.5pt; }
  .ciclo-table td, .ciclo-table th { padding: 2px 3px; }
  .ciclo-table-wrap { overflow: visible; }
  .ciclo-section-title, .ciclo-meta, .ciclo-origin h3, .ciclo-table th.ciclo-prog { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ══ Utilizatori (terv: ROTA utilizatori.dc.html, 7a–7d) ══════════════════════
   Nincs piros: a romboló művelet antracit + kuka-ikon + megerősítés névvel.
   A zöld csak az „Activ” állapotpöttyön és a sikersávon marad, szöveggel. */
body {
  --ut-line-soft: #eef2f6;
  --ut-btn-line: #dbe4ec;
  --ut-sel-bg: #eff6fd;
  --ut-sel-line: #cfe0ef;
  --ut-pill-bg: #f1f5f9;
  --ut-ok-bg: #edf6e7;
  --ut-ok-line: rgba(119, 184, 59, .42);
  --ut-ok-ink: #315d1f;
  --ut-ok-dot: #77b83b;
  --ut-warn-bg: #fffbeb;
  --ut-warn-line: #f3d98b;
  --ut-warn-ink: #3d3200;
  --ut-off-dot: #cbd5e1;
  --ut-off-avatar: #e2e8f0;
  --ut-faint: #98a2b3;
  --ut-item-ink: #111827;
  --ut-icon: #475569;
}
body.theme-dark {
  --ut-line-soft: #26354b;
  --ut-btn-line: #31435d;
  --ut-sel-bg: #1e2b40;
  --ut-sel-line: #31435d;
  --ut-pill-bg: #223047;
  --ut-ok-bg: #16240f;
  --ut-ok-line: #2f4a1c;
  --ut-ok-ink: #b6de7c;
  --ut-ok-dot: #8bc53f;
  --ut-warn-bg: #2a2410;
  --ut-warn-line: #6b5a12;
  --ut-warn-ink: #f3e3a8;
  --ut-off-dot: #55657d;
  --ut-off-avatar: #2a3950;
  --ut-faint: #7d8ba0;
  --ut-item-ink: var(--text);
  --ut-icon: #aab6c3;
}

.ut { color: var(--text); }
.ut [hidden] { display: none !important; }
body.ut-lock { overflow: hidden; }

/* Sikersáv / figyelmeztetés */
.ut-notice { align-items: center; background: var(--ut-ok-bg); border: 1px solid var(--ut-ok-line); border-radius: 8px; display: flex; gap: 12px; margin-bottom: 18px; padding: 12px 16px; }
.ut-notice-icon { align-items: center; background: var(--ut-ok-dot); border-radius: 999px; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 13px; font-weight: 800; height: 24px; justify-content: center; width: 24px; }
.ut-notice-text { color: var(--ut-ok-ink); flex: 1; font-size: 13.5px; font-weight: 800; line-height: 1.45; }
.ut-notice-text b { font-weight: 800; }
.ut-notice-x { background: none; border: 0; color: var(--ut-ok-ink); cursor: pointer; font-size: 14px; font-weight: 700; min-height: 0; padding: 4px 6px; }
.ut-notice--warning { background: var(--ut-warn-bg); border-color: var(--ut-warn-line); }
.ut-notice--warning .ut-notice-icon { background: var(--warning); color: var(--warning-ink); }
.ut-notice--warning .ut-notice-text, .ut-notice--warning span:not(.ut-notice-icon), .ut-notice--warning .ut-notice-x { color: var(--ut-warn-ink); }
.ut-notice--inline { font-size: 13.5px; font-weight: 700; margin: 16px 0 0; }

/* Cím + meta + „Utilizator nou” */
.ut-head { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.ut-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.ut-head p { color: var(--muted); font-size: 13.5px; font-weight: 600; margin: 4px 0 0; }

/* Gombok (fix szélességek a terv szerint) */
.ut-btn { align-items: center; border: 1px solid transparent; border-radius: 8px; box-sizing: border-box; cursor: pointer; display: inline-flex; font: inherit; font-size: 13.5px; font-weight: 800; gap: 8px; justify-content: center; line-height: 1.2; min-height: 44px; padding: 0 12px; text-align: center; text-decoration: none; white-space: nowrap; }
.ut-btn:hover { text-decoration: none; }
.ut-btn--main, .ut-btn--main:hover { background: var(--rota-navy); border-color: var(--rota-navy); color: var(--rota-navy-ink); }
.ut-btn--main span { font-size: 16px; line-height: 1; }
.ut-btn--ghost { background: var(--surface); border-color: var(--ut-btn-line); color: var(--rota-navy); font-size: 13px; font-weight: 700; }
.ut-btn--ghost:hover { background: var(--surface-alt); color: var(--rota-navy); }
.ut-btn--del { background: var(--surface); border-color: var(--rota-antracit); color: var(--rota-antracit); font-size: 13px; font-weight: 800; }
.ut-btn--del:hover { background: var(--surface-alt); color: var(--rota-antracit); }
.ut-btn--dark, .ut-btn--dark:hover { background: var(--rota-antracit); border-color: var(--rota-antracit); color: #fff; font-size: 14px; }
.theme-dark .ut-btn--dark, .theme-dark .ut-btn--dark:hover { color: #10151f; }
.ut-w110 { width: 110px; } .ut-w130 { width: 130px; } .ut-w150 { width: 150px; } .ut-w170 { width: 170px; } .ut-w190 { width: 190px; }
.ut-push { margin-left: auto; }
.ut-link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; min-height: 40px; padding: 0 0 0 6px; }
.ut-link:hover { background: none; color: var(--text); }

/* Kártya, kereső, szegmens */
.ut-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-top: 16px; padding: 18px 22px 22px; }
.ut-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.ut-search { align-items: center; border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; color: var(--ut-faint); display: flex; gap: 10px; min-height: 44px; padding: 0 14px; width: 300px; }
.ut-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(119, 184, 59, .12); }
.ut-search input { background: transparent; border: 0; box-shadow: none; color: var(--text); flex: 1; font-size: 14px; min-height: 42px; min-width: 0; padding: 0; }
.ut-search input:focus { border: 0; box-shadow: none; }
.ut-search input::placeholder { color: var(--ut-faint); opacity: 1; }
.ut-seg { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; display: inline-flex; gap: 4px; padding: 4px; }
.ut-seg-item { align-items: center; border-radius: 8px; box-sizing: border-box; color: var(--ut-icon); display: inline-flex; font-size: 13px; font-weight: 700; justify-content: center; min-height: 36px; text-decoration: none; white-space: nowrap; }
.ut-seg-item:hover { color: var(--rota-navy); text-decoration: none; }
.ut-seg-item.is-on, .ut-seg-item.is-on:hover { background: var(--rota-navy); color: var(--rota-navy-ink); font-weight: 800; }

/* Kijelöléses sáv — csak kijelölésnél */
.ut-bulk { align-items: center; background: var(--ut-sel-bg); border: 1px solid var(--ut-sel-line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding: 10px 14px; }
.ut-bulk > strong { color: var(--rota-navy); font-size: 13px; font-weight: 800; margin-right: 6px; }
.ut-bulk .ut-btn { min-height: 40px; }
.ut-bulk .ut-btn--del { gap: 7px; }

/* Táblázat */
.ut-table-box { border: 1px solid var(--border); border-radius: 8px; margin-top: 12px; overflow-x: auto; }
.ut-table { border-collapse: collapse; min-width: 900px; width: 100%; }
.ut-table th, .ut-table td { border-bottom: 1px solid var(--ut-line-soft); padding: 8px 7px; vertical-align: middle; }
.ut-table th:first-child, .ut-table td:first-child { padding-left: 14px; width: 44px; }
.ut-table th:last-child, .ut-table td:last-child { padding-right: 14px; width: 56px; }
.ut-table th { background: var(--surface-alt); border-bottom-color: var(--border); color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; padding-bottom: 10px; padding-top: 10px; text-transform: uppercase; white-space: nowrap; }
.ut-table th:nth-child(4) { width: 200px; }
.ut-table th:nth-child(5) { width: 150px; }
.ut-table th:nth-child(6) { width: 120px; }
.ut-table tbody tr:last-child td { border-bottom: 0; }
.ut-table td { height: 56px; }
.ut-table input[type="checkbox"] { accent-color: var(--rota-navy); cursor: pointer; height: 20px; margin: 0; min-height: 0; padding: 0; vertical-align: middle; width: 20px; }
.ut-table tr.is-test td { background: var(--ut-warn-bg); }
.ut-table tr.is-selected td { background: var(--ut-sel-bg); }
.ut-table tr.is-inactive td:not(.ut-menu-cell), .ut-table tr.is-inactive .ut-dots { opacity: .6; }
.ut-person { align-items: center; display: flex; gap: 10px; }
.ut-person strong { font-size: 14px; font-weight: 800; }
.ut-me { color: var(--muted); font-size: 13px; font-weight: 700; }
.ut-sub { color: var(--ut-warn-ink); display: block; font-size: 12px; font-weight: 700; }
.ut-avatar { align-items: center; background: var(--ut-sel-bg); border-radius: 999px; color: var(--rota-navy); display: inline-flex; flex: 0 0 auto; font-size: 12px; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.is-inactive .ut-avatar { background: var(--ut-off-avatar); color: var(--muted); }
.is-test .ut-avatar { background: var(--warning); color: #3d3200; }
.is-selected .ut-avatar { background: var(--rota-navy); color: var(--rota-navy-ink); }
.ut-muted { color: var(--muted); font-size: 13.5px; }
.ut-table td:nth-child(5) { font-size: 13.5px; font-weight: 700; }
.ut-pill { align-items: center; background: var(--ut-pill-bg); border: 1px solid transparent; border-radius: 8px; color: var(--rota-antracit); display: inline-flex; font-size: 12.5px; font-weight: 800; min-height: 30px; padding: 0 10px; white-space: nowrap; }
.ut-pill--admin { background: var(--ut-sel-bg); color: var(--rota-navy); }
.is-selected .ut-pill--admin { background: var(--surface); border-color: var(--ut-sel-line); }
.ut-state { align-items: center; color: var(--muted); display: inline-flex; font-size: 13px; font-weight: 700; gap: 7px; white-space: nowrap; }
.ut-state::before { background: var(--ut-off-dot); border-radius: 999px; content: ""; height: 8px; width: 8px; }
.ut-state.is-on { color: var(--ut-ok-ink); }
.ut-state.is-on::before { background: var(--ut-ok-dot); }

/* ⋯ sormenü (7b) és a „Schimbă rolul” lista */
.ut-menu { display: inline-block; position: relative; }
.ut-menu > summary { list-style: none; }
.ut-menu > summary::-webkit-details-marker { display: none; }
.ut-dots { align-items: center; border: 1px solid var(--ut-btn-line); border-radius: 8px; box-sizing: border-box; color: var(--ut-icon); cursor: pointer; display: inline-flex; font-size: 18px; font-weight: 800; height: 40px; justify-content: center; letter-spacing: 1px; line-height: 1; user-select: none; width: 40px; }
.ut-dots:hover, .ut-menu[open] > .ut-dots { border-color: var(--rota-navy); color: var(--rota-navy); }
.is-selected .ut-dots { background: var(--surface); border-color: var(--rota-navy); color: var(--rota-navy); }
.ut-menu-list { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 44px rgba(15, 23, 42, .14); box-sizing: border-box; padding: 6px; position: fixed; width: 260px; z-index: 950; }
.ut-rolemenu .ut-menu-list { width: 220px; }
.ut-menu-list form { margin: 0; }
.ut-menu-list a, .ut-menu-list button { align-items: center; background: none; border: 0; border-radius: 8px; box-sizing: border-box; color: var(--ut-item-ink); cursor: pointer; display: flex; font: inherit; font-size: 14px; font-weight: 700; gap: 10px; justify-content: flex-start; min-height: 44px; padding: 0 12px; text-align: left; text-decoration: none; width: 100%; }
.ut-menu-list a:hover, .ut-menu-list button:hover { background: var(--surface-alt); color: var(--ut-item-ink); text-decoration: none; }
.ut-menu-list svg { color: var(--ut-icon); flex: 0 0 auto; }
.ut-menu-list hr { background: var(--ut-line-soft); border: 0; height: 1px; margin: 6px 8px; }
.ut-menu-list .ut-menu-del, .ut-menu-list .ut-menu-del:hover { color: var(--rota-antracit); font-weight: 800; }
.ut-menu-list .ut-menu-del svg { color: var(--rota-antracit); }

/* Ablakok (7c, 7d) */
.ut-overlay { align-items: center; background: rgba(17, 24, 39, .45); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 1000; }
.ut-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .25); box-sizing: border-box; max-height: 94vh; overflow: auto; padding: 24px 26px 26px; width: min(620px, 100%); }
.ut-modal--del { width: min(480px, 100%); }
.ut-modal-head { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.ut-modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.ut-x { align-items: center; border: 1px solid var(--ut-btn-line); border-radius: 8px; box-sizing: border-box; color: var(--ut-icon); display: inline-flex; flex: 0 0 auto; font-size: 16px; font-weight: 700; height: 40px; justify-content: center; text-decoration: none; width: 40px; }
.ut-x:hover { color: var(--rota-navy); text-decoration: none; }
.ut-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 18px; }
.ut-field { display: block; margin: 0; }
.ut-field > span { color: var(--rota-antracit); display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0; margin-bottom: 6px; }
.ut-field input, .ut-field select { border-radius: 8px; box-sizing: border-box; font-size: 15px; min-height: 44px; padding: 0 14px; width: 100%; }
.ut-field select { padding-right: 34px; }
.ut-field select[disabled], .ut-check input[disabled] { cursor: not-allowed; opacity: .6; }
.ut-modal form > .ut-field { margin-top: 14px; }
.ut-linkbox { align-items: flex-start; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--ut-item-ink); cursor: pointer; display: flex; gap: 10px; margin-top: 14px; padding: 14px 16px; }
.ut-linkbox b { display: block; font-size: 14px; font-weight: 700; line-height: 20px; }
.ut-linkbox small { color: var(--muted); display: block; font-size: 12.5px; font-weight: 500; line-height: 1.5; margin-top: 6px; }
.ut-linkbox input, .ut-check input { accent-color: var(--rota-navy); flex: 0 0 auto; height: 20px; margin: 0; min-height: 0; padding: 0; width: 20px; }
.ut-check { align-items: center; color: var(--ut-item-ink); cursor: pointer; display: flex; font-size: 14px; font-weight: 700; gap: 10px; letter-spacing: 0; margin-top: 14px; }
.ut-modal-foot { border-top: 1px solid var(--ut-line-soft); display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; }
.ut-modal-foot .ut-btn { font-size: 14px; }
.ut-modal--del .ut-modal-foot { border-top: 0; margin-top: 18px; padding-top: 0; }
.ut-del-head { align-items: center; display: flex; gap: 12px; }
.ut-del-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin: 0; }
.ut-del-icon { align-items: center; background: var(--ut-pill-bg); border-radius: 999px; color: var(--rota-antracit); display: inline-flex; flex: 0 0 auto; height: 44px; justify-content: center; width: 44px; }
.ut-del-text { color: var(--rota-antracit); font-size: 14.5px; line-height: 1.6; margin: 14px 0 0; overflow-wrap: anywhere; }
.theme-dark .ut-del-text { color: var(--text); }
.ut-del-hint { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 0; padding: 12px 14px; }
.ut-inline-link { background: none; border: 0; color: var(--rota-navy); cursor: pointer; display: inline; font: inherit; font-weight: 700; min-height: 0; padding: 0; text-decoration: underline; }
.ut-inline-link:hover { background: none; color: var(--rota-navy); }

@media (max-width: 1100px) {
  .ut-push { margin-left: 0; }
  .ut-bulk .ut-push { margin-left: auto; }
}
@media (max-width: 760px) {
  .ut-card { padding: 14px; }
  .ut-search { width: 100%; }
  .ut-seg { max-width: 100%; overflow-x: auto; }
  .ut-seg-item { flex: 0 0 auto; padding: 0 12px; width: auto; }
  .ut-head .ut-btn { width: 100%; }
  .ut-grid { grid-template-columns: minmax(0, 1fr); }
  .ut-modal { padding: 20px; }
  .ut-modal-foot .ut-btn { flex: 1; width: auto; }
  .ut-bulk .ut-btn { flex: 1 1 auto; width: auto; }
}
.theme-dark .ut input[type="checkbox"] { color-scheme: dark; }
/* Autobuz logat în program greșit (1.70.0, rajz: „Program greșit”): lila, hogy elváljon a késés sárga–piros sávjától. */
.delay-tile.is-wrongprog { background: #6d28d9; border: 1px solid #5b21b6; color: #ffffff; }
.delay-tile.is-wrongprog .delay-tile-delay { font-size: 15px; font-weight: 800; line-height: 1.1; text-align: right; }
.delay-alert-panel.is-wrongprog { border-left-color: #6d28d9; }
.delay-alert-chip.is-wrongprog { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.wrongprog-todo { background: #f5f3ff; border: 1px solid #c4b5fd; border-radius: 10px; color: #3b0764; font-weight: 700; margin: 0; padding: 10px 12px; }
.wrongprog-alt { font-size: 13px; margin: 0; }
.wrongprog-pill { align-items: center; background: #ede9fe; border: 1px solid #c4b5fd; border-radius: 999px; color: #5b21b6; display: inline-flex; font-size: 12px; font-weight: 800; gap: 4px; margin-left: 6px; padding: 1px 8px; white-space: nowrap; }
.dispatcher-live-departure.is-wrongprog .departure-summary { box-shadow: inset 4px 0 0 #6d28d9; }
.wrongprog-rowpill { background: #ede9fe; border: 1px solid #c4b5fd; border-radius: 999px; color: #5b21b6; display: block; font-size: 11px; font-weight: 800; margin-top: 4px; padding: 1px 8px; white-space: nowrap; width: max-content; }
.dispatcher-day-time[data-wrongprog] { outline: 3px solid #6d28d9; outline-offset: 1px; }
tr.is-wrongprog > th.day-program-name { box-shadow: inset 4px 0 0 #6d28d9; }
/* Busz a Thorebből (1.71.0): üres buszszám 10 perccel az indulás után; kék, hogy elváljon a lila figyelmeztetéstől. */
.thoreb-pill { align-items: center; background: #e0f2fe; border: 1px solid #7dd3fc; border-radius: 999px; color: #075985; display: inline-flex; font-size: 12px; font-weight: 800; margin-left: 6px; padding: 1px 8px; white-space: nowrap; }
.dispatcher-day-time[data-thoreb] b::after { background: #0369a1; border-radius: 4px; color: #ffffff; content: "T"; display: inline-block; font-size: 10px; line-height: 14px; margin-left: 3px; padding: 0 4px; vertical-align: 1px; }
.pick-bus { display: flex; flex-wrap: wrap; gap: 10px; }
.pick-bus .button { font-size: 18px; min-width: 120px; }
/* Program greșit (1.72.0): a valódi programváltás egy kattintással rögzíthető. */
.wrongprog-record { border-top: 1px dashed #c4b5fd; display: grid; gap: 8px; padding-top: 12px; }
.wrongprog-record > p { margin: 0; }
.wrongprog-record .button { justify-self: start; }
/* „Toate dispeceratele” (1.75.0): melyik diszpécseri ponthoz tartozik az indulás. */
.dispatcher-live-terminal { background: var(--surface-soft, #eef3f9); border: 1px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; white-space: nowrap; }
/* 1.76.0: gazdátlan indulás (senki nem lépett be a járatra) — narancs szaggatott keret, nem ugrik fel. */
.delay-tile.is-gap { background: #fff7ed; border: 2px dashed #ea580c; color: #7c2d12; }
.delay-tile.is-gap .delay-tile-delay { font-size: 15px; font-weight: 800; line-height: 1.1; text-align: right; }
.delay-alert-panel.is-gap { border-left-color: #ea580c; }
.delay-alert-chip.is-gap { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.gap-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.gap-list li { align-items: baseline; border: 1px solid var(--border); border-radius: 10px; display: flex; gap: 12px; padding: 8px 12px; }
.gap-list b { font-size: 18px; min-width: 52px; }
.dispatcher-day-time[data-gap] { outline: 3px dashed #ea580c; outline-offset: 1px; }
/* Hartă flotă (1.77.0): cerc colorat cu numărul liniei. Culorile cerute de proprietar (10-27). */
.fleet-panel { display: grid; gap: 12px; }
.fleet-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.fleet-toolbar h1 { font-size: 26px; margin: 0; }
.fleet-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.fleet-legend li { align-items: center; display: flex; font-size: 14px; gap: 6px; }
.fleet-legend b { font-variant-numeric: tabular-nums; }
.fleet-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 340px; }
.fleet-map { border: 1px solid var(--border); border-radius: 12px; height: calc(100vh - 200px); min-height: 460px; }
.fleet-side { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 200px); min-height: 460px; }
.fleet-box { border: 1px solid var(--border); border-radius: 12px; display: grid; gap: 8px; padding: 10px 12px; }
.fleet-box h2 { align-items: center; display: flex; font-size: 15px; gap: 8px; margin: 0; }
.fleet-box h2 b { background: var(--surface-soft, #eef3f9); border-radius: 999px; font-size: 12px; padding: 0 8px; }
.fleet-box-head { align-items: center; display: flex; justify-content: space-between; }
.fleet-link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; padding: 0; }
.fleet-chips { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.fleet-chip { min-height: 0; height: 34px; box-shadow: none; align-items: center; background: var(--surface-soft, #eef3f9); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; display: flex; font: inherit; font-size: 13px; gap: 6px; opacity: .45; padding: 4px 8px; text-align: left; }
.fleet-chip.is-on { background: #ffffff; opacity: 1; }
.fleet-chip b { margin-left: auto; font-variant-numeric: tabular-nums; }
.fleet-chip .fleet-dot { font-size: 10px; height: 22px; min-width: 22px; }
.fleet-lines { display: flex; flex-wrap: wrap; gap: 4px; max-height: 92px; overflow: auto; }
.fleet-line { background: #ffffff; border: 1px solid var(--border); border-radius: 7px; box-shadow: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; height: 26px; line-height: 1; min-height: 0; min-width: 34px; padding: 0 5px; }
.fleet-line.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast, #ffffff); }
.fleet-problems { max-height: 30%; }
.fleet-buses { flex: 1; min-height: 0; }
.fleet-problems, .fleet-buses { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.fleet-list { display: grid; gap: 4px; list-style: none; margin: 0; overflow: auto; padding: 0; align-content: start; }
.fleet-item-btn { min-height: 0; box-shadow: none; align-items: center; background: none; border: 0; border-radius: 8px; cursor: pointer; display: flex; font: inherit; gap: 8px; padding: 4px 6px; text-align: left; width: 100%; }
.fleet-item-btn:hover, .fleet-item-btn:focus-visible { background: var(--surface-soft, #eef3f9); }
.fleet-item-btn.is-static { cursor: default; }
.fleet-item-btn .fleet-dot { flex: none; font-size: 11px; height: 26px; min-width: 26px; }
.fleet-item-text { display: grid; font-size: 13px; line-height: 1.25; min-width: 0; }
.fleet-item-text span { overflow: hidden; text-overflow: ellipsis; }
.fleet-item-bad { color: #a8201a; font-weight: 700; }
.fleet-item-right { font-size: 12px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.fleet-item-right.is-late { color: #8a6500; }
.fleet-dot.is-gap { background: #fff7ed; border: 2px dashed #ea580c; color: #7c2d12; }
.fleet-empty { font-size: 13px; padding: 4px 6px; }
@media (max-width: 900px) { .fleet-layout { grid-template-columns: 1fr; } .fleet-side { height: auto; } .fleet-map { height: 60vh; } }
.fleet-icon { background: none; border: 0; }
.fleet-dot { align-items: center; border: 2px solid #ffffff; border-radius: 999px; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); display: inline-flex; font-size: 12px; font-weight: 800; height: 28px; justify-content: center; line-height: 1; min-width: 28px; padding: 0 4px; }
.fleet-dot.is-ok { background: #2e9e44; color: #ffffff; }
.fleet-dot.is-late { background: #ffd21f; color: #122e60; }
.fleet-dot.is-wrong { background: #d43a2a; color: #122e60; }
body .fleet-dot.is-none { background: #9aa3ad; color: #ffffff; }
.fleet-sheet { display: grid; font-size: 13px; gap: 3px; }
.fleet-sheet-title { font-size: 14px; }
.fleet-sheet-late { color: #8a6500; font-weight: 700; }
.fleet-sheet-bad { color: #a8201a; font-weight: 700; }

