/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  font-size: 1.3rem;
  color: #1e2a46;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}

/* The HTML `hidden` attribute sets display:none in UA stylesheets, but explicit
 * `display: flex` on flex containers (like `.bulk-action-bar`) overrides it.
 * This rule restores the expected behavior across the app. */
[hidden] { display: none !important; }

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes right-header to the right */
  background: linear-gradient(120deg, #1b46a7 0%, #407ef7 60%, #5a9bff 100%);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 24px rgba(26, 62, 155, 0.2);
  color: #fff;
}

.logo-img {
  height: 60px;
  width: auto;
  margin-right: 2rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.daycare-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  color: #1f4fb9; /* Cobalt blue for all headings */
  margin-top: 0;
}

.main-content {
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(30, 60, 130, 0.12);
  border: 1px solid rgba(101, 143, 227, 0.35);
  position: relative;
  overflow: clip;
}

.main-content--wide {
  max-width: 1200px;
}

.main-content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.main-content > * {
  position: relative;
  z-index: 1;
}

label, p, td, th, li, span, div, input, a {
  color: #1e2a46;
  font-size: 1.1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 1rem;
  box-shadow: 0 16px 28px rgba(34, 76, 156, 0.08);
  border: 1px solid rgba(84, 132, 222, 0.25);
  padding: 1.5rem;
}

form label {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

form input[type="text"],
form input[type="password"],
form input[type="number"],
form input[type="email"] {
  font-size: 1.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(90, 126, 210, 0.35);
  margin-bottom: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="number"]:focus,
form input[type="email"]:focus {
  border-color: #3c7cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 132, 255, 0.15);
}

form div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Style the button for better separation and look */
form input[type="submit"],
form button,
form input[type="button"] {
  font-size: 1.08rem;
  margin-top: 0.6rem;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f57d6 0%, #3f8bff 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 20px rgba(29, 79, 186, 0.2);
}
form input[type="submit"]:hover,
form button:hover,
form input[type="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(29, 79, 186, 0.24);
}

.inline-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
}



.decline-reason-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.decline-reason-label {
  font-size: 0.9rem;
  color: #1d2d5c;

}

.decline-reason-input {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 160, 230, 0.45);
  font-size: 1rem;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.decline-reason-input:focus {
  outline: none;
  border-color: #3f8bff;
  box-shadow: 0 0 0 3px rgba(63, 139, 255, 0.15);
}

.inline-label {
  margin: 0;
}

.inline-input {
  width: 5rem;
}

.small-help {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.15rem;
  margin-bottom: 0.3rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-style: italic;
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 32px rgba(30, 60, 130, 0.12);
  border-radius: 16px;
  overflow: hidden;
  font-size: 1.08rem;
  border: 1px solid rgba(120, 160, 230, 0.35);
}

.hours-table tbody tr {
  vertical-align: top;
}

.hours-table__date {
  white-space: nowrap;
}

.hours-table__detail {
  word-break: break-word;
}

.hours-table__hours {
  font-weight: 600;
  text-align: center;
}

.hours-table__status {
  text-align: left;
}

.status-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

.status-reason {
  font-size: 0.95rem;
  color: #1f57d6;
  background: rgba(63, 139, 255, 0.08);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

.hours-table .action-buttons {
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 999px;
  box-shadow: none;
}

.contribution-hours-row {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  width: 100%;
}

.action-buttons-row {
  display: flex;
  flex-direction: row !important;
  gap: 0.5rem;
  align-items: center;
}

.small-table th:last-child,
.small-table td:last-child {
  min-width: 240px;
}

.small-table .action-buttons {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

/* Table headers */
th {
  background: linear-gradient(120deg, #1d4fcc 0%, #3b82f6 100%);  /* cobalt blue */
  color: #fff;
  text-align: left;
  padding: 1rem 0.9rem;
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* Table rows and cells */
td {
  padding: 0.95rem 0.9rem;
  border-bottom: 1px solid rgba(204, 216, 240, 0.8);
}

/* Alternate row color for readability */
tbody tr:nth-child(even) {
  background-color: rgba(237, 244, 255, 0.65);
}

/* Highlight row on hover */
tbody tr:hover {
  background-color: rgba(210, 229, 255, 0.8);
  transition: background 0.2s;
}

/* Optional: Actions column (e.g., Show link) */
td a {
  color: #1f57d6;
  text-decoration: none;
  font-weight: 500;
}

td a:hover {
  text-decoration: underline;
  color: #3f8bff;
}

/* Rounded corners for the table — per-cell so overflow:hidden is not needed */
thead th:first-child { border-radius: 16px 0 0 0; }
thead th:last-child  { border-radius: 0 16px 0 0; }
tbody tr:last-child td:first-child { border-radius: 0 0 0 16px; }
tbody tr:last-child td:last-child  { border-radius: 0 0 16px 0; }

.left-header {
  display: flex;
  align-items: center;
}

.right-header {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.right-header a {
  color: #f5f8ff; /* cobalt blue */
  font-weight: 600;
  text-decoration: none;
  margin-left: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.right-header a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}


.logout-link {
  font-size: 1.1rem;
  color: #f0f4ff;
  text-decoration: none;
  font-weight: 600;
}

.logout-link:hover {
  text-decoration: none;
}

table.small-table,
table.small-table td,
table.small-table th {
  font-size: 0.9rem !important; /* or whatever size you want */
}

.small-table tbody tr .inline-form {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, max-height 0.2s ease;
}

.small-table tbody tr:hover .inline-form,
.small-table tbody tr:focus-within .inline-form {
  opacity: 1;
  max-height: 500px;
  pointer-events: auto;
}


.hours-money-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

input[disabled] {
  background-color: #eef3ff;
  cursor: not-allowed;
  color: rgba(30, 42, 70, 0.7);
}


.family-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(120, 160, 230, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(30, 60, 130, 0.08);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.filter-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f4fb9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.filter-field input[type="text"],
.filter-field select {
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(90, 126, 210, 0.35);
  font-size: 1rem;
  background: #fff;
  margin: 0;
  width: auto;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-field input[type="text"] {
  min-width: 16rem;
}

.filter-field select {
  min-width: 12rem;
}

.filter-field input[type="text"]:focus,
.filter-field select:focus {
  border-color: #3c7cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 132, 255, 0.15);
}

.filter-field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}

.filter-field--check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.filter-field--check label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  font-weight: 500;
  color: #1e2a46;
  cursor: pointer;
}

.filters-bar__submit {
  margin: 0 !important;
  align-self: flex-end;
  margin-bottom: 0.1rem !important;
}

.filters-bar__clear {
  align-self: flex-end;
  margin-bottom: 0.1rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f57d6;
  background: transparent;
  border: 1px solid rgba(84, 132, 222, 0.4);
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filters-bar__clear:hover,
.filters-bar__clear:focus {
  background: rgba(63, 139, 255, 0.08);
  border-color: rgba(84, 132, 222, 0.65);
  color: #143fa6;
  text-decoration: none;
}

.filters-count {
  margin-left: auto;
  align-self: flex-end;
  margin-bottom: 0.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

.add-family-dropdown {
  width: 100%;
}

.add-family-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f57d6;
  background: rgba(63, 139, 255, 0.08);
  border: 1px solid rgba(84, 132, 222, 0.3);
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.add-family-toggle:hover {
  background: rgba(63, 139, 255, 0.15);
  border-color: rgba(84, 132, 222, 0.5);
}

.add-family-toggle-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.add-family-dropdown.open .add-family-toggle-arrow {
  transform: rotate(180deg);
}

.add-family-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.add-family-dropdown.open .add-family-panel {
  max-height: 500px;
  margin-top: 0.75rem;
}

.add-family-panel .add-family-form {
  width: 100%;
}

.archived-row {
  opacity: 0.6;
}

.archived-row td:first-child {
  font-style: italic;
}

td form:has(.archive-button) {
  display: inline;
  padding: 0;
  border: none;
  box-shadow: none;
  gap: 0;
  margin: 0;
}

.archive-button {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  margin-top: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.2);
}

.archive-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(230, 126, 34, 0.3);
  color: #fff;
}

.archive-button.unarchive {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.archive-button.unarchive:hover {
  box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

.show-button {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f57d6 0%, #3f8bff 100%);
  color: #fff !important;
  text-decoration: none !important;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 8px rgba(31, 87, 214, 0.2);
  white-space: nowrap;
}

.show-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(31, 87, 214, 0.3);
  color: #fff !important;
  text-decoration: none !important;
}

#family_summaries td:last-child {
  white-space: nowrap;
}

.bulk-checkbox-cell {
  width: 1px;
  white-space: nowrap;
  padding-right: 0.4rem;
}

.bulk-checkbox-cell input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
  margin: 0;
}

.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(120deg, #1b46a7 0%, #407ef7 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(26, 62, 155, 0.2);
}

.bulk-action-bar__count {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
}

.bulk-action-bar__count strong {
  font-size: 1.15rem;
  margin-right: 0.15rem;
}

.bulk-action-bar__send {
  appearance: none;
  border: none;
  background: #fff;
  color: #1f4fb9;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.bulk-action-bar__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

/* ── Sticky controls on the All Families page ── */
.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  padding-bottom: 0.5rem;
}

.sticky-controls--stuck {
  box-shadow: 0 4px 12px rgba(30, 60, 130, 0.10);
}

#family_summaries table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: clip;
  margin-top: 0;
}

#family_summaries tbody tr:last-child td {
  border-bottom: none;
}

#family_summaries thead th {
  position: sticky;
  top: var(--sticky-controls-height, 0px);
  z-index: 5;
}

.bulk-email-modal {
  padding: 0;
  width: min(720px, 92vw);
  max-height: 90vh;
  border: none;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(20, 40, 100, 0.35);
  background: #fff;
  color: #1e2a46;
  overflow: hidden;
}

.bulk-email-modal::backdrop {
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(2px);
}

.bulk-email-form {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  gap: 0;
  max-height: 90vh;
  overflow-y: auto;
}

.bulk-email-form > div {
  padding: 1.5rem 1.75rem;
}

.bulk-email-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(120, 160, 230, 0.3);
  background: linear-gradient(120deg, #1b46a7 0%, #3f8bff 100%);
  color: #fff;
}

.bulk-email-modal__header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #fff;
}

.bulk-email-modal__close {
  appearance: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.bulk-email-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bulk-email-field {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bulk-email-field label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1f4fb9;
}

.bulk-email-field input[type="text"],
.bulk-email-field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(90, 126, 210, 0.4);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
  margin: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bulk-email-field input[type="text"]:focus,
.bulk-email-field textarea:focus {
  outline: none;
  border-color: #3c7cff;
  box-shadow: 0 0 0 3px rgba(70, 132, 255, 0.15);
}

.bulk-email-field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.bulk-email-field--check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.bulk-email-field--check label {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-size: 0.95rem;
  color: #1e2a46;
}

.bulk-email-tokens {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #4a5780;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.bulk-email-tokens__label {
  font-weight: 600;
  color: #1f4fb9;
  margin-right: 0.15rem;
}

.bulk-email-tokens__chip {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(63, 139, 255, 0.1);
  color: #1f4fb9;
  border: 1px solid rgba(84, 132, 222, 0.35);
  font: inherit;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.bulk-email-tokens__chip:hover {
  background: rgba(63, 139, 255, 0.2);
  border-color: #3f8bff;
  transform: translateY(-1px);
}

.bulk-email-tokens__chip:active {
  transform: translateY(0);
  background: rgba(63, 139, 255, 0.28);
}

.bulk-email-tokens__chip:focus-visible {
  outline: 2px solid #3f8bff;
  outline-offset: 2px;
}

.bulk-email-tokens__chip-token {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
}

.bulk-email-tokens__chip-label {
  font-size: 0.8rem;
  color: #4a5780;
}

.bulk-email-preview {
  background: #f4f7fc;
  border: 1px solid rgba(120, 160, 230, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.bulk-email-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.bulk-email-preview__header h3 {
  margin: 0;
  font-size: 1rem;
  color: #1f4fb9;
}

.bulk-email-preview__header label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5780;
  margin-right: 0.4rem;
}

.bulk-email-preview__header select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(90, 126, 210, 0.4);
  background: #fff;
  font-size: 0.9rem;
}

.bulk-email-preview__email {
  background: #fff;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(120, 160, 230, 0.2);
}

.bulk-email-preview__subject {
  font-size: 0.95rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(120, 160, 230, 0.2);
  word-break: break-word;
}

.bulk-email-preview__label {
  font-weight: 600;
  color: #4a5780;
  margin-right: 0.35rem;
}

.bulk-email-preview__body {
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1e2a46;
  min-height: 4rem;
}

.bulk-email-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  background: #f4f7fc;
  border-top: 1px solid rgba(120, 160, 230, 0.3);
}

.bulk-email-modal__footer .btn-primary,
.bulk-email-modal__footer .btn-secondary,
.bulk-email-modal__footer input[type="submit"] {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  margin: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bulk-email-modal__footer .btn-primary,
.bulk-email-modal__footer input[type="submit"] {
  background: linear-gradient(135deg, #1f57d6 0%, #3f8bff 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(31, 87, 214, 0.2);
}

.bulk-email-modal__footer .btn-primary:hover,
.bulk-email-modal__footer input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(31, 87, 214, 0.28);
}

.bulk-email-modal__footer .btn-secondary {
  background: #fff;
  color: #1f4fb9;
  border: 1px solid rgba(84, 132, 222, 0.4);
}

.bulk-email-modal__footer .btn-secondary:hover {
  background: rgba(63, 139, 255, 0.08);
}

.bulk-email-skipped {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  color: #6b4a00;
  background: rgba(255, 196, 0, 0.08);
  border-radius: 8px;
  padding: 0.6rem 0.85rem 0.6rem 2rem;
  list-style: disc;
}

.bulk-email-skipped li {
  font-size: 0.95rem;
}

/* Inline edit + row-level admin actions */

.row-actions {
  white-space: nowrap;
}

.row-actions form.row-hidden-form {
  display: none;
}

td form:has(.archive-button),
td form.button_to {
  display: inline-block;
}

.inline-edit-input {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(90, 126, 210, 0.45);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  margin: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-edit-input:focus {
  outline: none;
  border-color: #3c7cff;
  box-shadow: 0 0 0 3px rgba(70, 132, 255, 0.18);
}

.inline-edit-input:invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}

.inline-edit-input--name {
  width: 100%;
  min-width: 12rem;
}

.inline-edit-input--hours {
  width: 6rem;
}

tr.inline-editing {
  background: rgba(63, 139, 255, 0.06);
}

.edit-button,
.delete-button,
.save-button,
.cancel-button {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  margin-top: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.edit-button {
  background: linear-gradient(135deg, #5a6bff 0%, #7e8bff 100%);
  box-shadow: 0 4px 8px rgba(90, 107, 255, 0.2);
}

.edit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(90, 107, 255, 0.3);
}

.delete-button {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  box-shadow: 0 4px 8px rgba(192, 57, 43, 0.2);
}

.delete-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(192, 57, 43, 0.3);
}

.save-button {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.save-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

.cancel-button {
  background: #6c7a93;
  box-shadow: 0 4px 8px rgba(108, 122, 147, 0.2);
}

.cancel-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(108, 122, 147, 0.3);
}

/* Delete confirmation modal — reuses bulk-email-modal header/footer classes. */

.delete-family-modal {
  padding: 0;
  width: min(480px, 92vw);
  border: none;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(20, 40, 100, 0.35);
  background: #fff;
  color: #1e2a46;
  overflow: hidden;
}

.delete-family-modal::backdrop {
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(2px);
}

.delete-family-modal__body {
  padding: 1.25rem 1.75rem;
}

.delete-family-modal__body p {
  margin: 0 0 0.75rem;
}

.delete-family-modal__warning {
  color: #8a1f15;
  background: rgba(231, 76, 60, 0.08);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border-left: 3px solid #c0392b;
}

.btn-danger {
  appearance: none;
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(192, 57, 43, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(192, 57, 43, 0.35);
}

@media (max-width: 600px) {
  body {
    font-size: 1.05rem;
  }

  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .right-header {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
  }

  .right-header a {
    margin-left: 0;
    font-size: 1rem;
  }

  .main-content {
    padding: 1.75rem 1.25rem;
    margin: 0 0.5rem 2.5rem;
  }

  .sticky-controls {
    position: static;
  }

  #family_summaries thead th {
    position: static;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  table:not(.hours-table) th,
  table:not(.hours-table) td {
    font-size: 0.95rem;
    padding: 0.75rem 0.5rem;
  }

  table.hours-table {
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
    margin-top: 1.25rem;
  }

  .hours-table thead {
    display: none;
  }

  .hours-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(120, 160, 230, 0.4);
    box-shadow: 0 12px 24px rgba(30, 60, 130, 0.12);
    background: rgba(255, 255, 255, 0.98);
  }

  .hours-table td {
    display: block;
    padding: 0.45rem 0;
    font-size: 0.95rem;
    border: none;
  }

  .hours-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #1f4fb9;
    margin-bottom: 0.15rem;
  }

  .hours-table__hours {
    text-align: left;
  }

  .status-wrapper {
    gap: 0.3rem;
  }

  .status-wrapper .action-buttons {
    align-self: flex-start;
  }
}
