/* ==========================================================================
   Směnový Plánovač (Shift Management Web Application)
   Styling faithfully reproducing Google Sheet visual language + modern UI
   ========================================================================== */

:root {
  --sheet-yellow: #f5b014;
  --sheet-yellow-dark: #df9e0b;
  --sheet-notes-yellow: #fff2cc;
  --sheet-blue-header: #8ea9db;
  --sheet-blue-cell: #d9e1f2;
  --sheet-blue-border: #41719c;
  --sheet-reserve-green: #e2efda;
  --sheet-reserve-border: #a9d08e;
  --sheet-leave-green: #c6e0b4;
  --sheet-leave-header: #a9d08e;
  --sheet-sick-pink: #fce4d6;
  --sheet-sick-red: #c00000;
  --sheet-sick-border: #ff0000;
  --sheet-border-dark: #333333;
  --sheet-grid-line: #bfbfbf;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #ca8a04;
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-ui: #cbd5e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */
.navbar {
  background-color: #1e293b;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav-brand .brand-icon {
  background: var(--sheet-yellow);
  color: #000;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-btn {
  background: transparent;
  color: #cbd5e1;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background-color: #334155;
  color: #ffffff;
}

.nav-btn.active {
  background-color: var(--primary);
  color: #ffffff;
}

.badge-counter {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #0f172a;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.user-badge .role-tag {
  background: var(--sheet-yellow);
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.btn-logout {
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* MAIN CONTAINER */
.app-container {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 0 1rem;
  flex: 1;
}

/* AUTH VIEWS */
.auth-wrapper {
  max-width: 480px;
  margin: 3rem auto;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid var(--border-ui);
}

.auth-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-ui);
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border: none;
  background: transparent;
  transition: all 0.15s;
}

.auth-tab.active {
  color: var(--primary);
  background: #ffffff;
  border-bottom: 3px solid var(--primary);
}

.auth-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #334155;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-ui);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.btn-primary {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  padding: 0.6rem 1rem;
  background-color: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
}

.btn-success {
  padding: 0.5rem 0.85rem;
  background-color: var(--success);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger {
  padding: 0.5rem 0.85rem;
  background-color: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background-color: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
}

.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ==========================================================================
   GOOGLE SHEET REPLICA BOARD
   ========================================================================== */

.sheet-planner-wrapper {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-ui);
}

.sheet-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-ui);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.date-nav-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-ui);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.date-nav-btn:hover {
  background: #e2e8f0;
}

.sheet-date-picker {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-ui);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Layout container with left and right day switching buttons */
.sheet-board-layout-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  position: relative;
  margin: 0 auto;
}

.sheet-side-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 78px;
  min-width: 78px;
  padding: 1.5rem 0.5rem;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: sticky;
  top: 140px;
  z-index: 10;
  margin-top: 10px;
}

.sheet-side-nav-btn:hover {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.sheet-side-nav-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.sheet-side-nav-btn .side-nav-arrow {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  transition: transform 0.2s ease;
}

.sheet-side-nav-btn.prev:hover .side-nav-arrow {
  transform: translateX(-4px);
}

.sheet-side-nav-btn.next:hover .side-nav-arrow {
  transform: translateX(4px);
}

.sheet-side-nav-btn .side-nav-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 860px) {
  .sheet-board-layout-wrap {
    gap: 0.75rem;
  }
  .sheet-side-nav-btn {
    width: 52px;
    min-width: 52px;
    padding: 1rem 0.25rem;
  }
  .sheet-side-nav-btn .side-nav-arrow {
    font-size: 1.5rem;
  }
  .sheet-side-nav-btn .side-nav-text {
    font-size: 0.65rem;
  }
}

@media (max-width: 680px) {
  .sheet-side-nav-btn {
    display: none !important;
  }
}

@media print {
  .sheet-side-nav-btn {
    display: none !important;
  }
  .sheet-board-layout-wrap {
    display: block;
  }
}

/* THE AUTHENTIC GOOGLE SHEET TABLE */
.sheet-board-card {
  max-width: 660px;
  width: 100%;
  margin: 0;
  background: #ffffff;
  border: 2px solid var(--sheet-border-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  overflow: hidden;
}

/* Board Header (Yellow) */
.sheet-top-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--sheet-yellow);
  border-bottom: 2px solid var(--sheet-border-dark);
}

.sheet-header-left {
  padding: 0.65rem 0.75rem;
  border-right: 2px solid var(--sheet-border-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sheet-date-display {
  font-size: 1.35rem;
  font-weight: 700;
  color: #000;
  text-align: center;
  letter-spacing: -0.2px;
}

.sheet-header-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.65rem 0.75rem;
  background-color: var(--sheet-yellow);
}

.sheet-shift-unified-box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sheet-shift-display {
  font-size: 1.35rem;
  font-weight: 800;
  color: #000;
  text-align: center;
  letter-spacing: -0.2px;
}

.sheet-holiday-tag {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-align: center;
}

/* Two Main Columns */
.sheet-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--sheet-border-dark);
}

.sheet-col-left {
  border-right: 2px solid var(--sheet-border-dark);
  background-color: #b4c6e7;
  display: flex;
  flex-direction: column;
}

.sheet-col-right {
  background-color: #b4c6e7;
  display: flex;
  flex-direction: column;
}

/* Station Group */
.station-group {
  display: grid;
  grid-template-columns: 90px 1fr;
  border-bottom: 2px solid var(--sheet-border-dark);
}

.sheet-col-left .station-group:last-child,
.sheet-col-right .station-group:last-child {
  border-bottom: none;
  flex: 1;
}

.sheet-col-left .station-group:last-child .station-slots,
.sheet-col-right .station-group:last-child .station-slots {
  flex: 1;
}

.station-label {
  background-color: #b4c6e7;
  color: #000;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 2px solid var(--sheet-border-dark);
  padding: 0.35rem;
  letter-spacing: -0.2px;
}

.station-slots {
  display: flex;
  flex-direction: column;
  background-color: #d9e1f2;
}

.slot-row {
  border-bottom: 1px solid var(--sheet-grid-line);
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  position: relative;
}

.slot-row:last-child {
  border-bottom: none;
}

.slot-select {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  outline: none;
  appearance: none;
  text-align: center;
}

.slot-select:hover {
  background-color: #c9d5ec;
}

.slot-select option {
  background: #ffffff;
  color: #000;
  font-weight: normal;
}

.slot-arrow {
  position: absolute;
  right: 6px;
  pointer-events: none;
  font-size: 0.7rem;
  color: #555;
}

/* Reserve / Green Middle Section */
.sheet-reserve-section {
  background-color: var(--sheet-reserve-green);
  border-bottom: 2px solid var(--sheet-border-dark);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.reserve-left-col {
  border-right: 2px solid var(--sheet-border-dark);
}

.reserve-slot-row {
  border-bottom: 1px solid var(--sheet-grid-line);
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  position: relative;
}

.reserve-slot-row:last-child {
  border-bottom: none;
}

/* VOLNA + MARODKY Section */
.sheet-leave-section {
  border-bottom: 2px solid var(--sheet-border-dark);
  background-color: var(--sheet-leave-green);
}

.leave-header-bar {
  background-color: var(--sheet-leave-header);
  border-bottom: 2px solid var(--sheet-border-dark);
  padding: 0.4rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.leave-header-bar .marodky-text {
  color: var(--sheet-sick-red);
}

.leave-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 200px;
}

.leave-col-half {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.leave-col-volna {
  background-color: var(--sheet-leave-green);
  border-right: 2px solid var(--sheet-border-dark);
}

.leave-col-marodky {
  background-color: var(--sheet-sick-pink);
}

.leave-col-title-bar {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--sheet-border-dark);
}

.leave-col-title-bar.volna-title {
  background-color: #b9d8a3;
  color: #14532d;
}

.leave-col-title-bar.marodky-title {
  background-color: #f8c8b4;
  color: var(--sheet-sick-red);
}

.leave-controls-bar {
  padding: 0.35rem 0.4rem;
  background: rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid var(--sheet-border-dark);
}

.leave-controls-bar.marodky-controls {
  background: rgba(255, 255, 255, 0.55);
}

.leave-quick-add-wrap {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.leave-quick-select {
  flex: 1;
  min-width: 0;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #16a34a;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  padding: 0 0.35rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.leave-quick-select:focus {
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.leave-quick-select.marodky-select {
  border-color: #dc2626;
}

.leave-quick-select.marodky-select:focus {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.leave-btn-multiday {
  height: 28px;
  padding: 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  color: #334155;
  transition: all 0.15s;
  flex-shrink: 0;
}

.leave-btn-multiday:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.leave-rows-list {
  display: flex;
  flex-direction: column;
}

.leave-item-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
  padding: 0.2rem 0.5rem;
  gap: 0.35rem;
}

.leave-worker-name {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000000;
}

.marodka-date-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.leave-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.btn-marodka-end-quick {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-marodka-end-quick:hover {
  background: #0369a1;
}

.btn-leave-del {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-leave-del:hover {
  background: rgba(220, 38, 38, 0.15);
  transform: scale(1.15);
}

.leave-item-row.marodka-worker {
  color: var(--sheet-sick-red);
}

/* Chips and badges for PLP & Trainings */
.participant-chip {
  display: inline-block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin: 0.15rem 0.2rem 0.15rem 0;
  white-space: nowrap;
}

.badge-time {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.badge-status-scheduled {
  display: inline-block;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.leave-empty-dash {
  color: #777;
  font-weight: normal;
}

/* Notes Yellow Bottom Section */
.sheet-notes-section {
  background-color: var(--sheet-notes-yellow);
  padding: 0.75rem;
  min-height: 100px;
  position: relative;
}

.sheet-notes-input {
  width: 100%;
  min-height: 80px;
  background: transparent;
  border: 1px dashed rgba(0,0,0,0.25);
  border-radius: 4px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  color: #000;
}

.sheet-notes-input:focus {
  outline: none;
  background: #ffffff;
  border-style: solid;
}

/* WORKER PORTAL DASHBOARD */
.worker-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-ui);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.status-highlight-box {
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.status-highlight-box.working {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #ffffff;
}

.status-highlight-box.leave {
  background: linear-gradient(135deg, #166534, #22c55e);
  color: #ffffff;
}

.status-highlight-box.sick {
  background: linear-gradient(135deg, #991b1b, #ef4444);
  color: #ffffff;
}

.status-highlight-box.free {
  background: #f1f5f9;
  color: #334155;
  border: 2px dashed #cbd5e1;
}

.status-station-badge {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0.5rem 0;
}

/* DATA TABLES */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-ui);
}

.data-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.badge-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background-color: #dcfce7;
  color: #166534;
}

.badge-rejected {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-mistr {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 700;
}

.badge-predak {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-weight: 700;
}

.badge-worker {
  background-color: #f1f5f9;
  color: #475569;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-ui);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-ui);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* TOAST NOTIFICATION */
#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 300;
  font-weight: 500;
}

/* PRINT STYLES */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .navbar, .sheet-toolbar, .no-print {
    display: none !important;
  }
  .app-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .sheet-planner-wrapper {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .sheet-board-card {
    max-width: 100%;
    box-shadow: none;
    border: 2px solid #000;
  }
}

/* WORKER QUALIFICATIONS & VACATION TRACKER STYLES */
.modal-large {
  max-width: 760px;
}

.clickable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.clickable-row:hover {
  background-color: #f8fafc;
}

.station-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin: 0.1rem 0.15rem;
  border: 1px solid #c7d2fe;
}

.station-tag-all {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.station-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.station-checkbox-item {
  border: 1px solid var(--border-ui);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
}

.station-checkbox-item:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.station-checkbox-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
  letter-spacing: 0.5px;
}

.progress-container {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0 1.25rem 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-green {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.progress-yellow {
  background: linear-gradient(90deg, #eab308, #ca8a04);
}

.progress-red {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

/* STATIC SHIFT DISPLAY (ON THE SHEET) */
.sheet-shift-badge-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  height: 100%;
}

.sheet-shift-display {
  font-size: 1.35rem;
  font-weight: 800;
  color: #000;
  text-align: center;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.sheet-date-btn {
  background: #ffffff;
  border: 1px solid var(--border-ui);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #0f172a;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sheet-date-btn:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  color: var(--primary);
}

/* CZECH CALENDAR MODAL (MONDAY TO SUNDAY) */
#modal-czech-calendar {
  z-index: 9999 !important;
}

.calendar-modal-content {
  background: #ffffff;
  border-radius: 12px;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  z-index: 10000 !important;
}

.calendar-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-ui);
}

.calendar-month-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.calendar-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f1f5f9;
  border-bottom: 2px solid var(--border-ui);
  text-align: center;
}

.calendar-weekday-col {
  padding: 0.6rem 0.2rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
}

.calendar-weekday-col.weekend {
  color: #dc2626;
  background: #fee2e2;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: #e2e8f0;
  padding: 2px;
}

.cal-day-cell {
  background: #ffffff;
  min-height: 64px;
  padding: 0.35rem 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}

.cal-day-cell:hover {
  background: #eff6ff;
  border-color: var(--primary);
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cal-day-cell.outside-month {
  background: #f8fafc;
  opacity: 0.45;
}

.cal-day-cell.selected {
  outline: 2px solid var(--primary);
  background: #dbeafe !important;
  font-weight: 800;
  z-index: 3;
}

.cal-day-cell.today {
  border: 2px solid #f59e0b;
  background: #fffbeb;
}

.cal-day-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-day-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.cal-today-dot {
  font-size: 0.65rem;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.cal-shift-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
  line-height: 1.1;
}

.cal-shift-pill.shift-ranni {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.cal-shift-pill.shift-nocni {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.cal-shift-pill.shift-odp {
  background: #fed7aa;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.cal-shift-pill.shift-volno {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.cal-day-cell.is-holiday {
  background: #fffdf5;
  border: 1.5px solid #f59e0b;
}

.cal-holiday-flag {
  font-size: 0.72rem;
  margin-left: 0.2rem;
}

.cal-holiday-pill {
  font-size: 0.65rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 0.08rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: 0.15rem;
  line-height: 1.15;
}

/* "Z" Volno & Shift Off Notice Styles */
.badge-zvolno {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.leave-item-row.zvolno-row {
  background-color: rgba(254, 243, 199, 0.45);
}

.leave-shift-off-notice {
  font-size: 0.8rem;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  text-align: center;
  font-weight: 600;
  line-height: 1.3;
}

/* Czech Date Picker Trigger Elements */
.czech-date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.czech-date-picker-wrap .form-input {
  flex: 1;
  cursor: pointer;
  background-color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.czech-date-picker-wrap .form-input:focus {
  background-color: #f8fafc;
}

.btn-date-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid var(--border-ui);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-date-picker:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Permanent station badge in worker table */
.badge-permanent {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

/* Z-volno duplicate warning box */
.zvolno-warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

/* Leave Admin Master-Detail Layout */
.leave-admin-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .leave-admin-layout {
    grid-template-columns: 1fr;
  }
}

.leave-admin-sidebar {
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.leave-admin-search-wrap {
  margin-bottom: 0.75rem;
}

.leave-worker-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-ui);
  padding-bottom: 0.5rem;
}

.leave-worker-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.leave-worker-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.leave-worker-tab.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.badge-tab-count {
  background: #ef4444;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  line-height: 1;
}

.leave-workers-list {
  max-height: 580px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.25rem;
}

.leave-worker-item {
  border: 1.5px solid var(--border-ui);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.leave-worker-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.leave-worker-item.active {
  background: #eff6ff;
  border-color: #3b82f6;
  border-left: 4px solid #2563eb;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.leave-worker-info {
  flex: 1;
  min-width: 0;
}

.leave-worker-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leave-worker-meta {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.leave-worker-pending-pill {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.leave-admin-content {
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: 400px;
}

.leave-admin-worker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-ui);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.leave-admin-worker-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Worker Excuse / Cannot Attend styles */
.btn-excuse {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-excuse:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
}

.badge-excused {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.participant-chip.declined {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
  text-decoration: line-through;
  opacity: 0.9;
}

/* Unassigned workers warning banner on shift sheet */
.sheet-unassigned-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 5px solid #e11d48;
  color: #9f1239;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  border-radius: 6px;
  margin: 0.6rem 0.6rem 0.4rem 0.6rem;
}

.sheet-unassigned-banner .unassigned-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sheet-unassigned-banner strong {
  color: #be123c;
  font-weight: 800;
}

/* PLP Badges */
.badge-plp {
  background: #0284c7;
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: 0.03em;
  margin-right: 0.35rem;
}

@media print {
  .sheet-unassigned-banner {
    display: none !important;
  }
  .badge-plp {
    background: transparent !important;
    color: #000000 !important;
    border: 1px solid #000000;
    padding: 0.05rem 0.3rem;
  }
}



