/* =========================================================
   INTERLACTO DOCHAZKA MODULE - MASTER STYLESHEET
   ========================================================= */

/* =========================================================
   0. TOOLBAR BUTTONS
   ========================================================= */
/* Toolbar buttons - prevent overlap */
.card-body .d-flex.flex-wrap.gap-2 .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Na menších obrazovkách zalamovat tlačítka */
@media (max-width: 1199px) {
  .card-body .d-flex.flex-wrap.gap-2 {
    justify-content: flex-start !important;
  }
}

/* =========================================================
   1. SEARCHBOX & INPUT GROUPS
   ========================================================= */
.dochazka-searchbox {
  width: 300px;
}

.dochazka-searchbox-cursor {
  cursor: pointer;
}

/* =========================================================
   2. PILL-LIKE ELEMENTS (detail pages)
   ========================================================= */
.pill-like {
  display: inline-block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

/* =========================================================
   3. NOTE & REJECT BOXES
   ========================================================= */
.note-box {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(13, 110, 253, 0.06);
  border: 1px solid rgba(13, 110, 253, 0.15);
  white-space: pre-wrap;
  word-break: break-word;
}

.reject-box {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.18);
  color: #b02a37;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================================
   4. PLAN WEEK RANGE
   ========================================================= */
.plan-week-range {
  color: #111 !important;
  opacity: 1 !important;
}

[data-bs-theme="dark"] .plan-week-range {
  color: #f1f1f1 !important;
}

/* =========================================================
   4a. PLAN TABLE BADGES (view mode - sjednoceno s edit mode)
   ========================================================= */
#planTable .badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  font-weight: 500;
  border-radius: 50px;
  border: 1px solid #dee2e6;
}

/* Lokace - bílé s okrajem */
#planTable .badge.bg-light {
  background-color: #fff !important;
  color: #495057 !important;
  border: 1px solid #dee2e6;
}

/* Činnosti - bílé s okrajem (stejné jako lokace) */
#planTable .badge.bg-primary-subtle {
  background-color: #fff !important;
  color: #495057 !important;
  border: 1px solid #dee2e6;
}

/* =========================================================
   5. CONTROLS WRAP
   ========================================================= */
.controls-wrap .btn {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .controls-wrap .btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .controls-wrap {
    flex-direction: column;
  }

  .controls-wrap .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   6. FIXED CELLS (tables)
   ========================================================= */
.fixed-cell {
  display: inline-block;
  min-width: 78px;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.fixed-cell-wide {
  min-width: 160px;
}

/* =========================================================
   7. CLICKABLE ROWS
   ========================================================= */
tr.row-link {
  cursor: pointer;
}

tr.row-link:hover {
  filter: brightness(0.98);
}

/* =========================================================
   8. PUNCH BOX (Prichod/Odchod)
   ========================================================= */
#punchWrap .btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.45rem;
  min-width: 120px;
  line-height: 1.1;
}

#punchWrap .btn i {
  font-size: 0.9rem;
}

#punchWrap .form-control {
  height: 30px;
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  #punchWrap .btn {
    width: 100%;
    min-width: 0;
  }

  #punchWrap .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }
}

/* =========================================================
   9. MOBILE TABLE STACK LAYOUT
   ========================================================= */
@media (max-width: 768px) {
  table.table {
    font-size: 0.8rem;
  }

  table.table thead {
    display: none;
  }

  table.table tbody tr {
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #ffffff;
  }

  table.table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.25rem;
    border: none;
  }

  table.table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    padding-right: 0.5rem;
    white-space: nowrap;
  }

  table.table tfoot tr {
    display: block;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
  }

  table.table tfoot th {
    display: block;
    border: none;
    padding: 0.25rem 0;
    text-align: center !important;
  }

  table.table tfoot th:first-child {
    font-size: 0.85rem;
  }

  table.table tfoot th:nth-child(2) {
    font-size: 1.1rem;
    color: var(--bs-primary);
  }

  table.table tfoot th:last-child {
    display: none;
  }
}

/* =========================================================
   10. MOBILE (<=576px) COMPACT LAYOUT
   ========================================================= */
@media (max-width: 576px) {
  .card.bg-primary-subtle .row {
    text-align: center;
  }

  .card.bg-primary-subtle .col-sm-6:last-child {
    margin-top: 10px;
  }

  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .controls-wrap .btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
  }

  #punchWrap .card-body {
    padding: 0.5rem 0.75rem;
  }

  .row.mt-4 .col-lg-4 .card-body {
    padding: 1rem 0.5rem;
  }

  .row.mt-4 .col-lg-4 .card-body h4 {
    font-size: 1.1rem;
  }

  .row.mt-4 .col-lg-4 .card-body .display-6 {
    font-size: 2rem;
  }

  .card-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch !important;
  }

  .card-header .btn {
    width: 100%;
  }
}

/* =========================================================
   11. MODALS - MOBILE
   ========================================================= */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-content {
    border-radius: 0.75rem;
  }
}

/* =========================================================
   12. LOCATION & PROJECT CHIPS (modal)
   ========================================================= */
.loc-chip-group,
.proj-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  min-height: 42px;
}

.loc-chip,
.proj-chip {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.1s ease;
}

.loc-chip:active,
.proj-chip:active {
  transform: scale(0.97);
}

.loc-chip.is-active,
.proj-chip.is-active {
  background: rgba(13, 110, 253, 0.15);
  border-color: rgba(13, 110, 253, 0.45);
}

.chip-add-wrap {
  display: inline-flex;
  width: 100%;
  order: 999;
  margin-top: 0.25rem;
}

.chip-search-wrap {
  width: 100%;
  order: 999;
  margin-top: 0.25rem;
}

.chip-add-input {
  border: 1px dashed #adb5bd;
  background: transparent;
  border-radius: 50px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: #6c757d;
  width: 100%;
  max-width: 200px;
  transition: all 0.15s ease;
}

.chip-add-input::placeholder {
  color: #adb5bd;
}

.chip-add-input:focus {
  outline: none;
  border-color: #0d6efd;
  border-style: solid;
  background: #fff;
}

[data-bs-theme="dark"] .chip-add-input {
  border-color: #465670;
  color: #8b949e;
}

[data-bs-theme="dark"] .chip-add-input:focus {
  background: #2a3547;
  border-color: #0d6efd;
}

/* =========================================================
   13. CARDS - SMALLER PADDING ON MOBILE
   ========================================================= */
@media (max-width: 576px) {
  .card-body {
    padding: 0.75rem;
  }

  .card-header {
    padding: 0.75rem;
  }
}

/* =========================================================
   14. PLAN TABLE - INLINE EDIT
   ========================================================= */
.plan-row-edit {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.plan-row-edit:hover {
  opacity: 1;
}

#planTable tr:hover .plan-row-edit {
  opacity: 0.8;
}

.plan-edit-save,
.plan-edit-cancel {
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.plan-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.25rem 0;
  align-items: center;
}

.plan-chip {
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 50px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #495057;
  white-space: nowrap;
}

.plan-chip:hover {
  border-color: #5d87ff;
  background: #f8f9ff;
}

.plan-chip.is-active {
  background: #fff;
  border-color: #5d87ff;
  color: #495057;
  box-shadow: 0 0 0 1px #5d87ff;
}

.plan-chip.is-active:hover {
  background: #f8f9ff;
  border-color: #5d87ff;
}

.plan-chip-search-wrap {
  display: inline-flex;
  width: 100%;
  order: 999;
  margin-top: 0.25rem;
}

.plan-chip-search {
  border: 1px dashed #adb5bd;
  background: transparent;
  border-radius: 50px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  color: #6c757d;
  width: 100%;
  max-width: 200px;
  transition: all 0.15s ease;
}

.plan-chip-search::placeholder {
  color: #adb5bd;
}

.plan-chip-search:focus {
  outline: none;
  border-color: #5d87ff;
  border-style: solid;
  background: #fff;
}

[data-bs-theme="dark"] .plan-chip-search {
  border-color: #465670;
  color: #8b949e;
}

[data-bs-theme="dark"] .plan-chip-search:focus {
  background: #2a3547;
  border-color: #5d87ff;
}

/* Legacy chip styles */
.plan-chip-add-wrap {
  display: inline-flex;
}

.plan-chip-input {
  border: 1px dashed #adb5bd;
  background: transparent;
  border-radius: 50px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  color: #6c757d;
  width: 110px;
  transition: all 0.15s ease;
}

.plan-chip-input::placeholder {
  color: #adb5bd;
}

.plan-chip-input:focus {
  outline: none;
  border-color: #5d87ff;
  border-style: solid;
  background: #fff;
  width: 140px;
}

/* Dark mode */
[data-bs-theme="dark"] .plan-chip {
  background: #2a3547;
  border-color: #465670;
  color: #c9d1d9;
}

[data-bs-theme="dark"] .plan-chip:hover {
  border-color: #5d87ff;
  background: #3a4557;
}

[data-bs-theme="dark"] .plan-chip.is-active {
  background: #2a3547;
  border-color: #5d87ff;
  color: #c9d1d9;
  box-shadow: 0 0 0 1px #5d87ff;
}

[data-bs-theme="dark"] .plan-chip-input {
  border-color: #465670;
  color: #8b949e;
}

[data-bs-theme="dark"] .plan-chip-input:focus {
  background: #2a3547;
  border-color: #5d87ff;
}

/* =========================================================
   15. ZAMESTNANCI OVERVIEW TABLE
   ========================================================= */
.btn-min {
  min-width: 118px;
  white-space: nowrap;
}

#employeesTable tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* =========================================================
   16. PLAN PRACE - TABLE & LAYOUT STYLES
   ========================================================= */
.week-inline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}

.plan-responsive {
  overflow-x: auto;
}

.plan-table {
  table-layout: fixed;
  width: 100%;
}

.plan-table th,
.plan-table td {
  font-size: 0.88rem;
  padding: 0.55rem 0.6rem;
  border-color: rgba(93, 135, 255, 0.18);
}

.plan-table thead th {
  color: #334155;
  background: #f5f8ff;
  border-bottom-color: rgba(93, 135, 255, 0.22);
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  box-shadow: 6px 0 14px rgba(15, 23, 42, 0.04);
}

.plan-table thead .sticky-col {
  z-index: 3;
  background: #f5f8ff;
}

.plan-emp-name {
  line-height: 1.2;
}

.plan-actions {
  min-width: 34px;
}

.plan-row:hover td {
  background: rgba(93, 135, 255, 0.06);
}

.plan-row:hover .sticky-col {
  background: rgba(93, 135, 255, 0.08);
}

.plan-head {
  font-weight: 700;
  color: #1f2937;
}

.plan-cell {
  vertical-align: top;
  user-select: none;
  min-width: 180px;
  background: #fff;
}

.plan-sub {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.25;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-note {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Status color variants */
.plan-work {
  background: rgba(93, 135, 255, 0.1);
}

.plan-work .plan-chip {
  background: rgba(93, 135, 255, 0.16);
  color: #1d4ed8;
  border-color: rgba(93, 135, 255, 0.25);
}

.plan-vacation {
  background: rgba(255, 193, 7, 0.12);
}

.plan-vacation .plan-chip {
  background: rgba(255, 193, 7, 0.18);
  color: #a16207;
  border-color: rgba(255, 193, 7, 0.28);
}

.plan-trip {
  background: rgba(255, 122, 0, 0.1);
}

.plan-trip .plan-chip {
  background: rgba(255, 122, 0, 0.16);
  color: #c2410c;
  border-color: rgba(255, 122, 0, 0.22);
}

.plan-sick {
  background: rgba(239, 68, 68, 0.1);
}

.plan-sick .plan-chip {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.22);
}

.plan-none {
  background: rgba(148, 163, 184, 0.12);
}

.plan-none .plan-chip {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.25);
}

.plan-absence {
  background: rgba(107, 114, 128, 0.1);
}

.plan-absence .plan-chip {
  background: rgba(107, 114, 128, 0.16);
  color: #4b5563;
  border-color: rgba(107, 114, 128, 0.22);
}

/* =========================================================
   16b. PLAN TABLE MODERN (Výkaz práce - Plán práce Po-Pá)
   ========================================================= */
.plan-table-modern {
  border-radius: 0.5rem;
  overflow: hidden;
}

.plan-day-row {
  transition: background-color 0.15s ease;
}

.plan-day-row:hover {
  background-color: rgba(93, 135, 255, 0.06) !important;
}

.plan-day-row:last-child {
  border-bottom: none !important;
}

.plan-day-row .badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.plan-day-row .badge.bg-secondary-subtle {
  background-color: rgba(108, 117, 125, 0.12) !important;
}

.plan-day-row .badge.bg-info-subtle {
  background-color: rgba(13, 202, 240, 0.15) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .plan-day-row .row {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .plan-day-row .col-auto,
  .plan-day-row .col {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .plan-day-row .col-auto:last-child {
    margin-bottom: 0;
  }
}

/* =========================================================
   17. LEGEND STYLES
   ========================================================= */
.legend {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  user-select: none;
}

.legend-work {
  background: rgba(93, 135, 255, 0.14);
  color: #1d4ed8;
  border-color: rgba(93, 135, 255, 0.2);
}

.legend-vacation {
  background: rgba(255, 193, 7, 0.16);
  color: #a16207;
  border-color: rgba(255, 193, 7, 0.22);
}

.legend-trip {
  background: rgba(255, 122, 0, 0.14);
  color: #c2410c;
  border-color: rgba(255, 122, 0, 0.2);
}

.legend-sick {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.2);
}

.legend-none {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.22);
}

.legend-absence {
  background: rgba(107, 114, 128, 0.14);
  color: #4b5563;
  border-color: rgba(107, 114, 128, 0.2);
}

#statusLegend .legend {
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

#statusLegend .legend:active {
  transform: translateY(1px);
}

#statusLegend .legend.active {
  box-shadow: 0 0 0 2px rgba(93, 135, 255, 0.35);
  transform: translateY(-1px);
}

/* =========================================================
   18. RESPONSIVE - TABLET & LARGER
   ========================================================= */
@media (min-width: 1300px) and (max-width: 1730px) {
  .left-sidebar.with-vertical {
    width: 270px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
  }

  .body-wrapper {
    margin-left: 270px;
    transition: margin-left 0.3s ease;
  }

  .container-fluid {
    max-width: calc(100% - 48px);
    padding-left: 24px;
    padding-right: 24px;
  }

  .left-sidebar.with-vertical .brand-logo {
    width: 270px;
  }

  .left-sidebar.with-vertical.mini-sidebar {
    width: 270px;
  }

  .left-sidebar.with-vertical.mini-sidebar ~ .body-wrapper {
    margin-left: 270px;
  }
}

@media (min-width: 1731px) {
  .body-wrapper {
    margin-left: 270px;
  }
}

@media (max-width: 1200px) {
  .plan-table th,
  .plan-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.84rem;
  }

  .plan-cell {
    min-width: 170px;
  }

  .sticky-col {
    width: 300px !important;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-subtitle {
    font-size: 0.9rem;
  }

  .btn-min {
    min-width: 100px;
  }
}

@media (max-width: 992px) {
  .left-sidebar.with-vertical {
    position: fixed;
    left: -100%;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: left 0.3s ease;
  }

  .left-sidebar.with-vertical.show-sidebar {
    left: 0;
  }

  .body-wrapper {
    margin-left: 0 !important;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
  }

  .container-fluid {
    padding-left: 16px;
    padding-right: 16px;
  }

  #actionsWrap {
    width: 100%;
    justify-content: flex-start;
  }

  #actionsWrap .btn {
    flex: 1 1 auto;
  }

  .row.g-3.align-items-end > div {
    width: 100%;
  }

  #statusLegend {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .sticky-col {
    width: 280px !important;
  }

  .plan-cell {
    min-width: 160px;
  }

  .card-header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  h4.card-title {
    font-size: 1.1rem;
  }

  h5.card-title {
    font-size: 1rem;
  }

  #actionsWrap {
    width: 100%;
    justify-content: stretch;
  }

  #actionsWrap .btn {
    flex: 1 1 auto;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  .d-flex.align-items-center.gap-3 img {
    width: 36px;
    height: 36px;
  }

  .row.g-3 > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #statusBadge {
    align-self: flex-start;
  }

  .card.bg-primary-subtle .row {
    text-align: center;
  }

  .card.bg-primary-subtle .col-sm-5 {
    margin-top: 10px;
  }

  .week-inline {
    font-size: 0.9rem;
  }

  .d-flex.justify-content-between.align-items-center.mt-3 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .plan-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .card.bg-primary-subtle .row {
    text-align: center;
  }

  .card.bg-primary-subtle .col-sm-5 {
    margin-top: 10px;
  }

  .plan-table th,
  .plan-table td {
    font-size: 0.82rem;
    padding: 0.42rem 0.45rem;
  }

  .sticky-col {
    width: 260px !important;
  }

  .plan-cell {
    min-width: 160px;
  }

  #employeesTable th,
  #employeesTable td {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .btn-min {
    width: 100%;
  }

  .row.mt-4 .col-lg-4 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 575px) {
  h4.card-title {
    font-size: 1.1rem;
  }

  .card-subtitle {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  .card-header {
    padding: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .badge {
    align-self: flex-start;
  }

  .card-body .d-flex.align-items-center.gap-3 {
    align-items: flex-start;
  }

  .card-body img.rounded-circle {
    width: 36px;
    height: 36px;
  }

  .row.g-3 > [class^="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #actionsWrap {
    flex-direction: column;
    width: 100%;
  }

  #actionsWrap .btn {
    width: 100%;
  }

  .card-body.d-flex.flex-wrap.justify-content-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .btn {
    font-size: 0.85rem;
  }

  .pill-like,
  .note-box,
  .reject-box {
    font-size: 0.9rem;
  }

  .sticky-col {
    width: 220px !important;
  }

  .plan-emp-name {
    font-size: 0.86rem;
  }

  .plan-cell {
    min-width: 145px;
  }

  .plan-chip {
    padding: 5px 9px;
    font-size: 0.76rem;
  }

  .plan-sub,
  .plan-note {
    font-size: 0.74rem;
  }

  #statusLegend .legend {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .row.g-3.align-items-end .col-xl-3 .d-flex.gap-2 {
    width: 100%;
  }

  .row.g-3.align-items-end .col-xl-3 .d-flex.gap-2 .btn {
    min-width: 44px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .week-inline {
    flex: 1;
    min-height: 38px;
    font-size: 0.86rem;
  }

  #employeesTable th:nth-child(2),
  #employeesTable td:nth-child(2),
  #employeesTable th:nth-child(4),
  #employeesTable td:nth-child(4),
  #employeesTable th:nth-child(5),
  #employeesTable td:nth-child(5) {
    display: none;
  }

  #employeesTable td:first-child img {
    width: 32px;
    height: 32px;
  }

  #employeesTable td:first-child .fw-semibold {
    font-size: 0.9rem;
  }

  #employeesTable td:first-child .text-muted {
    font-size: 0.75rem;
  }

  .card-body h4 {
    font-size: 1.25rem;
  }
}

/* =========================================================
   19. PRINT MEDIA
   ========================================================= */
@media print {
  .left-sidebar,
  .topbar,
  .btn,
  .modal {
    display: none !important;
  }

  .body-wrapper {
    margin-left: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
  }
}

/* =========================================================
   20. SUMMARY SECTION MARGIN
   ========================================================= */
.summary-section {
  margin-bottom: 50px;
}

/* =========================================================
   21. EDIT ATTENDANCE/PLAN BUTTON (pencil icon)
   ========================================================= */
.edit-attendance-btn,
.edit-plan-btn {
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.edit-attendance-btn:hover,
.edit-plan-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

#employeesTable tbody tr:hover .edit-attendance-btn,
.plan-row:hover .edit-plan-btn {
  opacity: 1;
}

@media (max-width: 768px) {
  .edit-attendance-btn,
  .edit-plan-btn {
    opacity: 1;
    padding: 0.35rem 0.55rem;
  }
}

/* =========================================================
   22. TIMESHEET ACTIVITY DISPLAY (výkaz práce - činnosti)
   ========================================================= */
.plan-cell-item {
  background: rgba(93, 135, 255, 0.04);
  border-radius: 0.25rem;
}

.plan-cell-item .plan-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(93, 135, 255, 0.14);
  color: #1d4ed8;
  border: 1px solid rgba(93, 135, 255, 0.22);
  border-radius: 50px;
}

.plan-cell-item .plan-sub {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.3;
  margin-bottom: 0.1rem;
}

.plan-cell-item .plan-sub i {
  color: #64748b;
  font-size: 0.8rem;
}

.plan-cell-item .plan-note {
  font-size: 0.76rem;
  color: #334155;
  line-height: 1.3;
  font-style: italic;
}

/* Timesheet multiple activities spacing */
#timesheetBody .plan-cell-item + .plan-cell-item {
  margin-top: 0.5rem;
}

/* Dark mode support */
[data-bs-theme="dark"] .plan-cell-item {
  background: rgba(93, 135, 255, 0.08);
}

[data-bs-theme="dark"] .plan-cell-item .plan-chip {
  background: rgba(93, 135, 255, 0.2);
  color: #93c5fd;
  border-color: rgba(93, 135, 255, 0.35);
}

[data-bs-theme="dark"] .plan-cell-item .plan-sub {
  color: #94a3b8;
}

[data-bs-theme="dark"] .plan-cell-item .plan-sub i {
  color: #64748b;
}

[data-bs-theme="dark"] .plan-cell-item .plan-note {
  color: #cbd5e1;
}

/* =========================================================
   23. ZEBRA STRIPING - střídavé pozadí řádků (timesheet + plán práce)
   ========================================================= */
#timesheetBody tr.day-even td,
#planBody tr.row-even td {
  background-color: rgba(93, 135, 255, 0.04);
}

#timesheetBody tr.day-odd td,
#planBody tr.row-odd td {
  background-color: #fff;
}

/* Dark mode */
[data-bs-theme="dark"] #timesheetBody tr.day-even td,
[data-bs-theme="dark"] #planBody tr.row-even td {
  background-color: rgba(93, 135, 255, 0.08);
}

[data-bs-theme="dark"] #timesheetBody tr.day-odd td,
[data-bs-theme="dark"] #planBody tr.row-odd td {
  background-color: #1a2332;
}

/* =========================================================
   24. TIMESHEET TABLE - konzistentní ohraničení
   ========================================================= */
#timesheetTable {
  border-collapse: collapse;
}

#timesheetTable td,
#timesheetTable th {
  border: 1px solid #dee2e6 !important;
}

[data-bs-theme="dark"] #timesheetTable td,
[data-bs-theme="dark"] #timesheetTable th {
  border-color: #3d4f6f !important;
}

/* =========================================================
   25. TIMESHEET & ATTENDANCE ROW STATES - barevné pozadí pro stavy
   ========================================================= */
/* Víkend - světle modrá (primary-subtle) */
#timesheetBody tr.row-weekend td,
#attendanceBody tr.row-weekend td {
  background-color: rgba(93, 135, 255, 0.12) !important;
}

/* Svátek - světle žlutá/oranžová (warning-subtle) */
#timesheetBody tr.row-holiday td,
#attendanceBody tr.row-holiday td {
  background-color: rgba(255, 174, 31, 0.15) !important;
}

/* Dovolená - světle oranžová */
#timesheetBody tr.row-vacation td,
#attendanceBody tr.row-vacation td {
  background-color: rgba(255, 152, 0, 0.15) !important;
}

/* Nemoc - světle oranžová */
#timesheetBody tr.row-sick td,
#attendanceBody tr.row-sick td {
  background-color: rgba(250, 137, 107, 0.15) !important;
}

/* Absence/Volno - světle fialová */
#timesheetBody tr.row-absence td,
#attendanceBody tr.row-absence td {
  background-color: rgba(147, 51, 234, 0.1) !important;
}

/* Služební cesta - oranžová */
#timesheetBody tr.row-trip td,
#attendanceBody tr.row-trip td {
  background-color: rgba(255, 152, 0, 0.18) !important;
}

/* Lékař - světle tyrkysová */
#timesheetBody tr.row-doctor td,
#attendanceBody tr.row-doctor td {
  background-color: rgba(6, 182, 212, 0.15) !important;
}

/* Dark mode */
[data-bs-theme="dark"] #timesheetBody tr.row-weekend td,
[data-bs-theme="dark"] #attendanceBody tr.row-weekend td {
  background-color: rgba(93, 135, 255, 0.18) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-holiday td,
[data-bs-theme="dark"] #attendanceBody tr.row-holiday td {
  background-color: rgba(255, 174, 31, 0.2) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-vacation td,
[data-bs-theme="dark"] #attendanceBody tr.row-vacation td {
  background-color: rgba(255, 152, 0, 0.22) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-sick td,
[data-bs-theme="dark"] #attendanceBody tr.row-sick td {
  background-color: rgba(250, 137, 107, 0.2) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-absence td,
[data-bs-theme="dark"] #attendanceBody tr.row-absence td {
  background-color: rgba(147, 51, 234, 0.2) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-trip td,
[data-bs-theme="dark"] #attendanceBody tr.row-trip td {
  background-color: rgba(255, 152, 0, 0.25) !important;
}

[data-bs-theme="dark"] #timesheetBody tr.row-doctor td,
[data-bs-theme="dark"] #attendanceBody tr.row-doctor td {
  background-color: rgba(6, 182, 212, 0.22) !important;
}

/* =========================================================
   26. ATTENDANCE TABLE - zebra striping
   ========================================================= */
#attendanceBody tr.day-even td {
  background-color: rgba(93, 135, 255, 0.04);
}

#attendanceBody tr.day-odd td {
  background-color: #fff;
}

[data-bs-theme="dark"] #attendanceBody tr.day-even td {
  background-color: rgba(93, 135, 255, 0.08);
}

[data-bs-theme="dark"] #attendanceBody tr.day-odd td {
  background-color: #1a2332;
}

/* Attendance table - konzistentní ohraničení */
#attendanceTable {
  border-collapse: collapse;
}

#attendanceTable td,
#attendanceTable th {
  border: 1px solid #dee2e6 !important;
}

[data-bs-theme="dark"] #attendanceTable td,
[data-bs-theme="dark"] #attendanceTable th {
  border-color: #3d4f6f !important;
}

/* =========================================================
   27. REST/BREAK VIOLATIONS - červené zvýraznění porušení přestávek
   ========================================================= */
/* Porušení přestávky mezi směnami (11h) - ČERVENÁ */
#attendanceBody tr.row-rest-violation td,
#timesheetBody tr.row-rest-violation td {
  background-color: rgba(220, 38, 38, 0.15) !important;
}

#attendanceBody tr.row-rest-violation:hover td,
#timesheetBody tr.row-rest-violation:hover td {
  background-color: rgba(220, 38, 38, 0.22) !important;
}

/* Chybějící přestávka během dne (30min) - ORANŽOVÁ */
#attendanceBody tr.row-break-violation td,
#timesheetBody tr.row-break-violation td {
  background-color: rgba(251, 146, 60, 0.18) !important;
}

#attendanceBody tr.row-break-violation:hover td,
#timesheetBody tr.row-break-violation:hover td {
  background-color: rgba(251, 146, 60, 0.25) !important;
}

/* Dark mode */
[data-bs-theme="dark"] #attendanceBody tr.row-rest-violation td,
[data-bs-theme="dark"] #timesheetBody tr.row-rest-violation td {
  background-color: rgba(220, 38, 38, 0.25) !important;
}

[data-bs-theme="dark"] #attendanceBody tr.row-break-violation td,
[data-bs-theme="dark"] #timesheetBody tr.row-break-violation td {
  background-color: rgba(251, 146, 60, 0.25) !important;
}

/* =========================================================
   VIEW MODE TOGGLE (Docházka / Výkaz práce)
   ========================================================= */
#viewModeToggle {
  background-color: #e9ecef;
}

#viewModeToggle .btn {
  border: none !important;
  background: transparent;
  color: #6c757d;
  font-weight: 500;
  transition: all 0.2s ease;
}

#viewModeToggle .btn:hover {
  color: #495057;
}

#viewModeToggle .btn-check:checked + .btn {
  background: #fff;
  color: #0d6efd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

/* Dark mode */
[data-bs-theme="dark"] #viewModeToggle {
  background-color: #343a40;
}

[data-bs-theme="dark"] #viewModeToggle .btn {
  color: #adb5bd;
}

[data-bs-theme="dark"] #viewModeToggle .btn:hover {
  color: #dee2e6;
}

[data-bs-theme="dark"] #viewModeToggle .btn-check:checked + .btn {
  background: #495057;
  color: #fff;
}

/* =========================================================
   PLAN TABLE STYLING
   ========================================================= */
#planTable {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

#planTable th {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

#planTable td {
  vertical-align: middle;
  border-color: #e9ecef;
}

/* Střídavé barvy podle dne */
#planTable tbody tr.day-even {
  background-color: #fff;
}

#planTable tbody tr.day-odd {
  background-color: #f8f9fa;
}

#planTable tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.08);
}

#planTable .fw-semibold {
  color: #212529;
}

#planTable .btn-outline-primary {
  padding: 0.25rem 0.5rem;
}

#planTable .btn-outline-primary:hover {
  background-color: #0d6efd;
  color: #fff;
}
