@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap");

:root {
  --navy: #1f3d63;
  --ink: #142338;
  --red: #c62032;
  --sky: #4aa8df;
  --green: #138a5d;
  --gold: #d5a43a;
  --paper: #f5f7fb;
  --muted: #65758d;
  --line: #dce3ec;
  --white: #ffffff;
  --soft-blue: #e8f2fb;
  --soft-red: #fff0f1;
  --soft-green: #eaf7f1;
  --soft-gold: #fff7dc;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

a {
  color: var(--navy);
}

.public-shell {
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(20,35,56,.96), rgba(31,61,99,.88)),
    url("https://scuolava.cl/portal/wp-content/uploads/2026/03/logo_SOLO_SCUOLA.png") left 34px bottom 30px / 210px auto no-repeat,
    var(--paper);
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  overflow-x: hidden;
}

.public-intro {
  color: var(--white);
  padding: 34px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  border-right: 1px solid rgba(255,255,255,.14);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 82px;
  height: auto;
  display: block;
  background: var(--white);
  border-radius: 6px;
  padding: 7px;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: #d8e8f6;
  font-size: 13px;
}

.public-copy h1 {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: .98;
  margin: 12px 0 16px;
  letter-spacing: 0;
}

.public-copy p {
  max-width: 540px;
  color: #e4edf6;
  font-size: 18px;
  line-height: 1.58;
}

.public-facts {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.public-fact {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  color: #edf6ff;
}

.public-fact strong {
  font-size: 13px;
  color: var(--white);
}

.public-fact span {
  color: #c8d8ea;
  font-size: 13px;
}

.public-note {
  color: #cfdae8;
  font-size: 13px;
}

.calendar-public-shell {
  min-height: 100vh;
  padding: 10px 22px 16px;
  background:
    linear-gradient(112deg, rgba(20,35,56,.96) 0%, rgba(31,61,99,.92) 43%, rgba(245,247,251,.98) 43.2%),
    var(--paper);
}

.calendar-public-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto 6px;
}

.calendar-public-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
  min-width: 0;
}

.calendar-public-brand img {
  width: 86px;
  height: auto;
  display: block;
  background: var(--white);
  border-radius: 6px;
  padding: 7px;
}

.calendar-public-brand strong,
.calendar-public-brand small {
  display: block;
}

.calendar-public-brand strong {
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.calendar-public-brand small {
  margin-top: 3px;
  color: #dce9f6;
  font-size: 13px;
}

.calendar-hero {
  min-height: calc(100vh - 76px);
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.calendar-hero-copy {
  color: var(--white);
  align-self: center;
  min-width: 0;
  position: relative;
  isolation: isolate;
  padding: 78px 0;
}

.calendar-hero-copy::before {
  content: "";
  position: absolute;
  width: min(420px, 90vw);
  aspect-ratio: 1;
  left: -68px;
  top: 50%;
  transform: translateY(-50%);
  background: url("https://scuolava.cl/portal/wp-content/uploads/2026/03/logo_SOLO_SCUOLA.png") center / contain no-repeat;
  opacity: .12;
  z-index: -1;
  pointer-events: none;
}

.calendar-hero-copy h1 {
  margin: 12px 0 14px;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.calendar-hero-copy p {
  margin: 0;
  color: #e4edf6;
  font-size: 18px;
  line-height: 1.55;
}

.calendar-frame-card {
  min-height: 640px;
  background: var(--white);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 24px 70px rgba(15, 28, 45, .20);
  align-self: start;
}

.calendar-iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
  border: 0;
  border-radius: 5px;
  background: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #dce9f6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  margin-right: 8px;
  background: var(--red);
}

.eyebrow.dark {
  color: var(--muted);
}

.eyebrow.dark::before {
  background: var(--sky);
}

.booking-panel {
  background: var(--white);
  width: min(880px, calc(100% - 48px));
  margin: 28px auto;
  border-radius: 8px;
  padding: 24px;
  align-self: center;
  box-shadow: 0 24px 70px rgba(15, 28, 45, .22);
  min-width: 0;
}

.booking-panel h2,
.section-title {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 24px;
}

.booking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.booking-head h2 {
  margin: 2px 0 0;
  font-size: 30px;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0 18px;
}

.booking-steps span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #f3f6fa;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.booking-steps .active {
  background: var(--soft-blue);
  color: var(--navy);
}

.day-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin-bottom: 4px;
  scrollbar-width: thin;
  max-width: 100%;
}

.day-tab {
  flex: 0 0 98px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  min-height: 66px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.day-tab span,
.day-tab strong {
  display: block;
}

.day-tab span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.day-tab strong {
  margin-top: 5px;
  font-size: 18px;
}

.day-tab.active {
  border-color: var(--red);
  background: var(--soft-red);
  color: var(--red);
}

.slot-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  margin-bottom: 18px;
  min-width: 0;
}

.slot-days {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}

.slot-day {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.slot-day strong {
  display: block;
  margin-bottom: 0;
  color: var(--navy);
}

.slot-day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.slot-day-title span {
  color: var(--muted);
  font-size: 13px;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slots.compact {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
}

.slot-radio {
  position: relative;
}

.slot-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slot-radio span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.slot-radio input:checked + span {
  border-color: var(--red);
  background: var(--soft-red);
  color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.form-title {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 42px;
  padding: 9px 11px;
  font: inherit;
  background: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.topline input:focus,
.day-tab:focus,
.slot-radio input:focus + span {
  outline: 3px solid rgba(74,168,223,.22);
  border-color: var(--sky);
}

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

.form-static {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  padding: 9px 11px;
  color: var(--navy);
  font-weight: 800;
}

.table-input {
  width: 100%;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  padding: 8px 9px;
  font: inherit;
}

.table-input.email-input {
  min-width: 230px;
}

.check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--navy);
  font-weight: 800;
}

.check-toggle.compact {
  min-height: 34px;
  font-size: 13px;
}

.form-end {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}

.responsibility-panel {
  border-left: 5px solid var(--sky);
}

.responsibility-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.responsibility-head p {
  margin: 4px 0 0;
}

.claim-form,
.transfer-form {
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
}

.btn.red {
  background: var(--red);
}

.btn.ghost {
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.quick-final-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.booking-actions span {
  color: var(--muted);
  font-size: 13px;
}

.admin-shell {
  min-height: 100vh;
}

.sidebar {
  background: var(--ink);
  color: var(--white);
  padding: 20px 16px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  align-items: flex-start;
}

.sidebar .sidebar-brand {
  display: block;
}

.sidebar .sidebar-brand img {
  width: 186px;
  max-width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 30px;
}

.nav a {
  color: #dce9f6;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
}

.nav a.active,
.nav a:hover {
  background: rgba(255,255,255,.12);
  color: var(--white);
}

.admin-main {
  padding: 24px;
  margin-left: 240px;
  min-width: 0;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topline h1 {
  margin: 0;
  font-size: 30px;
  color: var(--navy);
}

.topline input {
  min-height: 42px;
  min-width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 11px;
  font: inherit;
}

.admin-dashboard-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.dashboard-title {
  flex: 0 0 410px;
  min-width: 0;
}

.dashboard-title h1 {
  font-size: 28px;
  white-space: nowrap;
}

.dashboard-create {
  margin-top: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  max-width: 760px;
}

.metric-strip .metric {
  padding: 8px 9px;
  border-radius: 7px;
}

.metric-strip .metric span {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.metric-strip .metric strong {
  font-size: 20px;
  margin-top: 1px;
}

.metric-strip .metric-green {
  background: var(--soft-green);
  border-color: #bfe6d5;
}

.metric-strip .metric-green span,
.metric-strip .metric-green strong {
  color: var(--green);
}

.metric-strip .metric-gold {
  background: var(--soft-gold);
  border-color: #f0dda4;
}

.metric-strip .metric-gold span,
.metric-strip .metric-gold strong {
  color: #87610c;
}

.metric-strip .metric-red {
  background: var(--soft-red);
  border-color: #f0c8ce;
}

.metric-strip .metric-red span,
.metric-strip .metric-red strong {
  color: var(--red);
}

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

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 34px;
  margin-top: 4px;
  color: var(--navy);
}

.metric .metric-text {
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric .pill {
  display: inline-flex;
  font-size: 12px;
  margin-top: 10px;
}

.applicant-topline {
  align-items: flex-start;
}

.applicant-heading {
  flex: 1 1 380px;
  min-width: min(380px, 100%);
}

.topline-actions {
  display: flex;
  flex: 0 1 560px;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.state-actions {
  align-items: center;
  justify-content: flex-end;
}

.final-management-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.final-management-box > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 88px;
}

.final-management-box span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.final-management-box small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.final-management-form,
.final-management-read {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.final-management-form select,
.final-management-form input {
  width: auto;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: var(--white);
}

.final-management-form select {
  width: 132px;
}

.final-management-form input[type="date"] {
  width: 138px;
}

.record-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.record-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.record-tabs a.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.tab-panel[hidden] {
  display: none !important;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head p {
  margin: 0;
}

.followup-form {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.manual-applicant-form .section-title {
  margin-top: 4px;
  font-size: 18px;
}

.manual-applicant-form .section-title:not(:first-child) {
  margin-top: 18px;
}

.followup-table {
  margin-top: 8px;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  flex-wrap: wrap;
}

.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.choice-row input,
.check-toggle input {
  width: 16px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--navy);
}

.utp-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.utp-status-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.utp-status-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.utp-status-strip strong:not(.pill) {
  display: block;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.3;
}

.academic-route-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.academic-route-cards label {
  position: relative;
}

.academic-route-cards input {
  position: absolute;
  width: 1px;
  min-height: auto;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.academic-route-cards span {
  display: flex;
  align-items: center;
  min-height: 54px;
  height: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
}

.academic-route-cards input:checked + span {
  border-color: var(--red);
  background: var(--soft-red);
  color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.academic-route-cards input:disabled + span {
  cursor: not-allowed;
  opacity: .72;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  min-width: 0;
}

.filters-panel {
  padding: 8px 10px 10px;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.filters-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.filters-head .section-title {
  margin: 0;
  font-size: 15px;
}

.filters-head p {
  margin: 0;
  font-size: 11px;
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(118px, .85fr) minmax(104px, .76fr) minmax(112px, .78fr) minmax(112px, .78fr) minmax(104px, .76fr) minmax(104px, .76fr) 82px;
  gap: 5px;
  align-items: end;
}

.filters-grid .field {
  margin-bottom: 0;
  gap: 2px;
  min-width: 0;
}

.filters-grid label {
  font-size: 10px;
  line-height: 1.1;
}

.filters-grid input,
.filters-grid select {
  min-width: 0;
  min-height: 30px;
  padding: 4px 7px;
  font-size: 11px;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.filter-actions .btn {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
}

.applicants-table {
  table-layout: fixed;
  font-size: 13px;
}

.applicants-table th,
.applicants-table td {
  padding: 9px 8px;
  overflow-wrap: anywhere;
}

.applicants-table .col-date {
  width: 98px;
}

.applicants-table .col-student {
  width: 25%;
}

.applicants-table .col-level {
  width: 76px;
}

.applicants-table .col-guardian {
  width: 13%;
}

.applicants-table .col-phone {
  width: 90px;
}

.applicants-table .col-visit {
  width: 108px;
}

.applicants-table .col-owner {
  width: 112px;
}

.applicants-table .col-status {
  width: 124px;
}

.applicants-table .col-actions {
  width: 92px;
}

.applicants-table .cell-date,
.applicants-table .cell-level {
  line-height: 1.25;
}

.applicants-table .cell-student strong {
  display: block;
  line-height: 1.15;
}

.applicants-table .cell-actions .actions {
  flex-wrap: nowrap;
}

.applicants-table .cell-actions .btn {
  width: 74px;
  min-height: 34px;
  padding: 0 8px;
  line-height: 1.05;
  white-space: normal;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.pagination a.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.pagination a.disabled {
  color: var(--muted);
  opacity: .45;
  pointer-events: none;
}

.responsible-pill {
  max-width: 100%;
  justify-content: center;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  background: var(--soft-green);
  color: var(--green);
}

.pill.warn {
  background: var(--soft-gold);
  color: #87610c;
}

.pill.bad {
  background: var(--soft-red);
  color: var(--red);
}

.pill.soft {
  background: var(--soft-blue);
  color: var(--navy);
}

.notice {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--soft-blue);
}

.notice-error {
  background: var(--soft-red);
  color: var(--red);
}

.notice-success {
  background: var(--soft-green);
  color: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  margin: 0;
}

.calendar-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.calendar-status-head p {
  margin: 0 0 12px;
}

.calendar-actions {
  align-items: center;
}

.cron-box {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.cron-box code {
  display: block;
  padding: 10px;
  border-radius: 5px;
  background: #eef3f8;
  color: var(--navy);
  overflow-x: auto;
  white-space: nowrap;
}

.backup-settings {
  margin-top: 16px;
}

.backup-settings > summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
  padding: 14px 0;
}

.backup-settings > .panel {
  margin-top: 12px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.muted {
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}

.login-card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 55px rgba(20, 35, 56, .14);
}

.login-card .brand {
  margin-bottom: 22px;
}

.ficha-page {
  background: #e9eef5;
  padding: 28px;
}

.ficha-form .notice {
  width: min(980px, 100%);
  margin: 0 auto 14px;
}

.ficha-sheet {
  width: min(980px, 100%);
  margin: 0 auto;
  background: var(--white);
  color: #21344f;
  padding: 28px;
  box-shadow: 0 16px 60px rgba(20, 35, 56, .18);
}

.ficha-toolbar {
  width: min(980px, 100%);
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ficha-header {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: 16px;
  background: transparent;
  color: var(--navy);
  padding: 0 0 12px;
  border-bottom: 4px solid var(--navy);
}

.ficha-header img {
  width: 172px;
  max-width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.ficha-header strong {
  display: block;
}

.ficha-header strong {
  font-size: 14px;
  line-height: 1.2;
}

.ficha-header > span {
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.ficha-title {
  margin: 18px 0 12px;
}

.ficha-title small {
  color: var(--sky);
  font-weight: 800;
}

.ficha-title h1 {
  margin: 3px 0;
  color: var(--navy);
  font-size: 34px;
}

.role-note {
  display: inline-flex;
  margin-top: 10px !important;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f6f9fc;
  font-size: 12px;
  font-weight: 800;
}

.ficha-section-title {
  display: grid;
  grid-template-columns: 46px 1fr;
  margin-top: 12px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
}

.ficha-section-title span:first-child {
  background: var(--sky);
  text-align: center;
  padding: 8px;
}

.ficha-section-title span:last-child {
  padding: 8px 12px;
}

.ficha-table {
  border: 1px solid var(--line);
}

.ficha-table th,
.ficha-table td {
  border: 1px solid var(--line);
  padding: 8px;
  font-size: 13px;
}

.ficha-table th {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.ficha-static {
  display: block;
  min-height: 26px;
  padding-top: 5px;
}

.ficha-auto-value {
  display: block;
  min-height: 28px;
  padding: 5px 2px 3px;
  border-bottom: 1px solid #8798ad;
  color: #21344f;
  font-size: 13px;
  line-height: 1.35;
}

.ficha-auto-note {
  display: block;
  min-height: 74px;
  padding: 6px 2px;
  border-bottom: 1px solid #8798ad;
  color: #21344f;
  font-size: 13px;
  line-height: 1.35;
}

.stamp-box {
  width: 104px;
  aspect-ratio: 1;
  margin-top: 6px;
  border: 1.5px dashed #8798ad;
  display: grid;
  place-items: center;
  color: #8798ad;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.ficha-line,
.ficha-textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #8798ad;
  border-radius: 0;
  background: transparent;
  color: #21344f;
  font: inherit;
  font-size: 13px;
  min-height: 28px;
  padding: 4px 2px 3px;
}

.ficha-line:focus,
.ficha-textarea:focus {
  outline: 3px solid rgba(74,168,223,.22);
  border-bottom-color: var(--sky);
  background: #f7fbff;
}

.ficha-textarea {
  display: block;
  min-height: 74px;
  resize: vertical;
  line-height: 1.35;
}

.ficha-textarea.compact {
  min-height: 40px;
}

.ficha-box-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  cursor: pointer;
}

.utp-interview-options {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto minmax(190px, 1fr);
  align-items: center;
  gap: 12px;
}

.utp-interview-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.academic-route-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.locked-section {
  background: #f8fafc;
}

.locked-note {
  background: var(--soft-blue);
  color: var(--navy);
  font-weight: 900;
}

.auto-utp-row td:first-child::after {
  content: " automático";
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}

.ficha-page input:disabled,
.ficha-page textarea:disabled,
.ficha-page select:disabled {
  color: #738198;
  cursor: not-allowed;
  opacity: .85;
}

.ficha-check {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

.pending-documents {
  background: var(--soft-gold);
}

.pending-documents {
  display: table-cell;
}

.pending-documents .ficha-line {
  display: inline-block;
  width: calc(100% - 190px);
  margin-left: 8px;
  vertical-align: middle;
}

.check-cell {
  text-align: center;
  font-size: 18px !important;
}

.final-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}

.final-status div {
  padding: 10px;
  border-right: 1px solid var(--line);
  text-align: center;
  font-weight: 900;
}

.final-status label {
  padding: 10px;
  border-right: 1px solid var(--line);
  text-align: center;
  font-weight: 900;
  cursor: pointer;
}

.final-status div:last-child {
  border-right: 0;
}

.final-status label:last-child {
  border-right: 0;
}

.final-status-two {
  grid-template-columns: repeat(2, 1fr);
}

.final-status-two div {
  opacity: .55;
}

.final-status-two .is-selected {
  opacity: 1;
  box-shadow: inset 0 0 0 2px currentColor;
}

.final-resolution-note {
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  text-align: center;
  font-weight: 900;
}

.pending-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--soft-gold);
  color: #684a08;
}

.pending-summary ul {
  margin: 0;
  padding-left: 18px;
  columns: 2;
}

.pending-summary li {
  margin-bottom: 4px;
  break-inside: avoid;
}

.pending-summary.ready {
  background: var(--soft-green);
  color: var(--green);
}

.editable-final-status input {
  width: 15px;
  height: 15px;
  margin: 0 6px 0 0;
  accent-color: var(--navy);
}

.final-ok {
  color: var(--green);
  background: var(--soft-green);
}

.final-warn {
  color: #87610c;
  background: var(--soft-gold);
}

.final-blue {
  color: var(--navy);
  background: var(--soft-blue);
}

.final-bad {
  color: var(--red);
  background: var(--soft-red);
}

.control-note {
  text-align: center;
  color: var(--red);
  font-weight: 800;
  margin-top: 14px;
  font-size: 13px;
}

@media (max-width: 920px) {
  .calendar-public-shell {
    padding: 12px 14px 16px;
    background: linear-gradient(180deg, rgba(20,35,56,.96) 0%, rgba(31,61,99,.92) 300px, var(--paper) 300px);
  }

  .calendar-public-header {
    min-height: 38px;
    margin-bottom: 0;
  }

  .calendar-hero {
    min-height: 0;
    display: block;
  }

  .calendar-hero-copy {
    margin: 6px 0 18px;
    padding: 34px 0 30px;
  }

  .calendar-hero-copy::before {
    width: 330px;
    left: -44px;
  }

  .calendar-frame-card {
    min-height: 712px;
  }

  .calendar-iframe {
    min-height: 700px;
  }

  .public-shell,
  .admin-shell {
    display: block;
  }

  .public-intro {
    min-height: auto;
    padding: 28px 24px;
    border-right: 0;
  }

  .booking-panel {
    width: calc(100% - 32px);
    margin: 16px auto;
  }

  .sidebar {
    height: auto;
    position: relative;
    width: auto;
  }

  .admin-main {
    margin-left: 0;
  }

  .metric-grid,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-title {
    flex: 1 1 auto;
    width: 100%;
  }

  .dashboard-title h1 {
    white-space: normal;
  }

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

  .filter-search {
    grid-column: 1 / -1;
  }

  .filters-head {
    align-items: flex-start;
    flex-direction: row;
  }

  .calendar-status-head,
  .topline {
    align-items: stretch;
    flex-direction: column;
  }

  .topline-actions,
  .state-actions,
  .final-management-box,
  .final-management-form {
    justify-content: flex-start;
    width: 100%;
  }

  .utp-status-strip,
  .academic-route-cards {
    grid-template-columns: 1fr;
  }

  .slots.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-head {
    align-items: stretch;
    flex-direction: column;
  }

  .brand img {
    width: 72px;
  }
}

@media (max-width: 560px) {
  .calendar-public-shell {
    padding: 10px 14px 14px;
  }

  .calendar-public-header {
    align-items: flex-start;
    min-height: 34px;
  }

  .calendar-public-brand img {
    width: 70px;
  }

  .calendar-hero-copy h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .pending-summary ul {
    columns: 1;
  }

  .academic-route-options {
    grid-template-columns: 1fr;
  }

  .utp-interview-options {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .utp-interview-options span {
    text-align: left;
  }

  .calendar-hero-copy::before {
    width: 280px;
    left: -32px;
    opacity: .10;
  }

  .calendar-frame-card {
    min-height: 760px;
    padding: 6px;
  }

  .calendar-iframe {
    min-height: 748px;
  }

  .public-copy h1 {
    font-size: 36px;
  }

  .public-copy p {
    font-size: 16px;
  }

  .booking-panel {
    padding: 18px;
  }

  .booking-steps {
    grid-template-columns: 1fr;
  }

  .slots.compact {
    grid-template-columns: 1fr;
  }

  .slot-day-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  body,
  .ficha-page {
    background: var(--white);
    padding: 0;
    font-size: 9px;
  }

  .ficha-toolbar,
  .sidebar,
  .topline,
  .no-print,
  .ficha-form > .notice,
  .pending-summary {
    display: none !important;
  }

  .ficha-sheet {
    width: 100%;
    margin: 0;
    box-shadow: none;
    padding: 0;
    zoom: .82;
  }

  .ficha-header {
    grid-template-columns: 118px 1fr auto;
    gap: 10px;
    padding: 0 0 5px;
    border-bottom-width: 3px;
  }

  .ficha-header img {
    width: 104px;
  }

  .ficha-header strong {
    font-size: 13px;
  }

  .ficha-header > span {
    font-size: 9px;
  }

  .ficha-title h1 {
    font-size: 21px;
    margin: 0;
  }

  .ficha-title {
    margin: 6px 0 6px;
  }

  .ficha-title small {
    font-size: 9px;
  }

  .ficha-section-title {
    grid-template-columns: 30px 1fr;
    margin-top: 5px;
    font-size: 10px;
  }

  .ficha-section-title span:first-child,
  .ficha-section-title span:last-child {
    padding: 4px 6px;
  }

  .ficha-table th,
  .ficha-table td {
    padding: 3px 4px;
    font-size: 8.8px;
    line-height: 1.2;
  }

  .ficha-static {
    min-height: 14px;
    padding-top: 1px;
  }

  .ficha-line,
  .ficha-textarea,
  .ficha-auto-value,
  .ficha-auto-note {
    min-height: 15px;
    padding: 1px 2px;
    border-bottom-color: #8798ad;
    background: transparent !important;
    color: #21344f;
    font-size: 8.8px;
    line-height: 1.2;
    resize: none;
  }

  .ficha-textarea {
    min-height: 28px;
  }

  .ficha-textarea.compact {
    min-height: 20px;
  }

  .ficha-auto-note {
    min-height: 31px;
  }

  .ficha-box-label {
    min-height: 16px;
    gap: 4px;
  }

  .ficha-check {
    width: 11px;
    height: 11px;
    accent-color: var(--navy);
  }

  .auto-utp-row td:first-child::after {
    content: "";
  }

  .utp-interview-options {
    grid-template-columns: minmax(130px, 1fr) auto auto;
    gap: 8px;
  }

  .academic-route-options {
    gap: 4px;
  }

  .final-status div {
    padding: 4px;
    font-size: 10px;
  }

  .final-resolution-note {
    padding: 4px;
    font-size: 10px;
  }

  .stamp-box {
    width: 58px;
    margin-top: 3px;
    font-size: 6.8px;
  }

  .control-note {
    margin-top: 5px;
    font-size: 8.8px;
  }

  @page {
    size: A4 portrait;
    margin: 7mm;
  }
}
