@import url("https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap");

.me-shell {
  background:
    radial-gradient(circle at top right, rgba(2, 130, 171, 0.1), transparent 34rem),
    #f3f7f8;
  box-sizing: border-box;
  font-size: 1rem;
  min-height: 100vh;
  padding: 92px clamp(16px, 3vw, 48px) 52px;
}

.me-page-header,
.me-stats,
.me-view-tabs,
.me-panel,
.me-booking-summary,
.me-form-layout,
.me-flash {
  margin-left: auto;
  margin-right: auto;
  max-width: 1500px;
}

.me-page-header {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.me-page-header h1 {
  color: #123f49;
  font-family: "Alfa Slab One", Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  margin: 7px 0 10px;
}

.me-page-header p {
  color: #5b7078;
  font-size: 1.04rem;
  line-height: 1.45;
  margin: 0;
}

.me-eyebrow {
  color: #557078;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.me-header-actions,
.me-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.me-button,
.me-filter-actions button {
  align-items: center;
  background: #027ea6;
  border: 1px solid #027ea6;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  text-decoration: none;
}

.me-button:hover,
.me-button:focus,
.me-filter-actions button:hover,
.me-filter-actions button:focus {
  background: #015d7b;
  border-color: #015d7b;
  color: #fff;
  text-decoration: none;
}

.me-button-secondary {
  background: #fff;
  border-color: #cbdde3;
  color: #026f92;
}

.me-button-secondary:hover,
.me-button-secondary:focus {
  background: #eef7fa;
  border-color: #8fb9c7;
  color: #015d7b;
}

.me-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.me-stats article,
.me-booking-summary > div {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(18, 63, 73, 0.05);
  padding: 17px;
}

.me-stats span,
.me-booking-summary span {
  color: #697d84;
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.3;
  text-transform: uppercase;
}

.me-stats strong {
  color: #163d48;
  display: block;
  font-size: 2rem;
  letter-spacing: -0.035em;
  margin-top: 5px;
}

.me-view-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.me-view-tabs a {
  border-radius: 8px;
  color: #526b73;
  flex: 0 0 auto;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
}

.me-view-tabs a:hover,
.me-view-tabs a:focus {
  background: #e4f1f5;
  color: #026f92;
}

.me-view-tabs a.is-active {
  background: #123f49;
  color: #fff;
}

.me-panel {
  background: #fff;
  border: 1px solid #dce7ea;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(18, 63, 73, 0.06);
  box-sizing: border-box;
  margin-bottom: 20px;
  overflow: hidden;
}

.me-panel-heading {
  align-items: flex-start;
  border-bottom: 1px solid #e4edef;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 19px 21px 16px;
}

.me-panel-heading h2 {
  color: #173d48;
  font-family: "Alfa Slab One", Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
  margin: 3px 0 0;
}

.me-result-count {
  color: #647980;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
  padding-top: 7px;
}

.me-filter-grid {
  align-items: end;
  display: grid;
  gap: 13px;
  grid-template-columns: minmax(220px, 1.7fr) minmax(155px, 1fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) minmax(155px, 1fr) auto;
  padding: 18px 21px 21px;
}

.me-filter-grid label,
.me-field,
.me-activity-search {
  display: block;
  min-width: 0;
}

.me-filter-grid label > span,
.me-field > span,
.me-activity-search > span {
  color: #526971;
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.me-shell .me-filter-grid input,
.me-shell .me-filter-grid select,
.me-shell .me-field input,
.me-shell .me-field select,
.me-shell .me-field textarea,
.me-shell .me-activity-search input,
.me-shell .me-activity-number input {
  background: #fff;
  border: 1px solid #cbdadf;
  border-radius: 7px;
  box-sizing: border-box;
  color: #243f48;
  font: inherit;
  margin: 0;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.me-shell .me-filter-grid input:focus,
.me-shell .me-filter-grid select:focus,
.me-shell .me-field input:focus,
.me-shell .me-field select:focus,
.me-shell .me-field textarea:focus,
.me-shell .me-activity-search input:focus,
.me-shell .me-activity-number input:focus {
  border-color: #0282ab;
  box-shadow: 0 0 0 3px rgba(2, 130, 171, 0.12);
  outline: 0;
}

.me-shell [data-lockable-area] input:disabled,
.me-shell [data-lockable-area] select:disabled,
.me-shell [data-lockable-area] textarea:disabled,
.me-shell [data-lockable-area] button:disabled {
  background: #eef4f6;
  color: #71838a;
  cursor: not-allowed;
  opacity: 1;
}

.me-filter-actions a {
  color: #526971;
  font-size: 0.9rem;
  font-weight: 700;
}

.me-table-scroll {
  overflow-x: auto;
}

.me-bookings-table {
  border-collapse: collapse;
  min-width: 1180px;
  width: 100%;
}

.me-bookings-table th,
.me-bookings-table td {
  border-bottom: 1px solid #e5edef;
  padding: 16px 18px;
  text-align: left;
  vertical-align: middle;
}

.me-bookings-table thead th {
  background: #f7fafb;
  color: #61767d;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.me-sort-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 5px;
  text-decoration: none;
}

.me-sort-link span {
  color: #8aa0a8;
  font-size: 0.9rem;
}

.me-sort-link:hover,
.me-sort-link:focus,
.me-sort-link.is-active {
  color: #027ea6;
}

.me-sort-link.is-active span {
  color: #027ea6;
}

.me-clickable-row {
  cursor: pointer;
  outline: 0;
}

.me-bookings-table tbody tr:hover,
.me-clickable-row:focus {
  background: #f8fbfc;
}

.me-clickable-row:focus {
  box-shadow: inset 4px 0 #0282ab;
}

.me-bookings-table td {
  color: #29464f;
  font-size: 1rem;
}

.me-booking-link,
.me-bookings-table td > strong {
  color: #173d48;
  display: block;
  text-decoration: none;
}

.me-booking-link:hover strong,
.me-booking-link:focus strong {
  color: #027ea6;
}

.me-booking-link span,
.me-table-subline {
  color: #72858b;
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
  margin-top: 3px;
}

a.me-table-subline:hover,
a.me-table-subline:focus {
  color: #027ea6;
}

.me-activities-summary {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-status {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex !important;
  font-size: 0.82rem !important;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 9px;
  white-space: nowrap;
}

.me-status-recebida {
  background: #fff5d8;
  border-color: #ecd48b;
  color: #765600;
}

.me-status-contacto {
  background: #e8f3ff;
  border-color: #b6d4f2;
  color: #215b8f;
}

.me-status-confirmada {
  background: #e6f7ef;
  border-color: #acd9c3;
  color: #17663f;
}

.me-status-concluida {
  background: #edf0f1;
  border-color: #ccd5d8;
  color: #4c6067;
}

.me-status-cancelada {
  background: #fbe9e9;
  border-color: #e5b8b8;
  color: #963b3b;
}

.me-visit-type {
  background: #eef5f7;
  border: 1px solid #cfdee3;
  border-radius: 999px;
  color: #3d5963;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 9px;
  white-space: nowrap;
}

.me-visit-type-presencial {
  background: #e8f3ff;
  border-color: #bad6ed;
  color: #215b8f;
}

.me-visit-type-itinerante {
  background: #f2ebfb;
  border-color: #d3c0e8;
  color: #68458a;
}

.me-visit-type-online {
  background: #e6f7ef;
  border-color: #acd9c3;
  color: #17663f;
}

.me-empty {
  color: #6c7f85;
  margin: 0;
  padding: 42px 22px;
  text-align: center;
}

.me-empty-compact {
  padding: 18px 4px 4px;
}

.me-pagination {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 18px;
}

.me-pagination a {
  font-weight: 700;
}

.me-flash {
  border: 1px solid #b9d7c8;
  border-radius: 10px;
  box-sizing: border-box;
  color: #185b3c;
  margin-bottom: 18px;
  padding: 13px 16px;
}

.me-flash-success {
  background: #e8f7ef;
}

.me-flash-error {
  background: #fff0f0;
  border-color: #e4b9b9;
  color: #8b3030;
}

.me-flash-warning {
  background: #fff7df;
  border-color: #e7cf89;
  color: #765600;
}

.me-flash ul {
  margin-bottom: 0;
}

.me-booking-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.me-booking-summary strong {
  color: #173d48;
  display: block;
  font-size: 1.05rem;
  margin-top: 7px;
}

.me-form-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 0.85fr);
}

.me-form-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.me-form-main,
.me-form-sidebar {
  min-width: 0;
}

.me-form-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.me-form-sidebar > .me-panel {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  width: 100%;
}

.me-form-section {
  overflow: visible;
}

.me-fields {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px 21px 23px;
}

.me-fields-single {
  grid-template-columns: 1fr;
}

.me-management-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.me-management-notes {
  grid-column: 1 / -1;
}

.me-field-wide {
  grid-column: 1 / -1;
}

.me-field textarea {
  min-height: 110px;
  resize: vertical;
}

.me-field-help {
  color: #71838a;
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 6px;
}

.me-school-years {
  border: 1px solid #dce7ea;
  border-radius: 9px;
  margin: 0;
  padding: 16px;
}

.me-school-years legend {
  color: #526971;
  float: none;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  padding: 0 5px;
  width: auto;
}

.me-school-year-groups {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.me-school-year-group {
  --level-color: #0282ab;
  --level-soft: #e8f6fa;
  --level-text: #015d7b;
  background: #f8fbfc;
  border: 1px solid #dfeaec;
  border-top: 4px solid var(--level-color);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 11px 12px 12px;
}

.me-school-year-group-pre {
  --level-color: #eb0d00;
  --level-soft: #fff0ef;
  --level-text: #a20a00;
}

.me-school-year-group-cycle-1 {
  --level-color: #79ba1a;
  --level-soft: #f1f8e8;
  --level-text: #4e7c0e;
}

.me-school-year-group-cycle-2 {
  --level-color: #fea616;
  --level-soft: #fff6e5;
  --level-text: #985d00;
}

.me-school-year-group-cycle-3 {
  --level-color: #0282ab;
  --level-soft: #e8f6fa;
  --level-text: #015d7b;
}

.me-school-year-group-secondary {
  --level-color: #6550a3;
  --level-soft: #f1eef9;
  --level-text: #49377e;
}

.me-school-year-group h3 {
  color: var(--level-text);
  font-family: "Alfa Slab One", Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 10px;
  min-height: 2.05em;
  text-transform: uppercase;
}

.me-school-year-options {
  display: grid;
  gap: 8px;
  grid-auto-rows: minmax(40px, auto);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
}

.me-school-year-group:first-child .me-school-year-options {
  grid-template-columns: 1fr;
}

.me-school-year-options label {
  align-items: center;
  background: #fff;
  border: 1px solid #d5e2e6;
  border-radius: 7px;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 6px 8px;
  position: relative;
  text-align: center;
  width: 100%;
}

.me-school-year-options label:hover {
  border-color: var(--level-color);
}

.me-school-year-options label:focus-within {
  border-color: var(--level-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--level-color) 15%, transparent);
}

.me-school-year-options label:has(input:checked) {
  background: var(--level-soft);
  border-color: var(--level-color);
  color: var(--level-text);
}

.me-school-year-options span {
  align-items: center;
  display: inline-flex;
  font-size: 0.87rem;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  line-height: 1.15;
}

.me-school-year-options span::before {
  align-items: center;
  background: #fff;
  border: 1px solid #9fb5bd;
  border-radius: 4px;
  color: #fff;
  content: "";
  display: inline-flex;
  flex: 0 0 16px;
  font-size: 11px;
  height: 16px;
  justify-content: center;
  line-height: 1;
  width: 16px;
}

.me-school-year-options input:checked + span::before {
  background: var(--level-color);
  border-color: var(--level-color);
  content: "\2713";
}

.me-check-field {
  align-items: center;
  display: flex;
  gap: 7px;
}

.me-check-field small {
  color: #72858b;
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 2px;
}

.me-check-field.is-not-applicable {
  background: #f1f6f8;
  border-color: #d5e4e8;
  color: #6b7f86;
}

.me-check-field input,
.me-activity-item input[type="checkbox"] {
  flex: 0 0 auto;
  height: 17px;
  margin: 0;
  width: 17px;
}

.me-school-year-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.me-activity-search {
  padding: 18px 21px 8px;
}

.me-activity-list {
  display: grid;
  gap: 9px;
  padding: 8px 21px 22px;
}

.me-activity-group {
  background: #fff;
  border: 1px solid #dfeaec;
  border-radius: 10px;
  overflow: hidden;
}

.me-activity-group[hidden] {
  display: none;
}

.me-activity-group h3 {
  background: #fff7df;
  border-bottom: 1px solid #eadcae;
  color: #765600;
  font-family: "Alfa Slab One", Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
  padding: 11px 13px;
  text-transform: uppercase;
}

.me-activity-group-items {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.me-activity-group .me-activity-item {
  background: #fff;
}

.me-activity-item {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #dfeaec;
  border-radius: 9px;
  display: grid;
  gap: 15px;
  grid-template-columns: minmax(0, 1fr) 130px;
  padding: 11px 13px;
}

.me-activity-item[hidden] {
  display: none;
}

.me-activity-item.is-incompatible {
  background: #fff8ea;
  border-color: #efc76e;
}

.me-activity-item > label:first-child {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.me-activity-item strong,
.me-activity-item small {
  display: block;
}

.me-activity-item strong {
  color: #29464f;
}

.me-activity-item small {
  color: #72858b;
  margin-top: 2px;
}

.me-activity-main {
  min-width: 0;
}

.me-activity-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.me-activity-meta span {
  background: #eef5f7;
  border: 1px solid #d5e4e8;
  border-radius: 999px;
  color: #3d5861;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
}

.me-education-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.me-education-level {
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 7px;
}

.me-education-level-pre {
  background: #eb0d00;
}

.me-education-level-cycle-1 {
  background: #79ba1a;
}

.me-education-level-cycle-2 {
  background: #fea616;
}

.me-education-level-cycle-3 {
  background: #0282ab;
}

.me-education-level-secondary {
  background: #6550a3;
}

.me-education-levels-compact {
  gap: 3px;
  margin-top: 7px;
  max-width: 190px;
}

.me-education-levels-compact .me-education-level {
  font-size: 0.68rem;
  padding: 2px 5px;
}

.me-activity-item .me-activity-warning {
  color: #9a5c00;
  font-weight: 700;
  margin-top: 5px;
}

.me-activity-empty {
  color: #647980;
  margin: 0;
  padding: 4px 21px 22px;
}

.me-activity-empty[hidden],
.me-activity-warning[hidden] {
  display: none;
}

.me-program-summary {
  background: #fff;
  border-top: 1px solid #dfeaec;
  margin: 0 21px 22px;
  padding-top: 17px;
}

.me-program-summary h3 {
  color: #29464f;
  font-family: "Alfa Slab One", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 11px;
}

.me-program-summary-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.me-program-summary-grid div {
  background: #f8fbfc;
  border: 1px solid #dce7ea;
  border-radius: 8px;
  min-width: 0;
  padding: 10px 11px;
}

.me-program-summary-grid span,
.me-program-summary-grid small {
  color: #647980;
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
}

.me-program-summary-grid strong {
  color: #29464f;
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-top: 3px;
}

.me-program-summary-total {
  background: #fff7df !important;
  border-color: #e7cf89 !important;
}

.me-program-summary-total strong {
  color: #765600;
  font-size: 1.08rem;
}

.me-program-summary-note {
  color: #647980;
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 9px 0 0;
}

.me-activity-number span {
  color: #647980;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.me-activity-number em {
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 400;
  margin-top: 1px;
}

.me-sticky-panel {
  position: static;
}

.me-save-button {
  margin: 0 21px 18px;
  width: calc(100% - 42px);
}

.me-audit-note {
  color: #71838a;
  font-size: 0.84rem;
  margin: 0;
  padding: 0 21px 20px;
}

.me-email-recipient {
  border-bottom: 1px solid #e4edef;
  padding: 16px 21px;
}

.me-email-recipient span,
.me-email-recipient small {
  color: #71838a;
  display: block;
  font-size: 0.8rem;
}

.me-email-recipient strong {
  color: #29464f;
  display: block;
  font-size: 1rem;
  margin: 3px 0;
  overflow-wrap: anywhere;
}

.me-email-fields {
  padding-bottom: 15px;
}

.me-email-address-field {
  --email-address-accent: #027ea6;
  background: #f3f9fb;
  border: 1px solid #c7dfe7;
  border-left: 5px solid var(--email-address-accent);
  border-radius: 9px;
  padding: 11px 12px 12px;
}

.me-email-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.me-email-extra-toggle {
  background: #fff;
  border: 1px solid #cbdde3;
  border-radius: 999px;
  color: #026f92;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 34px;
  padding: 6px 12px;
}

.me-email-extra-toggle:hover,
.me-email-extra-toggle:focus,
.me-email-extra-toggle.is-active {
  background: #e8f3f6;
  border-color: #8fb9c7;
  color: #015d7b;
}

.me-email-address-field.me-email-address-cc {
  --email-address-accent: #6574c4;
  background: #f6f6fc;
  border-color: #d6d9ee;
}

.me-email-address-field.me-email-address-bcc {
  --email-address-accent: #8a5c9e;
  background: #faf6fb;
  border-color: #e2d4e8;
}

.me-email-address-field > span {
  align-items: baseline;
  color: var(--email-address-accent);
  display: flex;
  font-size: 1rem;
  justify-content: space-between;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.me-email-address-field > span small {
  color: #71838a;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.me-shell .me-email-address-field textarea {
  border-color: color-mix(in srgb, var(--email-address-accent) 45%, #cbdadf);
  box-shadow: 0 2px 7px rgba(18, 63, 73, 0.04);
  min-height: 68px;
}

.me-shell .me-email-address-field textarea:focus {
  border-color: var(--email-address-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--email-address-accent) 17%, transparent);
}

.me-email-fields .note-editor {
  border-color: #cbdde3;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.me-email-fields .note-toolbar {
  background: #f7fafb;
  border-color: #dfeaec;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px;
}

.me-email-fields .note-btn-group {
  margin: 0 2px 0 0;
}

.me-email-fields .note-btn {
  padding: 4px 7px;
}

.me-email-fields .note-editable {
  background: #fff;
  color: #29464f;
  font-size: 1rem;
  line-height: 1.55;
  min-height: 240px;
  padding: 12px;
}

.me-email-copy {
  align-items: flex-start;
}

.me-email-attachments input[type="file"] {
  background: #f7fafb;
  cursor: pointer;
  font-size: 0.84rem;
  padding: 8px;
}

.me-email-attachments input[type="file"]::file-selector-button {
  background: #e8f3f6;
  border: 1px solid #bfd5dc;
  border-radius: 6px;
  color: #225766;
  cursor: pointer;
  font-weight: 700;
  margin-right: 8px;
  padding: 6px 9px;
}

.me-email-copy > span,
.me-email-copy small {
  display: block;
}

.me-email-copy small {
  color: #71838a;
  font-size: 0.78rem;
  font-weight: 400;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.me-email-reset {
  width: 100%;
}

.me-calendar-details {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 17px 21px 0;
}

.me-calendar-details > div {
  border-bottom: 1px solid #e4edef;
  display: grid;
  gap: 4px;
  padding-bottom: 9px;
}

.me-calendar-details > div:last-child {
  border-bottom: 0;
}

.me-calendar-details dt {
  color: #657980;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.me-calendar-details dd {
  color: #27444d;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.me-calendar-state {
  background: #edf0f1;
  border: 1px solid #ccd5d8;
  border-radius: 999px;
  color: #4c6067;
  display: inline-flex;
  font-size: 0.74rem;
  padding: 4px 8px;
}

.me-calendar-state-pendente {
  background: #fff5d8;
  border-color: #ecd48b;
  color: #765600;
}

.me-calendar-state-sincronizado {
  background: #e6f7ef;
  border-color: #acd9c3;
  color: #17663f;
}

.me-calendar-state-erro {
  background: #fbe9e9;
  border-color: #e5b8b8;
  color: #963b3b;
}

.me-calendar-error {
  background: #fff5d8;
  border: 1px solid #ecd48b;
  border-radius: 7px;
  color: #765600;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 13px 21px 0;
  overflow-wrap: anywhere;
  padding: 9px 10px;
}

.me-calendar-retry {
  margin: 17px 21px 21px;
  width: calc(100% - 42px);
}

.me-calendar-retry:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.me-email-history {
  list-style: none;
  margin: 0;
  padding: 12px 21px 21px;
}

.me-email-history li {
  border-bottom: 1px solid #e4edef;
  padding: 13px 0;
}

.me-email-history li:last-child {
  border-bottom: 0;
}

.me-email-history-heading {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.me-email-history strong {
  color: #29464f;
  font-size: 0.92rem;
}

.me-email-history > li > span,
.me-email-history > li > small {
  color: #71838a;
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.me-email-status {
  border: 1px solid #acd9c3;
  border-radius: 999px;
  color: #17663f;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  white-space: nowrap;
}

.me-email-status-pendente {
  background: #edf0f1;
  border-color: #ccd5d8;
  color: #4c6067;
}

.me-email-status-enfileirado {
  background: #e6f7ef;
}

.me-email-status-parcial {
  background: #fff5d8;
  border-color: #ecd48b;
  color: #765600;
}

.me-email-status-falhou {
  background: #fbe9e9;
  border-color: #e5b8b8;
  color: #963b3b;
}

.me-email-history details {
  margin-top: 8px;
}

.me-email-attachment-list {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.me-email-attachment-list a {
  align-items: center;
  background: #edf6f8;
  border: 1px solid #d3e4e9;
  border-radius: 6px;
  color: #027ea6;
  display: flex;
  font-size: 0.8rem;
  font-weight: 700;
  justify-content: space-between;
  padding: 7px 8px;
  text-decoration: none;
}

.me-email-attachment-list a:hover,
.me-email-attachment-list a:focus {
  border-color: #8db9c8;
}

.me-email-attachment-list small {
  color: #71838a;
  font-size: 0.72rem;
  font-weight: 400;
  margin-left: 8px;
}

.me-email-history summary {
  color: #027ea6;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.me-email-preview {
  background: #f7fafb;
  border: 1px solid #dfeaec;
  border-radius: 7px;
  color: #29464f;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 8px 0 0;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
}

.me-email-preview > :first-child {
  margin-top: 0;
}

.me-email-preview > :last-child {
  margin-bottom: 0;
}

.me-history {
  list-style: none;
  margin: 0;
  padding: 12px 21px 21px;
}

.me-history li {
  border-bottom: 1px solid #e4edef;
  padding: 11px 0;
  position: relative;
}

.me-history li:last-child {
  border-bottom: 0;
}

.me-history strong,
.me-history span,
.me-history small {
  display: block;
}

.me-history strong {
  color: #29464f;
  font-size: 1rem;
}

.me-history span,
.me-history small {
  color: #71838a;
  font-size: 0.84rem;
  margin-top: 2px;
}

.me-history em {
  color: #765600;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
}

html[data-ccvf-theme="dark"] .me-shell {
  background: #0c171e;
}

html[data-ccvf-theme="dark"] .me-page-header h1,
html[data-ccvf-theme="dark"] .me-panel-heading h2,
html[data-ccvf-theme="dark"] .me-stats strong,
html[data-ccvf-theme="dark"] .me-booking-summary strong,
html[data-ccvf-theme="dark"] .me-booking-link,
html[data-ccvf-theme="dark"] .me-bookings-table td > strong,
html[data-ccvf-theme="dark"] .me-activity-item strong,
html[data-ccvf-theme="dark"] .me-calendar-details dd,
html[data-ccvf-theme="dark"] .me-email-recipient strong,
html[data-ccvf-theme="dark"] .me-email-history strong,
html[data-ccvf-theme="dark"] .me-history strong {
  color: #edf7fa;
}

html[data-ccvf-theme="dark"] .me-page-header p,
html[data-ccvf-theme="dark"] .me-eyebrow,
html[data-ccvf-theme="dark"] .me-result-count,
html[data-ccvf-theme="dark"] .me-table-subline,
html[data-ccvf-theme="dark"] .me-booking-link span,
html[data-ccvf-theme="dark"] .me-stats span,
html[data-ccvf-theme="dark"] .me-booking-summary span,
html[data-ccvf-theme="dark"] .me-calendar-details dt {
  color: #9fb7c1;
}

html[data-ccvf-theme="dark"] .me-panel,
html[data-ccvf-theme="dark"] .me-stats article,
html[data-ccvf-theme="dark"] .me-booking-summary > div {
  background: #11232d;
  border-color: #294b5b;
  box-shadow: none;
}

html[data-ccvf-theme="dark"] .me-panel-heading,
html[data-ccvf-theme="dark"] .me-bookings-table th,
html[data-ccvf-theme="dark"] .me-bookings-table td,
html[data-ccvf-theme="dark"] .me-calendar-details > div,
html[data-ccvf-theme="dark"] .me-email-recipient,
html[data-ccvf-theme="dark"] .me-email-history li,
html[data-ccvf-theme="dark"] .me-history li {
  border-color: #294b5b;
}

html[data-ccvf-theme="dark"] .me-bookings-table thead th,
html[data-ccvf-theme="dark"] .me-activity-item,
html[data-ccvf-theme="dark"] .me-school-year-group {
  background: #162d38;
  color: #a9c0c8;
}

html[data-ccvf-theme="dark"] .me-school-years,
html[data-ccvf-theme="dark"] .me-school-year-group,
html[data-ccvf-theme="dark"] .me-school-year-options label {
  border-color: #345969;
}

html[data-ccvf-theme="dark"] .me-school-year-options label {
  background: #0d1d25;
  color: #dbe6ed;
}

html[data-ccvf-theme="dark"] .me-school-year-group-pre {
  --level-color: #ff6158;
}

html[data-ccvf-theme="dark"] .me-school-year-group-cycle-1 {
  --level-color: #9ed84b;
}

html[data-ccvf-theme="dark"] .me-school-year-group-cycle-2 {
  --level-color: #ffc15b;
}

html[data-ccvf-theme="dark"] .me-school-year-group-cycle-3 {
  --level-color: #59c3df;
}

html[data-ccvf-theme="dark"] .me-school-year-group-secondary {
  --level-color: #a995e3;
}

html[data-ccvf-theme="dark"] .me-school-year-group h3 {
  color: var(--level-color);
}

html[data-ccvf-theme="dark"] .me-school-year-options label:has(input:checked) {
  background: color-mix(in srgb, var(--level-color) 22%, #0d1d25);
  border-color: var(--level-color);
  color: #f5fbfd;
}

html[data-ccvf-theme="dark"] .me-school-year-options span::before {
  background: #0e1b24;
  border-color: #52717f;
}

html[data-ccvf-theme="dark"] .me-school-year-options input:checked + span::before {
  background: var(--level-color);
  border-color: var(--level-color);
  color: #fff;
}

html[data-ccvf-theme="dark"] .me-visit-type {
  background: #1a303b;
  border-color: #365565;
  color: #d7e7ed;
}

html[data-ccvf-theme="dark"] .me-bookings-table tbody tr:hover {
  background: #18313d;
}

html[data-ccvf-theme="dark"] .me-activity-item.is-incompatible {
  background: #392f18;
  border-color: #8f6f2b;
}

html[data-ccvf-theme="dark"] .me-activity-meta span,
html[data-ccvf-theme="dark"] .me-program-summary-grid div {
  background: #162d38;
  border-color: #345969;
  color: #dbe6ed;
}

html[data-ccvf-theme="dark"] .me-program-summary {
  background: #0d1d25;
  border-color: #345969;
}

html[data-ccvf-theme="dark"] .me-program-summary h3,
html[data-ccvf-theme="dark"] .me-program-summary-grid strong {
  color: #edf7fa;
}

html[data-ccvf-theme="dark"] .me-program-summary-total {
  background: #392f18 !important;
  border-color: #8f6f2b !important;
}

html[data-ccvf-theme="dark"] .me-program-summary-total strong {
  color: #ffd989;
}

html[data-ccvf-theme="dark"] .me-program-summary-note,
html[data-ccvf-theme="dark"] .me-program-summary-grid span,
html[data-ccvf-theme="dark"] .me-program-summary-grid small {
  color: #a9c0c8;
}

html[data-ccvf-theme="dark"] .me-activity-item .me-activity-warning {
  color: #ffd989;
}

html[data-ccvf-theme="dark"] .me-education-level {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}

html[data-ccvf-theme="dark"] .me-email-fields .note-editor,
html[data-ccvf-theme="dark"] .me-email-fields .note-toolbar {
  border-color: #345969;
}

html[data-ccvf-theme="dark"] .me-email-address-field {
  background: #142b35;
  border-color: #345969;
  border-left-color: var(--email-address-accent);
}

html[data-ccvf-theme="dark"] .me-email-extra-toggle {
  background: #0d1d25;
  border-color: #345969;
  color: #bceefa;
}

html[data-ccvf-theme="dark"] .me-email-extra-toggle:hover,
html[data-ccvf-theme="dark"] .me-email-extra-toggle:focus,
html[data-ccvf-theme="dark"] .me-email-extra-toggle.is-active {
  background: #162d38;
  border-color: #4f7889;
  color: #edf7fa;
}

html[data-ccvf-theme="dark"] .me-email-address-field.me-email-address-cc {
  background: #20283c;
}

html[data-ccvf-theme="dark"] .me-email-address-field.me-email-address-bcc {
  background: #2b2234;
}

html[data-ccvf-theme="dark"] .me-email-address-field > span {
  color: color-mix(in srgb, var(--email-address-accent) 62%, #fff);
}

html[data-ccvf-theme="dark"] .me-email-address-field > span small {
  color: #afc2ca;
}

html[data-ccvf-theme="dark"] .me-email-fields .note-toolbar {
  background: #162d38;
}

html[data-ccvf-theme="dark"] .me-email-fields .note-btn {
  background: #0d1d25;
  border-color: #345969;
  color: #dbe6ed;
}

html[data-ccvf-theme="dark"] .me-email-fields .note-editable,
html[data-ccvf-theme="dark"] .me-email-preview {
  background: #0d1d25;
  border-color: #345969;
  color: #dbe6ed;
}

html[data-ccvf-theme="dark"] .me-email-attachments input[type="file"],
html[data-ccvf-theme="dark"] .me-email-attachment-list a {
  background: #162d38;
  border-color: #345969;
  color: #bceefa;
}

html[data-ccvf-theme="dark"] .me-activity-empty {
  color: #a9c0c8;
}

html[data-ccvf-theme="dark"] .me-filter-grid input,
html[data-ccvf-theme="dark"] .me-filter-grid select,
html[data-ccvf-theme="dark"] .me-field input,
html[data-ccvf-theme="dark"] .me-field select,
html[data-ccvf-theme="dark"] .me-field textarea,
html[data-ccvf-theme="dark"] .me-activity-search input,
html[data-ccvf-theme="dark"] .me-activity-number input {
  background: #0d1d25;
  border-color: #345969;
  color: #edf7fa;
}

@media (max-width: 1050px) {
  .me-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .me-management-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-sticky-panel {
    position: static;
  }

  .me-school-year-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .me-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .me-header-actions,
  .me-header-actions .me-button {
    width: 100%;
  }

  .me-stats,
  .me-booking-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-fields,
  .me-filter-grid {
    grid-template-columns: 1fr;
  }

  .me-filter-actions {
    grid-column: auto;
  }

  .me-field-wide {
    grid-column: auto;
  }

  .me-activity-item {
    grid-template-columns: 1fr;
  }

  .me-program-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-program-summary-total {
    grid-column: 1 / -1;
  }

  .me-school-year-groups {
    grid-template-columns: 1fr;
  }

  .me-school-year-options {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  }

  .me-activity-number {
    padding-left: 27px;
  }
}

@media (max-width: 460px) {
  .me-stats,
  .me-booking-summary,
  .me-program-summary-grid {
    grid-template-columns: 1fr;
  }
}
