#modal {
  position: fixed;
  z-index: 2;
  left: 25%;
  top: 10%;
  width: 400px;
  word-break: break-word;
  border-radius: 6px;
  background: #dcefe7;
  border: 5px solid #24483a;
}

/* hide the container when it has no content */
#modal:empty {
  display: none;
}

/* once #modal has content, paint a full-screen blur behind it */
#modal:not(:empty)::before {
  content: "";
  position: fixed;
  inset: 0;
  /* top/right/bottom/left: 0 */
  backdrop-filter: blur(2px);
  /* the blur */
  -webkit-backdrop-filter: blur(2px);
  background: rgba(255, 255, 255, 0.2);
  /* optional tint */
  z-index: 1;
  /* sits under your modal’s box */
}

/* keep your actual modal content above that backdrop */
#modal>* {
  position: relative;
  z-index: 2;
}


/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #f6faf7;
  color: #2f3f38;
  font-size: 0.9rem;
  /* Reduced font size */
}

.container {
  border-radius: 8px;
  padding: 15px;
}

/* Increase container width */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 1020px !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 820px !important;
  }
}
/* Navbar Styling */
.navbar {
  background-color: #2f6f56 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.navbar-brand,
.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  margin-right: 1rem;
}

.navbar-nav .nav-link:hover {
  color: #dcefe7 !important;
}

/* Make active link more noticeable */
.navbar-nav .nav-link.active {
  color: #ffffff !important;
  background-color: #1f4d3b !important;
  /* Darker shade for active state */
  font-weight: 600 !important;
  /* Make active item bold */
}

.navbar-nav .nav-link.active:hover {
  color: #ffffff !important;
  /* Keep white text on hover */
  background-color: #285f49 !important;
  /* Slightly lighter shade on hover */
}
/* Card Styling */
.card {
  background-color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  padding: 15px;
  margin-bottom: 15px;
}

/* Table Styling */
.table {
  font-size: 0.85rem;
  /* Reduced table font size */
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background-color: white;
}

.table th {
  background-color: #2f6f56 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px !important;
  border: none !important;
}

.table td,
.table th {
  padding: 10px;
  vertical-align: middle;
  border-bottom: 1px solid #eceff1;
}

.table tbody tr:hover {
  background-color: #eef7f2;
}

/* Form Styling */
.form-control {
  font-size: 0.9rem;
  /* Smaller font for form inputs */
  border-radius: 6px;
  padding: 8px;
  border: 1px solid #ddd;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  border-color: #3f8a6b;
  box-shadow: 0 0 4px rgba(63, 138, 107, 0.22);
}

/* Button Styling */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  /* Reduced button font size */
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #3f8a6b !important;
  border: none !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #2f6f56 !important;
}

.btn-danger {
  background-color: #e57373 !important;
  color: white !important;
  border: none !important;
}

.btn-danger:hover {
  background-color: #d32f2f !important;
}

.btn-secondary {
  background-color: #f9fafb !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
}

.btn-secondary:hover {
  background-color: #eceff1 !important;
}

/* Badge and Alert Styling */
.alert {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-primary {
  background-color: #e4f3ec;
  color: #2f6f56;
}

.alert-success {
  background-color: #e8f5e9;
  color: #388e3c;
}

/* Admin index layouts */
.admin-page-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-page-title h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.admin-page-actions {
  flex: 0 0 auto;
}

.admin-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-summary-item {
  background: #ffffff;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.04);
  padding: 14px 16px;
}

.admin-summary-label {
  color: #667085;
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.admin-summary-item strong {
  color: #1f2937;
  font-size: 1.25rem;
}

.admin-section-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.admin-section-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.admin-section-header-muted h2 {
  color: #667085;
}

.admin-table-wrap {
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.04);
  margin-bottom: 22px;
}

.admin-table {
  box-shadow: none;
  margin-bottom: 0;
}

.admin-table th {
  white-space: nowrap;
}

.admin-table td {
  background-color: #ffffff;
}

.admin-table .hours-cell {
  color: #24483a;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.admin-table-muted td {
  color: #667085;
}

.staff-name {
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 2px;
}

.staff-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 4px 7px;
}

.staff-status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.staff-status-retired {
  background: #eef1f6;
  color: #667085;
}

/* Voucher admin */
.voucher-request-panel {
  background: #fff8e1;
  border: 1px solid #ffe1a6;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 14px 16px 2px;
}

.voucher-search {
  flex: 0 1 520px;
}

.voucher-search-form {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.voucher-search-form .form-control {
  min-width: 220px;
}

.voucher-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voucher-expiry-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.voucher-expiry-note {
  color: #667085;
  display: block;
  font-weight: 600;
  margin-top: 4px;
}

.voucher-origin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.voucher-pagination {
  margin-bottom: 12px;
}

.voucher-code {
  background: #eaf6ef;
  border: 1px solid #cfe6da;
  border-radius: 6px;
  color: #24483a;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 7px 9px;
}

.voucher-date {
  color: #1f2937;
  font-weight: 700;
}

.voucher-money {
  color: #24483a;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.voucher-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.voucher-status-unused {
  background: #e8f5e9;
  color: #2e7d32;
}

.voucher-status-partial {
  background: #fff3cd;
  color: #8a5a00;
}

.voucher-status-used {
  background: #eef1f6;
  color: #667085;
}

.voucher-row-used td {
  color: #667085;
}

.voucher-row-used .voucher-code {
  background: #f4f6f9;
  border-color: #e2e7ef;
  color: #667085;
}

.voucher-usages {
  display: grid;
  gap: 5px;
}

.voucher-usage {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voucher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.voucher-actions form {
  margin: 0;
}

/* Settings */
.settings-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.settings-panel {
  background: #ffffff;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.04);
  overflow: hidden;
}

.settings-panel-header {
  align-items: center;
  background: #f7f9fc;
  border-bottom: 1px solid #e7ebf3;
  display: flex;
  min-height: 42px;
  padding: 10px 14px;
}

.settings-panel-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.settings-inline-fields {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.settings-field .form-label {
  color: #667085;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.settings-field .form-control {
  font-size: 0.9rem;
  min-height: 36px;
  padding: 6px 8px;
}

.settings-days-header,
.settings-day-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(78px, 0.4fr));
}

.settings-days-header {
  background: #ffffff;
  border-bottom: 1px solid #e7ebf3;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 9px 14px;
  text-transform: uppercase;
}

.settings-day-row {
  align-items: center;
  border-bottom: 1px solid #eef1f6;
  padding: 9px 14px;
}

.settings-day-row:last-child {
  border-bottom: 0;
}

.settings-day-today {
  background: #f1faf5;
}

.settings-day-name strong,
.settings-day-name small {
  display: block;
}

.settings-save-bar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.04);
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding: 12px;
}

@media (max-width: 768px) {
  .voucher-search,
  .voucher-search-form {
    display: block;
  }

  .voucher-search-form .form-control {
    margin-bottom: 8px;
    min-width: 0;
  }

  .voucher-summary-grid {
    grid-template-columns: 1fr;
  }

  .voucher-expiry-grid {
    grid-template-columns: 1fr;
  }

  .voucher-origin-grid {
    grid-template-columns: 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-days-header {
    display: none;
  }

  .settings-day-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .settings-day-name {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .admin-page-header {
    display: block;
  }

  .admin-page-actions {
    margin-top: 12px;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Daily overview */
.daily-date-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.daily-date-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.daily-date-form .form-control {
  min-width: 160px;
}

.daily-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.daily-overview-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.daily-panel {
  background: #ffffff;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.04);
  overflow: hidden;
  padding: 0 14px 8px;
}

.daily-panel .admin-section-header {
  margin-top: 14px;
}

.daily-summary-table {
  box-shadow: none;
  margin-bottom: 0;
}

.daily-summary-table td {
  border-bottom: 1px solid #eef1f6;
  padding: 8px 0;
}

.daily-summary-table td:last-child {
  color: #24483a;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.daily-total-row td {
  border-top: 2px solid #24483a;
  color: #1f2937;
  font-weight: 700;
}

.daily-detail-table td {
  vertical-align: top;
}

.daily-detail-table tbody tr.daily-sale-start td {
  border-top: 2px solid #aeb8c7;
}

.daily-detail-table tbody tr.daily-sale-continuation td {
  border-top: 0;
}

.daily-time {
  color: #1f2937;
  font-weight: 700;
}

.payment-amount {
  color: #24483a;
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin-top: 2px;
}

.gender-dot {
  border-radius: 999px;
  display: inline-block;
  height: 12px;
  margin-right: 8px;
  vertical-align: middle;
  width: 12px;
}

.gender-dot-male {
  background: #95b9c7;
}

.gender-dot-female {
  background: #ffc0cb;
}

@media (max-width: 992px) {
  .daily-summary-grid,
  .daily-overview-grid {
    grid-template-columns: 1fr;
  }

  .daily-date-nav {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

/* Sidebar and Button Groups */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.button-group .btn {
  flex: 1 1 28%;
  min-width: 110px;
  margin: 3px;
}

/* Footer Styling */
footer {
  background-color: #2f6f56;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 0.85rem;
  /* Reduced footer font size */
}

footer a {
  color: #cfe6da;
  text-decoration: none;
}

footer a:hover {
  color: #ffffff;
}

/* Header or Title Styling */
h1,
h2,
h3 {
  color: #2f6f56;
  font-weight: 700;
}

h1 {
  font-size: 2.2rem;
  /* Reduced heading sizes */
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* Additional Layout Spacing */
.mt-3 {
  margin-top: 0.8rem !important;
}

.mb-3 {
  margin-bottom: 0.8rem !important;
}

.pt-3 {
  padding-top: 0.8rem !important;
}

.pb-3 {
  padding-bottom: 0.8rem !important;
}


table.table-striped .not-striped tbody tr:nth-child(odd) {
  background-color: transparent !important;
}

table.table-striped .not-striped tbody tr:nth-child(even) {
  background-color: transparent !important;
}
