/* ==========================================================================
   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;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: #0f172a;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.user-badge-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Plant toggle group in navbar */
.plant-toggle-group {
  display: inline-flex;
  align-items: center;
  background: #1e293b;
  border-radius: 6px;
  padding: 2px;
  border: 1.5px solid #3b82f6;
  gap: 2px;
  margin-right: 0.25rem;
}

.plant-btn {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.plant-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.plant-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.user-badge-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.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;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-ui);
}

.toolbar-nav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 580px;
  justify-content: center;
}

.toolbar-nav-row .date-nav-btn {
  flex: 1;
  text-align: center;
  background: #f1f5f9;
  border: 1px solid var(--border-ui);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

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

.toolbar-date-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 580px;
  justify-content: center;
  flex-wrap: wrap;
}

.toolbar-date-row .sheet-date-btn {
  flex: 1;
  min-width: 220px;
  text-align: center;
  background: #ffffff;
  border: 1.5px solid var(--border-ui);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toolbar-date-row .sheet-date-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.toolbar-date-row .btn-today {
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.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: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, 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, .reserve-slot-row {
  border-bottom: 1px solid var(--sheet-grid-line);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

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

.slot-worker-display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.slot-worker-display.has-overtime {
  font-size: 0.84rem;
  gap: 3px;
}

.slot-worker-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  line-height: 1.25;
  padding: 1px 0;
}

.slot-ot-badge {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e40af;
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.slot-arrival-badge {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
  color: #15803d;
  background-color: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.badge-blood-donor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.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;
  font-family: inherit;
  line-height: 1.25;
  letter-spacing: normal;
}

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

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

.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);
}

/* 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;
  font-family: inherit;
  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;
}

.participants-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: flex-start;
  max-width: 100%;
}

.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, .table-custom {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

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

.data-table th,
.table-custom 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;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 0.5rem !important;
  align-items: flex-start !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);
  position: relative;
  z-index: 10000 !important;
  margin: 1rem auto;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-scrollable-body {
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

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

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

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

.calendar-weekday-col {
  padding: 0.5rem 0.15rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: #334155;
  min-width: 0;
}

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

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

.cal-day-cell {
  background: #ffffff;
  min-height: 60px;
  padding: 0.25rem 0.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

.cal-day-cell:hover {
  background: #eff6ff;
  border-color: var(--primary);
  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.is-past-disabled {
  opacity: 0.45;
  background: #f1f5f9;
  cursor: not-allowed !important;
}

.cal-day-cell.is-past-disabled:hover {
  background: #fee2e2 !important;
  box-shadow: none !important;
}

.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-cell.has-worker-event {
  border-left: 3px solid #0284c7;
}

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

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

.cal-today-dot {
  font-size: 0.62rem;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  padding: 0.02rem 0.25rem;
  border-radius: 4px;
  white-space: nowrap;
}

.cal-shift-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.2rem;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
  line-height: 1.1;
  min-width: 0;
  max-width: 100%;
}

.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.62rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 0.08rem 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: 0.15rem;
  line-height: 1.15;
  min-width: 0;
  max-width: 100%;
}

/* Event badges on calendar cells (Nahlášené volno, PLP, Školení) */
.cal-events-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  min-width: 0;
}

.cal-event-pill {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  min-width: 0;
  max-width: 100%;
}

.cal-event-volno {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.cal-event-zvolno {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.cal-event-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px dashed #f59e0b;
}

.cal-event-marodka {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.cal-event-plp {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #67e8f9;
}

.cal-event-training {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}

.cal-event-prescas {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.shift-short {
  display: none;
}

@media (max-width: 640px) {
  #modal-czech-calendar {
    padding: 0.25rem !important;
  }
  .calendar-modal-content {
    margin: 0.25rem auto;
    max-height: 96vh;
    border-radius: 8px;
  }
  .calendar-nav-bar {
    padding: 0.5rem 0.75rem;
  }
  .calendar-month-title {
    font-size: 1.05rem;
  }
  .calendar-weekday-col {
    padding: 0.35rem 0.1rem;
    font-size: 0.75rem;
  }
  .cal-day-cell {
    min-height: 48px;
    padding: 0.18rem 0.1rem;
  }
  .cal-day-num {
    font-size: 0.8rem;
  }
  .cal-shift-pill {
    font-size: 0.58rem;
    padding: 0.08rem 0.1rem;
    margin-top: 0.1rem;
  }
  .cal-holiday-pill {
    display: none !important;
  }
  .shift-full {
    display: none !important;
  }
  .shift-short {
    display: inline !important;
  }
}

/* "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-item-row.plp-row {
  background-color: rgba(224, 242, 254, 0.55);
  border-left: 3px solid #0284c7;
}

.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 minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .leave-admin-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .mobile-leave-tabs {
    display: flex !important;
  }

  .leave-admin-layout.mobile-view-list .leave-admin-sidebar {
    display: block !important;
  }
  .leave-admin-layout.mobile-view-list .leave-admin-content {
    display: none !important;
  }

  .leave-admin-layout.mobile-view-detail .leave-admin-sidebar {
    display: none !important;
  }
  .leave-admin-layout.mobile-view-detail .leave-admin-content {
    display: block !important;
  }

  .mobile-leave-back-bar {
    display: block !important;
  }
}

.leave-admin-sidebar,
.leave-admin-content {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.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: none !important;
  opacity: 0.95;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* 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: #dbeafe;
  color: #1e40af !important;
  border: 1px solid #bfdbfe;
  font-size: 0.85rem;
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0.35rem;
  line-height: 1.2;
}

@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;
  }
}

/* ==============================================================================
   RESPONSIVE DESIGN PRO MOBILNÍ TELEFONY A TABLETY
   ============================================================================== */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* Filter pills pro záložky aktivní / zrušené */
.filter-pills .pill-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pills .pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

@media (max-width: 860px) {
  /* NAVBAR NA MOBILU: fixuje celou šířku a zaručuje okamžitou dostupnost odhlášení i posun lišty */
  .navbar {
    padding: 0.4rem 0.6rem;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .nav-brand {
    font-size: 1rem;
    gap: 0.35rem;
    order: 1;
    flex-shrink: 0;
  }

  .nav-brand .brand-icon {
    padding: 0.2rem 0.4rem;
    font-size: 0.82rem;
  }

  /* User Area: na mobilu má plnou šířku řádku s rozdělením info vlevo a tlačítek vpravo */
  .user-badge {
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.25rem 0.45rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    background-color: #0f172a;
    border-radius: 8px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .user-badge-info {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    flex: 1 1 auto;
    min-width: 0;
    touch-action: pan-x;
  }
  .user-badge-info::-webkit-scrollbar {
    display: none;
  }

  .user-badge-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .user-badge #user-display-name {
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 500;
    max-width: none;
    flex-shrink: 0;
  }

  .user-badge .role-tag {
    font-size: 0.62rem;
    padding: 0.1rem 0.3rem;
    flex-shrink: 0;
  }

  .plant-btn {
    font-size: 0.72rem !important;
    padding: 0.18rem 0.42rem !important;
  }

  .user-badge .btn-secondary, .user-badge .btn-logout {
    font-size: 0.72rem !important;
    padding: 0.22rem 0.45rem !important;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 5px;
  }

  .user-badge .btn-logout {
    background: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 700;
    border: none !important;
  }

  /* Navigační lišta záložek - plynule a spolehlivě posuvná */
  .nav-links {
    order: 3;
    width: 100%;
    max-width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    gap: 0.35rem;
    padding: 0.35rem 0.2rem 0.2rem;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    scrollbar-width: thin;
    box-sizing: border-box;
  }

  .nav-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .app-container {
    padding: 0 0.35rem;
    margin: 0.5rem auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .worker-card, .leave-admin-layout, .leave-admin-content {
    max-width: 100%;
    box-sizing: border-box;
  }

  .worker-card {
    padding: 0.85rem 0.55rem;
  }

  .leave-admin-sidebar, .leave-admin-content {
    padding: 0.75rem 0.5rem;
  }

  .mobile-table-hint {
    display: flex !important;
  }

  .leave-admin-worker-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  /* ŠICHTOVNÍK NA MOBILU: žádné ořezávání jmen, optimální šířka sloupců */
  .sheet-board-layout-wrap {
    padding: 0;
    gap: 0;
    width: 100%;
  }

  .sheet-planner-wrapper {
    padding: 0.25rem 0.1rem;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .sheet-board-card {
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
    box-sizing: border-box;
  }

  .sheet-date-display, .sheet-shift-display {
    font-size: 1.05rem;
    letter-spacing: -0.3px;
  }

  /* Zúžením popisku stanoviště ze 90px na 56px získá jméno pracovníka více místa a popisek Předák + Zástup mistra se celý vejde */
  .station-group {
    grid-template-columns: 56px 1fr !important;
  }

  .station-label {
    font-size: 0.78rem !important;
    font-weight: 800;
    padding: 0.15rem 0.1rem;
    letter-spacing: -0.4px;
    border-right-width: 1.5px;
  }

  .slot-row, .reserve-slot-row {
    height: 32px; /* Příjemnější pro prsty na mobilu */
    padding: 0 0.15rem;
    overflow: hidden;
  }

  .slot-worker-display {
    font-size: 0.84rem !important;
    gap: 3px;
    line-height: 1.25 !important;
  }

  .slot-worker-display.has-overtime {
    font-size: 0.77rem !important;
    letter-spacing: normal !important;
    gap: 2px;
  }

  .slot-worker-name {
    line-height: 1.25;
  }

  .slot-ot-badge,
  .slot-arrival-badge {
    font-size: 0.68rem !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
    gap: 1px !important;
  }

  .slot-select {
    font-size: 0.86rem !important;
    font-weight: 700;
    letter-spacing: normal !important;
    padding-right: 14px;
    padding-left: 2px;
    text-align: center;
    font-family: inherit;
    line-height: 1.25;
  }

  .slot-arrow {
    right: 2px;
    font-size: 0.62rem;
    opacity: 0.45;
  }

  .leave-col-header {
    font-size: 0.72rem;
    padding: 0.25rem 0.15rem;
  }

  .leave-item-row {
    font-size: 0.78rem;
    height: 30px;
    padding: 0 0.25rem;
  }

  .sheet-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .toolbar-nav-row, .toolbar-date-row {
    width: 100%;
  }
}

.mobile-leave-nav-hint {
  display: none;
}

@media (max-width: 900px) {
  .mobile-leave-nav-hint {
    display: flex !important;
  }
}

/* Quick approve / reject buttons in shift sheet VOLNA list */
.btn-leave-action {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.btn-leave-action.approve {
  background: #16a34a;
  color: #ffffff;
}

.btn-leave-action.approve:hover {
  background: #15803d;
  transform: scale(1.05);
}

.btn-leave-action.reject {
  background: #dc2626;
  color: #ffffff;
}

.btn-leave-action.reject:hover {
  background: #b91c1c;
  transform: scale(1.05);
}

.leave-item-pending {
  animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

/* Quick Add Leave Button in VOLNA title */
.btn-sheet-add-leave {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #15803d;
  color: #ffffff;
  border: 1px solid #166534;
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease-in-out;
}

.btn-sheet-add-leave:hover {
  background: #166534;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-sheet-add-leave:active {
  transform: translateY(0);
}

/* Sheet Leave Modal Type Selection Cards */
.sheet-leave-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.sheet-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.sheet-type-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.sheet-type-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.sheet-type-card#sheet-type-card-z_volno.active {
  border-color: #eab308;
  background: #fef9c3;
  box-shadow: 0 0 0 1px #eab308;
}

.sheet-type-card#sheet-type-card-z_volno.active .sheet-type-title {
  color: #854d0e;
}

/* Quick Add Leave: Z-volno yellow button */
.btn-zvolno-quick {
  background: #eab308 !important;
  color: #713f12 !important;
  border: 1px solid #ca8a04 !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-zvolno-quick:hover {
  background: #ca8a04 !important;
  color: #ffffff !important;
  border-color: #a16207 !important;
}

.btn-zvolno-quick:hover .btn-zvolno-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.sheet-type-card#sheet-type-card-paragraf.active {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 0 0 1px #d97706;
}

.sheet-type-icon {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.sheet-type-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e293b;
  margin-bottom: 0.15rem;
}

.sheet-type-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .btn-sheet-add-leave .btn-text {
    display: none;
  }
  .btn-sheet-add-leave {
    padding: 0.2rem 0.4rem;
  }
}

/* ========================================================================== */
/* RESPONSIVE LEAVE ADMINISTRATION: DESKTOP TABLE VS MOBILE CARDS           */
/* ========================================================================== */
.leave-desktop-table-wrap {
  display: block;
}
.leave-mobile-cards-wrap {
  display: none;
}

@media (max-width: 768px) {
  .leave-desktop-table-wrap {
    display: none !important;
  }
  .mobile-table-hint {
    display: none !important;
  }
  .leave-mobile-cards-wrap {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
  }

  .leave-mobile-card {
    background: #ffffff;
    border: 1px solid var(--border-ui);
    border-radius: 10px;
    padding: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: all 0.2s ease;
  }

  .leave-mobile-card.pending-card {
    border: 1.5px solid #f59e0b;
    background: #fffdf7;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
  }

  .leave-mobile-card.selected-highlight {
    border-color: #2563eb !important;
    background: #eff6ff !important;
  }

  /* PLP and Training cards styling */
  .plp-card-confirmed {
    border: 1.5px solid #86efac !important;
    background: #f0fdf4 !important;
  }
  .plp-card-pending {
    border: 1.5px solid #93c5fd !important;
    background: #eff6ff !important;
  }
  .plp-card-declined {
    border: 1.5px solid #fca5a5 !important;
    background: #fef2f2 !important;
  }

  .plp-header-actions {
    width: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
  }
  .plp-header-actions button {
    flex: 1 1 calc(50% - 0.25rem) !important;
    justify-content: center !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.88rem !important;
    border-radius: 8px !important;
  }

  .plp-training-tabs {
    display: flex !important;
    width: 100% !important;
    gap: 0.35rem !important;
    background: #f1f5f9 !important;
    padding: 3px !important;
    border-radius: 8px !important;
    border-bottom: none !important;
  }
  .plp-training-tabs .leave-worker-tab {
    flex: 1 !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.55rem 0.4rem !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    border: none !important;
    margin: 0 !important;
  }
  .plp-training-tabs .leave-worker-tab.active {
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    font-weight: 700 !important;
  }

  #training-workers-list {
    grid-template-columns: 1fr !important;
    max-height: 240px !important;
  }
  .tr-worker-label {
    padding: 0.5rem 0.6rem !important;
    font-size: 0.9rem !important;
  }
  .tr-worker-chk {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  .tr-worker-search-bar {
    width: 100% !important;
  }
  .tr-worker-search-bar input {
    width: 100% !important;
  }

  .modal-footer-btns {
    display: flex !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
  .modal-footer-btns button {
    flex: 1 !important;
    padding: 0.6rem 0.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

.tr-worker-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.tr-worker-label:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.tr-worker-chk {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Pending queue navigator bar */
.pending-queue-nav-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Shift preview modal styles */
.shift-preview-modal-content {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
}

.shift-preview-station-card {
  background: #ffffff;
  border: 1px solid var(--border-ui);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
}

.shift-preview-station-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Station JEŘ Lock Button & Badge */
.station-label-jer {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.15rem !important;
}

.btn-jer-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.15s ease-in-out;
  border: 1.5px solid transparent;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-jer-lock.unlocked {
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  border-color: #cbd5e1;
}

.btn-jer-lock.unlocked:hover {
  background: #ffffff;
  border-color: #3b82f6;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.25);
}

.btn-jer-lock.locked {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}

.btn-jer-lock.locked:hover {
  background: #fecaca;
  transform: scale(1.1);
}

.badge-jer-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  color: #dc2626;
  filter: drop-shadow(0 1px 1px rgba(220, 38, 38, 0.2));
}

@media (max-width: 768px) {
  .station-label-jer {
    padding: 0.15rem 0.05rem !important;
    gap: 0.15rem !important;
  }
  .btn-jer-lock {
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
    border-radius: 4px;
  }
  .badge-jer-lock {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Station Understaffed Alert (Upozornění na podstav pracoviště)
   ========================================================================== */
.station-group.station-understaffed {
  background-color: #fef2f2;
}

.station-group.station-understaffed .station-label,
.station-label.understaffed-label {
  background: linear-gradient(180deg, #fee2e2 0%, #fca5a5 100%) !important;
  color: #7f1d1d !important;
  border-right: 2px solid #f87171 !important;
  text-shadow: none !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0.25rem 0.2rem !important;
}

.station-understaffed-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: #ffffff;
  color: #b91c1c;
  padding: 1px 7px;
  border-radius: 9999px;
  border: 1.5px solid #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.station-group.station-understaffed .station-slots {
  background-color: #fef2f2;
}

.station-group.station-understaffed .slot-row {
  border-bottom: 1px solid #fee2e2;
}

.station-group.station-understaffed .slot-select {
  color: #0f172a;
}

.station-group.station-understaffed .slot-select:hover {
  background-color: #fee2e2;
}

.station-group.station-understaffed .slot-worker-name {
  color: #0f172a !important;
}

.shift-preview-station-card.understaffed {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

.shift-preview-station-card.understaffed .shift-preview-station-title {
  color: #b91c1c !important;
  font-weight: 800;
}

/* Quick Add Marodka Button in MARODKY title */
.btn-sheet-add-marodka {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease-in-out;
}

.btn-sheet-add-marodka:hover {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-sheet-add-marodka:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .btn-sheet-add-marodka .btn-text {
    display: none;
  }
  .btn-sheet-add-marodka {
    padding: 0.2rem 0.4rem;
  }
}

/* Mistr's leave row in Rozpis směn -> Volna */
.leave-item-row.mistr-leave-row {
  border: 2px solid #eab308 !important;
  background: linear-gradient(90deg, #fefce8 0%, #fef9c3 100%) !important;
  box-shadow: 0 2px 5px rgba(234, 179, 8, 0.28) !important;
  border-radius: 6px !important;
}

/* Předák substitute badge inside station-label */
.station-label.has-predak-sub {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 0.2rem 0.15rem !important;
  overflow: hidden;
}

.station-label.has-predak-sub .station-name-text {
  line-height: 1.1;
}

.predak-sub-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  letter-spacing: -0.2px;
}

.predak-sub-badge.predak-sub-full {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #eab308;
}

.predak-sub-badge.predak-sub-leave {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #818cf8;
}

@media (max-width: 600px) {
  .station-label.has-predak-sub {
    padding: 0.1rem 0.05rem !important;
    gap: 1px !important;
  }

  .station-label.has-predak-sub .station-name-text {
    font-size: 0.72rem !important;
    line-height: 1.05 !important;
  }

  .predak-sub-badge {
    font-size: 0.56rem !important;
    padding: 1px 2px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.3px !important;
    border-radius: 3px !important;
  }
}

/* ========================================================================== */
/* EVIDENCE VOLNA: FILTRY (SCHVÁLENÉ, ČEKAJÍCÍ, PROBĚHLÉ, VŠECHNY) A BARVY    */
/* ========================================================================== */
.badge-approved {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge-pending {
  background-color: #fef08a;
  color: #854d0e;
  border: 1px solid #facc15;
}

.badge-past {
  background-color: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.filter-pills {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-ui);
  gap: 4px;
  flex-wrap: wrap;
}

.filter-pills .pill-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-pills .pill-btn.pill-approved {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}
.filter-pills .pill-btn.pill-approved:hover {
  background: #dcfce7;
}
.filter-pills .pill-btn.pill-approved.active {
  background: #16a34a;
  color: #ffffff;
  border-color: #15803d;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.35);
}

.filter-pills .pill-btn.pill-pending {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fde047;
}
.filter-pills .pill-btn.pill-pending:hover {
  background: #fef08a;
}
.filter-pills .pill-btn.pill-pending.active {
  background: #facc15;
  color: #713f12;
  border-color: #eab308;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.35);
}

.filter-pills .pill-btn.pill-past {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.filter-pills .pill-btn.pill-past:hover {
  background: #e2e8f0;
}
.filter-pills .pill-btn.pill-past.active {
  background: #64748b;
  color: #ffffff;
  border-color: #475569;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.35);
}

.filter-pills .pill-btn.pill-all {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.filter-pills .pill-btn.pill-all:hover {
  background: #f8fafc;
}
.filter-pills .pill-btn.pill-all.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

/* Barevné odlišení řádků v tabulce evidence volna: Zelená (Schválené), Žlutá (Čekající), Šedá (Proběhlé) */
.data-table tbody tr.leave-row-approved {
  background-color: #f0fdf4;
}
.data-table tbody tr.leave-row-approved:hover {
  background-color: #dcfce7;
}
.data-table tbody tr.leave-row-approved td:first-child {
  border-left: 4px solid #22c55e;
}

.data-table tbody tr.leave-row-pending {
  background-color: #fefce8;
}
.data-table tbody tr.leave-row-pending:hover {
  background-color: #fef9c3;
}
.data-table tbody tr.leave-row-pending td:first-child {
  border-left: 4px solid #eab308;
}

.data-table tbody tr.leave-row-past {
  background-color: #f1f5f9;
  color: #64748b;
}
.data-table tbody tr.leave-row-past:hover {
  background-color: #e2e8f0;
}
.data-table tbody tr.leave-row-past td:first-child {
  border-left: 4px solid #94a3b8;
}

/* Barevné odlišení mobilních karet v evidenci volna */
.leave-mobile-card.approved-card {
  border: 1.5px solid #4ade80 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.1) !important;
}

.leave-mobile-card.pending-card {
  border: 1.5px solid #eab308 !important;
  background: #fefce8 !important;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.14) !important;
}

.leave-mobile-card.past-card {
  border: 1.5px solid #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.08) !important;
}

