body.page_admin {
  overflow-y: auto;
  height: auto;
}

body.page_admin .home_layout {
  height: auto;
  min-height: 100svh;
}

body.page_admin .home_content {
  flex: 1;
  height: auto;
  overflow: visible;
  padding-top: 24px;
  padding-bottom: 40px;
}

.admin_container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.admin_container h1 {
  text-align: center;
  color: #333;
  margin-top: 0;
  margin-bottom: 32px;
}

/* NEW: Global Controls */
.admin_global_controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto 24px auto;
}

.admin_global_controls .cta_button {
  width: 100%;
}

@media (min-width: 769px) {
  .admin_global_controls {
    max-width: 1000px;
    /* Allow it to be wider */
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    /* Add some gap */
  }

  .admin_global_controls .form_group {
    flex-grow: 1;
    /* Let the dropdown grow */
  }

  /* Checkbox aligns to the bottom */
  .admin_global_controls .form_group_checkbox {
    padding-bottom: 14px;
    flex-shrink: 0;
    /* Don't let it shrink */
  }

  .admin_global_controls .cta_button {
    width: auto;
    flex-shrink: 0;
    margin-bottom: 2px;
    /* Align with input */
  }
}

/* End Global Controls */


/* Counter badge style */
.accordion_counter_badge {
  font-size: 16px;
  font-weight: 500;
  color: #777;
}

/* Description text inside accordion */
.admin_section_description {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin: 0;
  padding-top: 16px;
  margin-bottom: 16px;
}

/* Checkbox style */
.form_group_checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Removed margin-top, it's handled by the parent flex gap */
}

.form_group_checkbox input {
  margin: 0;
  width: 16px;
  height: 16px;
}

.form_group_checkbox label {
  font-size: 15px;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
  /* Prevent wrapping */
}


/* Selector group (no longer needed) */
/*
.admin_selector_group {
  margin-top: 0;
  max-width: 600px;
}
*/

/* Horizontal rule to divide selector from list */
.section_divider_admin {
  border: 0;
  height: 1px;
  background: #f0f0f0;
  margin: 24px 0;
}


/* Admin Form (now in modal) */
.admin_form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin_form .cta_button {
  width: 100%;
  margin-top: 8px;
}

/* Appointment Card List */
.admin_card_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin_card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fcfcfc;
  display: flex;
  flex-direction: column;
}

.admin_card_header {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5ff;
}

.admin_card_header h4 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.admin_card_body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin_card_body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.admin_card_body p strong {
  color: #111;
}

.admin_card_actions {
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  background: #f5f5f5;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin_card_actions .cta_button {
  padding: 8px 16px;
  font-size: 14px;
}

/* Gallery-specific styles */
.gallery_publish_btn {
  background: #fff;
  color: #1a73e8;
  border: 2px solid #1a73e8;
}

.gallery_publish_btn:hover {
  background: #f4f8ff;
}

.gallery_publish_btn.is-published {
  background: #1a73e8;
  color: #fff;
}

.gallery_publish_btn.is-published:hover {
  background: #1865c9;
}


@media (min-width: 769px) {
  .admin_card {
    flex-direction: row;
  }

  .admin_card_header {
    width: 250px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 0;
  }

  .admin_card_main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .admin_card_body {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    flex-grow: 1;
  }
}

/* Modal Styles */
.modal_overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal_content {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal_close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

.modal_content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #333;
}

.modal_content p {
  font-size: 16px;
  color: #555;
  margin-bottom: 16px;
}

/* Admin Dashboard Table Styles */
.admin_dashboard_table_container {
  overflow-x: auto;
  width: 100%;
  margin-top: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.admin_dashboard_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 700px;
  /* Prevent cramping */
}

.admin_dashboard_table th,
.admin_dashboard_table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.admin_dashboard_table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.admin_dashboard_table tbody tr:hover {
  background-color: #f1f3f5;
}

.admin_dashboard_table td {
  color: #555;
}

/* Numeric columns right aligned */
.admin_dashboard_table td:nth-child(4),
.admin_dashboard_table td:nth-child(5),
.admin_dashboard_table td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Link Generator Styles */
.link_generator_container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #e0e0e0;
}

.link_generator_container h4 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #333;
}

/* Radio button group styling */
.form_group_radio {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.form_group_radio input[type="radio"] {
  margin: 0;
}

.form_group_radio label {
  font-size: 15px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
}

/* UTM Options specific styling (indented slightly) */
#lgUtmOptions .form_group {
  margin-left: 20px;
}

/* Generated Link Result */
.generated_link_result {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.generated_link_result label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.copy_container {
  display: flex;
  gap: 8px;
}

.copy_container input {
  flex-grow: 1;
  background-color: #fff;
  /* Ensure readability */
  font-family: monospace;
  /* Use monospace for URLs */
}

.copy_container button {
  padding: 8px 16px;
}