/* Excel-szerű megjelenés – TL beosztás prototípus */
:root {
  --excel-border: #b4b4b4;
  --excel-header: #e2efda;
  --excel-header-wknd: #ffe8e8;
  --excel-header-sun: #ffd6d6;
  --excel-header-holiday: #e8a0a0;
  --excel-day-wknd: #fff5f5;
  --excel-day-sun: #ffefef;
  --excel-day-holiday: #fce8e8;
  --excel-sipos: #ddebf7;
  --excel-baka: #fff2cc;
  --excel-iroda: #f2f2f2;
  --excel-font: "Segoe UI", Calibri, Arial, sans-serif;
  --sticky-name: #fafafa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--excel-font);
  font-size: 12px;
  color: #000;
  background: #f0f0f0;
}

code {
  background: #e8e8e8;
  padding: 0 4px;
  border-radius: 2px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--excel-border);
}

.topbar h1 {
  margin: 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-vsep {
  width: 1px;
  align-self: stretch;
  min-height: 1.75rem;
  margin: 2px 2px;
  background: #c8c8c8;
  flex-shrink: 0;
}

.toolbar-spacer {
  flex: 1 1 12px;
  min-width: 8px;
}

.btn-nav--logout {
  color: #444;
}

.btn-danger {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid #c55;
  background: #fff5f5;
  color: #9c0006;
  cursor: pointer;
  border-radius: 2px;
}

.btn-danger:hover {
  background: #ffe8e8;
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-nav,
.btn-primary {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--excel-border);
  background: #fff;
  cursor: pointer;
  border-radius: 2px;
}

.btn-primary {
  background: #217346;
  color: #fff;
  border-color: #1e6b40;
}

.badge-demo {
  background: #fff3cd;
  border: 1px solid #e0c060;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
}

.badge-dev {
  background: #d9e8f5;
  border: 1px solid #6fa8d6;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
}

.badge-worker {
  background: #e8f5e9;
  border: 1px solid #81c784;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
}

.badge-live {
  background: #e8f5e9;
  border: 1px solid #2e7d32;
  color: #1b5e20;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

.badge-demo {
  background: #fff3e0;
  border: 1px solid #f57c00;
  color: #e65100;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
}

.btn-secondary {
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--excel-border);
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 2px;
}

.btn-secondary:hover {
  background: #ebebeb;
}

.live-empty-banner {
  margin: 8px 4px 12px;
  padding: 10px 12px;
  border: 1px solid #6fa8d6;
  background: #f0f7fc;
  font-size: 13px;
  border-radius: 2px;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.page-nav a {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--excel-border);
  background: #fafafa;
  color: #333;
  text-decoration: none;
  border-radius: 2px;
}

.page-nav a.active {
  background: #217346;
  color: #fff;
  border-color: #1e6b40;
}

.page-nav-home {
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.dev-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #e8e8e8;
}

.dev-gate-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--excel-border);
  padding: 24px;
  border-radius: 4px;
}

.dev-gate-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.dev-gate-label {
  display: block;
  margin: 16px 0 12px;
  font-size: 12px;
}

.dev-gate-label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  font-size: 14px;
  border: 1px solid var(--excel-border);
  font-family: inherit;
}

.dev-gate-error {
  color: #b71c1c;
  font-size: 12px;
  margin: 0 0 8px;
}

.dev-gate-error.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.slot-picker {
  position: absolute;
  z-index: 1000;
  width: min(320px, calc(100vw - 24px));
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--excel-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  font-size: 12px;
}

.slot-picker-inner {
  padding: 8px;
}

.slot-picker-title {
  margin: 0 0 6px;
  font-weight: 600;
}

.slot-picker-group {
  margin: 8px 0 4px;
  padding-top: 6px;
  border-top: 1px solid #ddd;
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}

.slot-picker-group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.slot-pick-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
  margin: 2px 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  border-radius: 2px;
}

.slot-pick-btn:hover {
  border-color: #217346;
  background: #fff;
}

.slot-pick-btn--caution {
  cursor: pointer;
  background: #f3e6e6;
  border-color: #c98a8a;
}

.slot-pick-btn--caution:hover {
  border-color: #a4262c;
  background: #f8ecec;
}

.slot-pick-btn--caution .slot-pick-name {
  color: #1a1a1a;
  font-weight: 600;
}

.slot-pick-btn--caution .slot-pick-reason {
  color: #8b1e1e;
  font-weight: 500;
}

.slot-pick-btn--warn {
  background: #fff4cc;
  border-color: #d4b84a;
}

.slot-pick-btn--warn:hover {
  border-color: #b8921f;
  background: #fff0b8;
}

.slot-pick-btn--warn .slot-pick-reason {
  color: #6b4f00;
  font-weight: 500;
}

.slot-pick-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.slot-pick-reason {
  flex: 1 1 100%;
  font-size: 10px;
  line-height: 1.3;
  color: #a4262c;
  padding-left: 22px;
}

.slot-pick-name {
  flex: 1;
  font-weight: 600;
  color: #111;
}

.slot-pick-hrs {
  color: #555;
  font-size: 11px;
  white-space: nowrap;
}

td.name-cell.schedule-slot {
  cursor: pointer;
  outline: 1px dashed transparent;
}

td.name-cell.schedule-slot:hover {
  outline-color: #217346;
}

.page-hub {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hub-card-wide {
  max-width: 720px;
}

.hub-link-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .hub-link-pair {
    grid-template-columns: 1fr;
  }
}

.hub-link-block h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.bookmark-copy code,
.footer-bookmark .bookmark-url {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f5f5f5;
  border: 1px solid var(--excel-border);
  font-size: 12px;
  word-break: break-all;
}

.footer-bookmark {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.bookmark-label {
  font-weight: 600;
  font-size: 12px;
}

.hub-server code {
  font-size: 12px;
}

.hub-card {
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--excel-border);
  padding: 24px 28px;
  border-radius: 4px;
}

.hub-card h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.hub-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.hub-tile {
  display: block;
  padding: 16px;
  border: 1px solid var(--excel-border);
  background: #f8faf8;
  text-decoration: none;
  color: inherit;
  border-radius: 2px;
}

.hub-tile:hover {
  border-color: #217346;
  background: #fff;
}

.hub-tile strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.hub-tile span {
  font-size: 12px;
  color: #555;
}

.hub-tile-worker {
  background: #f1f8f2;
}

.layout--worker-only .panel-side--compact {
  min-width: 200px;
}

select.igeny-select {
  width: 100%;
  max-width: 42px;
  font-size: 11px;
  font-family: inherit;
  border: 1px solid #ccc;
  padding: 1px 0;
  text-align: center;
}

td.igeny-edit {
  padding: 2px !important;
}

.badge-gen {
  background: #e8f4ea;
  border: 1px solid #217346;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  max-width: 280px;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--excel-border);
  padding: 0 8px;
}

.tab {
  font-family: inherit;
  font-size: 12px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.tab.active {
  border-bottom-color: #217346;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  min-height: calc(100vh - 140px);
}

.layout.layout--workers {
  grid-template-columns: 1fr;
}

.layout.layout--workers .panel-side {
  display: none;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .panel-side {
    border-top: 1px solid var(--excel-border);
  }
}

.panel-main {
  padding: 12px;
  overflow: auto;
}

.panel-side {
  background: #fff;
  border-left: 1px solid var(--excel-border);
  padding: 12px;
  font-size: 11px;
}

.panel-side h2 {
  margin: 0 0 8px;
  font-size: 13px;
}

.tab-panel.hidden {
  display: none;
}

.hint {
  margin: 0 0 8px;
  color: #444;
  font-size: 11px;
}

.hint.small {
  font-size: 10px;
  color: #666;
}

.scroll-x {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--excel-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* —— Excel beosztás táblázat —— */
.week-hours-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font-size: 10px;
  line-height: 1.35;
  padding: 4px 6px;
  max-width: 140px;
}

.week-hours-item {
  display: block;
  white-space: nowrap;
}

.week-hours-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  margin-right: 4px;
  vertical-align: middle;
}

.week-hours-muted {
  color: #999;
  font-size: 11px;
}

table.excel th.week-hours-col-header {
  background: #e8eef8;
  font-size: 10px;
  font-weight: 600;
  min-width: 88px;
  max-width: 130px;
  line-height: 1.25;
  vertical-align: middle;
}

table.excel td.week-hours-side {
  background: #eef3ff;
  border-left: 2px solid #4472c4;
  vertical-align: top;
  min-width: 88px;
  max-width: 140px;
  padding: 4px;
}

table.excel td.excel-inline-hint {
  font-size: 10px;
  font-weight: 500;
  color: #555;
}

.excel-inline-hint {
  font-size: 10px;
  font-weight: 400;
  color: #666;
}

table.grid-igeny th.week-hours-igeny-head {
  background: #e8eef8;
  font-size: 10px;
  font-weight: 600;
  min-width: 52px;
  max-width: 72px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 4px 2px;
}

table.grid-igeny td.week-hours-igeny-side {
  background: #eef3ff;
  border-left: 2px solid #4472c4;
  vertical-align: top;
  min-width: 52px;
  max-width: 80px;
  padding: 2px;
}

table.grid-igeny td.week-hours-igeny-side .week-hours-list {
  max-width: none;
  font-size: 8px;
  padding: 2px;
  gap: 1px;
}

.week-block {
  margin-bottom: 16px;
}

.week-block h3 {
  margin: 0 0 4px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

table.excel {
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 960px;
}

table.excel th,
table.excel td {
  border: 1px solid var(--excel-border);
  padding: 2px 4px;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.excel .col-label {
  width: 52px;
  text-align: left;
  font-weight: 600;
  background: var(--sticky-name);
  position: sticky;
  left: 0;
  z-index: 2;
}

table.excel .col-house {
  width: 72px;
  min-width: 72px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  background: #fff;
  position: sticky;
  left: 52px;
  z-index: 2;
  white-space: normal;
  line-height: 1.2;
}

table.excel .day-header {
  background: var(--excel-header);
  font-size: 10px;
  min-width: 72px;
}

table.excel .day-header.wknd {
  background: var(--excel-header-wknd);
}

table.excel .day-header.sun {
  background: var(--excel-header-sun);
}

table.excel .day-header.holiday {
  background: var(--excel-header-holiday);
  box-shadow: inset 0 0 0 1px #d4a72c;
}

table.excel .day-header.holiday.sun {
  background: linear-gradient(180deg, var(--excel-header-holiday) 55%, var(--excel-header-sun) 100%);
}

table.excel .day-header.holiday.wknd:not(.sun) {
  background: linear-gradient(180deg, var(--excel-header-holiday) 55%, var(--excel-header-wknd) 100%);
}

table.excel .day-header.day-outside {
  background: #e8e8e8;
  color: #555;
}

table.excel .day-outside-tag {
  font-size: 9px;
  font-weight: 500;
  color: #666;
}

table.excel td.day-outside,
table.excel th.day-outside {
  background: #f0f0f0;
  color: #555;
}

table.excel td.day-outside.name-cell:not(.schedule-slot) {
  opacity: 0.95;
}

table.excel .time-row {
  font-size: 10px;
  color: #333;
  background: #fff;
}

table.excel th.ora {
  min-width: 2.4em;
  font-size: 10px;
}

table.excel td.ora {
  min-width: 2.6em;
  width: 2.6em;
  font-weight: 600;
  background: #f9f9f9;
  font-variant-numeric: tabular-nums;
}

table.excel td.ora-edit {
  overflow: visible;
  padding: 0 2px;
  background: #fafafa;
}

table.excel .slot-sipos td.ora-edit,
table.excel .slot-sipos td.ora {
  background: #eef6fc;
}

table.excel .slot-baka td.ora-edit,
table.excel .slot-baka td.ora {
  background: #fff9e8;
}

table.excel .slot-iroda td.ora-edit,
table.excel .slot-iroda td.ora {
  background: #f5f5f5;
}

table.excel .slot-hours-input {
  -moz-appearance: textfield;
  appearance: textfield;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 2.2em;
  margin: 0 auto;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  font-family: inherit;
  line-height: 1.35;
  padding: 3px 2px;
  color: inherit;
}

table.excel .slot-hours-input::placeholder {
  color: #888;
  font-weight: 500;
  opacity: 1;
}

table.excel .ora-has-override .slot-hours-input {
  color: #0b5cad;
}

table.excel .slot-hours-input:hover {
  border-color: #b4b4b4;
  background: rgba(255, 255, 255, 0.85);
}

table.excel .slot-hours-input:focus {
  border-color: #4472c4;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 1px #4472c4;
}

table.excel .row-szabi td {
  background: #ffffe0;
  min-height: 18px;
}

table.excel .slot-sipos {
  background: var(--excel-sipos);
}

table.excel .slot-baka {
  background: var(--excel-baka);
}

table.excel .slot-iroda {
  background: var(--excel-iroda);
}

table.excel .name-cell {
  font-weight: 600;
  font-size: 11px;
}

table.excel td.col-constant {
  background: #fafafa;
  min-width: 48px;
}

.legend-side {
  display: inline-block;
  margin-top: 4px;
  padding: 4px;
  border: 1px solid var(--excel-border);
  background: #fff;
  font-size: 10px;
  text-align: left;
}

.legend-side .leg-item {
  display: inline-block;
  padding: 2px 6px;
  margin: 0;
  border-radius: 2px;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
}

.legend-side.legend-hours {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 8px 4px 12px;
}

.legend-hours-table .leg-th-num {
  text-align: right;
  font-size: 10px;
}

.legend-hours-table .leg-hrs-sub {
  color: #333;
  font-size: 10px;
}

.legend-hours-table .leg-th-quarter {
  font-size: 9px;
  line-height: 1.2;
  white-space: normal;
  max-width: 4.25rem;
}

.legend-hours-table .leg-hrs-quarter {
  font-size: 10px;
}

.legend-hours-table .leg-hrs-q-delta {
  font-size: 10px;
  font-weight: 700;
}

table.legend-hours-table {
  border-collapse: collapse;
  width: max-content;
  max-width: 100%;
  table-layout: auto;
  font-size: 11px;
}

table.legend-hours-table th,
table.legend-hours-table td {
  border: 1px solid var(--excel-border);
  padding: 3px 5px;
  text-align: left;
  vertical-align: middle;
}

table.legend-hours-table th {
  background: #f3f3f3;
  font-weight: 600;
}

.leg-th-name,
table.legend-hours-table tbody td:first-child {
  width: 1%;
  min-width: 5.75rem;
  max-width: 11rem;
  white-space: nowrap;
  padding-right: 4px;
  text-align: left;
}

table.legend-hours-table thead th:not(.leg-th-name) {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

table.legend-hours-table td.leg-hrs {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.legend-side.legend-hours .leg-item {
  min-width: 3.25rem;
  box-sizing: border-box;
}

.leg-hrs {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leg-hrs-muted {
  color: #666;
  font-weight: normal;
}

.leg-hrs-plus {
  color: #0b6e0b;
  font-weight: 700;
}

.leg-hrs-minus {
  color: #a4262c;
  font-weight: 700;
}

.legend-hours-hint {
  margin: 6px 2px 0;
  font-size: 10px;
  color: #555;
  line-height: 1.35;
}

.weekend-fairness {
  display: block;
  margin: 0 4px 12px;
  max-width: 420px;
}

.weekend-fairness-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
}

.weekend-fairness-hint {
  margin: 0 0 8px;
  font-size: 10px;
}

td.leg-hrs.weekend-over-cap {
  background: #fde8e8;
  color: #a4262c;
  font-weight: 700;
}

.note-rules-preview {
  margin: 6px 0 0;
  font-size: 11px;
  color: #0b6e0b;
  line-height: 1.35;
}

.note-rules-muted {
  color: #777;
}

.note-rules-empty {
  color: #666;
  font-style: italic;
}

.worker-note-cell textarea {
  display: block;
  width: 100%;
  min-height: 4.5em;
  box-sizing: border-box;
}

.worker-note-cell .note-rules-wrap {
  margin-top: 8px;
}

.worker-note-cell .note-rules-preview {
  margin-top: 0;
  margin-bottom: 4px;
}

.note-rules-ask {
  margin: 0;
  font-size: 12px;
  color: #4a6b4a;
  font-style: italic;
  line-height: 1.4;
}

table.excel td.ora-custom {
  font-weight: 700;
  color: #0b5cad;
  box-shadow: inset 0 -2px 0 #7eb8e8;
}

/* —— Igény rács —— */
table.grid-igeny {
  border-collapse: collapse;
  min-width: 1100px;
  width: max-content;
  background: #fff;
}

table.grid-igeny th,
table.grid-igeny td {
  border: 1px solid var(--excel-border);
  padding: 4px 2px;
  text-align: center;
  min-width: 28px;
  font-size: 11px;
}

table.grid-igeny th.name-col,
table.grid-igeny td.name-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  text-align: left;
  min-width: 88px;
  padding-left: 8px;
  font-weight: 600;
}

table.grid-igeny .day-h.wknd {
  background: var(--excel-header-wknd);
}

table.grid-igeny .day-h.sun {
  background: var(--excel-header-sun);
}

table.grid-igeny .day-h.holiday {
  background: var(--excel-header-holiday);
  box-shadow: inset 0 0 0 1px #d4a72c;
}

.calendar-legend-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.cal-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid #ccc;
}

.cal-legend-swatch.wknd {
  background: var(--excel-header-wknd);
  border-color: #e8b4b4;
}

.cal-legend-swatch.sun {
  background: var(--excel-header-sun);
  border-color: #d99;
}

.cal-legend-swatch.holiday {
  background: var(--excel-header-holiday);
  border-color: #c66;
}

table.excel td.day-wknd,
table.excel td.day-sun,
table.excel td.day-holiday {
  background: var(--excel-day-wknd);
}

table.excel td.day-sun {
  background: var(--excel-day-sun);
}

table.excel td.day-holiday {
  background: var(--excel-day-holiday);
}

table.grid-igeny td.day-wknd {
  background: var(--excel-day-wknd);
}

table.grid-igeny td.day-sun {
  background: var(--excel-day-sun);
}

table.grid-igeny td.day-holiday {
  background: var(--excel-day-holiday);
}

table.grid-igeny th.day-h.holiday {
  box-shadow: inset 0 0 0 1px #c66;
}

.month-credits-mount {
  margin: 0 4px 14px;
  max-width: 980px;
}

.month-credits-panels {
  background: #fff;
  border: 1px solid var(--excel-border);
  padding: 10px 12px;
  border-radius: 2px;
}

.credits-intro {
  margin: 0 0 12px;
}

.credits-panel-wrap + .credits-panel-wrap {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #ccc;
}

.credits-panel-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

table.grid-credits {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

table.grid-credits th,
table.grid-credits td {
  border: 1px solid var(--excel-border);
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}

table.grid-credits input[type="number"] {
  width: 3.5em;
  font: inherit;
  padding: 4px;
}

.credit-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

label.credit-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.credits-day-cell {
  font-size: 10px;
  line-height: 1.35;
  vertical-align: top;
}

.credits-day-has {
  background: #f5f8ff;
}

.credit-tag {
  display: block;
}

.credit-tag.credit-emb {
  color: #264478;
}

.credit-tag.credit-isk {
  color: #1b5e20;
}

.igeny-has-credit {
  font-weight: 700;
}

.beteg-day-cell {
  font-size: 10px;
  vertical-align: middle;
  padding: 2px 3px;
  text-align: center;
}

.beteg-day-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  min-height: 22px;
  padding: 1px 4px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #333;
}

.beteg-day-trigger:hover {
  border-color: #888;
  background: #fafafa;
}

.beteg-day-trigger.beteg-day-has,
.beteg-day-trigger.credit-day-has {
  background: #fff8f0;
  border-color: #e0a86a;
  font-weight: 600;
}

.beteg-day-trigger.credit-day-has {
  background: #f3f8ff;
  border-color: #7fa8d4;
}

.credit-hours-row {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
}

.credit-hours-row .credit-hours-input {
  margin-left: 6px;
  width: 3.5rem;
  font-size: 11px;
  padding: 2px 4px;
}

.month-credits-mount.hidden {
  display: none;
}

.beteg-drop-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 6.5em;
}

.beteg-drop-caret {
  flex-shrink: 0;
  font-size: 9px;
  color: #666;
}

.beteg-picker {
  position: absolute;
  z-index: 1001;
  width: 200px;
  max-width: min(200px, calc(100vw - 16px));
  background: #fff;
  border: 1px solid var(--excel-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.beteg-picker.hidden {
  display: none;
}

.beteg-picker-inner {
  padding: 8px 10px;
}

.beteg-picker-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.beteg-day-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

label.beteg-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  white-space: nowrap;
  padding: 2px 0 2px 4px;
  cursor: pointer;
}

label.beteg-check:hover {
  background: #f5f5f5;
}

table.grid-igeny td.has-code {
  font-weight: 700;
}

table.grid-igeny tr.row-szabi-load td {
  background: #f5f5f5;
  font-size: 10px;
  padding: 2px;
}

table.grid-igeny td.szabi-full {
  background: #ffcdd2;
  color: #b71c1c;
}

table.grid-igeny tr.row-pick td {
  border-bottom: 1px dashed #e0e0e0;
}

table.grid-igeny tr.row-person td {
  border-top: none;
}

table.grid-igeny td.name-col-pick {
  font-size: 10px;
  font-weight: 500;
  color: #666;
  font-style: italic;
}

table.grid-igeny td.name-col-person {
  font-weight: 700;
  padding-top: 2px;
}

table.grid-igeny tr.row-self td {
  background: #fffde7;
}

table.grid-igeny tr.row-readonly td.igeny-mirror {
  color: #666;
}

table.grid-igeny select.igeny-select:disabled {
  opacity: 0.92;
  cursor: default;
  background: #f7f7f7;
}

table.grid-igeny td.igeny-szabi-cell {
  vertical-align: middle;
  background: #fafafa;
}

table.grid-worker-notes {
  width: 100%;
  max-width: 960px;
  border-collapse: collapse;
  background: #fff;
}

table.grid-worker-notes th,
table.grid-worker-notes td {
  border: 1px solid var(--excel-border);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

table.grid-worker-notes .col-note-name {
  width: 120px;
  white-space: nowrap;
}

table.grid-worker-notes textarea.worker-note-input {
  width: 100%;
  min-height: 72px;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  resize: vertical;
}

/* —— Összesítő —— */
table.grid-summary {
  border-collapse: collapse;
  width: 100%;
  max-width: 720px;
  background: #fff;
}

table.grid-summary th,
table.grid-summary td {
  border: 1px solid var(--excel-border);
  padding: 6px 8px;
  text-align: right;
}

table.grid-summary th:first-child,
table.grid-summary td:first-child {
  text-align: left;
}

table.grid-summary thead th {
  background: var(--excel-header);
  font-weight: 600;
}

.szabi-quarter-mount {
  margin-top: 20px;
  max-width: 100%;
}

.szabi-quarter-banner:empty {
  display: none;
}

.szabi-quarter-banner:not(:empty) {
  margin: 0 0 12px;
}

.szabi-quarter-alert {
  background: #fff8e6;
  border: 1px solid #e6c200;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 960px;
}

.szabi-banner-title {
  margin: 0 0 8px;
  font-size: 14px;
}

.szabi-banner-list {
  margin: 0 0 8px;
  padding-left: 1.2em;
  font-size: 13px;
}

.szabi-banner-behind {
  color: #a00;
}

.szabi-banner-ok {
  color: #2d5a27;
}

.szabi-banner-name {
  margin-right: 4px;
}

.szabi-quarter-name {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  box-sizing: border-box;
}

table.grid-szabi-quarter th.szabi-quarter-worker {
  padding: 6px 4px;
  min-width: 4.5rem;
  vertical-align: middle;
}

.szabi-banner-annual {
  color: #333;
  font-weight: normal;
}

.szabi-banner-annual-note {
  font-size: 11px;
  color: #666;
}

table.grid-szabi-quarter {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  background: #fff;
  font-size: 13px;
}

table.grid-szabi-quarter th,
table.grid-szabi-quarter td {
  border: 1px solid var(--excel-border);
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}

table.grid-szabi-quarter th:first-child,
table.grid-szabi-quarter td:first-child,
table.grid-szabi-quarter .szabi-quarter-months {
  text-align: left;
}

table.grid-szabi-quarter thead th {
  background: var(--excel-header);
  font-weight: 600;
}

table.grid-szabi-quarter .col-required,
.szabi-quarter-req {
  color: #c00000;
  font-weight: 600;
  background: #fff5f5;
}

.szabi-quarter-row-current td {
  background: #f0f7ff;
}

.szabi-pct-behind {
  background: #ffc7ce !important;
  color: #9c0006;
  font-weight: 600;
}

.szabi-pct-ok {
  background: #e2efda;
}

.szabi-pct-current {
  box-shadow: inset 0 0 0 2px #4472c4;
}

.szabi-pct-exempt {
  background: #f3f3f3;
  font-style: italic;
}

.szabi-pct-tag {
  display: block;
  font-size: 10px;
  font-weight: normal;
  color: #666;
}

.settings-szabi-year {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 4px 16px;
}

.settings-szabi-year input {
  width: 4.5em;
}

/* —— Beállítások —— */
.settings-subhead {
  margin: 16px 4px 8px;
  font-size: 14px;
  font-weight: 600;
}

.settings-subhead:first-child {
  margin-top: 4px;
}

.settings-hint {
  margin: 0 4px 10px;
}

table.grid-shift-templates {
  border-collapse: collapse;
  width: 100%;
  max-width: 720px;
  margin: 0 4px 16px;
  font-size: 12px;
}

table.grid-shift-templates th,
table.grid-shift-templates td {
  border: 1px solid var(--excel-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}

table.grid-shift-templates th {
  background: #f3f3f3;
  font-weight: 600;
}

table.grid-shift-templates .shift-time-input {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 2px;
  min-width: 6.5em;
}

table.grid-shift-templates .shift-hours-preview {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shift-overnight-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
}

.btn-sm {
  font-size: 11px;
  padding: 4px 10px;
}

.settings-scroll {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--excel-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

table.grid-settings {
  border-collapse: collapse;
  width: 100%;
  min-width: 980px;
  background: #fff;
}

table.grid-settings th,
table.grid-settings td {
  border: 1px solid var(--excel-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

table.grid-settings col.col-full {
  width: 22%;
}

table.grid-settings col.col-nick {
  width: 12%;
}

table.grid-settings col.col-color {
  width: 10%;
}

table.grid-settings col.col-hours {
  width: 11%;
}

table.grid-settings col.col-annual-szabi {
  width: 12%;
}

table.grid-settings .col-annual-szabi-cell {
  white-space: nowrap;
}

table.grid-settings .annual-szabi-input {
  width: 3.2rem;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 6px;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-align: center;
}

table.grid-settings .col-hours-cell {
  white-space: nowrap;
}

table.grid-settings .hours-input {
  width: 3.2rem;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 6px;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-align: center;
}

table.grid-settings .hours-suffix {
  margin-left: 4px;
  color: #555;
  font-size: 12px;
}


table.grid-settings input[type="text"] {
  width: 100%;
  min-width: 0;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 2px;
}

table.grid-worker-notes textarea.worker-note-readonly {
  background: #f7f7f7;
  color: #333;
  cursor: default;
}

.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--excel-border);
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border: 1px solid #666;
  border-radius: 2px;
}

.palette-pop {
  position: absolute;
  z-index: 10;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  width: 140px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--excel-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.palette-pop.open {
  display: flex;
}

.palette-pop button {
  width: 24px;
  height: 24px;
  border: 1px solid #888;
  cursor: pointer;
  padding: 0;
}

.palette-pop button:focus {
  outline: 2px solid #217346;
}

.worker-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.worker-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.ai-box {
  background: #f9f9f9;
  border: 1px solid var(--excel-border);
  padding: 8px;
  margin-top: 8px;
}

.ai-box h3 {
  margin: 0 0 6px;
  font-size: 11px;
}

.ai-box ul {
  margin: 0;
  padding-left: 16px;
  font-size: 10px;
}

.footer-note {
  padding: 8px 16px;
  font-size: 10px;
  color: #555;
  background: #e8e8e8;
}

/* —— Nyomtatás: havi beosztás (álló A4, 0,7 cm margó) —— */
.schedule-print-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 4px 8px;
  padding: 6px 8px;
  background: #f5f8fc;
  border: 1px solid var(--excel-border);
  border-radius: 2px;
}

.schedule-print-bar .btn-print-schedule {
  font-weight: 600;
}

.schedule-print-head {
  margin: 0 0 6px;
  text-align: center;
}

.schedule-print-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.schedule-print-sub {
  margin: 2px 0 0;
  font-size: 9px;
  color: #444;
}

body.schedule-print-doc .schedule-print-mount .scroll-x,
body.schedule-print-doc .excel-wrap {
  overflow: visible;
  max-width: none;
  border: none;
  box-shadow: none;
}

body.schedule-print-doc {
  box-sizing: border-box;
  max-width: 210mm;
  margin: 8px auto;
  padding: 8px;
  background: #e8e8e8;
}

.schedule-print-head--injected {
  display: none;
}

body.schedule-print-doc .week-block {
  margin-bottom: 8px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0.7cm;
  }

  html.schedule-print-root,
  html.schedule-print-root body {
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .schedule-print-screen-only {
    display: none !important;
  }

  body.schedule-print-doc {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  body.schedule-print-doc .schedule-print-head {
    margin-bottom: 2mm;
  }

  body.schedule-print-doc .schedule-print-title {
    font-size: 11pt;
  }

  body.schedule-print-doc .schedule-print-sub {
    font-size: 8pt;
  }

  body.schedule-print-doc table.excel {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 6.2pt;
  }

  body.schedule-print-doc table.excel th,
  body.schedule-print-doc table.excel td {
    padding: 0.4px 1.5px !important;
    line-height: 1.15;
    overflow: visible;
    text-overflow: clip;
  }

  body.schedule-print-doc table.excel .col-label {
    width: 10mm;
    font-size: 5.8pt;
    position: static !important;
  }

  body.schedule-print-doc table.excel .col-house {
    width: 8mm;
    min-width: 0;
    font-size: 5.5pt;
    position: static !important;
  }

  body.schedule-print-doc table.excel .day-header {
    min-width: 0;
    font-size: 5.8pt;
  }

  body.schedule-print-doc table.excel td.ora,
  body.schedule-print-doc table.excel th.ora {
    min-width: 0;
    width: auto;
    font-size: 5.8pt;
  }

  body.schedule-print-doc table.excel th.week-hours-col-header,
  body.schedule-print-doc table.excel td.week-hours-side,
  body.print-schedule-from-app table.excel th.week-hours-col-header,
  body.print-schedule-from-app table.excel td.week-hours-side {
    display: none !important;
  }

  body.schedule-print-doc .week-block {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.2mm;
  }

  body.schedule-print-doc .week-block h3 {
    font-size: 6.5pt;
    margin: 0 0 0.5mm;
  }

  body.schedule-print-doc .legend-hours,
  body.schedule-print-doc .legend-side,
  body.schedule-print-doc .weekend-fairness,
  body.schedule-print-doc .calendar-legend-hint,
  body.schedule-print-doc .live-empty-banner,
  body.schedule-print-doc .month-credits-mount {
    display: none !important;
  }

  body.print-schedule-from-app #devGate,
  body.print-schedule-from-app .topbar,
  body.print-schedule-from-app .tabs,
  body.print-schedule-from-app .toolbar-vsep,
  body.print-schedule-from-app .footer-note,
  body.print-schedule-from-app .month-credits-mount,
  body.print-schedule-from-app .live-empty-banner,
  body.print-schedule-from-app #scheduleMount .legend-hours,
  body.print-schedule-from-app #scheduleMount .weekend-fairness,
  body.print-schedule-from-app #scheduleMount .calendar-legend-hint {
    display: none !important;
  }

  body.print-schedule-from-app .tab-panel {
    display: none !important;
  }

  body.print-schedule-from-app #tab-beosztas {
    display: block !important;
  }

  body.print-schedule-from-app .layout,
  body.print-schedule-from-app .panel-main,
  body.print-schedule-from-app .excel-wrap {
    display: block !important;
    overflow: visible !important;
    border: none;
    box-shadow: none;
  }

  html.print-schedule-from-app-root,
  body.print-schedule-from-app {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-schedule-from-app .schedule-print-head--injected {
    display: block !important;
    margin-bottom: 2mm;
  }

  body.print-schedule-from-app table.excel {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 7pt;
  }

  body.print-schedule-from-app table.excel .col-label,
  body.print-schedule-from-app table.excel .col-house {
    position: static !important;
    background: #fafafa !important;
  }

  body.print-schedule-from-app table.excel th,
  body.print-schedule-from-app table.excel td {
    padding: 1px 2px !important;
    overflow: visible;
    text-overflow: clip;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-schedule-from-app table.excel th.day-header {
    background: var(--excel-header) !important;
  }

  body.print-schedule-from-app table.excel th.day-header.wknd {
    background: var(--excel-header-wknd) !important;
  }

  body.print-schedule-from-app table.excel th.day-header.sun {
    background: var(--excel-header-sun) !important;
  }

  body.print-schedule-from-app table.excel th.day-header.holiday {
    background: var(--excel-header-holiday) !important;
  }

  body.print-schedule-from-app table.excel td.day-wknd {
    background: var(--excel-day-wknd) !important;
  }

  body.print-schedule-from-app table.excel td.day-sun {
    background: var(--excel-day-sun) !important;
  }

  body.print-schedule-from-app table.excel td.day-holiday {
    background: var(--excel-day-holiday) !important;
  }

  body.print-schedule-from-app table.excel tr.row-szabi td {
    background: #ffffe0 !important;
  }

  body.print-schedule-from-app table.excel tr.slot-sipos td:not([style*="background"]) {
    background: var(--excel-sipos) !important;
  }

  body.print-schedule-from-app table.excel tr.slot-baka td:not([style*="background"]) {
    background: var(--excel-baka) !important;
  }

  body.print-schedule-from-app table.excel tr.slot-iroda td:not([style*="background"]) {
    background: var(--excel-iroda) !important;
  }

  body.print-schedule-from-app table.excel td.name-cell[style],
  body.print-schedule-from-app table.excel td.schedule-slot[style] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.print-schedule-from-app table.excel td.ora,
  body.print-schedule-from-app table.excel td.ora-edit {
    background: #f9f9f9 !important;
  }

  body.print-schedule-from-app table.excel tr.slot-sipos td.ora,
  body.print-schedule-from-app table.excel tr.slot-sipos td.ora-edit {
    background: #eef6fc !important;
  }

  body.print-schedule-from-app table.excel tr.slot-baka td.ora,
  body.print-schedule-from-app table.excel tr.slot-baka td.ora-edit {
    background: #fff9e8 !important;
  }

  body.print-schedule-from-app table.excel .slot-hours-input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: 600 !important;
    color: inherit !important;
  }

  body.print-schedule-from-app table.excel .beteg-day-has,
  body.print-schedule-from-app table.excel .credits-day-has {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-schedule-from-app .week-block {
    break-inside: avoid;
    margin-bottom: 1.2mm;
  }

  body.print-schedule-from-app .week-block h3 {
    font-size: 7pt;
    margin: 0 0 0.5mm;
    color: #222;
  }

  body.print-schedule-from-app #slotPicker,
  body.print-schedule-from-app #betegPicker,
  body.print-schedule-from-app #creditPicker {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}