.timesheet-report-page {
  width: 100%;
  color: #111827;
  font-family: inherit;
}

.timesheet-report-page * {
  box-sizing: border-box;
}

.timesheet-report-page .wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.timesheet-report-page h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

/* Form controls */

.timesheet-report-page button,
.timesheet-report-page select,
.timesheet-report-page input,
.timesheet-report-page textarea {
  font: inherit;
  box-sizing: border-box;
}

.timesheet-report-page select,
.timesheet-report-page input,
.timesheet-report-page textarea {
  width: 100%;
  padding: 11px 12px;
  margin: 5px 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
}

.timesheet-report-page select:focus,
.timesheet-report-page input:focus,
.timesheet-report-page textarea:focus {
  outline: none;
  border-color: #00a9e0;
  box-shadow: 0 0 0 3px rgba(0, 169, 224, 0.15);
}

.timesheet-report-page textarea {
  min-height: 90px;
  resize: vertical;
}

/* Buttons */

.timesheet-report-page button {
  padding: 11px 16px;
  margin: 5px 5px 10px 0;
  border: none;
  border-radius: 10px;
  background: #005fae;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    opacity 0.2s ease,
    transform 0.1s ease;
}

.timesheet-report-page button:hover {
  background: #004f91;
}

.timesheet-report-page button:active {
  transform: translateY(1px);
}

.timesheet-report-page button.secondary {
  background: #475569;
}

.timesheet-report-page button.secondary:hover {
  background: #334155;
}

.timesheet-report-page button.approved-button {
  background: #2e7d32;
}

.timesheet-report-page button.approved-button:hover {
  background: #256428;
}

.timesheet-report-page button.danger {
  background: #b42318;
}

.timesheet-report-page button.danger:hover {
  background: #8f1c13;
}

.timesheet-report-page button:disabled,
.timesheet-report-page .disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Main cards */

.timesheet-report-page .filters,
.timesheet-report-page .summary,
.timesheet-report-page .employee-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Filters */

.timesheet-report-page .filters {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: start;
}

.timesheet-report-page #customDates {
  display: none;
}

/* Summary */

.timesheet-report-page .summary {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.timesheet-report-page .summary-box {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.timesheet-report-page .summary-value {
  margin-top: 4px;
  color: #005fae;
  font-size: 24px;
  font-weight: 700;
}

/* Employee section */

.timesheet-report-page .employee-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timesheet-report-page .employee-name {
  color: #005fae;
  font-size: 22px;
  font-weight: 700;
}

.timesheet-report-page .employee-summary {
  line-height: 1.5;
  text-align: right;
}

.timesheet-report-page .employee-total {
  color: #2e7d32;
  font-size: 18px;
  font-weight: 700;
}

.timesheet-report-page .employee-ot-total {
  color: #b45309;
  font-weight: 700;
}

/* Daily cards */

.timesheet-report-page .days-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.timesheet-report-page .day-card {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  line-height: 1.55;
}

.timesheet-report-page .day-date {
  margin-bottom: 8px;
  color: #111827;
  font-size: 17px;
  font-weight: 700;
}

.timesheet-report-page .flag {
  margin-top: 8px;
  color: #b45309;
  font-weight: 700;
}

.timesheet-report-page .ok {
  margin-top: 8px;
  color: #2e7d32;
  font-weight: 700;
}

.timesheet-report-page .approval-status {
  margin-top: 8px;
  font-weight: 700;
}

.timesheet-report-page .approval-status small {
  color: #64748b;
  font-weight: 400;
}

.timesheet-report-page .locked-status {
  margin-top: 4px;
  color: #64748b;
}

/* Employee action area */

.timesheet-report-page .employee-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.timesheet-report-page .export-row {
  margin-top: 20px;
}

/* Modal */

.timesheet-report-page .modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  padding: 20px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.78);
}

.timesheet-report-page .modal {
  width: 100%;
  max-width: 540px;
  margin: 40px auto;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.timesheet-report-page .modal h2 {
  margin: 0 0 14px;
  color: #005fae;
}

.timesheet-report-page .modal-summary,
.timesheet-report-page .calculation-box {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  line-height: 1.7;
}

.timesheet-report-page .modal-summary {
  margin-bottom: 15px;
}

.timesheet-report-page .calculation-box {
  margin: 14px 0;
}

.timesheet-report-page .modal label {
  display: block;
  margin-top: 12px;
  font-weight: 700;
}

.timesheet-report-page .modal input,
.timesheet-report-page .modal textarea {
  width: 100%;
}

.timesheet-report-page .calculation-highlight {
  color: #2e7d32;
  font-weight: 700;
}

.timesheet-report-page .warning-text {
  margin-top: 8px;
  color: #b45309;
}

.timesheet-report-page .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

/* Tablet */

@media (min-width: 700px) {
  .timesheet-report-page .days-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

/* Desktop */

@media (min-width: 1050px) {
  .timesheet-report-page .days-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 699px) {
  .timesheet-report-page h1 {
    font-size: 24px;
  }

  .timesheet-report-page .filters,
  .timesheet-report-page .summary,
  .timesheet-report-page .employee-card {
    padding: 14px;
  }

  .timesheet-report-page .employee-header {
    display: block;
  }

  .timesheet-report-page .employee-summary {
    margin-top: 8px;
    text-align: left;
  }

  .timesheet-report-page button {
    width: 100%;
    margin-right: 0;
  }

  .timesheet-report-page .modal {
    margin: 10px auto;
    padding: 18px;
  }
}

/* Print */

@media print {
  .timesheet-report-page {
    background: #ffffff;
    color: #000000;
  }

  .timesheet-report-page button,
  .timesheet-report-page .filters,
  .timesheet-report-page .export-row,
  .timesheet-report-page .modal-overlay {
    display: none !important;
  }

  .timesheet-report-page .employee-card,
  .timesheet-report-page .summary,
  .timesheet-report-page .day-card,
  .timesheet-report-page .summary-box {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
    border: 1px solid #cccccc;
  }

  .timesheet-report-page .days-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}