
#monthlyAttendanceForm button {
  min-height: 34px;
  padding-inline: 14px;
  white-space: nowrap;
}

#monthlyAttendanceForm input,
#monthlyAttendanceForm select {
  min-height: 34px;
}

.attendance-modal-card {
  width: min(1500px, 98.5vw);
  height: min(900px, 96vh);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

#monthlyAttendanceModal {
  z-index: 12000 !important;
}

#monthlyAttendanceModal .attendance-modal-card {
  z-index: 12001 !important;
}

.modal-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-search-label {
  display: grid;
  gap: 5px;
  max-width: 340px;
  margin-bottom: 8px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.monthly-attendance-wrap {
  min-height: 0;
  max-height: none;
  overflow: auto;
  position: relative;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: #ffffff;
}

#monthlyAttendanceTable {
  min-width: 2100px;
  border-collapse: separate;
  border-spacing: 0;
}

#monthlyAttendanceTable th,
#monthlyAttendanceTable td {
  min-width: 54px;
  text-align: center;
}

#monthlyAttendanceTable thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #eef6ff;
  box-shadow: inset 0 -1px 0 #cbd5e1;
}

#monthlyAttendanceTable th:nth-child(1),
#monthlyAttendanceTable td:nth-child(1) {
  min-width: 110px;
  width: 110px;
  text-align: left;
}

#monthlyAttendanceTable th:nth-child(2),
#monthlyAttendanceTable td:nth-child(2) {
  min-width: 240px;
  width: 240px;
  text-align: left;
}

#monthlyAttendanceTable th:nth-child(1),
#monthlyAttendanceTable th:nth-child(2) {
  position: sticky;
  top: 0;
  z-index: 12;
}

#monthlyAttendanceTable th:nth-child(1) {
  left: 0;
}

#monthlyAttendanceTable th:nth-child(2) {
  left: 110px;
}

#monthlyAttendanceTable td:nth-child(1),
#monthlyAttendanceTable td:nth-child(2) {
  position: sticky;
  background: #ffffff;
  z-index: 7;
  box-shadow: inset -1px 0 0 #e2e8f0;
}

#monthlyAttendanceTable td:nth-child(1) {
  left: 0;
}

#monthlyAttendanceTable td:nth-child(2) {
  left: 110px;
}

#monthlyAttendanceTable .table-input {
  width: 100%;
  min-height: 30px;
  padding: 4px 5px;
  font-size: 11px;
}

.attendance-weekoff-cell {
  background: #fee2e2 !important;
  color: #991b1b;
}

.attendance-holiday-cell {
  background: #dcfce7 !important;
  color: #166534;
}

.attendance-rotational-weekoff-cell {
  background: #e0f2fe !important;
  color: #075985;
}

.attendance-locked-cell {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  font-size: 10px;
  font-weight: 950;
}

.legend-weekoff,
.legend-holiday,
.legend-rotational-weekoff {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-weekoff { background: #fecaca; }
.legend-holiday { background: #bbf7d0; }
.legend-rotational-weekoff { background: #bae6fd; }

.sticky-attendance-col {
  position: sticky;
  left: 0;
  z-index: 7;
  background: #ffffff;
  box-shadow: inset -1px 0 0 #e2e8f0;
}

.sticky-attendance-name {
  left: 110px;
  z-index: 7;
}
.file-level-control { display: grid; gap: 10px; min-width: min(980px, 82vw); }
.file-level-toolbar, .file-level-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.file-level-toolbar label { min-width: 160px; flex: 1 1 170px; }
.file-level-toolbar input, .file-level-toolbar select { width: 100%; }
.file-level-table-wrap { max-height: 360px; overflow: auto; }
.file-level-table-wrap .data-table { min-width: 900px; }
/* File-level leader controls */
