:root {
  --brand-blue: #14258f;
  --brand-blue-dark: #101e68;
  --brand-magenta: #bf2381;
  --brand-magenta-dark: #9b1b69;
  --brand-pink: #f9edf5;
  --brand-surface: #f5f6fb;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1b2856;
  background: var(--brand-surface);
  font-synthesis: none;
}
.waiting-list-notice {
  padding: 12px 14px;
  border-left: 3px solid #c99334;
  border-radius: 6px;
  background: #fff7e8;
  color: #6c4d1b;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: #0454b2;
}
.hidden {
  display: none !important;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background: var(--brand-blue-dark);
  color: white;
  width: 255px;
  min-width: 255px;
  display: flex;
  flex-direction: column;
  padding: 28px 17px 18px;
  position: sticky;
  height: 100vh;
  top: 0;
}
.brand {
  background: white;
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 28px;
  box-shadow: 0 6px 20px #00000012;
}
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}
.login-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 26px;
}
.side-title {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #89addf;
  padding: 0 17px 13px;
  font-weight: 800;
}
.sidebar nav {
  display: grid;
  gap: 3px;
}
.sidebar nav button {
  border: 0;
  background: transparent;
  border-radius: 11px;
  text-align: left;
  padding: 8px 16px;
  color: #d5e3ff;
  font-size: 14px;
  line-height: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.sidebar nav button:hover,
.sidebar nav button.active {
  background: #293a86;
  color: white;
}
.sidebar nav button.active {
  border-left: 3px solid #e9a5d0;
}
.side-foot {
  margin-top: auto;
  border-top: 1px solid #35558b;
  padding: 18px 10px 0;
}
.userpill {
  font-size: 14px;
  color: #fff;
}
.userpill:first-letter {
  color: #3cd2bc;
}
.logout {
  border: 0;
  color: #c8d9f1;
  background: none;
  padding: 12px 0;
}
.main {
  flex: 1;
  min-width: 0;
  padding: 0 32px;
  max-width: 1700px;
}
.topbar {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.crumb {
  font-size: 12px;
  color: #7c8daa;
}
.topbar h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 7px 0 0;
}
.topactions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.live {
  font-size: 12px;
  color: #476489;
}
.live span {
  color: #03b690;
}
.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 13px;
}
.primary {
  background: var(--brand-magenta);
  color: white;
  box-shadow: 0 5px 12px #bf238125;
}
.secondary {
  background: #edf3fc;
  color: #114184;
}
.light {
  background: white;
  color: #0c3681;
}
.btn:hover {
  filter: brightness(0.96);
}
.welcome {
  background: linear-gradient(
    116deg,
    var(--brand-blue-dark) 0%,
    var(--brand-blue) 63%,
    #3449aa 100%
  );
  padding: 30px 34px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
  min-height: 155px;
  position: relative;
  overflow: hidden;
}
.welcome:after {
  content: "";
  position: absolute;
  right: -60px;
  top: -130px;
  width: 330px;
  height: 330px;
  border: 50px solid #ffffff08;
  border-radius: 50%;
  pointer-events: none;
}
.welcome > div,
.welcome > button {
  position: relative;
  z-index: 1;
}
.welcome .eyebrow {
  color: #f0badb;
}
.welcome h2 {
  font-size: 27px;
  margin: 12px 0 7px;
}
.welcome h2 span {
  color: #f0badb;
}
.welcome p {
  font-size: 13px;
  color: #d4e4fd;
  max-width: 520px;
  line-height: 1.7;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 800;
  color: var(--brand-magenta);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.metric,
.panel {
  background: white;
  border: 1px solid #e7eef9;
  box-shadow: 0 4px 17px #13346d07;
  border-radius: 15px;
}
.metric {
  padding: 21px;
  min-height: 137px;
}
.metric-icon {
  display: grid;
  place-items: center;
  font-size: 23px;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: var(--brand-pink);
  color: var(--brand-magenta);
  margin-bottom: 12px;
}
.metric-icon.blue {
  background: #e6efff;
  color: #316bcc;
}
.metric-icon.violet {
  background: #f0eaff;
  color: #9368d9;
}
.metric-icon.teal {
  background: #e2f7f1;
  color: #1eb09b;
}
.metric span {
  display: block;
  font-size: 12px;
  color: #6b7b97;
}
.metric strong {
  font-size: 30px;
  display: block;
  margin-top: 5px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}
.panel {
  padding: 23px;
  min-width: 0;
}
.panel-head,
.list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}
.panel h3,
.panel h2 {
  margin: 0;
  font-size: 17px;
}
.panel p,
.list-top p {
  color: #7b89a2;
  font-size: 12px;
  margin: 8px 0 0;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(95px, 150px) 1fr 28px;
  gap: 10px;
  align-items: center;
  margin: 17px 0;
  font-size: 12px;
}
.bar-row span {
  color: #516582;
}
.bar-row b {
  text-align: right;
}
.track {
  height: 10px;
  background: #eef2fa;
  border-radius: 99px;
  overflow: hidden;
}
.track > div {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #d67ab2, var(--brand-magenta));
}
.stage-grid {
  height: 205px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
  padding: 15px 5px 0;
}
.stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.stage strong {
  order: 0;
}
.stage-bar {
  order: 1;
  width: min(48px, 75%);
  border-radius: 7px 7px 0 0;
}
.stage span {
  order: 2;
  text-align: center;
  color: #6b7b97;
  font-size: 10px;
  padding-top: 3px;
}
.recent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f3fa;
  cursor: pointer;
}
.recent:last-child {
  border-bottom: 0;
}
.avatar {
  background: var(--brand-pink);
  color: var(--brand-magenta);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: bold;
}
.recent div {
  flex: 1;
  min-width: 0;
}
.recent strong {
  font-size: 13px;
  display: block;
}
.recent small {
  font-size: 11px;
  color: #8896ad;
  display: block;
  padding-top: 5px;
}
.pill {
  background: #edf6ff;
  color: #1760a2;
  border-radius: 99px;
  font-size: 11px;
  padding: 6px 10px;
  display: inline-block;
  white-space: nowrap;
}
.textbutton {
  background: none;
  border: 0;
  color: var(--brand-magenta);
  font-size: 12px;
  font-weight: 700;
}
.empty {
  text-align: center;
  color: #8b97aa;
  padding: 30px !important;
}
.listpanel {
  min-height: 510px;
}
.list-top h2 {
  font-size: 20px;
}
.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8faff;
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 13px;
}
.filters input {
  width: min(100%, 350px);
  border: 0;
  outline: 0;
  background: transparent;
  color: #173d75;
  font-size: 13px;
}
.filters span {
  font-size: 12px;
  color: #8191ab;
}
.tablewrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #f3f7fd;
  color: #315487;
  font-weight: 700;
  padding: 15px 12px;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0f2f8;
  color: #364e73;
}
tbody tr:hover {
  background: #fcfdff;
}
.tableactions {
  white-space: nowrap;
}
.tableactions button {
  border: 0;
  background: #edf3fc;
  color: #15559a;
  padding: 8px;
  border-radius: 6px;
  margin-right: 5px;
  font-size: 11px;
}
.tableactions button.danger {
  background: #fff0f4;
  color: #bd2860;
}
.hint {
  padding: 18px;
  margin-top: 18px;
  background: var(--brand-pink);
  border: 1px solid #edc7df;
  border-radius: 10px;
  color: var(--brand-magenta-dark);
  font-size: 12px;
}
.reportfilters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.reportfilters label {
  font-size: 12px;
  color: #607494;
}
.reportfilters select {
  display: block;
  padding: 10px;
  margin-top: 7px;
  border: 1px solid #e1e8f3;
  border-radius: 8px;
  background: white;
  min-width: 160px;
}
footer {
  text-align: center;
  color: #9eacc2;
  font-size: 11px;
  padding: 35px 0;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #081e47a8;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dialog {
  background: white;
  border-radius: 17px;
  width: min(750px, 100%);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 20px 70px #0003;
}
.dialog-head {
  padding: 22px 27px;
  border-bottom: 1px solid #edf1f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 7px 0 0;
  font-size: 21px;
}
.dialog-head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.iconbtn {
  background: #f3f6fc;
  color: #6b7b96;
  border: 0;
  width: 35px;
  height: 35px;
  border-radius: 9px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 27px;
}
#modalFields > .field {
  min-width: 0;
}
.form-grid label,
.login-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #38577d;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.login-box input {
  margin-top: 8px;
  display: block;
  width: 100%;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-size: 13px;
  color: #203b66;
  outline-color: var(--brand-magenta);
}
.form-grid label.full {
  grid-column: 1/-1;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 27px;
  border-top: 1px solid #edf1f9;
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  color: white;
  border-radius: 10px;
  padding: 14px 22px;
  z-index: 30;
  font-size: 13px;
  box-shadow: 0 12px 30px #0002;
  display: none;
}
#toast.show {
  display: block;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 15%, #f3dfed, transparent 34%),
    linear-gradient(130deg, #e7effa, #fff);
}
.login-box {
  background: white;
  border: 1px solid #e5edf7;
  border-top: 4px solid var(--brand-magenta);
  border-radius: 24px;
  padding: 42px;
  width: min(420px, 92vw);
  box-shadow: 0 25px 60px #09295a1a;
  text-align: center;
}
.login-box h1 {
  font-size: 26px;
  margin: 12px 0;
  color: var(--brand-blue);
}
.login-box > p {
  color: #7085a5;
  font-size: 14px;
  margin-bottom: 30px;
}
.login-box label {
  text-align: left;
  margin-bottom: 18px;
}
.login-box .btn {
  width: 100%;
  margin-top: 9px;
}
.login-box .error {
  color: #c42f57;
  min-height: 15px;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 215px;
    min-width: 215px;
  }
  .main {
    padding: 0 18px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .app {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 12px;
  }
  .brand {
    padding: 8px 12px;
    margin: 0 0 12px;
    width: 190px;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
  }
  .sidebar nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px;
  }
  .sidebar nav button span {
    display: none;
  }
  .side-title,
  .side-foot {
    display: none;
  }
  .topbar {
    height: auto;
    padding: 22px 0;
    align-items: flex-start;
  }
  .topbar h1 {
    font-size: 23px;
  }
  .live {
    display: none;
  }
  .welcome {
    padding: 22px;
    display: block;
  }
  .welcome h2 {
    font-size: 23px;
  }
  .welcome button {
    margin-top: 16px;
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 13px;
    min-height: 115px;
  }
  .metric strong {
    font-size: 26px;
  }
  .panel {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .reportfilters {
    display: block;
  }
  .reportfilters label {
    display: block;
    margin-bottom: 12px;
  }
  .stage-grid {
    gap: 2px;
  }
  .bar-row {
    grid-template-columns: 108px 1fr 20px;
  }
}

/* Interacciones y contraste de la identidad del colegio. */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-magenta);
  outline-offset: 3px;
}
.primary:hover {
  background: var(--brand-magenta-dark);
}
.login-wrap {
  padding: 28px 0;
}
.login-box .eyebrow {
  font-size: 10px;
}
.sidebar nav button.active {
  box-shadow: inset 0 0 0 1px #ffffff15;
}
.sidebar .brand-logo {
  border-radius: 4px;
}
::selection {
  background: #edc7df;
  color: var(--brand-blue-dark);
}

.field-error {
  display: block;
  color: #a32648;
  font-size: 12px;
  margin-top: 7px;
}
[aria-invalid="true"] {
  border-color: #a32648 !important;
}
.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.recent[role="button"]:focus-visible {
  outline: 3px solid var(--brand-magenta);
  outline-offset: 3px;
}
nav button[aria-current="page"] {
  font-weight: 700;
}

.form-grid .full {
  grid-column: 1/-1;
}
@media (max-width: 650px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topactions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }
  .list-top {
    flex-wrap: wrap;
  }
}

@media (max-width: 650px) {
  .side-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 8px 4px 0;
  }
  .userpill {
    font-size: 12px;
  }
  .logout {
    font-size: 12px;
    padding: 6px 0;
  }
}

.microsoft-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 2px;
}
.microsoft-mark i {
  width: 9px;
  height: 9px;
  background: #fff;
}
.login-box .login-access-note {
  font-size: 12px;
  line-height: 1.6;
  margin: 20px 0 0;
}
.access-note {
  font-size: 13px;
  color: #516582;
  line-height: 1.6;
}
.access-oid {
  display: block;
  margin-top: 6px;
  color: #6b7b97;
  font-size: 10px;
}
.access-form {
  background: var(--brand-surface);
  border: 1px solid #e1e8f3;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}
.access-form h3 {
  margin: 0;
}
.access-form p,
.access-form small {
  font-size: 12px;
  line-height: 1.6;
  color: #516582;
}
.access-form .form-grid {
  padding: 20px 0;
}
.access-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.access-form .error {
  color: #a32648;
}
.pill.pending {
  background: var(--brand-pink);
  color: var(--brand-magenta-dark);
}

/* Entradas y correspondencia de admisiones. */
.entries-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 12px 0 24px;
}
.entries-intro h2 {
  margin: 10px 0;
  font-size: 27px;
  letter-spacing: -0.6px;
}
.entries-intro p {
  max-width: 670px;
  line-height: 1.7;
  color: #607494;
  font-size: 14px;
  margin: 0;
}
.entries-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.entry-channel-visits { grid-column: 1 / -1; }
.entry-channel-visits > .entry-options { display: block; }
.visit-sources-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.visit-sources-intro p { margin:0; max-width:680px; color:#64748b; }
.visit-sources-intro .btn { flex-shrink:0; }
.visit-source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.visit-source-grid .entry-card { min-width:0; }
.visit-legacy-entry { margin-top:16px; }
.visit-legacy-entry summary { cursor:pointer; color:#64748b; font-size:13px; padding:10px 0; }
.visit-legacy-entry .entry-card { margin-top:10px; }
@media(max-width:1000px) { .visit-source-grid { grid-template-columns:1fr; } .visit-sources-intro { align-items:flex-start; flex-direction:column; } }
.entry-channel-wide {
  grid-column: 1/-1;
}
.entry-channel-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}
.entry-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-pink);
  color: var(--brand-magenta);
  font-weight: 800;
  font-size: 14px;
}
.entry-channel-head h3 {
  font-size: 18px;
}
.entry-options {
  display: grid;
  gap: 14px;
}
.entry-channel-wide .entry-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.entry-card {
  min-width: 0;
  border: 1px solid #e5eaf5;
  border-radius: 12px;
  padding: 17px;
  background: #fcfdff;
}
.entry-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.entry-card-top strong {
  font-size: 14px;
  line-height: 1.5;
}
.entry-card-top .pill {
  font-size: 10px;
  padding: 5px 8px;
}
.entry-paused {
  background: #eef0f5;
  color: #66758c;
}
.entry-mode {
  font-size: 12px;
  color: #6b7b97 !important;
  line-height: 1.6;
}
.entry-qr-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
}
.entry-qr {
  display: block;
  border: 1px solid #e7eaf2;
  border-radius: 10px;
  background: #fff;
  width: 116px;
  height: 116px;
  flex-shrink: 0;
}
.entry-qr-frame {
  position: relative;
  flex-shrink: 0;
  width: fit-content;
}
.entry-qr-downloads {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  background: #fffffff0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.entry-qr-frame:hover .entry-qr-downloads,
.entry-qr-frame:focus-within .entry-qr-downloads {
  opacity: 1;
  pointer-events: auto;
}
.qr-download {
  display: flex;
  padding: 3px;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
}
.qr-download:hover,
.qr-download:focus-visible {
  background: #eef3ff;
  outline: 2px solid var(--brand-blue);
  outline-offset: 1px;
}
.qr-download img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
@media (hover: none) {
  .entry-qr-downloads {
    top: auto;
    opacity: 1;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .entry-qr-downloads {
    transition: none;
  }
}
.entry-received {
  display: block;
  font-size: 28px;
  font-weight: 800;
}
.entry-count-label {
  display: block;
  font-size: 11px;
  color: #78869e;
  line-height: 1.5;
  max-width: 130px;
  margin: 4px 0 10px;
}
.textlink {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-blue);
}
.entry-url-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #526887;
}
.entry-url {
  display: block;
  min-width: 0;
  width: 100%;
  font-size: 11px;
  background: #fff;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  padding: 10px;
  margin-top: 7px;
  color: #3c527b;
}
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}
.entry-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.entry-actions .btn {
  font-size: 11px;
  padding: 10px 12px;
}
.entry-editor {
  margin-bottom: 24px;
  border-top: 3px solid var(--brand-magenta);
}
.entry-editor .form-grid {
  padding: 0;
}
.entry-editor small {
  display: block;
  font-size: 11px;
  color: #71819d;
  margin-top: 6px;
  line-height: 1.6;
}
.entry-editor .error {
  font-size: 13px;
  color: #a32648;
}
.entry-channel-wide .entry-qr-row {
  gap: 9px;
  flex-wrap: wrap;
}
.entry-channel-wide .entry-qr {
  width: 104px;
  height: 104px;
}
.entry-channel-wide .entry-received {
  font-size: 23px;
}
.entry-channel-wide .entry-count-label {
  max-width: 80px;
  font-size: 10px;
}
.entry-channel-wide .entry-actions .btn {
  width: 100%;
  justify-content: center;
}
.entry-channel-wide .entry-card-top {
  display: block;
}
.entry-channel-wide .entry-card-top .pill {
  margin-top: 8px;
}
.entry-channel-wide .entry-card {
  padding: 13px;
}
.public-intake {
  background:
    radial-gradient(circle at 10% 10%, #f5e5f0, transparent 30%),
    var(--brand-surface);
  padding: 32px 18px;
}
.public-card {
  width: min(720px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e1e8f3;
  border-top: 4px solid var(--brand-magenta);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 16px 60px #14258f10;
}
.public-logo {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 26px;
}
.public-card h1 {
  font-size: 26px;
  margin: 10px 0;
  color: var(--brand-blue);
}
.public-description {
  font-size: 13px;
  line-height: 1.8;
  color: #607494;
}
.public-fields {
  padding: 20px 0;
  gap: 19px;
}
.entry-privacy {
  font-size: 12px;
  line-height: 1.8;
  color: #6b7b97;
  background: var(--brand-surface);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 15px 0;
}
.entry-privacy p {
  margin: 0;
}
.public-submit {
  width: 100%;
  margin-top: 8px;
}
.entry-honeypot {
  display: none;
}
.public-card .error {
  font-size: 13px;
  line-height: 1.7;
  color: #a32648;
  background: #fff0f4;
  padding: 12px;
  border-radius: 8px;
}
.intake-success {
  background: #edf8f3;
  border: 1px solid #cfe9dc;
  border-radius: 12px;
  color: #245d46;
  padding: 24px;
  margin-top: 24px;
}
.intake-success h2 {
  font-size: 21px;
  margin: 0 0 12px;
}
.intake-success p {
  line-height: 1.8;
  font-size: 14px;
}
.mail-tabs {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid #e5eaf4;
  margin: 20px 0;
}
.mail-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #70819f;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 13px;
}
.mail-tabs [aria-selected="true"] {
  color: var(--brand-magenta);
  border-bottom-color: var(--brand-magenta);
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.template-card {
  border: 1px solid #e2e9f5;
  border-radius: 12px;
  padding: 20px;
  background: #fcfdff;
  min-width: 0;
}
.template-subject {
  font-weight: 600;
  color: var(--brand-blue) !important;
  font-size: 13px !important;
  line-height: 1.7;
}
.template-preview,
.mail-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.8 inherit;
  color: #61728f;
  background: #f4f6fb;
  border-radius: 9px;
  padding: 16px;
  max-height: 250px;
  overflow: auto;
}
.template-variables {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.template-variables button {
  border: 0;
  cursor: pointer;
  font: 11px/1.5 monospace;
}
.mail-history-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
  color: #72809a;
  font-size: 12px;
  gap: 12px;
}
.mail-history-search {
  flex: 1 1 260px;
}
.mail-history-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid #dce5f2;
  padding: 10px;
  border-radius: 8px;
  background: white;
  font: inherit;
}
.mail-history-filter select {
  border: 1px solid #dce5f2;
  padding: 8px;
  border-radius: 8px;
  background: white;
  margin-left: 8px;
}
.mail-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
}
.journey-social {
  border-top: 1px solid #dce5f2;
  margin-top: 20px;
  padding-top: 16px;
}
.journey-social h4 {
  margin: 0 0 12px;
}
.mail-error {
  background: #fff0f4;
  color: #a32648;
}
.mail-error-text {
  white-space: normal;
  font-size: 11px !important;
  max-width: 230px;
  line-height: 1.6;
}
.mail-body {
  min-width: 250px;
}
.mail-panel .tablewrap td {
  vertical-align: top;
}
.mail-panel .error {
  color: #a32648;
  font-size: 13px;
}
.mail-panel small {
  display: block;
  line-height: 1.7;
  color: #71819d;
  margin-top: 6px;
}
.tableactions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 1150px) {
  .entry-channel-wide .entry-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entry-channel-wide .entry-qr-row {
    flex-wrap: nowrap;
  }
  .entry-channel-wide .entry-actions .btn {
    width: auto;
  }
  .entry-channel-wide .entry-card-top {
    display: flex;
  }
  .entry-channel-wide .entry-card-top .pill {
    margin-top: 0;
  }
  .entry-channel-wide .entry-count-label {
    max-width: 120px;
  }
}
@media (max-width: 750px) {
  .entries-intro {
    display: block;
  }
  .entries-intro h2 {
    font-size: 23px;
  }
  .entries-intro > .pill {
    margin-top: 15px;
  }
  .entries-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }
  .entry-channel-wide {
    grid-column: auto;
  }
  .entry-channel-wide .entry-options {
    grid-template-columns: 1fr;
  }
  .public-card {
    padding: 24px 19px;
  }
  .public-intake {
    padding: 18px 12px;
  }
  .public-card h1 {
    font-size: 23px;
  }
  .mail-history-filter {
    align-items: flex-start;
    flex-direction: column;
  }
}

.privacy-notice {
  grid-column: 1 / -1;
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line, #dbe2ee);
  border-radius: 12px;
  background: #f7f9fc;
  color: #46556e;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.child-protection-notice {
  display: grid;
  grid-template-columns: clamp(64px, 20%, 110px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dbe2ee;
}
.child-protection-notice img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}
.child-protection-notice p {
  margin: 0;
}
.guardian-pending-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 24px;
  border: 1px solid #dce5f2;
  border-top: 4px solid var(--brand-magenta);
  border-radius: 16px;
  color: #23385b;
}
.guardian-pending-dialog::backdrop {
  background: #18234399;
}
.guardian-pending-list {
  display: grid;
  gap: 12px;
}
.guardian-pending-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #f7f9fc;
  overflow-wrap: anywhere;
}
.guardian-pending-item > div {
  min-width: 0;
  flex: 1 1 230px;
}
.guardian-pending-item h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.guardian-pending-item ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
}
.portal-notice {
  margin: 18px 0;
  padding: 16px;
  background: #eef4ff;
  border: 1px solid #cfddf2;
  border-radius: 10px;
  line-height: 1.6;
}
.portal-children {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.portal-children [aria-current="page"] {
  outline: 2px solid var(--brand-magenta);
  outline-offset: 2px;
}
.portal-account,
.portal-access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.portal-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #dbe2ee;
}
.public-card form > .field {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.public-card form > .field input,
.public-card form > .field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  color: #23385b;
}
.portal-section fieldset {
  min-width: 0;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
}
.portal-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.portal-choice input,
.portal-notice input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
}
.journey-summary {
  background: #f3f5fc;
  border-left: 3px solid #bd2080;
  border-radius: 8px;
  padding: 12px 16px;
  color: #14258f;
  line-height: 1.6;
}
.mail-preview-dialog {
  width: min(960px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 22px;
  border: 1px solid #dbe2ee;
  border-radius: 16px;
  color: #23385b;
}
.mail-preview-dialog::backdrop {
  background: #18234399;
}
.mail-preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}
.mail-preview-toolbar h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.mail-preview-toolbar p {
  font-size: 13px;
  line-height: 1.5;
}
.mail-preview-sizes {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}
.mail-preview-canvas {
  background: #e8edf4;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}
.mail-preview-canvas iframe {
  display: block;
  width: 100%;
  height: 65dvh;
  min-height: 360px;
  margin: auto;
  border: 0;
  background: #f1f4f9;
}
@media (max-width: 650px) {
  .mail-preview-dialog {
    padding: 12px;
  }
  .mail-preview-toolbar {
    flex-direction: column;
    gap: 4px;
  }
  .mail-preview-canvas {
    padding: 0;
  }
}
.privacy-notice p {
  margin: 0;
}
.privacy-notice a {
  color: #172c96;
  text-decoration: underline;
}
.family-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.family-section-title {
  margin: 12px 0 0;
  font-size: 18px;
}
@media (max-width: 750px) {
  .family-fields {
    grid-template-columns: 1fr;
  }
}

.entries-grid > .entry-channel:first-child {
  grid-column: 1/-1;
}
.entries-grid > .entry-channel:first-child .entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 28px;
}
.entries-grid > .entry-channel:first-child .entry-card-top,
.entries-grid > .entry-channel:first-child .entry-mode,
.entries-grid > .entry-channel:first-child .entry-url-label,
.entries-grid > .entry-channel:first-child .entry-actions {
  grid-column: 1;
}
.entries-grid > .entry-channel:first-child .entry-qr-row {
  grid-column: 2;
  grid-row: 1 / span 4;
  margin: 0;
}
@media (max-width: 750px) {
  .entries-grid > .entry-channel:first-child .entry-card {
    display: block;
  }
  .entries-grid > .entry-channel:first-child .entry-qr-row {
    margin: 18px 0;
  }
}

/* Account view selector in the sidebar. */
.account-switcher { position: relative; }
.account-switcher .userpill { display: flex; align-items: center; gap: .5rem; width: 100%; background: transparent; border: 1px solid transparent; color: inherit; padding: .65rem .5rem; text-align: left; border-radius: 10px; cursor: pointer; font: inherit; }
.account-switcher #username { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.5; }
.account-switcher .userpill:hover, .account-switcher .userpill[aria-expanded="true"] { background: #ffffff12; border-color: #ffffff30; }
.account-views { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; padding: .65rem; background: white; color: #18305b; border: 1px solid #dce4f2; border-radius: 12px; box-shadow: 0 8px 28px #101f4933; }
.account-views p { margin: .2rem .5rem .5rem; font-size: .75rem; color: #65758e; }
.account-views button { width: 100%; border: 0; background: transparent; text-align: left; border-radius: 8px; padding: .7rem .6rem; color: #18305b; font: inherit; font-size: .85rem; cursor: pointer; }
.account-views button:hover, .account-views button[aria-current="true"] { background: #edf2fb; color: #a91e7b; }
.account-views small { display: block; padding: 0 .5rem; color: #65758e; font-size: .75rem; }
.account-views small:empty { display: none; }
.account-switcher button:focus-visible { outline: 2px solid #df83c3; outline-offset: 2px; }
