@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css");

:root {
  --sw-radius: 0.5rem;
  --sw-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { overscroll-behavior-y: contain; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; margin: 0; background: #f5f5f5; color: #1a1a1a; }

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  border-radius: var(--sw-radius);
}
body.admin-page.env-development { background: #eef4ff; }
body.admin-page.env-production { background: #f4f7ee; }
body.admin-page.env-development,
body.admin-page.env-production {
  padding-top: 22px;
  padding-bottom: 22px;
}
body.env-development::before,
body.env-production::before,
body.env-development::after,
body.env-production::after {
  position: fixed;
  left: 0;
  width: 100%;
  height: 22px;
  line-height: 22px;
  z-index: 1400;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  pointer-events: none;
  text-transform: uppercase;
}
body.env-development::before,
body.env-production::before { top: 0; }
body.env-development::after,
body.env-production::after { bottom: 0; }
body.env-development::before,
body.env-development::after { content: "DEV OMGEVING"; background: #f59e0b; color: #111827; }
body.env-production::before,
body.env-production::after { content: "PRODUCTIE OMGEVING"; background: #16a34a; color: #ffffff; }
.admin-header {
  background: #2c3e50;
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-header a { color: #ecf0f1; text-decoration: none; }
.admin-header a:hover { text-decoration: underline; }
.admin-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-header nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.32);
}
.admin-header nav span::before {
  content: "👤";
  font-size: 0.8rem;
  color: #cbd5e1;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}
.admin-header nav span::after {
  content: "👤";
  font-size: 0.8rem;
  line-height: 1;
  visibility: hidden;
}
.admin-header button { background: #34495e; color: #fff; border: none; padding: 0.35rem 0.75rem; cursor: pointer; border-radius: 4px; font-size: 0.9rem; }
.admin-header button:hover { background: #415b76; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.admin-main h1 { margin-top: 0; }

@supports (-webkit-touch-callout: none) {
  /* iOS Safari: beperk scroll-chain/pull-to-refresh springgedrag */
  html { height: -webkit-fill-available; }
  body.admin-page {
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}
.page-back-nav {
  margin: -0.35rem 0 0.9rem;
}
.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.93rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.page-back-link:hover {
  text-decoration: underline;
}
.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.dashboard-head h1 { margin: 0; }
.dashboard-tools-btn { white-space: nowrap; }
.flash { background: #d4edda; color: #155724; padding: 0.5rem 1rem; border-radius: 4px; }
.error { background: #f8d7da; color: #721c24; padding: 0.5rem 1rem; border-radius: 4px; }
.filter-form { background: #fff; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; box-shadow: var(--sw-shadow); }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filter-row input, .filter-row select { padding: 0.4rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; }
.personen-filter-form .filter-row {
  align-items: flex-end;
}
.personen-filter-form .filter-field {
  display: grid;
  gap: 0.2rem;
  min-width: 170px;
  flex: 1 1 170px;
}
.personen-filter-form .filter-field-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}
.personen-filter-form .filter-field input,
.personen-filter-form .filter-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.2rem;
}
.personen-filter-form .date-input-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.personen-filter-form .date-input-row input {
  flex: 1 1 auto;
}
.personen-filter-form .date-apply-btn {
  display: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 0.83rem;
  font-weight: 600;
  min-height: 2.2rem;
  padding: 0.24rem 0.56rem;
}
.personen-filter-form .afstammeling-autocomplete {
  position: relative;
  width: 100%;
}
.personen-filter-form .filter-field.filter-field-autocomplete {
  min-width: 220px;
  flex-basis: 220px;
}
.personen-filter-form .afstammeling-autocomplete-input {
  width: 100%;
  min-height: 2.2rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.personen-filter-form .afstammeling-autocomplete-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  padding: 0.25rem;
}
.personen-filter-form .afstammeling-autocomplete-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  color: #0f172a;
  cursor: pointer;
}
.personen-filter-form .afstammeling-autocomplete-item:hover,
.personen-filter-form .afstammeling-autocomplete-item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}
.personen-filter-extra {
  margin: 0;
}
.personen-filter-extra > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  min-height: 2.2rem;
  padding: 0.35rem 0.8rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.personen-filter-extra > summary::-webkit-details-marker {
  display: none;
}
.personen-filter-extra > summary::before {
  content: "▸";
  margin-right: 0.4rem;
  color: #64748b;
}
.personen-filter-extra[open] > summary::before {
  content: "▾";
}
.personen-filter-extra[open] {
  flex: 1 0 100%;
}
.personen-filter-extra-grid {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.personen-filter-extra-grid select {
  width: 100%;
}
.aanmeldingen-filter-form .filter-field-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}
.aanmeldingen-filter-grid {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(240px, 1fr) auto auto;
  gap: 0.4rem 0.5rem;
  align-items: end;
}
.aanmeldingen-filter-field {
  display: grid;
  gap: 0.16rem;
}
.aanmeldingen-filter-field select,
.aanmeldingen-filter-field input {
  width: 100%;
  min-height: 2.05rem;
}
.aanmeldingen-filter-actions {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: end;
  justify-content: flex-end;
}
.aanmeldingen-filter-form .filter-reset-btn {
  min-width: 0;
  min-height: 2.05rem;
  padding: 0.28rem 0.58rem;
}
.aanmeldingen-day-field {
  grid-column: 3;
  grid-row: 1;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.aanmeldingen-day-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
.day-filter-pill {
  position: relative;
  display: inline-flex;
}
.day-filter-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.day-filter-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.82rem;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}
.day-filter-pill input[type="checkbox"]:checked + span {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.day-filter-pill input[type="checkbox"]:focus-visible + span {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.filter-live-stats {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #475569;
}
.filter-row > button:not(.btn) { padding: 0.4rem 1rem; background: #3498db; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.filter-row > button:not(.btn):hover { background: #2980b9; }
.filter-row .btn-link { margin-left: 0.5rem; color: #3498db; text-decoration: none; font-size: 0.95rem; }
.filter-row .btn-link:hover { text-decoration: underline; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--sw-shadow); }
.data-table th, .data-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #34495e; color: #fff; font-weight: 600; }
.data-table tr:hover { background: #f8f9fa; }
.data-table a { color: #3498db; text-decoration: none; margin-right: 0.5rem; }
.data-table a:hover { text-decoration: underline; }
.data-table form { display: inline; }
.data-table button { background: transparent; color: #e74c3c; border: none; cursor: pointer; padding: 0; font-size: 0.9rem; }
.data-table button:hover { text-decoration: underline; }
.data-table-tree .tree-cell { vertical-align: middle; }
.data-table-tree .tree-indent { display: inline-block; }
.data-table-tree .tree-branch { color: #95a5a6; font-weight: normal; }
.data-table-tree tr.is-stamouder { background: #f3f8ff; }
.data-table-tree tr.is-stamouder:hover { background: #eaf2ff; }
.data-table-tree .partner-tree-cell { position: relative; }
.data-table-tree tr.tree-line-single .partner-tree-cell::before {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: 30%;
  bottom: 30%;
  border-left: 1.5px solid #94a3b8;
}
.data-table-tree tr.tree-line-single .partner-tree-cell::after {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: 50%;
  width: 0.45em;
  border-top: 1.5px solid #94a3b8;
}
.data-table-tree tr.partner-link-start .partner-tree-cell::before {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: 50%;
  bottom: -1px;
  border-left: 1.5px solid #94a3b8;
}
.data-table-tree tr.partner-link-start .partner-tree-cell::after {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: 50%;
  width: 0.45em;
  border-top: 1.5px solid #94a3b8;
}
.data-table-tree tr.partner-link-end .partner-tree-cell::before {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: -1px;
  bottom: 50%;
  border-left: 1.5px solid #94a3b8;
}
.data-table-tree tr.partner-link-end .partner-tree-cell::after {
  content: "";
  position: absolute;
  left: calc(var(--partner-indent, 1em) - 0.85em);
  top: 50%;
  width: 0.45em;
  border-top: 1.5px solid #94a3b8;
}
.meta-icon {
  margin-left: 0.2rem;
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.72;
  vertical-align: middle;
  cursor: help;
}
.data-table .muted { color: #95a5a6; font-size: 0.9rem; }
.form-block { background: #fff; padding: 1.5rem; border-radius: 8px; max-width: 480px; box-shadow: var(--sw-shadow); }
.form-block label { display: block; margin-bottom: 0.75rem; }
.form-block input[type="text"], .form-block input[type="number"], .form-block input[type="date"], .form-block select { width: 100%; padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; margin-top: 0.25rem; }
.form-block input[type="checkbox"] { margin-right: 0.5rem; }
.form-actions { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.form-actions button:not(.btn) { padding: 0.5rem 1.25rem; background: #27ae60; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.form-actions button:not(.btn):hover { background: #219a52; }
.form-actions .btn { min-width: 10.5rem; }
.form-actions a { margin-left: 0; color: #3498db; text-decoration: none; }
.card { background: #fff; padding: 1.5rem; border-radius: 8px; margin-bottom: 1rem; box-shadow: var(--sw-shadow); }
.card .btn { margin-right: 0.45rem; margin-bottom: 0.35rem; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--sw-shadow);
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-left: 4px solid #3498db;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.stat-card-muted { border-left-color: #95a5a6; }
.stat-card-warning { border-left-color: #f59e0b; }
.stat-card .stat-number { display: block; font-size: 1.75rem; font-weight: 700; color: #2c3e50; }
.stat-card .stat-label { font-size: 0.9rem; color: #7f8c8d; }
.dashboard-years .year-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; }
.year-card { background: #f8f9fa; border-radius: 10px; padding: 1.05rem 1.15rem; border: 1px solid #e5e7eb; }
.year-card.is-next-upcoming-year {
  background: #f7fff9;
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.16), 0 6px 16px rgba(34, 197, 94, 0.14);
}
.year-card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.45rem; }
.year-card-title { font-size: 1.25rem; font-weight: 700; color: #2c3e50; text-decoration: none; }
.year-card-title:hover { color: #3498db; text-decoration: underline; }
.year-card-badges { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.badge { font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 4px; font-weight: 600; }
.badge-open { background: #d4edda; color: #155724; }
.badge-closed { background: #e2e3e5; color: #495057; }
.badge-next { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.year-card-meta { margin: 0 0 0.45rem; font-size: 0.94rem; color: #4b5563; line-height: 1.35; }
.year-card-stats { font-size: 0.9rem; color: #4b5563; margin-bottom: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.45rem 0.7rem; align-items: center; }
.year-card-pay-info { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.year-pay-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.13rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.year-pay-chip-paid {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.year-pay-chip-unpaid {
  background: #fff1f2;
  color: #be123c;
  border-color: #fda4af;
}
.year-card-actions {
  display: grid;
  gap: 0.45rem;
}
.year-card-primary .btn {
  min-width: 0;
}
.dashboard-links { margin-top: 1rem; }
.years-toolbar { margin-bottom: 1rem; }
.years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.9rem;
}
.year-admin-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.05rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.year-admin-card.is-next-upcoming-year {
  background: #f7fff9;
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.16), 0 6px 16px rgba(34, 197, 94, 0.14);
}
.year-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.year-admin-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #1f2937;
}
.year-admin-meta {
  margin: 0 0 0.65rem;
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.35;
}
.year-admin-info {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.year-admin-info-row {
  margin: 0;
  display: grid;
  gap: 0.06rem;
}
.year-admin-meta-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.year-admin-meta-value {
  color: #1f2937;
  font-weight: 700;
}
.year-admin-meta-link {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.year-admin-primary { margin-bottom: 0.65rem; }
.year-admin-actions {
  display: grid;
  gap: 0.55rem;
}
.year-admin-action-group {
  border-top: 1px dashed #e5e7eb;
  padding-top: 0.45rem;
}
.year-admin-group-label {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.year-admin-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.year-admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
}
.year-admin-action-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  text-decoration: none;
}
.year-admin-share .link-external::after { content: " ↗"; font-size: 0.82em; opacity: 0.8; margin-left: 0.15rem; }
.year-list { list-style: none; padding: 0; margin: 0; }
.year-list li { padding: 0.4rem 0; border-bottom: 1px solid #eee; }
.year-list li:last-child { border-bottom: none; }
.year-list a { margin-right: 0.5rem; }
.dashboard-changes { margin-top: 1.5rem; }
.dashboard-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.dashboard-info-grid .dashboard-changes { margin-top: 0; }
.dashboard-info-grid .card { margin-bottom: 0; }
@media (min-width: 980px) {
  .dashboard-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.changes-list { list-style: none; padding: 0; margin: 0.25rem 0 0; }
.changes-list li { padding: 0.4rem 0; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.changes-list li:last-child { border-bottom: none; }
.change-main { margin-bottom: 0.15rem; }
.registration-days-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-left: 0.45rem;
  vertical-align: middle;
}
.registration-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
}
.registration-day-chip.is-on {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.registration-day-chip.is-off {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.change-meta { font-size: 0.8rem; color: #6c757d; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.price-table { width: 100%; max-width: 560px; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.price-table th, .price-table td { padding: 0.5rem 0.75rem; border: 1px solid #eee; }
.price-table th { background: #34495e; color: #fff; }
.price-table input { width: 100%; padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; }
.copy-prices { margin-top: 1rem; padding: 0.75rem; background: #f8f9fa; border-radius: 4px; }
.copy-prices select { margin: 0 0.5rem; padding: 0.35rem; }
.copy-prices button { padding: 0.35rem 0.75rem; background: #95a5a6; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.data-table .link-delete { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: inherit; padding: 0; margin-left: 0.25rem; }
.data-table .link-delete:hover { text-decoration: underline; }
.year-delete { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #dee2e6; max-width: 480px; }
.year-delete h2 { font-size: 1.1rem; margin-top: 0; color: #721c24; }
.year-delete p { margin: 0.5rem 0; font-size: 0.95rem; }
.year-delete .btn-delete { padding: 0.5rem 1rem; background: #e74c3c; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.95rem; }
.year-delete .btn-delete:hover { background: #c0392b; }
.relation-fieldset .searchable-select-wrap { margin-top: 0.25rem; }
.searchable-select-wrap .searchable-select-input { display: block; width: 100%; margin-bottom: 0.35rem; padding: 0.45rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; }
.searchable-select-wrap .searchable-select-input:focus { outline: none; border-color: #3498db; }
.searchable-select-wrap .searchable-select { width: 100%; }

/* Familierelaties: overzichtelijke lijsten (Ouders + Partner) */
.relation-fieldset { margin-top: 1rem; }
.relation-fieldset .rel-block { margin-bottom: 1.5rem; }
.relation-fieldset .rel-block:last-child { margin-bottom: 0; }
.relation-fieldset .rel-label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.relation-fieldset .rel-hint { margin: 0 0 0.5rem; font-size: 0.9rem; color: #6c757d; }
.relation-fieldset .rel-search {
  display: block; width: 100%; margin-bottom: 0.5rem; padding: 0.6rem 0.75rem;
  border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
  -webkit-appearance: none; appearance: none;
}
.relation-fieldset .rel-search:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); }
.relation-fieldset .rel-selected {
  margin-bottom: 0.5rem; padding: 0.5rem 0.75rem; background: #e8f5e9; border-radius: 6px; font-size: 0.9rem;
  display: none;
}
.relation-fieldset .rel-list {
  max-height: 220px; overflow-y: auto; border: 1px solid #dee2e6; border-radius: 6px; background: #fff;
  padding: 0.25rem 0;
}
.relation-fieldset .rel-list-partner { max-height: 200px; }
.relation-fieldset .rel-tak { padding: 0 0.5rem 0.25rem; }
.relation-fieldset .rel-tak-title {
  position: sticky; top: 0; z-index: 1; background: #f1f3f5; padding: 0.4rem 0.5rem;
  font-size: 0.8rem; font-weight: 600; color: #495057; border-radius: 4px; margin-bottom: 0.25rem;
}
.relation-fieldset .rel-option {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.55rem 0.6rem; margin: 0; border: none; border-radius: 6px;
  background: none; cursor: pointer; font-size: 0.95rem; text-align: left;
  min-height: 44px;
  transition: background 0.15s;
}
.relation-fieldset .rel-option:hover { background: #f0f4f8; }
.relation-fieldset .rel-option input[type="checkbox"] {
  flex-shrink: 0; width: 1.2rem; height: 1.2rem; margin: 0; cursor: pointer;
}
.relation-fieldset .rel-option-text { flex: 1; }
.relation-fieldset .rel-option-partner {
  display: block; width: 100%; padding: 0.55rem 0.6rem; margin: 0 0 0.15rem;
  border: 1px solid #dee2e6; border-radius: 6px; background: #fff;
  cursor: pointer; font-size: 0.95rem; text-align: left; min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}
.relation-fieldset .rel-option-partner:hover { background: #f0f4f8; border-color: #adb5bd; }
.relation-fieldset .rel-option-partner.is-selected {
  background: #e3f2fd; border-color: #3498db; font-weight: 500;
}
.relation-fieldset .rel-partner-current {
  margin-bottom: 0.5rem; padding: 0.6rem 0.75rem; background: #f8f9fa; border-radius: 6px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; min-height: 44px;
}
.relation-fieldset .rel-partner-none { color: #6c757d; font-style: italic; }
.relation-fieldset .rel-partner-clear {
  padding: 0.35rem 0.6rem; font-size: 0.85rem; background: #6c757d; color: #fff;
  border: none; border-radius: 4px; cursor: pointer; margin-left: auto;
}
.relation-fieldset .rel-partner-clear:hover { background: #5a6268; }
.relation-fieldset .rel-option-none { font-style: italic; color: #6c757d; }
@media (max-width: 480px) {
  .relation-fieldset .rel-list { max-height: 180px; }
  .relation-fieldset .rel-option,
  .relation-fieldset .rel-option-partner { padding: 0.65rem 0.75rem; min-height: 48px; }
}

/* Aanmeldingen pagina */
.flash.flash-error { background: #f8d7da; color: #721c24; margin-bottom: 0.75rem; }
.flash.flash-success { margin-bottom: 0.75rem; }
.page-toast-stack {
  position: fixed;
  top: 4.6rem;
  right: 1rem;
  z-index: 1200;
  display: grid;
  gap: 0.45rem;
  width: min(92vw, 420px);
}
.page-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  transition: opacity 0.2s ease;
}
.page-toast.is-success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.page-toast.is-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.page-toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
}
.page-toast-close:hover {
  opacity: 1;
}
.personen-actions { margin: 0.1rem 0 0.8rem; }
.aanm-links { margin: 0 0 0.75rem; }
.aanm-card { padding: 1rem; }
.aanm-card h2 { margin: 0 0 0.45rem; font-size: 1.05rem; color: #2c3e50; }
.aanm-stats-line { margin: 0; color: #334155; }
.aanm-stats-details > summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c3e50;
  user-select: none;
}
.aanm-stats-details[open] > summary {
  margin-bottom: 0.55rem;
}
.aanm-stats-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.aanm-stat-tile {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.48rem 0.6rem;
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.aanm-stat-tile.is-count { grid-column: span 2; }
.aanm-stat-tile.is-amount-total { grid-column: 1 / span 2; }
.aanm-stat-tile.is-amount-paid { grid-column: 3 / span 2; }
.aanm-stat-tile.is-amount-open { grid-column: 5 / span 2; }
.aanm-stat-tile.is-positive {
  background: #f0fdf4;
  border-color: #86efac;
}
.aanm-stat-tile.is-warning {
  background: #fff7ed;
  border-color: #fdba74;
}
.aanm-stat-label {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.aanm-stat-value {
  font-size: 1.03rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.aanm-day-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.aanm-day-stat {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.5rem 0.6rem;
}
.aanm-day-stat h3 {
  margin: 0 0 0.36rem;
  font-size: 0.88rem;
  color: #1e293b;
}
.aanm-day-stat p {
  margin: 0.15rem 0;
  color: #334155;
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.86rem;
}
.aanm-col-bedragen { width: 16%; min-width: 130px; }
.aanm-col-acties { width: 14%; min-width: 120px; }
.aanm-stats-line .stats-unpaid { color: #b91c1c; }
.aanm-day-stat .stats-paid { color: #15803d; }
.aanm-day-stat .stats-unpaid { color: #b91c1c; }
.submission-meta-row td {
  border-bottom: none;
  padding-bottom: 0.25rem;
  vertical-align: middle;
}
.data-table-tree tbody tr.submission-meta-row td {
  border-top: 2px solid #dbe3ef;
  padding-top: 0.6rem;
}
.data-table-tree tbody tr.submission-meta-row:first-child td {
  border-top: none;
  padding-top: 0.42rem;
}
.data-table-tree tbody tr[data-group-row="1"] td {
  border-bottom: 1px solid #dbe3ef;
  padding-bottom: 0.62rem;
}
.submission-meta-byline {
  color: #334155;
  font-size: 0.92rem;
}
.submission-meta-status {
  width: 16%;
  min-width: 130px;
  text-align: left;
}
.submission-meta-status .status-badge { margin-left: 0; }
.submission-meta-actions {
  width: 14%;
  min-width: 120px;
}
.submission-byline strong { color: #0f172a; }
.payment-qr { margin-top: 0.75rem; text-align: center; }
.payment-qr p { margin-bottom: 0.4rem; font-size: 0.92rem; color: #475569; }
.payment-qr-img { display: block; margin: 0 auto; border-radius: 8px; }
.submission-person-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}
.submission-person-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}
.submission-person-name {
  min-width: 0;
  font-weight: 500;
}
.submission-day-grid {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.25rem;
}
.submission-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid #cbd5e1;
}
.submission-day-pill.is-on {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.submission-day-pill.is-off {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.aanm-import-help { margin: 0 0 0.6rem; color: #475569; font-size: 0.92rem; }
.aanm-import-input {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  resize: vertical;
}
.aanm-import-actions { margin-top: 0.6rem; }
.tools-card {
  padding: 0.85rem 1rem;
}
.tools-details > summary {
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 700;
  color: #2c3e50;
  user-select: none;
  list-style: none;
}
.tools-details > summary::-webkit-details-marker {
  display: none;
}
.tools-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  color: #64748b;
  transform: translateY(-1px);
}
.tools-details[open] > summary::before {
  content: "▾";
}
.tools-details[open] > summary {
  margin-bottom: 0.65rem;
}
.aanm-export-details > summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c3e50;
  user-select: none;
}
.aanm-export-details[open] > summary { margin-bottom: 0.6rem; }
.aanm-export-form { margin-top: 0.5rem; }
.aanm-export-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.45rem 0.8rem;
}
.aanm-export-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: #334155;
}
.aanm-export-actions { margin-top: 0.75rem; }
.data-table .cell-day { width: 52px; text-align: center; }
.data-table .cell-amount { width: 120px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-name { font-weight: 500; }
.day-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; color: #94a3b8; font-weight: 700; }
.day-mark.is-on { color: #16a34a; }
.cell-actions {
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
.data-table .cell-actions a {
  margin-right: 0;
}
.compact-actions { min-width: 120px; gap: 0.28rem; }
.actions-divider {
  width: 1px;
  height: 1.1rem;
  background: #d1d5db;
  display: inline-block;
  margin: 0 0.1rem;
}
.registration-unpaid { background: #fff7f7; }
.registration-unpaid:hover { background: #ffecec !important; }
.registration-paid { background: #f5fff7; }
.registration-paid:hover { background: #eaffef !important; }
.registration-partial { background: #fffaf0; }
.registration-partial:hover { background: #fff2d9 !important; }
.status-badge {
  display: inline-flex;
  margin-left: 0.5rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}
.status-unpaid { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.status-paid { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-partial { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.note-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  cursor: help;
  vertical-align: middle;
}
.paid-form { margin: 0; display: inline-flex; }
.delete-form { margin: 0; display: inline-flex; }
.icon-form { display: inline-flex; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.42rem 0.72rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.1;
  min-width: 9rem;
}
.data-table .btn { background: #e2e8f0; color: #1f2937; border-color: #cbd5e1; }
.data-table .btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-primary { background: #2563eb !important; color: #fff !important; border-color: #1d4ed8 !important; }
.btn-primary:hover { background: #1d4ed8 !important; }
.btn-secondary { background: #334155; color: #fff; border-color: #1e293b; }
.btn-secondary:hover { background: #1e293b; }
.btn-success { background: #16a34a !important; color: #fff !important; border-color: #15803d !important; }
.btn-success:hover { background: #15803d !important; }
.btn-warning { background: #f59e0b !important; color: #111827 !important; border-color: #d97706 !important; }
.btn-warning:hover { background: #d97706 !important; color: #fff !important; }
.btn-danger { background: #dc2626 !important; color: #fff !important; border-color: #b91c1c !important; }
.btn-danger:hover { background: #b91c1c !important; }
.dashboard-tools-btn { min-width: 0; }
.paid-form .btn { min-height: 32px; padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.paid-form .btn,
.delete-form .btn,
.year-admin-primary .btn { min-width: 0; }

.data-table .btn-delete-icon {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #ef4444;
  border-radius: 999px;
  background: #fff5f5;
  color: #dc2626;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.data-table .btn-delete-icon:hover { background: #fee2e2; color: #b91c1c; text-decoration: none; }

.data-table .btn-edit-icon,
.data-table .btn-status-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.data-table .btn-edit-icon {
  border: 1px solid #60a5fa;
  background: #eff6ff;
  color: #1d4ed8;
}
.data-table .btn-edit-icon:hover { background: #dbeafe; color: #1e40af; text-decoration: none; }

.data-table .btn-status-icon {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  padding: 0;
}
.data-table .btn-status-icon.is-paid {
  border-color: #4ade80;
  background: #dcfce7;
  color: #166534;
}
.data-table .btn-status-icon.is-unpaid {
  border-color: #fda4af;
  background: #fff1f2;
  color: #be123c;
}
.data-table .btn-status-icon:hover { filter: brightness(0.97); text-decoration: none; }

.data-table .btn-reminder-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border: 1px solid #cbd5e1;
}
.data-table .btn-reminder-email {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
  padding: 0;
}
.data-table .btn-reminder-email:hover { background: #ffedd5; color: #9a3412; text-decoration: none; }
.data-table .btn-reminder-whatsapp {
  background: #ecfdf5;
  color: #15803d;
  border-color: #86efac;
}
.data-table .btn-reminder-whatsapp:hover { background: #dcfce7; color: #166534; text-decoration: none; }

@media (max-width: 900px) {
  .cell-actions { min-width: 130px; }
}
@media (max-width: 700px) {
  body.admin-page.env-development,
  body.admin-page.env-production {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  body.env-development::before,
  body.env-production::before,
  body.env-development::after,
  body.env-production::after {
    height: 20px;
    line-height: 20px;
    font-size: 0.72rem;
  }
  .page-toast-stack {
    left: 0.6rem;
    right: 0.6rem;
    top: 4.2rem;
    width: auto;
  }
  .admin-header {
    padding: 0.6rem 0.75rem;
    gap: 0.35rem;
  }
  .admin-header > a {
    font-size: 0.98rem;
    font-weight: 700;
  }
  .admin-header nav {
    width: 100%;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: stretch;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .admin-header nav a,
  .admin-header nav span,
  .admin-header nav form {
    white-space: nowrap;
    min-height: 2rem;
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
  }
  .admin-header nav::before {
    content: "";
    order: 85;
    flex: 0 0 100%;
  }
  .admin-header nav a {
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: #34495e;
    text-decoration: none;
    text-align: center;
  }
  .admin-header nav a:hover {
    text-decoration: none;
    background: #415b76;
  }
  .admin-header nav span {
    order: 90;
    flex: 0 0 calc(50% - 0.2rem);
    align-items: center;
    justify-content: center;
    padding: 0 0.55rem;
    line-height: 1;
    font-size: 0.82rem;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-header nav span::before {
    content: "👤";
    font-size: 0.78rem;
    line-height: 1;
    display: inline-block;
  }
  .admin-header nav span::after {
    font-size: 0.78rem;
  }
  .admin-header nav form {
    order: 99;
    display: flex;
    flex: 0 0 calc(50% - 0.2rem);
    margin-left: 0;
  }
  .admin-header button {
    width: 100%;
    min-height: 2rem;
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    font-size: 0.82rem;
  }
  .personen-filter-form .filter-row {
    align-items: stretch;
  }
  .personen-filter-form .filter-field,
  .personen-filter-form .filter-field.filter-field-autocomplete {
    min-width: 0;
    flex: 1 1 100%;
  }
  .personen-filter-form .filter-field-label {
    font-size: 0.7rem;
  }
  .personen-filter-form .date-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .aanm-stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .aanm-stat-tile {
    grid-column: auto !important;
    padding: 0.42rem 0.5rem;
  }
  .aanm-stat-label {
    font-size: 0.72rem;
  }
  .aanm-stat-value {
    font-size: 0.96rem;
  }
  .aanm-day-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .aanm-day-stat p {
    font-size: 0.84rem;
  }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .dashboard-head .dashboard-tools-btn {
    width: 100%;
    margin-top: 0.1rem;
  }
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }
  .stat-card {
    padding: 1rem 1.1rem;
    border-radius: 10px;
  }
  .stat-card .stat-number {
    font-size: 1.95rem;
  }
  .stat-card .stat-label {
    font-size: 0.94rem;
  }
  .persons-table-scroll .data-table {
    width: max-content;
    min-width: 100%;
  }
  .persons-table-scroll .data-table th,
  .persons-table-scroll .data-table td { white-space: nowrap; }
  .aanmeldingen-table-scroll .data-table {
    width: max-content;
    min-width: 100%;
  }
  .data-table th, .data-table td { padding: 0.42rem 0.36rem; }
  .aanmeldingen-table-scroll .data-table th,
  .aanmeldingen-table-scroll .data-table td { white-space: nowrap; }
  .aanmeldingen-table-scroll .data-table .cell-day { width: 34px; }
  .aanmeldingen-table-scroll .data-table .cell-amount { width: 84px; }
  .cell-actions {
    min-width: 88px;
    gap: 0.25rem;
    justify-content: flex-start;
  }
  .compact-actions { min-width: 0; }
  .aanm-col-bedragen,
  .aanm-col-acties {
    width: auto;
    min-width: 0;
  }
  .submission-meta-status,
  .submission-meta-actions {
    width: auto;
    min-width: 0;
  }
  .submission-person-row {
    grid-template-columns: 1fr auto;
    gap: 0.28rem 0.4rem;
    align-items: center;
  }
  .submission-day-grid {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }
  .submission-person-name {
    grid-column: 1;
    grid-row: 1;
  }
  .submission-person-row .btn-edit-icon {
    grid-column: 2;
    grid-row: 2;
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.82rem;
    align-self: center;
    margin-top: 0;
  }
  .aanmeldingen-filter-form { padding: 0.75rem; }
  .aanmeldingen-filter-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: stretch;
  }
  .aanmeldingen-filter-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .aanmeldingen-day-field {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .aanmeldingen-filter-actions .filter-reset-btn {
    width: 100%;
    justify-content: center;
  }
  .aanmeldingen-day-pills {
    gap: 0.3rem;
  }
  .day-filter-pill {
    flex: 1 1 calc(33.333% - 0.2rem);
    min-width: 92px;
  }
  .day-filter-pill span {
    width: 100%;
    font-size: 0.86rem;
    padding: 0.26rem 0.5rem;
  }
  .aanmeldingen-filter-form .filter-live-stats {
    margin-top: 0.45rem;
    font-size: 0.9rem;
  }
}

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); }
.login-box { background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 100%; max-width: 360px; }
.login-box h1 { margin-top: 0; font-size: 1.5rem; }
.login-sub { color: #7f8c8d; margin-bottom: 1.5rem; }
.login-form label { display: block; margin-bottom: 1rem; }
.login-form input { width: 100%; padding: 0.6rem; border: 1px solid #ddd; border-radius: 4px; margin-top: 0.25rem; }
.login-form button { width: 100%; padding: 0.75rem; background: #27ae60; color: #fff; border: none; border-radius: 4px; font-size: 1rem; cursor: pointer; margin-top: 0.5rem; }
.login-form button:hover { background: #219a52; }

.sw-tooltip-bubble {
  position: absolute;
  z-index: 4000;
  max-width: min(320px, calc(100vw - 12px));
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.sw-tooltip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.share-email-textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 0.7rem;
  resize: vertical;
}

.share-email-preview-wrap {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.share-email-preview-wrap > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
}

.share-email-preview {
  padding: 0.4rem 0.7rem 0.8rem;
}

.share-email-preview p {
  margin: 0.18rem 0;
  color: #1f2937;
}

.share-preview-spacer { height: 0.45rem; }

.share-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.35rem 0 0.6rem;
  background: #fff;
  border: 1px solid #dbe3ef;
}

.share-preview-table th,
.share-preview-table td {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.88rem;
}

.share-preview-table th {
  background: #eef2f7;
  color: #334155;
}
