.leave-summary-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

.leave-summary-header {
  margin-bottom: 20px;
}

.leave-summary-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
}

.leave-summary-header p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.leave-summary-filters {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(180px, 1fr))
    auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.leave-filter-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.leave-filter-field label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.leave-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
}

.leave-filter-field select:focus {
  outline: none;
  border-color: #6b7280;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

.leave-filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.leave-primary-button,
.leave-secondary-button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.leave-primary-button {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
}

.leave-primary-button:hover {
  background: #1f2937;
}

.leave-secondary-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.leave-secondary-button:hover {
  background: #f9fafb;
}

.leave-summary-totals {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.leave-total-card {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.leave-total-label {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.leave-total-card strong {
  font-size: 25px;
  color: #111827;
}

.leave-summary-status {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #6b7280;
  text-align: center;
}

.leave-summary-status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.leave-summary-status.is-empty {
  color: #6b7280;
}

.leave-summary-status.is-hidden {
  display: none;
}

.leave-summary-results {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.leave-month-section {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.leave-month-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.leave-month-header h2 {
  margin: 0;
  font-size: 19px;
  color: #111827;
}

.leave-month-summary {
  color: #6b7280;
  font-size: 14px;
}

.leave-month-records {
  display: flex;
  flex-direction: column;
}

.leave-record {
  display: grid;
  grid-template-columns:
    minmax(160px, 1.2fr)
    minmax(150px, 1fr)
    minmax(180px, 1.4fr)
    minmax(90px, 0.6fr)
    minmax(90px, 0.7fr);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.leave-record:last-child {
  border-bottom: none;
}

.leave-record-employee {
  font-weight: 700;
  color: #111827;
}

.leave-record-type {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.leave-record-dates,
.leave-record-days,
.leave-record-status {
  color: #4b5563;
  font-size: 14px;
}

.leave-record-days {
  font-weight: 600;
}

.leave-record-notes {
  grid-column: 1 / -1;
  margin-top: -4px;
  color: #6b7280;
  font-size: 13px;
}

.leave-record-status {
  text-align: right;
  font-weight: 600;
}

.leave-record-status.is-approved {
  color: #047857;
}

.leave-record-status.is-pending {
  color: #b45309;
}

.leave-record-status.is-rejected {
  color: #b91c1c;
}

@media (max-width: 1050px) {
  .leave-summary-filters {
    grid-template-columns:
      repeat(2, minmax(180px, 1fr));
  }

  .leave-filter-actions {
    grid-column: 1 / -1;
  }

  .leave-summary-totals {
    grid-template-columns:
      repeat(2, minmax(150px, 1fr));
  }

  .leave-record {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .leave-record-status {
    text-align: left;
  }
}

@media (max-width: 650px) {
  .leave-summary-page {
    padding: 14px;
  }

  .leave-summary-header h1 {
    font-size: 24px;
  }

  .leave-summary-filters,
  .leave-summary-totals {
    grid-template-columns: 1fr;
  }

  .leave-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-primary-button,
  .leave-secondary-button {
    width: 100%;
  }

  .leave-month-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .leave-record {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .leave-record-notes {
    grid-column: auto;
    margin-top: 0;
  }
}

.leave-summary-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

@media (max-width: 650px) {
  .leave-summary-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-summary-header-row .leave-primary-button {
    width: 100%;
  }
}

.leave-summary-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

@media (max-width: 650px) {
  .leave-summary-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-summary-header-row .leave-primary-button {
    width: 100%;
  }
}    

.hidden {
  display: none !important;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.65);
}

.review-modal-content {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.review-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.review-title {
  margin-bottom: 5px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.modal-close {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 22px;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.form-grid label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: #374151;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.form-grid textarea {
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.form-status {
  min-height: 22px;
  padding: 0 24px;
  color: #374151;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px 24px;
  border-top: 1px solid #e5e7eb;
}

.primary-button,
.secondary-button {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #0077a8;
  background: #0077a8;
  color: #ffffff;
}

.secondary-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

@media (max-width: 650px) {
  .review-modal {
    align-items: flex-start;
    padding: 10px;
  }

  .review-modal-content {
    max-height: calc(100vh - 20px);
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .full-width {
    grid-column: auto;
  }

  .review-modal-header,
  .modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
.leave-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.leave-record-edit-btn,
.leave-record-delete-btn {
  padding: 7px 12px;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.leave-record-edit-btn {
  border: 1px solid #0077a8;
  background: #ffffff;
  color: #0077a8;
}

.leave-record-edit-btn:hover {
  background: #f0f9ff;
}

.leave-record-delete-btn {
  border: 1px solid #dc2626;
  background: #ffffff;
  color: #dc2626;
}

.leave-record-delete-btn:hover {
  background: #fef2f2;
}

.employee-leave-summary-row {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.employee-leave-summary-item {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.employee-leave-summary-label {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 13px;
}

.employee-leave-summary-item strong {
  font-size: 22px;
  color: #111827;
}

.employee-leave-summary-item.is-highlighted strong {
  color: #0077a8;
}

@media (max-width: 900px) {
  .employee-leave-summary-row {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .employee-leave-summary-row {
    grid-template-columns: 1fr;
  }
}

.leave-stats-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.leave-stats-modal.is-open {
  display: flex;
}

.leave-stats-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.leave-stats-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 20px 50px
    rgba(15, 23, 42, 0.25);
}

.leave-stats-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.leave-stats-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #111827;
}

.leave-stats-modal-header p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #6b7280;
}

.leave-stats-modal-close {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.leave-stats-modal-body {
  max-height: calc(80vh - 85px);
  overflow-y: auto;
  padding: 12px 20px 20px;
}

.leave-stats-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #eef0f3;
}

.leave-stats-modal-row:last-child {
  border-bottom: 0;
}

.leave-stats-modal-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.leave-stats-modal-value {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.leave-stats-modal-empty {
  margin: 20px 0;
  text-align: center;
  color: #6b7280;
}

.leave-summary-stat-button {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.leave-summary-stat-button:hover {
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow:
    0 5px 14px
    rgba(15, 23, 42, 0.08);
}

.leave-summary-stat-button:focus-visible {
  outline: 3px solid
    rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.leave-summary-stat-hint {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
}


